:root {
  --primary: #0d6efd;
  --primary-dark: #0a4db8;
  --teal: #1eb7a6;
  --green: #22a06b;
  --warning: #f4b740;
  --danger: #dc3545;
  --ink: #1b2432;
  --muted: #687385;
  --bg: #f4f7fb;
  --card: #ffffff;
  --line: #dfe7f1;
  --soft-green: #dcf8ea;
  --soft-warning: #fff3d1;
  --soft-red: #ffe3e7;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--ink);
}

body {
  line-height: 1.5;
}

button, input, textarea {
  font: inherit;
}

.app-shell {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: linear-gradient(180deg, #edf4ff 0%, var(--bg) 110px, var(--bg) 100%);
}

.app-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  padding: 18px 20px 22px;
  border-bottom-left-radius: 28px;
  border-bottom-right-radius: 28px;
}

.app-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.brand {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255,255,255,0.16);
  font-size: 0.78rem;
  font-weight: 700;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(34,160,107,0.2);
}

.app-header .subtitle {
  margin: 16px 0 0;
  font-size: 0.92rem;
  opacity: 0.9;
}

.page {
  padding: 18px 18px 40px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(18, 38, 63, 0.06);
  padding: 18px;
  margin-bottom: 16px;
}

.summary-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.metric {
  background: linear-gradient(180deg, #f8fbff, #eef5ff);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
}

.metric-label {
  display: block;
  font-size: 0.74rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.metric-value {
  display: block;
  font-size: 1.6rem;
  font-weight: 700;
  margin-top: 6px;
}

.employee-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.employee-meta h2 {
  margin: 0;
  font-size: 1.24rem;
}

.employee-meta p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--primary));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.primary-btn, .secondary-btn, .ghost-btn {
  border: none;
  border-radius: 14px;
  padding: 16px 18px;
  font-weight: 800;
  font-size: 1.05rem;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 6px 12px rgba(17, 33, 52, 0.08);
}

.primary-btn:active, .secondary-btn:active, .ghost-btn:active {
  transform: translateY(1px);
}

.primary-btn {
  background: linear-gradient(135deg, var(--green), #189a68);
  color: white;
  width: 100%;
}

.secondary-btn {
  background: linear-gradient(135deg, var(--warning), #ef9d11);
  color: #2f2500;
  width: 100%;
}

.ghost-btn {
  background: #eef3ff;
  color: var(--primary-dark);
  width: 100%;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-head h3 {
  margin: 0;
  font-size: 1.02rem;
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 12px;
  background: #f9fbff;
  border: 2px solid var(--line);
  border-radius: 14px;
  min-height: 70px;
}

.task-item input[type="checkbox"] {
  width: 24px;
  height: 24px;
  margin-top: 2px;
  accent-color: var(--green);
  flex-shrink: 0;
}

.task-copy {
  flex: 1;
}

.task-copy strong {
  display: block;
  font-size: 1rem;
  font-weight: 800;
}

.task-copy small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.35;
}

.task-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 90px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border: 1px solid transparent;
  flex-shrink: 0;
}

.task-status.done {
  background: var(--soft-green);
  color: #0d6b49;
  border-color: #cfeed9;
}

.task-status.warning {
  background: #fff3d1;
  color: #8a5b00;
  border-color: #f7d98d;
}

.task-status.critical {
  background: #ffe3e7;
  color: #9b1c2c;
  border-color: #f2b4c1;
}

.task-status.normal {
  background: #eef4ff;
  color: #2249a4;
  border-color: #d4e1ff;
}

.task-item.completed {
  background: var(--soft-green);
  border-color: #cfeed9;
}

.task-item.warning {
  background: #fffaf0;
  border-color: #f7d98d;
}

.task-item.critical {
  background: #fff3f5;
  border-color: #f2b4c1;
}

.task-item.missed {
  background: var(--soft-red);
  border-color: #f4c3cd;
}

.note-box {
  width: 100%;
  min-height: 90px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: #fbfcff;
  resize: vertical;
}

.shift-summary {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.summary-line:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.75rem;
  font-weight: 700;
}

.badge.good {
  background: var(--soft-green);
  color: #0d6e4d;
}

.badge.warn {
  background: var(--soft-warning);
  color: #8c6600;
}

.badge.alert {
  background: var(--soft-red);
  color: #aa1e38;
}

.employee-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.employee-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  background: #f8fbff;
  border-radius: 14px;
  padding: 12px 14px;
}

.employee-row strong {
  display: block;
}

.employee-row small {
  color: var(--muted);
}

.progress-bar {
  width: 100%;
  height: 10px;
  background: #ebf0f7;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 8px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--teal));
  border-radius: inherit;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.timeline li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.timeline-time {
  min-width: 78px;
  font-weight: 700;
  color: var(--muted);
}

.timeline-dot {
  width: 10px;
  height: 10px;
  background: var(--primary);
  border-radius: 50%;
  margin-top: 6px;
}

.timeline-copy {
  flex: 1;
  border-left: 2px solid #dfe7f1;
  padding-left: 12px;
}

.timeline-copy strong { display: block; }

.timeline-copy span { color: var(--muted); font-size: 0.82rem; }

.muted {
  color: var(--muted);
}

@media (min-width: 720px) {
  .app-shell {
    max-width: 900px;
    padding: 20px;
  }

  .employee-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 20px;
  }

  .page {
    padding-top: 28px;
  }
}
