:root {
  --bg: #eef3f8;
  --card: #ffffff;
  --text: #10213a;
  --muted: #6b7280;
  --border: #dce6f3;
  --primary: #0f766e;
  --footer-bg: #1d4ed8;
  --green: #22c55e;
  --orange: #f59e0b;
  --red: #ef4444;
  --purple: #0f766e;
  --hod-active: #16a34a;
  --owner-active: #ea580c;
  --hr-purple: #115e59;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(21, 42, 78, 0.12);
  --phone-w: 390px;
  --phone-h: 844px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: 'Roboto', system-ui, -apple-system, sans-serif;
  background: #1e293b;
  color: var(--text);
}

a, button { cursor: pointer; font-family: inherit; }
button { border: none; background: none; }

/* Desktop wrapper */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px 32px;
  gap: 16px;
}

.prototype-banner {
  color: #94a3b8;
  font-size: 13px;
  text-align: center;
  max-width: 420px;
}

.phone-frame {
  width: var(--phone-w);
  height: var(--phone-h);
  max-height: 90vh;
  background: linear-gradient(180deg, #f7fbff 0%, var(--bg) 100%);
  border-radius: 36px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  border: 8px solid #111827;
  position: relative;
  display: flex;
  flex-direction: column;
}

.status-bar {
  height: 44px;
  padding: 12px 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
  background: var(--bg);
}

.status-icons { display: flex; gap: 6px; font-size: 12px; }

.screen-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 0 16px 148px;
}

.screen-content.no-nav { padding-bottom: 100px; }
.screen-content.nav-hidden-only { padding-bottom: 108px; }

.page { display: none; min-height: 100%; }
.page.active { display: block; }

/* Header */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 8px 0 16px;
}

.page-header h1 { font-size: 22px; font-weight: 700; line-height: 1.2; }
.page-header .subtitle { font-size: 13px; color: var(--muted); margin-top: 4px; }

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--card);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  position: relative;
}

.icon-btn .dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 50%;
  border: 2px solid var(--card);
}

.back-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  margin-bottom: 8px;
}

.back-header button {
  font-size: 22px;
  color: var(--text);
  padding: 4px;
}

.back-header h2 { font-size: 18px; font-weight: 600; }

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 16px 0 10px;
  font-size: 15px;
  font-weight: 700;
}

.link-btn { color: var(--primary); font-size: 13px; font-weight: 500; }

/* Cards */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 4px;
}

.stat-chip {
  padding: 12px 6px;
  text-align: center;
}

.stat-chip .num { font-size: 20px; font-weight: 700; }
.stat-chip .lbl { font-size: 10px; color: var(--muted); margin-top: 4px; }

.stat-chip.pending .num { color: var(--red); }
.stat-chip.progress .num { color: var(--orange); }
.stat-chip.done .num { color: var(--green); }
.stat-chip.delayed .num { color: var(--red); }

.task-card {
  padding: 14px;
  margin-bottom: 10px;
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 10px;
  align-items: start;
  width: 100%;
}

.task-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #eff6ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.task-card h4 { font-size: 14px; font-weight: 600; }
.task-card p { font-size: 12px; color: var(--muted); margin-top: 2px; }
.task-meta { text-align: right; font-size: 11px; color: var(--muted); }
.task-meta .time { color: var(--red); font-weight: 500; }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
  margin-top: 6px;
}

.badge.delayed { background: #fee2e2; color: var(--red); }
.badge.progress { background: #ffedd5; color: #c2410c; }
.badge.pending { background: #dbeafe; color: var(--primary); }
.badge.high { background: #fee2e2; color: var(--red); }
.badge.medium { background: #ffedd5; color: #c2410c; }
.badge.low { background: #dcfce7; color: #15803d; }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.metric-card {
  padding: 14px;
  min-height: 110px;
}

.metric-card .icon { font-size: 22px; margin-bottom: 8px; }
.metric-card h5 { font-size: 12px; font-weight: 600; margin-bottom: 8px; }
.metric-card .value { font-size: 15px; font-weight: 700; }
.metric-card .sub { font-size: 11px; color: var(--muted); margin-top: 4px; }
.metric-card .sub span.green { color: var(--green); }
.metric-card .sub span.orange { color: var(--orange); }
.metric-card .sub span.red { color: var(--red); }

/* Owner */
.overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.overview-card {
  padding: 14px;
}

.overview-card .label { font-size: 11px; color: var(--muted); }
.overview-card .val { font-size: 22px; font-weight: 700; margin: 6px 0; }
.overview-card .trend { font-size: 11px; }
.overview-card .trend.up { color: var(--green); }
.overview-card .trend.down { color: var(--green); }
.overview-card .trend.bad { color: var(--red); }

.dept-performance-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 4px;
}

.dept-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 0;
  text-align: left;
  box-sizing: border-box;
}

.grid-2 .metric-card--full {
  grid-column: 1 / -1;
  width: 100%;
}

.dept-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.dept-bar-wrap { flex: 1; min-width: 0; width: 100%; }
.dept-bar-wrap .name { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.dept-bar {
  height: 6px;
  background: #e5e7eb;
  border-radius: 3px;
  overflow: hidden;
}

.dept-bar span {
  display: block;
  height: 100%;
  border-radius: 3px;
}

.dept-rating { font-size: 13px; font-weight: 600; white-space: nowrap; }

.insight-card {
  padding: 14px;
  margin-bottom: 10px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.insight-card .ic { font-size: 22px; flex-shrink: 0; }
.insight-card p { font-size: 13px; line-height: 1.4; flex: 1; }
.insight-card .arrow { font-size: 18px; }

/* Staff */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: #dcfce7;
  color: #15803d;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 8px;
}

.status-pill .dot { width: 8px; height: 8px; background: var(--green); border-radius: 50%; }

.btn-primary {
  background: linear-gradient(135deg, #0f766e, #0b5a95);
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
}

.staff-task-card {
  width: 100%;
  display: block;
  text-align: left;
  padding: 14px;
  margin-bottom: 10px;
}
.staff-task-card .top { display: flex; gap: 10px; }
.staff-task-card .actions {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.staff-task-card .actions .btn-primary {
  margin-left: 0;
}

/* Staff home — light dashboard layout */
.staff-home-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 8px 0 16px;
}

.staff-home-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.staff-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2dd4bf, #0f766e);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.25);
}

.staff-home-greeting {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

.staff-home-role {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.staff-home-role .sep { opacity: 0.5; }

.staff-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #15803d;
  font-weight: 600;
}

.staff-status .dot {
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
}

/* Active task cards */
.staff-active-task {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
}

.staff-active-task__left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 36px;
}

.staff-active-task__icon { font-size: 18px; line-height: 1; }

.staff-active-task__room {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}

.staff-active-task__body {
  flex: 1;
  min-width: 0;
}

.staff-active-task__body h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.staff-active-task__meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.staff-active-task__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.priority-pill {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 20px;
  text-transform: uppercase;
}

.priority-pill.high {
  background: #fee2e2;
  color: #dc2626;
}

.priority-pill.medium {
  background: #ffedd5;
  color: #ea580c;
}

.btn-task-accept {
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #fff;
  background: linear-gradient(135deg, #0f766e, #0d9488);
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.3);
}

.btn-task-start {
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #fff;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

/* Performance today cards */
.staff-perf-grid {
  margin-bottom: 4px;
}

.staff-perf-card {
  padding: 14px;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--border);
}

.staff-perf-card .lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.staff-perf-value-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 6px 0 8px;
}

.staff-perf-card .value {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
}

.staff-perf-card .trend {
  font-size: 12px;
  font-weight: 700;
}

.staff-perf-card .trend.up { color: var(--green); }

.staff-perf-bar {
  height: 4px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
}

.staff-perf-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #0f766e, #2dd4bf);
  border-radius: 4px;
}

.staff-stars {
  font-size: 14px;
  color: #f59e0b;
  letter-spacing: 1px;
  margin-top: 4px;
}

/* Badges */
.staff-badges-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 12px;
}

.staff-badges-row--wrap {
  flex-wrap: wrap;
  overflow-x: visible;
}

.staff-badge-item {
  flex: 0 0 auto;
  min-width: 72px;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 8px;
  box-shadow: var(--shadow);
}

.staff-badge-item .badge-icon {
  font-size: 22px;
  display: block;
}

.staff-badge-item small {
  display: block;
  margin-top: 6px;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
}

/* AI recommendation cards */
.staff-ai-card {
  width: 100%;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px;
  margin-bottom: 10px;
  text-align: left;
  background: linear-gradient(135deg, #f0fdfa, #f0fdfa);
  border: 1px solid #99f6e4;
}

.staff-ai-card__icon {
  font-size: 22px;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(15, 118, 110, 0.1);
}

.staff-ai-card__body {
  flex: 1;
  min-width: 0;
}

.staff-ai-card__body h4 {
  font-size: 13px;
  font-weight: 700;
  color: #115e59;
}

.staff-ai-card__body p {
  font-size: 12px;
  color: #6b7280;
  margin-top: 3px;
  line-height: 1.4;
}

.staff-ai-card__arrow {
  font-size: 18px;
  color: #0f766e;
  flex-shrink: 0;
}

/* Rewards page */
.staff-rewards-hero {
  padding: 20px;
  text-align: center;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1px solid #fcd34d;
  margin-bottom: 12px;
}

.staff-rewards-xp {
  font-size: 28px;
  font-weight: 800;
  color: #92400e;
}

.staff-rewards-hero p {
  font-size: 13px;
  color: #b45309;
  margin-top: 4px;
  font-weight: 600;
}

/* Staff footer — light theme with teal active */
.footer-nav.footer-nav--staff {
  background: #fff;
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(21, 42, 78, 0.08);
}

.footer-nav.footer-nav--staff .footer-item {
  color: var(--muted);
}

.footer-nav.footer-nav--staff .footer-item.active {
  color: var(--purple);
}

.footer-nav.footer-nav--staff .footer-item.active .footer-ic {
  background: #ecfdf5;
  border-radius: 12px;
  padding: 4px 10px;
}

.phone-frame:has(.footer-nav--staff) .scroll-to-top {
  background: var(--purple);
}

/* Staff dashboard — manager-style live tasks (tasks tab) */
.staff-live-task {
  width: 100%;
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 10px 12px;
  align-items: start;
  padding: 14px;
  margin-bottom: 10px;
  text-align: left;
}

.staff-live-task .task-body h4 {
  font-size: 14px;
  font-weight: 600;
}

.staff-live-task .task-body p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.staff-live-task .task-guest {
  font-size: 11px;
  margin-top: 4px;
}

.staff-live-task .task-body .badge {
  margin-top: 8px;
}

.staff-live-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.btn-outline {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.btn-accept {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary));
}

.staff-metrics-grid {
  margin-top: 12px;
}

.staff-score-card {
  padding: 14px;
  text-align: left;
  background: linear-gradient(135deg, #115e59, #0f766e);
  color: #fff;
  border: none;
}

.staff-score-card--rating {
  background: linear-gradient(135deg, #0f766e, #1d4ed8);
}

.staff-score-card .lbl {
  font-size: 11px;
  opacity: 0.9;
}

.staff-score-card .value {
  font-size: 22px;
  font-weight: 800;
  margin: 6px 0;
}

.staff-score-card .value span {
  font-size: 14px;
  font-weight: 600;
  opacity: 0.85;
}

.staff-score-card .sub {
  font-size: 11px;
  opacity: 0.9;
}

.staff-insight-card {
  width: 100%;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px;
  margin-bottom: 12px;
  text-align: left;
  background: linear-gradient(135deg, #ecfdf5, #ccfbf1);
  border-color: #99f6e4;
}

.staff-insight-card .ic {
  font-size: 24px;
  flex-shrink: 0;
}

.staff-insight-card p {
  flex: 1;
  font-size: 13px;
  line-height: 1.5;
  color: #134e4a;
}

.staff-insight-card .arrow {
  font-size: 18px;
  color: #0f766e;
}

.review-quote { font-size: 13px; font-weight: 600; font-style: italic; margin: 6px 0; }

.profile-chevron { float: right; color: var(--muted); font-size: 18px; }

/* HR */
.purple-banner {
  background: linear-gradient(135deg, #115e59, #0f766e);
  color: #fff;
  padding: 18px;
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.purple-banner .top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  font-weight: 600;
}

.purple-banner .stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  text-align: center;
}

.purple-banner .stats .num { font-size: 32px; font-weight: 700; }
.purple-banner .stats .lbl { font-size: 12px; opacity: 0.85; margin-top: 4px; }

.emp-row {
  display: grid;
  grid-template-columns: 44px 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  margin-bottom: 8px;
  width: 100%;
}

.emp-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #99f6e4, #14b8a6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}

.emp-row h4 { font-size: 14px; }
.emp-row .dept { font-size: 11px; color: var(--muted); }
.emp-rating { color: var(--green); font-size: 13px; font-weight: 600; }
.emp-pct { font-size: 15px; font-weight: 700; }
.emp-footer { grid-column: 2 / -1; font-size: 11px; color: var(--muted); margin-top: -4px; }

.analytics-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.analytics-row .card { padding: 12px 8px; text-align: center; }
.analytics-row .val { font-size: 18px; font-weight: 700; margin-top: 6px; }
.analytics-row .lbl { font-size: 9px; color: var(--muted); margin-top: 4px; }

.training-card {
  background: #ecfdf5;
  padding: 16px;
  border-radius: var(--radius);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}

.training-card h5 { font-size: 14px; font-weight: 700; }
.training-card p { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* Bottom nav */
/* App footer: drawer bar + bottom nav */
.app-footer-stack {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  background: transparent;
  border-top: none;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

.footer-nav {
  height: 72px;
  background: var(--footer-bg);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding-bottom: 6px;
}

.footer-item {
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  min-width: 56px;
  opacity: 0.9;
}

.footer-ic {
  font-size: 22px;
  line-height: 1;
  font-weight: 700;
}

.footer-item.active {
  opacity: 1;
  font-weight: 700;
}

.scroll-to-top {
  position: absolute;
  right: 18px;
  bottom: 98px; /* above footer bar */
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--footer-bg);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  z-index: 30;
}

.app-drawer-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  background: linear-gradient(180deg, #f8fafc, #fff);
  border-bottom: 1px solid var(--border);
  width: 100%;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}

.app-drawer-bar .grid-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.bottom-nav {
  height: 64px;
  background: var(--card);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding-bottom: 6px;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--muted);
  padding: 6px 8px;
  min-width: 56px;
}

.nav-item .ic { font-size: 20px; }
.nav-item.active { font-weight: 600; }
.nav-item.active.owner { color: var(--owner-active); }
.nav-item.active.hod { color: var(--hod-active); }
.nav-item.active.staff { color: var(--primary); }
.nav-item.active.hr { color: var(--primary); }

/* Role selector */
.role-select { padding: 24px 16px; }
.role-select h1 { font-size: 24px; text-align: center; margin-bottom: 8px; }
.role-select .sub { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 28px; }

.role-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  margin-bottom: 12px;
  text-align: left;
  width: 100%;
}

.role-card .emoji { font-size: 32px; }
.role-card h3 { font-size: 16px; font-weight: 700; }
.role-card p { font-size: 12px; color: var(--muted); margin-top: 4px; }
.role-card .arrow { margin-left: auto; color: var(--muted); font-size: 20px; }

/* Landing + login */
.landing-hero {
  background: linear-gradient(135deg, #0f766e 0%, #1d4ed8 100%);
  color: #fff;
  padding: 22px 16px 18px;
  border-radius: var(--radius);
  margin: 0 0 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.landing-title {
  font-size: 26px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 6px;
}

.landing-tag {
  text-align: center;
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  margin-bottom: 14px;
}

.landing-context {
  background: rgba(0, 0, 0, 0.12);
  border-radius: 16px;
  padding: 16px;
}

.landing-q {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 8px;
  text-align: center;
}

.landing-p {
  font-size: 13px;
  line-height: 1.6;
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.92);
  text-align: left;
}

.landing-guidelines {
  margin: 12px 0 0;
  padding-left: 18px;
  color: rgba(255, 255, 255, 0.95);
  font-size: 13px;
  line-height: 1.6;
}

.landing-guidelines li {
  margin-bottom: 6px;
}

.landing-links {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 16px;
}

.landing-link-btn {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  border-radius: 12px;
  padding: 12px 10px;
  font-size: 12px;
  font-weight: 700;
}

.loading-screen {
  margin-top: 24px;
  padding: 30px 20px;
  text-align: center;
}

.loading-logo {
  width: 84px;
  height: 84px;
  margin: 0 auto 12px;
  border-radius: 24px;
  background: linear-gradient(135deg, #0f766e, #1d4ed8);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
}

.loading-screen h1 {
  font-size: 24px;
  margin-bottom: 4px;
}

.loading-screen p {
  color: var(--muted);
  margin-bottom: 14px;
}

.loading-bar {
  width: 100%;
  height: 8px;
  background: #d8e4f5;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 8px;
}

.loading-bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #0f766e, #1d4ed8);
  animation: loadingProgress 1.2s ease-in-out forwards;
}

@keyframes loadingProgress {
  from { width: 0%; }
  to { width: 100%; }
}

.landing-copyright {
  margin-top: 14px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.92);
  text-align: center;
}

.login-card {
  padding: 16px;
  margin-top: 0;
}

.login-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text);
}

.login-subtitle {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.form-group label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 14px;
  background: #fff;
}

.checkbox-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--text);
  font-weight: 600;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
}

.login-submit {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 15px;
}

.login-error {
  margin-top: 10px;
  color: var(--red);
  font-weight: 700;
  min-height: 18px;
  font-size: 13px;
}

.login-hints {
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.login-hints code {
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 8px;
  font-weight: 700;
}

/* Detail pages */
.detail-hero {
  padding: 20px;
  text-align: center;
  margin-bottom: 16px;
}

.detail-hero .big { font-size: 36px; font-weight: 700; }
.detail-hero .label { color: var(--muted); font-size: 13px; margin-top: 4px; }

.info-list { padding: 0 14px; }
.info-row {
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.info-row:last-child { border-bottom: none; }
.info-row span:last-child { color: var(--muted); font-weight: 500; }

.filter-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 0 12px;
  margin-bottom: 8px;
}

.filter-tab {
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--muted);
}

.filter-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.filter-tab.active.hod-pending { background: #fee2e2; color: var(--red); border-color: #fecaca; }
.filter-tab.active.hod-progress { background: #ffedd5; color: #c2410c; border-color: #fed7aa; }
.filter-tab.active.hod-done { background: #dcfce7; color: #15803d; border-color: #bbf7d0; }

.notif-item {
  padding: 14px;
  margin-bottom: 8px;
  display: flex;
  gap: 12px;
}

.notif-item.unread { border-left: 3px solid var(--primary); }

.flow-map {
  padding: 16px;
  font-size: 12px;
  line-height: 1.6;
}

.flow-map h3 { font-size: 14px; margin: 16px 0 8px; color: var(--purple); }
.flow-map ul { padding-left: 18px; color: var(--muted); }
.flow-map li { margin-bottom: 4px; }
.flow-map a { color: var(--primary); text-decoration: none; }

.screen-label {
  position: absolute;
  bottom: 118px;
  left: 50%;
  transform: translateX(-50%);
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 4px 12px;
  border-radius: 12px;
  z-index: 5;
  pointer-events: none;
}

.screen-label.hr { background: #ecfdf5; color: var(--hr-purple); }
.screen-label.owner { background: #ffedd5; color: #c2410c; }
.screen-label.hod { background: #dcfce7; color: #15803d; }

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}

.empty-state .icon { font-size: 48px; margin-bottom: 12px; }

.list-item {
  padding: 14px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.list-item h4 { font-size: 14px; text-align: left; }
.list-item p { font-size: 12px; color: var(--muted); margin-top: 2px; }

.cta-bar {
  padding: 16px;
  position: sticky;
  bottom: 0;
  background: var(--bg);
}

.cta-bar .btn-primary {
  width: 100%;
  padding: 14px;
  font-size: 15px;
  border-radius: 12px;
}

.chip-role {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  background: #f3f4f6;
  color: var(--muted);
  margin-left: 8px;
}

/* Request actions (staff) */
.request-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.request-actions .btn-action {
  padding: 14px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  border: 2px solid transparent;
}

.btn-action.accept { background: #22c55e; color: #fff; grid-column: 1 / -1; }
.btn-action.pass { background: #eff6ff; color: var(--primary); border-color: #bfdbfe; }
.btn-action.pause { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.btn-action.reject { background: #fef2f2; color: var(--red); border-color: #fecaca; }

.request-card {
  padding: 18px;
  margin-bottom: 12px;
}

.request-card .room-title { font-size: 20px; font-weight: 700; }
.request-card .meta { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* Active task timer */
.timer-panel {
  padding: 24px 16px;
  text-align: center;
  margin-bottom: 12px;
}

.timer-ring-wrap {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 0 auto 16px;
}

.timer-ring-wrap svg { transform: rotate(-90deg); width: 100%; height: 100%; }

.timer-ring-bg { fill: none; stroke: #e5e7eb; stroke-width: 10; }
.timer-ring-progress {
  fill: none;
  stroke: var(--primary);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 283;
  stroke-dashoffset: 283;
  transition: stroke-dashoffset 0.3s ease;
}

.timer-ring-wrap.overdue .timer-ring-progress { stroke: var(--red); }
.timer-ring-wrap.warning .timer-ring-progress { stroke: var(--orange); }

.timer-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.timer-center .elapsed { font-size: 32px; font-weight: 700; font-variant-numeric: tabular-nums; }
.timer-center .lbl { font-size: 11px; color: var(--muted); margin-top: 2px; }

.timer-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.timer-stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 8px;
  text-align: center;
}

.timer-stat .val { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.timer-stat .lbl { font-size: 10px; color: var(--muted); margin-top: 4px; }

.progress-track {
  height: 10px;
  background: #e5e7eb;
  border-radius: 5px;
  overflow: hidden;
  margin: 12px 0;
}

.progress-track .fill {
  height: 100%;
  background: var(--primary);
  border-radius: 5px;
  width: 0%;
  transition: width 0.3s ease;
}

.progress-track.overdue .fill { background: var(--red); }
.progress-track.warning .fill { background: var(--orange); }

.service-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.service-actions .btn-pause-toggle {
  background: #fff7ed;
  color: #c2410c;
  padding: 12px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13px;
}

.service-actions .btn-complete {
  background: #22c55e;
  color: #fff;
  padding: 12px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13px;
  grid-column: 1 / -1;
}

.status-banner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
}

.status-banner.running { background: #dbeafe; color: #1d4ed8; }
.status-banner .pulse { animation: pulse 1.5s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.status-banner.paused { background: #ffedd5; color: #c2410c; }
.status-banner.overdue { background: #fee2e2; color: #b91c1c; }

/* App drawer sheet */
.app-drawer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.app-drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.app-drawer-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 75%;
  background: var(--card);
  border-radius: 20px 20px 0 0;
  z-index: 101;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom, 12px);
}

.app-drawer-sheet.open { transform: translateY(0); }

.app-drawer-handle {
  width: 40px;
  height: 4px;
  background: #d1d5db;
  border-radius: 2px;
  margin: 10px auto 8px;
}

.app-drawer-head {
  padding: 0 20px 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.app-drawer-head h3 { font-size: 18px; }
.app-drawer-head p { font-size: 12px; color: var(--muted); }

.app-drawer-close {
  font-size: 24px;
  color: var(--muted);
  padding: 4px 8px;
}

.app-drawer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 8px 16px 20px;
  overflow-y: auto;
}

.drawer-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 8px;
  background: var(--bg);
  border-radius: 14px;
  border: 1px solid var(--border);
  text-align: center;
}

.drawer-tile-icon { font-size: 24px; }
.drawer-tile-label { font-size: 11px; font-weight: 600; color: var(--text); line-height: 1.2; }

body.drawer-open .screen-content { overflow: hidden; }

@media (max-width: 420px) {
  .app-shell { padding: 0; }
  .prototype-banner { display: none; }
  .phone-frame {
    width: 100%;
    height: 100vh;
    max-height: none;
    border-radius: 0;
    border: none;
  }
}

/* ========== Dark theme (in-app) ========== */
.phone-frame.theme-dark {
  --bg: #0f1423;
  --card: #1a2235;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --border: #2d3748;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  background: linear-gradient(180deg, #12182b 0%, var(--bg) 100%);
}

.phone-frame.theme-dark .status-bar { background: #12182b; color: #f1f5f9; }
.phone-frame.theme-dark .form-group input,
.phone-frame.theme-dark .form-group select,
.phone-frame.theme-dark .form-group textarea,
.phone-frame.theme-dark .settings-row input,
.phone-frame.theme-dark .settings-row select { background: #0f1423; color: var(--text); border-color: var(--border); }
.phone-frame.theme-dark .icon-btn { background: var(--card); color: var(--text); }
.phone-frame.theme-dark .staff-perf-card,
.phone-frame.theme-dark .staff-ai-card { background: var(--card); border-color: var(--border); }
.phone-frame.theme-dark .staff-ai-card { background: linear-gradient(135deg, #134e4a, #1a2235); }
.phone-frame.theme-dark .staff-ai-card__body h4 { color: #99f6e4; }
.phone-frame.theme-dark .staff-ai-card__icon { background: #0f1423; }
.phone-frame.theme-dark .footer-nav.footer-nav--staff { background: #12182b; border-color: var(--border); }
.phone-frame.theme-dark .footer-nav.footer-nav--staff .footer-item.active { color: #fbbf24; }
.phone-frame.theme-dark .footer-nav.footer-nav--staff .footer-item.active .footer-ic { background: rgba(251, 191, 36, 0.15); }
.phone-frame.theme-dark .portfolio-stat-card { background: var(--card); border-color: var(--border); }
.phone-frame.theme-dark .portfolio-hero { background: linear-gradient(135deg, #1a2235, #12182b); border-color: #134e4a; }
.phone-frame.theme-dark .platinum-badge { background: rgba(15, 118, 110, 0.25); color: #99f6e4; }
.phone-frame.theme-dark .nutcracker-shield { background: linear-gradient(135deg, #422006, #78350f); border-color: #fbbf24; }
.phone-frame.theme-dark .trophy-item { background: var(--card); border-color: var(--border); }
.phone-frame.theme-dark .leaderboard-podium { background: var(--card); }
.phone-frame.theme-dark .leaderboard-row { background: var(--card); border-color: var(--border); }
.phone-frame.theme-dark .settings-group { background: var(--card); }
.phone-frame.theme-dark .theme-toggle button { background: #0f1423; color: var(--muted); border-color: var(--border); }
.phone-frame.theme-dark .theme-toggle button.active { background: #0f766e; color: #fff; border-color: #0f766e; }

/* ========== Achievement portfolio ========== */
.portfolio-eyebrow {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 4px 0 12px;
  line-height: 1.4;
}

.portfolio-hero {
  padding: 16px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #f0fdfa, #fff);
  border: 1px solid #99f6e4;
}

.portfolio-hero__main {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: start;
}

.staff-avatar.large {
  width: 56px;
  height: 56px;
  font-size: 18px;
}

.portfolio-hero__main h1 {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
}

.portfolio-hero__main > div:nth-child(2) p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.platinum-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  background: #ccfbf1;
  color: #0d9488;
}

.nutcracker-shield {
  text-align: center;
  padding: 8px 10px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1px solid #fbbf24;
  min-width: 72px;
}

.nutcracker-shield .shield-icon { font-size: 20px; display: block; }
.nutcracker-shield .shield-lbl { font-size: 8px; font-weight: 700; color: #92400e; display: block; margin-top: 2px; }
.nutcracker-shield .shield-xp { font-size: 14px; font-weight: 800; color: #78350f; display: block; }

.level-progress { margin-top: 14px; }

.level-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
}

.level-hint {
  font-size: 11px;
  color: var(--purple);
  font-weight: 600;
  margin-top: 6px;
  text-align: center;
}

.portfolio-stats { margin-bottom: 12px; }

.portfolio-stat-card {
  padding: 12px;
  text-align: left;
  border: 1px solid var(--border);
}

.portfolio-stat-card .stat-val {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin-top: 4px;
}

.portfolio-stat-card .stat-val.green { color: var(--green); }
.portfolio-stat-card .stat-val.gold { color: #d97706; }

.portfolio-stat-card .stat-lbl {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
}

.portfolio-stat-card .stat-link {
  font-size: 10px;
  color: var(--purple);
  font-weight: 600;
  margin-top: 4px;
  display: inline-block;
}

.portfolio-stat-card .stat-stars {
  color: #f59e0b;
  font-size: 12px;
  margin-top: 4px;
}

.portfolio-tabs {
  display: flex;
  gap: 0;
  overflow-x: auto;
  border-bottom: 2px solid var(--border);
  margin-bottom: 12px;
}

.portfolio-tabs button {
  flex: 0 0 auto;
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
}

.portfolio-tabs button.active {
  color: var(--purple);
  border-bottom-color: var(--purple);
}

.portfolio-panel h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
}

.trophy-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.trophy-item {
  flex: 0 0 auto;
  min-width: 88px;
  text-align: center;
  padding: 12px 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.trophy-item .trophy-icon { font-size: 28px; display: block; }
.trophy-item .trophy-name { font-size: 9px; font-weight: 700; color: var(--text); margin-top: 6px; line-height: 1.3; }
.trophy-item .trophy-count { font-size: 10px; color: #d97706; font-weight: 700; margin-top: 2px; }

.portfolio-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--muted);
}

.portfolio-footer .btn-portfolio-profile {
  margin-left: auto;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #0f766e, #0d9488);
}

.portfolio-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ========== Leaderboard ========== */
.leaderboard-podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  padding: 20px 12px;
  margin-bottom: 12px;
  background: linear-gradient(180deg, #f0fdfa, var(--card));
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.podium-place { text-align: center; flex: 1; max-width: 100px; }

.podium-place .podium-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  margin: 0 auto 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.podium-place.first .podium-avatar { background: linear-gradient(135deg, #fbbf24, #d97706); width: 52px; height: 52px; font-size: 16px; }
.podium-place.second .podium-avatar { background: linear-gradient(135deg, #94a3b8, #64748b); }
.podium-place.third .podium-avatar { background: linear-gradient(135deg, #d97706, #92400e); }

.podium-place .podium-name { font-size: 11px; font-weight: 700; color: var(--text); }
.podium-place .podium-xp { font-size: 10px; color: var(--muted); margin-top: 2px; }

.podium-block { height: 40px; border-radius: 8px 8px 0 0; margin-top: 8px; }
.podium-place.first .podium-block { height: 64px; background: linear-gradient(180deg, #fbbf24, #d97706); }
.podium-place.second .podium-block { height: 48px; background: linear-gradient(180deg, #cbd5e1, #94a3b8); }
.podium-place.third .podium-block { height: 36px; background: linear-gradient(180deg, #fdba74, #ea580c); }

.leaderboard-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: left;
  width: 100%;
}

.leaderboard-row .rank { font-size: 14px; font-weight: 800; color: var(--muted); min-width: 20px; }
.leaderboard-row .lb-body { flex: 1; }
.leaderboard-row .lb-body h4 { font-size: 13px; font-weight: 700; }
.leaderboard-row .lb-body p { font-size: 11px; color: var(--muted); margin-top: 2px; }
.leaderboard-row .lb-xp { font-size: 13px; font-weight: 800; color: #d97706; }

.dept-competition {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: center;
  padding: 16px;
  margin-top: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.dept-competition .dept-side { text-align: center; }
.dept-competition .dept-name { font-size: 12px; font-weight: 700; }
.dept-competition .dept-xp { font-size: 16px; font-weight: 800; color: var(--text); margin-top: 4px; }
.dept-competition .dept-badge {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 9px;
  font-weight: 800;
  background: #dcfce7;
  color: #15803d;
}

.dept-competition .dept-trophy { font-size: 32px; }

/* ========== Task detail ========== */
.task-detail-card { padding: 16px; margin-bottom: 12px; }
.task-detail-card .task-detail-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.task-detail-card h3 { font-size: 16px; font-weight: 700; }
.task-detail-card .task-room { font-size: 13px; color: var(--muted); margin-top: 4px; }
.task-detail-card .task-requested { font-size: 11px; color: var(--muted); margin-top: 8px; }

.task-timeline { padding: 16px; margin-bottom: 12px; }
.task-timeline h4 { font-size: 13px; font-weight: 700; margin-bottom: 14px; }

.timeline-step {
  display: flex;
  gap: 12px;
  position: relative;
  padding-bottom: 16px;
}

.timeline-step:last-child { padding-bottom: 0; }
.timeline-step::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 24px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-step:last-child::before { display: none; }

.timeline-step .step-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  background: var(--border);
  color: var(--muted);
}

.timeline-step.done .step-dot { background: #2563eb; color: #fff; }
.timeline-step.current .step-dot { border: 2px solid #2563eb; background: var(--card); color: #2563eb; }
.timeline-step .step-body h5 { font-size: 13px; font-weight: 600; }
.timeline-step .step-body p { font-size: 11px; color: var(--muted); margin-top: 2px; }

.timeline-step.pending .step-dot {
  border: 2px dashed var(--border);
  background: transparent;
  color: var(--muted);
}

.timeline-step.pending .step-body h5 { color: var(--muted); }

.timeline-delta {
  font-size: 10px !important;
  font-weight: 700;
  color: var(--primary) !important;
  margin-top: 4px !important;
}

.task-feedback-card {
  padding: 16px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #fef3c7, #fff);
  border: 1px solid #fcd34d;
}

.task-feedback-card .rating-big { font-size: 22px; font-weight: 800; color: #92400e; }
.task-feedback-card .feedback-stars { color: #f59e0b; font-size: 14px; margin: 6px 0; }

.task-xp-reward {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1px solid #fbbf24;
  border-radius: var(--radius);
  margin-bottom: 12px;
}

.task-xp-reward .xp-coin { font-size: 28px; }
.task-xp-reward .xp-text { font-size: 18px; font-weight: 800; color: #78350f; }
.task-xp-reward .xp-sub { font-size: 11px; color: #92400e; margin-top: 2px; }

/* ========== Settings ========== */
.settings-section-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 16px 0 8px;
}

.settings-group { padding: 0; overflow: hidden; margin-bottom: 4px; }

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.settings-row:last-child { border-bottom: none; }
.settings-row.stack { flex-direction: column; align-items: stretch; }
.settings-row h4 { font-size: 14px; font-weight: 600; color: var(--text); }
.settings-row p { font-size: 11px; color: var(--muted); margin-top: 2px; }

.settings-row input,
.settings-row select {
  flex: 1;
  max-width: 180px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 13px;
  background: var(--bg);
  color: var(--text);
}

.settings-row.stack input,
.settings-row.stack select { max-width: none; width: 100%; margin-top: 8px; }

.theme-toggle {
  display: flex;
  gap: 4px;
  background: var(--bg);
  padding: 3px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.theme-toggle button {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  border: 1px solid transparent;
}

.theme-toggle button.active { background: var(--purple); color: #fff; }

.toggle-switch { position: relative; width: 44px; height: 24px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-switch .slider {
  position: absolute;
  inset: 0;
  background: #cbd5e1;
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.2s;
}

.toggle-switch .slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .slider { background: var(--purple); }
.toggle-switch input:checked + .slider::before { transform: translateX(20px); }

.settings-save-btn {
  width: 100%;
  padding: 14px;
  margin-top: 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #0f766e, #0d9488);
}

.ai-settings-note {
  font-size: 11px;
  color: var(--muted);
  padding: 10px 16px 14px;
  line-height: 1.5;
  border-top: 1px solid var(--border);
}
