/* ===========================================================
   校园通 (CampusConnect) — Android App Design System
   Human / approachable direction adapted for campus utility.
   Pixel 8 Pro frame (412 × 900).
   =========================================================== */

:root {
  /* palette — teal academic + warm highlights */
  --bg:      #f4f6f9;
  --surface: #ffffff;
  --fg:      #1a1c22;
  --muted:   #6b7280;
  --border:  #e5e7eb;
  --accent:  #0d9488;
  --accent-soft: #ccfbf1;
  --accent-warm:  #f59e0b;
  --danger:  #ef4444;
  --success: #10b981;
  --info:    #3b82f6;

  /* typography — Noto Sans SC for Chinese, system fallback */
  --font-display: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
  --font-body:    'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', 'SF Mono', ui-monospace, Menlo, monospace;

  --fs-h1: 22px;
  --fs-h2: 18px;
  --fs-h3: 16px;
  --fs-body: 14px;
  --fs-meta: 12px;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-pill: 999px;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0; height: 100%;
  background: #1a1c22;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: grid;
  place-items: center;
}

/* ─── Device frame: Pixel 8 Pro ─────────────────────────── */
.device {
  position: relative;
  width: 412px;
  height: 900px;
  border-radius: 44px;
  padding: 10px;
  background: linear-gradient(160deg, #1e1e20 0%, #0e0e10 50%, #08080a 100%);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04) inset,
    0 0 0 2px #000 inset,
    0 28px 60px -12px rgba(0,0,0,0.5),
    0 8px 20px -8px rgba(0,0,0,0.4);
  isolation: isolate;
}

/* power button */
.device::after {
  content: '';
  position: absolute;
  right: -3px; top: 180px;
  width: 4px; height: 70px;
  background: #0a0a0c;
  border-radius: 2px;
}
/* volume rocker */
.device::before {
  content: '';
  position: absolute;
  right: -3px; top: 265px;
  width: 4px; height: 110px;
  background: #0a0a0c;
  border-radius: 2px;
}

/* punch-hole camera */
.punch-hole {
  position: absolute;
  top: 24px; left: 50%;
  transform: translateX(-50%);
  width: 12px; height: 12px;
  background: #000;
  border-radius: 50%;
  z-index: 5;
}

/* ─── Screen surface ─────────────────────────────────────── */
.screen {
  position: relative;
  width: 100%; height: 100%;
  background: var(--bg);
  border-radius: 36px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ─── Status bar ─────────────────────────────────────────── */
.statusbar {
  flex: 0 0 36px;
  padding: 12px 22px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.01em;
  user-select: none;
}
.statusbar .right { display: inline-flex; align-items: center; gap: 5px; }
.statusbar svg { width: 14px; height: 10px; fill: var(--fg); }
.statusbar .battery { width: 22px; }

/* ─── Content (scrollable) ───────────────────────────────── */
.content {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}
.content::-webkit-scrollbar { display: none; }

/* ─── Android nav bar ────────────────────────────────────── */
.navbar {
  flex: 0 0 30px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  justify-items: center;
  padding-bottom: 6px;
}
.navbar svg { width: 14px; height: 14px; stroke: var(--fg); opacity: 0.55; }

/* ─── Bottom tab bar ─────────────────────────────────────── */
.tabbar {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(var(--tabs, 4), 1fr);
  padding: 6px 6px 0;
  border-top: 1px solid var(--border);
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 0 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s;
}
.tab.active { color: var(--accent); font-weight: 600; }
.tab svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.tab.active svg { stroke-width: 2.1; }

/* ─── Spacing helpers ────────────────────────────────────── */
.pad     { padding-inline: 18px; }
.stack   { display: flex; flex-direction: column; gap: 14px; }
.row     { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.grid-2  { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid-3  { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.grid-4  { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }

/* ─── Typography ─────────────────────────────────────────── */
h1, h2, h3 { margin: 0; }
.h1 { font-family: var(--font-display); font-size: var(--fs-h1); font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; margin: 0; }
.h2 { font-family: var(--font-display); font-size: var(--fs-h2); font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; margin: 0; }
.h3 { font-size: var(--fs-h3); font-weight: 600; line-height: 1.35; margin: 0; }
.meta { font-size: var(--fs-meta); color: var(--muted); }
.num  { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.greeting {
  font-size: 12px; color: var(--muted);
  letter-spacing: 0.03em; text-transform: uppercase;
  margin: 0 0 2px;
}

/* ─── Cards ──────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
}
.card.accent {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}
.card.flat {
  background: transparent; border: 0;
  border-radius: 0; padding: 12px 0;
  border-top: 1px solid var(--border);
}
.card.flat:first-child { border-top: 0; padding-top: 0; }

/* ─── List row ───────────────────────────────────────────── */
.list-row {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center; gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
}
.list-row:first-child { border-top: 0; }
.list-row .l-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--accent-soft);
  display: grid; place-items: center;
  color: var(--accent);
}
.list-row .l-icon svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.list-row .l-body .l-title { font-size: 14px; font-weight: 500; line-height: 1.3; }
.list-row .l-body .l-sub   { color: var(--muted); font-size: 12px; line-height: 1.3; margin-top: 2px; }

/* ─── Buttons ────────────────────────────────────────────── */
.btn-primary {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 48px;
  padding: 12px 20px;
  background: var(--accent);
  color: #fff;
  border: 0; border-radius: var(--radius-md);
  font: inherit; font-size: 15px; font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  text-decoration: none;
}
.btn-primary:active { transform: scale(0.97); background: #0b847a; }
.btn-primary:disabled { opacity: 0.5; cursor: default; transform: none; }

.btn-secondary {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 48px;
  padding: 12px 20px;
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font: inherit; font-size: 15px; font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  text-decoration: none;
}
.btn-secondary:active { transform: scale(0.97); background: var(--bg); }

.btn-sm {
  min-height: 36px; padding: 8px 16px;
  font-size: 13px; font-weight: 500;
  border-radius: var(--radius-sm);
}

/* ─── Service grid icon ──────────────────────────────────── */
.svc-item {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 14px 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none; color: var(--fg);
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.svc-item:active { transform: scale(0.95); background: var(--accent-soft); }
.svc-item .svc-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid; place-items: center;
}
.svc-item .svc-label {
  font-size: 12px; font-weight: 500;
  text-align: center; line-height: 1.3;
}

/* ─── Input fields ───────────────────────────────────────── */
.field {
  display: flex; flex-direction: column; gap: 6px;
}
.field label {
  font-size: 13px; font-weight: 500;
  color: var(--fg);
  letter-spacing: -0.005em;
}
.field input, .field textarea, .field select {
  width: 100%; min-height: 48px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit; font-size: 15px; color: var(--fg);
  outline: none;
  transition: border-color 0.15s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field input::placeholder, .field textarea::placeholder {
  color: #c4c7cc;
}
.field .hint {
  font-size: 12px; color: var(--muted);
  margin-top: -2px;
}
.field .error-text {
  font-size: 12px; color: var(--danger);
  margin-top: -2px;
}
.field.error input {
  border-color: var(--danger);
}
.field.error input:focus {
  box-shadow: 0 0 0 3px #fee2e2;
}

/* ─── Pills / tags ───────────────────────────────────────── */
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 12px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.pill.active { background: var(--accent); color: #fff; }
.tag {
  display: inline-flex; align-items: center;
  padding: 5px 12px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
.tag.active { background: var(--fg); color: #fff; border-color: var(--fg); }
.tag.unread { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ─── Badge (notification dot) ───────────────────────────── */
.badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  background: var(--danger);
  color: #fff;
  border-radius: var(--radius-pill);
  font-size: 10px; font-weight: 700;
  line-height: 1;
}

/* ─── Toast ──────────────────────────────────────────────── */
.toast {
  position: absolute; top: 60px; left: 50%;
  transform: translateX(-50%);
  padding: 12px 22px;
  background: var(--fg);
  color: #fff;
  border-radius: var(--radius-pill);
  font-size: 13px; font-weight: 500;
  z-index: 100;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.toast.show { opacity: 1; }
.toast.success { background: var(--success); }
.toast.error   { background: var(--danger); }

/* ─── Modal / Dialog ─────────────────────────────────────── */
.modal-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.42);
  z-index: 90;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s;
}
.modal-overlay.show { opacity: 1; pointer-events: auto; }
.modal-box {
  width: calc(100% - 48px);
  max-width: 320px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px 20px 20px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.modal-box .modal-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  margin: 0 auto 12px;
  display: grid; place-items: center;
  font-size: 24px;
}
.modal-box .modal-icon.success { background: #d1fae5; color: var(--success); }
.modal-box .modal-icon.error   { background: #fee2e2; color: var(--danger); }
.modal-box .modal-icon.info    { background: var(--accent-soft); color: var(--accent); }
.modal-box h3 { margin: 0 0 6px; font-size: 17px; }
.modal-box p  { margin: 0 0 18px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.modal-box .modal-actions {
  display: flex; gap: 10px;
}
.modal-box .modal-actions button {
  flex: 1;
}

/* ─── Loading spinner ────────────────────────────────────── */
.spinner {
  width: 22px; height: 22px;
  border: 2.5px solid rgba(255,255,255,0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
.spinner.dark {
  border-color: var(--border);
  border-top-color: var(--accent);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Page loading overlay ───────────────────────────────── */
.page-loader {
  position: absolute; inset: 0;
  background: var(--bg);
  z-index: 80;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px;
  transition: opacity 0.3s;
}
.page-loader.hidden { opacity: 0; pointer-events: none; }
.page-loader .loader-label {
  font-size: 13px; color: var(--muted);
}

/* ─── Notice card ────────────────────────────────────────── */
.notice-item {
  padding: 12px 16px;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 8px;
}
.notice-item .notice-title {
  font-size: 14px; font-weight: 600; line-height: 1.3;
}
.notice-item .notice-date {
  font-size: 11px; color: var(--muted); margin-top: 4px;
}

/* ─── Course card ────────────────────────────────────────── */
.course-card {
  display: flex; gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
}
.course-card .course-time {
  flex: 0 0 52px;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
}
.course-card .course-time .t-start { font-size: 18px; font-weight: 700; color: var(--accent); }
.course-card .course-time .t-end   { font-size: 12px; color: var(--muted); }
.course-card .course-info { flex: 1; }
.course-card .course-name { font-size: 15px; font-weight: 600; line-height: 1.3; }
.course-card .course-meta { font-size: 12px; color: var(--muted); margin-top: 3px; }

/* ─── Seat grid ──────────────────────────────────────────── */
.seat-map {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.seat {
  aspect-ratio: 1;
  border-radius: 6px;
  display: grid; place-items: center;
  font-size: 10px; font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  border: 1.5px solid transparent;
}
.seat.available { background: #d1fae5; color: var(--success); }
.seat.available:hover { border-color: var(--success); }
.seat.occupied  { background: #f3f4f6; color: #c4c7cc; cursor: default; }
.seat.selected  { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ─── Amount selector ────────────────────────────────────── */
.amount-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.amount-btn {
  padding: 14px 8px;
  text-align: center;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 16px; font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.amount-btn.selected {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

/* ─── Profile header ─────────────────────────────────────── */
.profile-header {
  display: flex; flex-direction: column; align-items: center;
  padding: 20px 18px;
  text-align: center;
}
.profile-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-soft), #d1fae5);
  border: 3px solid var(--surface);
  display: grid; place-items: center;
  font-size: 28px; font-weight: 700;
  color: var(--accent);
  margin-bottom: 10px;
}
.profile-name { font-size: 18px; font-weight: 700; }
.profile-id   { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ─── Settings item ──────────────────────────────────────── */
.setting-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s;
  text-decoration: none; color: var(--fg);
}
.setting-item:first-child { border-top: 1px solid var(--border); }
.setting-item:active { background: var(--bg); }
.setting-item .si-left { display: flex; align-items: center; gap: 12px; }
.setting-item .si-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: grid; place-items: center;
}
.setting-item .si-label { font-size: 14px; font-weight: 500; }
.setting-item .si-right { color: var(--muted); font-size: 13px; }
.setting-item .si-arrow { color: #c4c7cc; }

/* ─── Toggle switch ──────────────────────────────────────── */
.toggle {
  width: 48px; height: 28px;
  padding: 2px;
  background: var(--border);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.2s;
  position: relative;
}
.toggle.on { background: var(--accent); }
.toggle::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 24px; height: 24px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.toggle.on::after { transform: translateX(20px); }

/* ─── Splash screen ──────────────────────────────────────── */
.splash-screen {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%;
  background: linear-gradient(160deg, var(--accent) 0%, #0b847a 100%);
  color: #fff;
  text-align: center;
}
.splash-logo {
  width: 80px; height: 80px;
  background: rgba(255,255,255,0.18);
  border-radius: 22px;
  display: grid; place-items: center;
  font-size: 38px;
  margin-bottom: 20px;
  backdrop-filter: blur(10px);
}
.splash-name { font-size: 28px; font-weight: 800; letter-spacing: 0.04em; }
.splash-sub  { font-size: 13px; opacity: 0.75; margin-top: 8px; letter-spacing: 0.06em; }

/* ─── Welcome / onboarding ──────────────────────────────── */
.welcome-section {
  text-align: center; padding: 32px 24px 18px;
}
.welcome-section .welcome-icon {
  width: 72px; height: 72px; margin: 0 auto 16px;
  background: var(--accent-soft);
  border-radius: 20px;
  display: grid; place-items: center;
  font-size: 36px;
}
.welcome-section h2 { margin-bottom: 6px; }
.welcome-section p  { color: var(--muted); font-size: 14px; }

/* ─── Chip row (overflow-x scroll) ───────────────────────── */
.chip-row {
  display: flex; gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-behavior: smooth;
}
.chip-row::-webkit-scrollbar { display: none; }

/* ─── Section header ─────────────────────────────────────── */
.section-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 18px 10px;
}
.section-hd h3 { font-size: 15px; font-weight: 600; }
.section-hd a { font-size: 13px; color: var(--accent); text-decoration: none; }

/* ─── Empty state ────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 40px 24px;
  color: var(--muted);
}
.empty-state .empty-icon {
  font-size: 48px; margin-bottom: 12px; opacity: 0.5;
}
.empty-state h3 { margin-bottom: 6px; color: var(--fg); }
.empty-state p  { font-size: 13px; }

/* ─── Auth page (login/register) ─────────────────────────── */
.auth-page {
  display: flex; flex-direction: column;
  min-height: 100%;
  padding: 24px 22px;
}
.auth-logo {
  text-align: center; padding-top: 28px; padding-bottom: 24px;
}
.auth-logo .al-icon {
  width: 60px; height: 60px; margin: 0 auto 12px;
  background: var(--accent-soft);
  border-radius: 16px;
  display: grid; place-items: center;
  font-size: 28px; color: var(--accent);
}
.auth-logo h2 { font-size: 22px; font-weight: 700; }
.auth-logo p  { font-size: 13px; color: var(--muted); margin-top: 4px; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-links {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 6px;
  font-size: 13px;
}
.auth-links a { color: var(--accent); text-decoration: none; font-weight: 500; }

/* ─── Header bar (for sub-pages) ─────────────────────────── */
.header-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.header-bar .back-btn {
  width: 36px; height: 36px;
  border: 0; background: transparent;
  border-radius: 50%;
  display: grid; place-items: center;
  cursor: pointer; color: var(--fg);
  font-size: 18px;
}
.header-bar .back-btn:active { background: var(--bg); }
.header-bar .hb-title { font-size: 16px; font-weight: 600; flex: 1; }

/* ─── Search bar ─────────────────────────────────────────── */
.search-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  margin: 12px 18px;
}
.search-bar svg { width: 18px; height: 18px; stroke: var(--muted); fill: none; stroke-width: 1.8; }
.search-bar input {
  flex: 1; border: 0; background: transparent;
  font: inherit; font-size: 14px; color: var(--fg);
  outline: none; padding: 8px 0;
}
.search-bar input::placeholder { color: #c4c7cc; }

/* ─── Transaction item ───────────────────────────────────── */
.txn-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.txn-item .txn-left .txn-name { font-size: 14px; font-weight: 500; }
.txn-item .txn-left .txn-time { font-size: 12px; color: var(--muted); margin-top: 2px; }
.txn-item .txn-amount { font-size: 16px; font-weight: 600; font-family: var(--font-mono); }
.txn-item .txn-amount.positive { color: var(--success); }
.txn-item .txn-amount.negative { color: var(--fg); }

/* ─── Message item ───────────────────────────────────────── */
.msg-item {
  padding: 14px 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: relative;
}
.msg-item.unread { background: #f0fdfa; }
.msg-item.unread::before {
  content: '';
  position: absolute; left: 6px; top: 50%;
  transform: translateY(-50%);
  width: 7px; height: 7px;
  background: var(--accent);
  border-radius: 50%;
}
.msg-item .msg-title { font-size: 14px; font-weight: 600; }
.msg-item .msg-body  { font-size: 13px; color: var(--muted); margin-top: 3px; line-height: 1.4; }
.msg-item .msg-time  { font-size: 11px; color: var(--muted); margin-top: 5px; }

/* ─── Balance card ───────────────────────────────────────── */
.balance-card {
  margin: 12px 18px;
  padding: 20px 22px;
  background: linear-gradient(135deg, var(--accent), #0b847a);
  color: #fff;
  border-radius: var(--radius-lg);
}
.balance-card .bal-label { font-size: 12px; opacity: 0.8; letter-spacing: 0.04em; }
.balance-card .bal-amount { font-size: 36px; font-weight: 700; margin: 4px 0 2px; font-family: var(--font-mono); }
.balance-card .bal-hint { font-size: 11px; opacity: 0.65; }

/* ─── Lost item card ─────────────────────────────────────── */
.lost-card {
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
}
.lost-card .lost-name { font-size: 15px; font-weight: 600; }
.lost-card .lost-meta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.lost-card .lost-tags { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }

/* ─── Student info card (home page requirement) ──────────── */
.student-badge {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-pill);
  color: #fff;
  font-size: 12px;
  backdrop-filter: blur(6px);
}
.student-badge strong { font-weight: 600; }

/* ─── Transport controls for animation ───────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}
.anim-fade-up  { animation: fadeInUp 0.5s ease-out both; }
.anim-fade-in  { animation: fadeIn 0.4s ease-out both; }
.anim-scale-in { animation: scaleIn 0.35s ease-out both; }

/* Stagger children */
.stagger > * { opacity: 0; animation: fadeInUp 0.45s ease-out forwards; }
.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.1s; }
.stagger > *:nth-child(3) { animation-delay: 0.15s; }
.stagger > *:nth-child(4) { animation-delay: 0.2s; }
.stagger > *:nth-child(5) { animation-delay: 0.25s; }
.stagger > *:nth-child(6) { animation-delay: 0.3s; }
.stagger > *:nth-child(7) { animation-delay: 0.35s; }
.stagger > *:nth-child(8) { animation-delay: 0.4s; }
.stagger > *:nth-child(9) { animation-delay: 0.45s; }
.stagger > *:nth-child(10) { animation-delay: 0.5s; }
