/* ============================================================
   ANACITY Business — Employee Mobile App
   Design System — Plum Tokens
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&family=Roboto:wght@400;500;700&display=swap');

:root {
  /* ---------- Color: brand ---------- */
  --color-primary:        #693687;
  --color-primary-hover:  #552b6e;
  --color-primary-light:  #9a63c4;
  --color-primary-soft:   #f2ebf7;
  --color-primary-pale:   #dcc9ea;

  /* ---------- Color: neutrals (plum-cast) ---------- */
  --color-ink:            #221a29;
  --color-body:           #5c5566;
  --color-muted:          #8f8899;
  --color-border:         #e9e4ee;
  --color-surface:        #ffffff;
  --color-surface-alt:    #f8f6fa;
  --color-dark-bg:        #1b1122;
  --color-dark-text:      #b3a8bf;

  /* ---------- Color: feedback ---------- */
  --color-success:        #1e9e5a;
  --color-success-soft:   #e6f6ee;
  --color-warning:        #f5a623;
  --color-warning-soft:   #fef4e3;
  --color-warning-text:   #b97a12;
  --color-error:          #d93025;
  --color-error-soft:     #fdeceb;

  /* ---------- Typography ---------- */
  --font-display: "Poppins", "Segoe UI", system-ui, sans-serif;
  --font-body:    "Roboto", "Helvetica Neue", system-ui, sans-serif;

  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.375rem;
  --text-2xl:  1.75rem;
  --text-3xl:  2.25rem;
  --text-4xl:  3rem;

  --weight-regular:  400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     700;

  --leading-tight:  1.2;
  --leading-normal: 1.6;

  /* ---------- Spacing (4px base) ---------- */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;

  /* ---------- Layout ---------- */
  --container-max:  1140px;
  --container-pad:  1rem;
  --grid-gap:       1.5rem;
  --sidebar-w:      240px;

  /* ---------- Radius ---------- */
  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --radius-pill: 999px;

  /* ---------- Elevation ---------- */
  --shadow-sm: 0 1px 3px rgba(34, 26, 41, 0.06);
  --shadow-md: 0 6px 18px rgba(34, 26, 41, 0.09);
  --shadow-lg: 0 14px 34px rgba(34, 26, 41, 0.15);

  /* ---------- Motion ---------- */
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 500ms;
}

/* ---------- Global resets ---------- */
* { box-sizing: border-box; -webkit-font-smoothing: antialiased; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-body);
  background:
    radial-gradient(1200px 600px at 20% 0%, #efe6f7 0%, transparent 60%),
    radial-gradient(900px 500px at 90% 80%, #e7dcf2 0%, transparent 55%),
    #ecebef;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 16px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--color-ink);
  line-height: var(--leading-tight);
  margin: 0;
}

/* ---------- Device frame ---------- */
.device-wrapper {
  width: 1440px;
  display: flex;
  justify-content: center;
}

.device-frame {
  width: 407px;
  border-radius: 56px;
  background: linear-gradient(180deg, #0f0812, #1b1122);
  padding: 16px;
  box-shadow:
    0 40px 80px -20px rgba(34,26,41,0.35),
    0 20px 40px -10px rgba(34,26,41,0.25),
    inset 0 0 0 2px #2a1f34,
    inset 0 0 0 4px #0a060d;
  position: relative;
}

.device-frame::before {
  content: "";
  position: absolute;
  left: -3px; top: 130px;
  width: 3px; height: 60px;
  background: #1b1122; border-radius: 2px 0 0 2px;
  box-shadow: 0 90px 0 #1b1122, 0 170px 0 #1b1122;
}

.device-frame::after {
  content: "";
  position: absolute;
  right: -3px; top: 180px;
  width: 3px; height: 90px;
  background: #1b1122; border-radius: 0 2px 2px 0;
}

.device-screen {
  width: 375px;
  height: 812px;
  background: var(--color-surface-alt);
  border-radius: 44px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* ---------- Status bar ---------- */
.status-bar {
  height: 54px;
  padding: 20px 28px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--color-ink);
  position: relative;
  z-index: 5;
  flex-shrink: 0;
  background: var(--color-surface-alt);
}

.status-bar .time { letter-spacing: -0.2px; }
.status-icons { display: flex; align-items: center; gap: 6px; }
.status-icons svg { display: block; }

.dynamic-island {
  position: absolute;
  top: 11px; left: 50%;
  transform: translateX(-50%);
  width: 120px; height: 34px;
  background: #000;
  border-radius: 20px;
  z-index: 6;
}

/* ---------- App / Nav bar ---------- */
.app-bar {
  padding: 8px 20px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--color-surface-alt);
  flex-shrink: 0;
}

.app-bar .left { display: flex; align-items: center; gap: 10px; }

.icon-btn {
  width: 38px; height: 38px;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  display: flex; align-items: center; justify-content: center;
  color: var(--color-ink);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-standard);
  padding: 0;
}

.icon-btn:active { background: var(--color-primary-soft); }

.title-block .eyebrow {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted);
  font-weight: 500;
}

.title-block .title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--color-ink);
  line-height: 1.1;
  margin-top: 2px;
}

/* ---------- Scroll body ---------- */
.scroll-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 20px 100px;
  -webkit-overflow-scrolling: touch;
}
.scroll-body::-webkit-scrollbar { display: none; }

/* ---------- Bottom tab bar ---------- */
.tab-bar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--color-border);
  padding: 8px 16px 22px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  z-index: 4;
}

.tab-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 4px;
  color: var(--color-muted);
  font-family: var(--font-display);
  font-size: 10.5px; font-weight: 500;
  cursor: pointer;
  transition: color var(--duration-fast) var(--ease-standard);
  border: none; background: none;
}

.tab-item.active { color: var(--color-primary); }

.tab-item .tab-icon-wrap {
  width: 34px; height: 22px;
  border-radius: var(--radius-pill);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--duration-fast) var(--ease-standard);
}

.tab-item.active .tab-icon-wrap {
  background: var(--color-primary-soft);
}

.home-indicator {
  position: absolute; left: 50%; bottom: 6px;
  transform: translateX(-50%);
  width: 130px; height: 4px; border-radius: 4px;
  background: var(--color-ink); opacity: 0.85;
  z-index: 5;
}

/* ---------- Section title ---------- */
.section-title {
  display: flex; align-items: center; justify-content: space-between;
  margin: 18px 4px 10px;
}

.section-title h3 {
  font-family: var(--font-display);
  font-size: 13px; font-weight: 600;
  color: var(--color-ink);
  letter-spacing: 0.02em;
}

.section-title .link {
  font-family: var(--font-display);
  font-size: 12px; font-weight: 500;
  color: var(--color-primary);
  cursor: pointer;
  border: none; background: none;
}

/* ---------- Cards ---------- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 10px;
}

.card-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
}
.card-row:last-child { border-bottom: none; }

.card-row .card-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--color-primary-soft); color: var(--color-primary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.card-row .card-body { flex: 1; min-width: 0; }

.card-row .card-label {
  font-size: 11px; color: var(--color-muted);
  letter-spacing: 0.04em; font-weight: 500;
}

.card-row .card-value {
  font-family: var(--font-display);
  font-size: 14px; font-weight: 500;
  color: var(--color-ink);
  margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------- Action tiles ---------- */
.action-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 12px 0;
}

.action-tile {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 12px 6px 10px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform var(--duration-fast) var(--ease-standard), box-shadow var(--duration-fast) var(--ease-standard);
}

.action-tile:active { transform: scale(0.95); }

.action-tile .tile-icon {
  width: 36px; height: 36px;
  border-radius: 12px;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  display: flex; align-items: center; justify-content: center;
}

.action-tile .tile-label {
  font-family: var(--font-display);
  font-size: 11px; font-weight: 500;
  color: var(--color-ink);
  text-align: center;
  line-height: 1.2;
}

.action-tile.primary {
  background: var(--color-primary);
  border-color: var(--color-primary);
}
.action-tile.primary .tile-icon { background: rgba(255,255,255,0.18); color: #fff; }
.action-tile.primary .tile-label { color: #fff; }

/* ---------- Chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-family: var(--font-display);
  font-size: 11px; font-weight: 500;
}
.chip svg { width: 12px; height: 12px; }

.chip-success { background: var(--color-success-soft); color: var(--color-success); }
.chip-warning { background: var(--color-warning-soft); color: var(--color-warning-text); }
.chip-error { background: var(--color-error-soft); color: var(--color-error); }
.chip-muted { background: var(--color-surface-alt); color: var(--color-muted); border: 1px dashed var(--color-border); }

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Hub menu ---------- */
.hub-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 10px;
  cursor: pointer;
  transition: transform var(--duration-fast) var(--ease-standard), box-shadow var(--duration-fast) var(--ease-standard);
}

.hub-card:active { transform: scale(0.98); box-shadow: var(--shadow-md); }

.hub-card .hub-icon {
  width: 44px; height: 44px;
  border-radius: 14px;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.hub-card .hub-text { flex: 1; min-width: 0; }

.hub-card .hub-title {
  font-family: var(--font-display);
  font-size: 14px; font-weight: 600;
  color: var(--color-ink);
}

.hub-card .hub-desc {
  font-size: 12px; color: var(--color-muted);
  margin-top: 2px;
}

.hub-card .hub-chevron { color: var(--color-muted); flex-shrink: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: var(--text-sm); font-weight: 600;
  border: none; cursor: pointer;
  transition: background var(--duration-fast) var(--ease-standard), transform var(--duration-fast) var(--ease-standard);
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}
.btn-primary:active { background: var(--color-primary-hover); }

.btn-secondary {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--color-primary);
  color: var(--color-primary);
}

.btn-danger {
  background: var(--color-error);
  color: #fff;
}

.btn-success {
  background: var(--color-success);
  color: #fff;
}

.btn-full { width: 100%; }

.btn-sm {
  padding: 8px 16px;
  font-size: var(--text-xs);
}

.btn:disabled {
  opacity: 0.5; cursor: not-allowed;
}

/* ---------- FAB ---------- */
.fab {
  position: absolute;
  bottom: 90px; right: 20px;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg);
  border: none; cursor: pointer;
  z-index: 3;
  transition: transform var(--duration-fast) var(--ease-standard);
}
.fab:active { transform: scale(0.9); }

/* ---------- Forms ---------- */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-family: var(--font-display);
  font-size: 12px; font-weight: 500;
  color: var(--color-ink);
  margin-bottom: 6px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-ink);
  background: var(--color-surface);
  outline: none;
  transition: border-color var(--duration-fast) var(--ease-standard);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--color-primary);
}

.form-textarea { resize: vertical; min-height: 80px; }
.form-select { appearance: none; cursor: pointer; }

.form-input::placeholder, .form-textarea::placeholder {
  color: var(--color-muted);
}

/* ---------- Tabs ---------- */
.tab-group {
  display: flex; gap: 0;
  border-bottom: 2px solid var(--color-border);
  margin-bottom: 14px;
}

.tab-btn {
  flex: 1;
  padding: 10px 8px;
  font-family: var(--font-display);
  font-size: 13px; font-weight: 500;
  color: var(--color-muted);
  background: none; border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  text-align: center;
  transition: color var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard);
}

.tab-btn.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

/* ---------- Toggle ---------- */
.toggle-group {
  display: flex;
  background: var(--color-primary-soft);
  border-radius: var(--radius-pill);
  padding: 3px;
  margin-bottom: 14px;
}

.toggle-btn {
  flex: 1; padding: 8px 12px;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: 12px; font-weight: 500;
  color: var(--color-primary);
  background: transparent;
  border: none; cursor: pointer;
  text-align: center;
  transition: all var(--duration-fast) var(--ease-standard);
}

.toggle-btn.active {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

/* ---------- Search bar ---------- */
.search-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  margin-bottom: 14px;
}

.search-bar input {
  flex: 1; border: none; outline: none;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-ink);
  background: transparent;
}

.search-bar input::placeholder { color: var(--color-muted); }
.search-bar .search-icon { color: var(--color-muted); flex-shrink: 0; }

/* ---------- Modal ---------- */
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(27,17,34,0.6);
  display: flex; align-items: center; justify-content: center;
  z-index: 50;
  padding: 24px;
  animation: fadeIn var(--duration-fast) var(--ease-standard);
}

.modal-content {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 100%;
  max-height: 80%;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp var(--duration-base) var(--ease-standard);
}

.modal-title {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 600;
  color: var(--color-ink);
  margin-bottom: 12px;
}

.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: none; border: none;
  color: var(--color-muted); cursor: pointer;
  padding: 4px;
}

/* ---------- Bottom sheet ---------- */
.bottom-sheet-overlay {
  position: absolute;
  inset: 0;
  background: rgba(27,17,34,0.5);
  z-index: 50;
  animation: fadeIn var(--duration-fast) var(--ease-standard);
}

.bottom-sheet {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: var(--color-surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 20px;
  z-index: 51;
  max-height: 70%;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: sheetUp var(--duration-base) var(--ease-standard);
}

.bottom-sheet .sheet-handle {
  width: 40px; height: 4px;
  background: var(--color-border);
  border-radius: var(--radius-pill);
  margin: 0 auto 16px;
}

.bottom-sheet-title {
  font-family: var(--font-display);
  font-size: 16px; font-weight: 600;
  color: var(--color-ink);
  margin-bottom: 16px;
}

/* ---------- Toast ---------- */
.toast {
  position: absolute;
  top: 70px; left: 20px; right: 20px;
  padding: 14px 18px;
  background: var(--color-dark-bg);
  color: #fff;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: 13px; font-weight: 500;
  z-index: 100;
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 10px;
  animation: slideDown var(--duration-base) var(--ease-standard);
}

.toast-success { border-left: 4px solid var(--color-success); }
.toast-error { border-left: 4px solid var(--color-error); }
.toast-info { border-left: 4px solid var(--color-primary); }

/* ---------- KPI card ---------- */
.kpi-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.kpi-value {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-primary);
}

.kpi-label {
  font-size: var(--text-xs);
  color: var(--color-muted);
  margin-top: 4px;
}

/* ---------- List items ---------- */
.list-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform var(--duration-fast) var(--ease-standard);
}

.list-item:active { transform: scale(0.98); }

.list-item .li-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.list-item .li-body { flex: 1; min-width: 0; }

.list-item .li-title {
  font-family: var(--font-display);
  font-size: 13px; font-weight: 500;
  color: var(--color-ink);
}

.list-item .li-meta {
  font-size: 11px; color: var(--color-muted); margin-top: 2px;
}

.list-item .li-right {
  text-align: right; flex-shrink: 0;
}

.list-item .li-time {
  font-family: var(--font-display);
  font-size: 11px; font-weight: 500;
  color: var(--color-body);
}

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

.empty-state .empty-icon {
  width: 48px; height: 48px;
  margin: 0 auto 12px;
  color: var(--color-primary-pale);
}

.empty-state .empty-title {
  font-family: var(--font-display);
  font-size: 14px; font-weight: 600;
  color: var(--color-ink);
  margin-bottom: 4px;
}

/* ---------- Badge card (digital badge) ---------- */
.badge-card {
  border-radius: 24px;
  background:
    radial-gradient(120% 80% at 100% 0%, #9a63c4 0%, transparent 55%),
    radial-gradient(90% 70% at 0% 100%, #4a2361 0%, transparent 55%),
    linear-gradient(160deg, #693687 0%, #3f1f56 100%);
  color: #fff;
  padding: 20px;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 20px 40px -14px rgba(105,54,135,0.55),
    0 8px 20px -8px rgba(34,26,41,0.35);
}

.badge-card::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(400px 200px at 90% 110%, rgba(255,255,255,0.10), transparent 60%),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.03) 0 2px, transparent 2px 6px);
  pointer-events: none;
}

/* ---------- QR code (CSS-only) ---------- */
.qr-display {
  width: 100px; height: 100px;
  background: #fff;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.qr-display .qr-grid {
  position: absolute; inset: 4px;
  background-image:
    linear-gradient(#221a29 25%, transparent 25%, transparent 50%, #221a29 50%, #221a29 75%, transparent 75%),
    linear-gradient(90deg, #221a29 25%, transparent 25%, transparent 50%, #221a29 50%, #221a29 75%, transparent 75%);
  background-size: 8px 8px;
}

.qr-display .qr-corner {
  position: absolute;
  width: 20px; height: 20px;
  border: 4px solid #221a29;
  background: #fff;
  border-radius: 3px;
}
.qr-display .qr-corner::after {
  content: "";
  position: absolute; inset: 3px;
  background: #221a29;
  border-radius: 1px;
}
.qr-display .qr-corner.tl { top: 4px; left: 4px; }
.qr-display .qr-corner.tr { top: 4px; right: 4px; }
.qr-display .qr-corner.bl { bottom: 4px; left: 4px; }

.qr-display .qr-logo {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 22px; height: 22px;
  background: var(--color-primary);
  border: 2px solid #fff;
  border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 10px;
  color: #fff;
}

/* ---------- Avatar ---------- */
.avatar-circle {
  border-radius: 50%;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  flex-shrink: 0;
  overflow: hidden;
}

.avatar-circle.sm { width: 36px; height: 36px; font-size: 14px; }
.avatar-circle.md { width: 48px; height: 48px; font-size: 18px; }
.avatar-circle.lg { width: 64px; height: 64px; font-size: 24px; }

/* ---------- Banner ---------- */
.banner {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
  font-size: 12px;
}

.banner-warning {
  background: var(--color-warning-soft);
  color: var(--color-warning-text);
  border: 1px solid rgba(245,166,35,0.3);
}

.banner-success {
  background: var(--color-success-soft);
  color: var(--color-success);
  border: 1px solid rgba(30,158,90,0.3);
}

.banner-error {
  background: var(--color-error-soft);
  color: var(--color-error);
  border: 1px solid rgba(217,48,37,0.3);
}

.banner-icon { flex-shrink: 0; }
.banner-text { font-family: var(--font-display); font-weight: 500; }

/* ---------- Slot grid ---------- */
.slot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.slot-item {
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  text-align: center;
  font-family: var(--font-display);
  font-size: 12px; font-weight: 500;
  cursor: pointer;
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-ink);
  transition: all var(--duration-fast) var(--ease-standard);
}

.slot-item.available { border-color: var(--color-success); color: var(--color-success); }
.slot-item.booked { background: var(--color-surface-alt); color: var(--color-muted); cursor: not-allowed; }
.slot-item.selected { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

/* ---------- Parking grid ---------- */
.parking-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.parking-slot {
  padding: 14px 6px;
  border-radius: var(--radius-sm);
  text-align: center;
  font-family: var(--font-display);
  font-size: 11px; font-weight: 600;
  border: 1.5px solid var(--color-border);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-standard);
}

.parking-slot.available { background: var(--color-success-soft); border-color: var(--color-success); color: var(--color-success); }
.parking-slot.full { background: var(--color-error-soft); border-color: var(--color-error); color: var(--color-error); cursor: not-allowed; }
.parking-slot.selected { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

/* ---------- Emoji rating ---------- */
.emoji-row {
  display: flex; justify-content: center; gap: 12px;
  margin: 16px 0;
}

.emoji-btn {
  font-size: 28px;
  border: 2px solid transparent;
  border-radius: 50%;
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  background: var(--color-surface-alt);
  transition: all var(--duration-fast) var(--ease-standard);
}

.emoji-btn.selected {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
  transform: scale(1.15);
}

/* ---------- Credit card ---------- */
.credit-card {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  border-radius: var(--radius-lg);
  padding: 20px;
  color: #fff;
  margin-bottom: 14px;
}

.credit-balance {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
}

.credit-label {
  font-size: var(--text-xs);
  opacity: 0.8;
  margin-top: 4px;
}

/* ---------- Timeline ---------- */
.timeline-item {
  display: flex; gap: 12px;
  padding: 12px 0;
  position: relative;
}

.timeline-dot {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.timeline-dot.dot-in { background: var(--color-success-soft); color: var(--color-success); }
.timeline-dot.dot-out { background: var(--color-warning-soft); color: var(--color-warning-text); }
.timeline-dot.dot-denied { background: var(--color-error-soft); color: var(--color-error); }

/* ---------- Login styles ---------- */
.login-screen {
  display: flex; flex-direction: column;
  align-items: center;
  padding: 40px 24px;
  flex: 1;
  overflow-y: auto;
  background: var(--color-surface-alt);
}

.login-logo {
  width: 64px; height: 64px;
  border-radius: 18px;
  background: var(--color-primary);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700; font-size: 24px;
  color: #fff;
  margin-bottom: 16px;
  box-shadow: var(--shadow-md);
}

.login-title {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 700;
  color: var(--color-ink);
  text-align: center;
}

.login-subtitle {
  font-size: 13px;
  color: var(--color-muted);
  text-align: center;
  margin: 4px 0 24px;
}

.user-card {
  width: 100%;
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-standard);
}

.user-card:active, .user-card.selected {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
}

.user-card .user-avatar {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #c8a8e0, #7a4aa0);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  flex-shrink: 0;
  position: relative;
}

.user-card .user-info { flex: 1; }

.user-card .user-name {
  font-family: var(--font-display);
  font-size: 14px; font-weight: 600;
  color: var(--color-ink);
}

.user-card .user-role {
  font-size: 12px; color: var(--color-muted);
  margin-top: 2px;
}

.user-card .badge-status {
  flex-shrink: 0;
}

/* ---------- Emergency flash ---------- */
.emergency-overlay {
  position: absolute; inset: 0;
  background: rgba(217,48,37,0.95);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  z-index: 200;
  padding: 32px;
  color: #fff;
  text-align: center;
  animation: pulse-bg 2s infinite;
}

@keyframes pulse-bg {
  0%, 100% { background: rgba(217,48,37,0.95); }
  50% { background: rgba(217,48,37,0.85); }
}

/* ---------- SOS ---------- */
.sos-tile {
  padding: 20px;
  border-radius: var(--radius-md);
  text-align: center;
  cursor: pointer;
  border: 2px solid var(--color-border);
  background: var(--color-surface);
  transition: all var(--duration-fast) var(--ease-standard);
}

.sos-tile:active {
  transform: scale(0.95);
  border-color: var(--color-error);
}

.sos-tile .sos-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  margin: 0 auto 8px;
  display: flex; align-items: center; justify-content: center;
}

.sos-tile .sos-label {
  font-family: var(--font-display);
  font-size: 13px; font-weight: 600;
  color: var(--color-ink);
}

/* ---------- Food ---------- */
.restaurant-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 10px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform var(--duration-fast) var(--ease-standard);
}

.restaurant-card:active { transform: scale(0.98); }

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

.restaurant-logo {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 18px; font-weight: 700;
  flex-shrink: 0;
}

.menu-item-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 8px;
}

.menu-item-card .mi-body { flex: 1; }
.menu-item-card .mi-price {
  font-family: var(--font-display);
  font-size: 14px; font-weight: 600;
  color: var(--color-primary);
}

/* ---------- Animations ---------- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes sheetUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes pulseRing {
  0% { box-shadow: 0 0 0 0 rgba(217,48,37,0.6); }
  70% { box-shadow: 0 0 0 14px rgba(217,48,37,0); }
  100% { box-shadow: 0 0 0 0 rgba(217,48,37,0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes spinnerRotate {
  to { transform: rotate(360deg); }
}

.anim-fade-in { animation: fadeIn var(--duration-base) var(--ease-standard); }
.anim-slide-up { animation: slideUp var(--duration-base) var(--ease-standard); }
.anim-scale-in { animation: scaleIn var(--duration-base) var(--ease-standard); }

.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--color-primary-soft);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spinnerRotate 0.8s linear infinite;
}

/* ---------- Hover/focus/active states ---------- */
button:focus-visible, a:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.hub-card:hover { box-shadow: var(--shadow-md); }
.action-tile:hover { box-shadow: var(--shadow-md); }
.list-item:hover { box-shadow: var(--shadow-md); }

/* ---------- Utility ---------- */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.text-center { text-align: center; }
.text-sm { font-size: var(--text-sm); }
.text-xs { font-size: var(--text-xs); }
.text-muted { color: var(--color-muted); }
.text-ink { color: var(--color-ink); }
.text-primary { color: var(--color-primary); }
.fw-600 { font-weight: 600; }
.font-display { font-family: var(--font-display); }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
