/* ═══════════════════════════════════════
   HEMBASE — Design System v2.0
   Linne & havre — Skandinavisk premium
═══════════════════════════════════════ */

/* ── Tokens ── */
:root {
  /* Brand — terrakotta dämpad */
  --brand: #C97B5E;
  --brand-d: #B8694C;
  --brand-l: #F5E4DA;
  --brand-grad: linear-gradient(135deg, #C97B5E, #D69783);

  /* Greens — sage istället för skrikig */
  --green: #9CAB94;
  --green-d: #7E8E78;
  --green-l: #ECEFE9;
  --green-grad: linear-gradient(135deg, #9CAB94, #B5C2AE);

  /* Blues — dimm-blå */
  --blue: #8FA1B0;
  --blue-d: #748694;
  --blue-l: #ECEFF2;
  --blue-grad: linear-gradient(135deg, #8FA1B0, #A8B7C3);

  /* Pinks — dusty rose */
  --pink: #D4A5A0;
  --pink-d: #BD8B85;
  --pink-l: #F5E9E7;
  --pink-grad: linear-gradient(135deg, #D4A5A0, #E2BAB5);

  /* Ambers — havre-honung */
  --amber: #D4A574;
  --amber-d: #B88B5C;
  --amber-l: #F5E9D4;
  --amber-grad: linear-gradient(135deg, #D4A574, #E0B991);

  /* Purples — dimm-lila */
  --purple: #A595B8;
  --purple-d: #8B7AA0;
  --purple-l: #ECE7F0;
  --purple-grad: linear-gradient(135deg, #A595B8, #BAACCB);

  /* Neutrals — varm cremebas */
  --bg: #FAF7F2;
  --surface: #FFFFFF;
  --surface2: #F4EFE8;
  --border: #EAE3D8;
  --g100: #F4EFE8;
  --g200: #E5DDD0;
  --g300: #C9BFAE;
  --g400: #A8A092;
  --g500: #87807A;
  --g600: #6E6962;
  --g700: #524E48;
  --g800: #3A3733;

  /* Semantic */
  --text: #2D2826;
  --text-2: #6E6962;
  --text-3: #A8A092;
  --red: #B86553;
  --red-l: #F5E2DD;

  /* Spacing — mer luft */
  --r-s: 10px;
  --r-m: 14px;
  --r: 16px;
  --r-l: 22px;
  --r-xl: 28px;
  --r-full: 999px;

  /* Shadows — mjuka, diffuserade */
  --shadow-sm: 0 1px 2px rgba(45, 40, 38, 0.04), 0 1px 3px rgba(45, 40, 38, 0.03);
  --shadow: 0 2px 8px rgba(45, 40, 38, 0.05), 0 4px 16px rgba(45, 40, 38, 0.04);
  --shadow-lg: 0 4px 16px rgba(45, 40, 38, 0.06), 0 12px 32px rgba(45, 40, 38, 0.05);
  --shadow-brand: 0 4px 16px rgba(201, 123, 94, 0.18), 0 8px 24px rgba(201, 123, 94, 0.10);
  --shadow-green: 0 4px 16px rgba(156, 171, 148, 0.18), 0 8px 24px rgba(156, 171, 148, 0.10);
  --shadow-blue: 0 4px 16px rgba(143, 161, 176, 0.18), 0 8px 24px rgba(143, 161, 176, 0.10);
}

/* ═══ LUCIDE ICONS — strikta linjeikoner ═══ */
.lc {
  display: inline-flex;
  width: 18px; height: 18px;
  stroke-width: 2;
  vertical-align: middle;
  flex-shrink: 0;
}
.lc.size-sm { width: 14px; height: 14px; }
.lc.size-lg { width: 22px; height: 22px; }
.lc.size-xl { width: 28px; height: 28px; }
.lc.size-xxl { width: 36px; height: 36px; }

/* ═══ ONBOARDING — color picker ═══ */
.ob-color-choice {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
  padding: 0;
}
.ob-color-choice.selected {
  transform: scale(1.1);
  border-color: #2D2826;
}

/* ═══ AVATAR — initial-cirklar för familjemedlemmar ═══ */
.avatar {
  display: inline-flex;
  align-items: center; justify-content: center;
  border-radius: 50%;
  font-weight: 600;
  color: white;
  flex-shrink: 0;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  background: var(--brand-grad);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
}
.avatar.size-sm { width: 28px; height: 28px; font-size: 11px; }
.avatar.size-md { width: 38px; height: 38px; font-size: 14px; }
.avatar.size-lg { width: 48px; height: 48px; font-size: 18px; }
.avatar.size-xl { width: 64px; height: 64px; font-size: 24px; }
.avatar.size-xxl { width: 80px; height: 80px; font-size: 30px; }
/* Färgvarianter — användaren tilldelas en färg vid skapande */
.avatar.color-1 { background: var(--brand-grad); }
.avatar.color-2 { background: var(--blue-grad); }
.avatar.color-3 { background: var(--green-grad); }
.avatar.color-4 { background: var(--pink-grad); }
.avatar.color-5 { background: var(--purple-grad); }
.avatar.color-6 { background: var(--amber-grad); }

/* ═══ FILE INPUT — stylade upload-knappar ═══ */
.file-upload-btn {
  display: flex; align-items: center; justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 16px;
  background: var(--brand-l);
  border: 2px dashed var(--brand);
  border-radius: var(--r-l);
  color: var(--brand-d);
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  margin-bottom: 12px;
}
.file-upload-btn:hover { background: #EFD9C9; }
.file-upload-btn input[type="file"] {
  position: absolute;
  width: 0; height: 0;
  opacity: 0;
  pointer-events: none;
}
.file-upload-name {
  font-size: 12px; font-weight: 500;
  color: var(--text-2);
  margin-top: 6px; text-align: center;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100%;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 450;
  line-height: 1.55;
  letter-spacing: -0.005em;
}
input, select, textarea, button { font-family: inherit; }
a { color: inherit; text-decoration: none; }

/* ── Layout ── */
.app-shell {
  display: flex;
  flex-direction: column;
  height: 100vh; height: 100dvh;
  max-width: 430px;
  margin: 0 auto;
  position: relative;
  background: var(--bg);
  overflow: hidden;
}

/* ── Top Bar ── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 10px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  z-index: 10;
}
.topbar-logo {
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.5px;
  color: var(--text);
}
.topbar-logo span { color: var(--brand); }
.topbar-date {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}
.topbar-actions { display: flex; gap: 8px; align-items: center; }
.topbar-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--g100);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; cursor: pointer;
  position: relative;
  transition: background 0.15s;
}
.topbar-btn:active { background: var(--g200); }
.notif-dot {
  position: absolute; top: 4px; right: 4px;
  width: 8px; height: 8px;
  background: var(--red); border-radius: 50%;
  border: 2px solid var(--surface);
}

/* ── Scroll Area ── */
.scroll-area {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
}
.page { display: none; padding: 18px 18px 28px; }
.page.active { display: block; }

/* ── Bottom Nav ── */
.bottom-nav {
  display: flex;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
  flex-shrink: 0;
  z-index: 10;
}
.nav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; gap: 3px;
  padding: 6px 4px;
  border: none; background: none; cursor: pointer;
  color: var(--g400);
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.02em;
  transition: color 0.15s;
  border-radius: var(--r);
}
.nav-item.active { color: var(--brand); }
.nav-icon {
  font-size: 22px;
  transition: transform 0.15s;
  display: flex; align-items: center; justify-content: center;
}
.nav-icon .lc { width: 22px; height: 22px; stroke-width: 2; }
.nav-item.active .nav-icon { transform: scale(1.08); }
.nav-item.active .nav-icon .lc { stroke-width: 2.4; }

/* ── Cards ── */
.card {
  background: var(--surface);
  border-radius: var(--r-l);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
}
.card-flat {
  background: var(--surface);
  border-radius: var(--r-l);
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
}

/* ── Hero Cards ── */
/* ═══ HERO — premium ═══ */
.hero {
  position: relative;
  border-radius: var(--r-xl);
  padding: 24px 22px;
  margin-bottom: 14px;
  color: white;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.hero::after {
  content: '';
  position: absolute;
  top: -40%; right: -10%;
  width: 60%; height: 180%;
  background: radial-gradient(ellipse, rgba(255,255,255,0.08), transparent 70%);
  pointer-events: none;
}
.hero-brand { background: var(--brand-grad); box-shadow: var(--shadow-brand); }
.hero-green { background: var(--green-grad); box-shadow: var(--shadow-green); }
.hero-blue { background: var(--blue-grad); box-shadow: var(--shadow-blue); }
.hero-purple { background: var(--purple-grad); }
.hero-label { font-size: 11px; font-weight: 600; opacity: 0.85; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 8px; }
.hero-value { font-size: 34px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.05; }
.hero-sub { font-size: 13px; font-weight: 500; opacity: 0.85; margin-top: 8px; line-height: 1.4; }
.hero-icon { position: absolute; right: 22px; top: 50%; transform: translateY(-50%); font-size: 44px; opacity: 0.22; }

/* ── Section Headers ── */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.section-title {
  font-size: 17px; font-weight: 650;
  letter-spacing: -0.3px; color: var(--text);
}
.section-action {
  font-size: 13px; font-weight: 700;
  color: var(--brand); cursor: pointer;
  padding: 4px 10px;
  background: var(--brand-l);
  border-radius: var(--r-full);
}

/* ── List Rows ── */
.row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.row:last-child { border-bottom: none; padding-bottom: 0; }
.row:first-child { padding-top: 0; }
.row-icon {
  width: 40px; height: 40px;
  border-radius: var(--r);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.row-icon-brand { background: var(--brand-l); }
.row-icon-green { background: var(--green-l); }
.row-icon-blue { background: var(--blue-l); }
.row-icon-amber { background: var(--amber-l); }
.row-icon-pink { background: var(--pink-l); }
.row-icon-purple { background: var(--purple-l); }
.row-info { flex: 1; min-width: 0; }
.row-title { font-size: 14px; font-weight: 700; color: var(--text); }
.row-sub { font-size: 12px; font-weight: 600; color: var(--text-2); margin-top: 2px; }
.row-value { font-size: 14px; font-weight: 650; flex-shrink: 0; }
.row-del { font-size: 16px; color: var(--g300); cursor: pointer; padding: 4px; flex-shrink: 0; }
.row-del:active { color: var(--red); }

/* ── Checkboxes ── */
.chk {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 2.5px solid var(--g300);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
  transition: all 0.2s;
  font-size: 12px; font-weight: 700; color: white;
}
.chk.done { background: var(--green); border-color: var(--green); }
.sq-chk {
  width: 22px; height: 22px;
  border-radius: 6px;
  border: 2.5px solid var(--g300);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
  transition: all 0.2s;
  font-size: 11px; font-weight: 700; color: white;
}
.sq-chk.done { background: var(--green); border-color: var(--green); }

/* ── Buttons ── */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 20px;
  border-radius: var(--r-full);
  border: none; cursor: pointer;
  font-size: 15px; font-weight: 650;
  transition: all 0.15s;
  width: 100%;
}
.btn:active { transform: scale(0.98); }
.btn-brand { background: var(--brand-grad); color: white; box-shadow: var(--shadow-brand); }
.btn-green { background: var(--green-grad); color: white; box-shadow: var(--shadow-green); }
.btn-blue { background: var(--blue-grad); color: white; box-shadow: var(--shadow-blue); }
.btn-ghost { background: var(--g100); color: var(--text); }
.btn-danger { background: var(--red-l); color: var(--red); }
.btn-sm {
  padding: 8px 16px; font-size: 13px;
  border-radius: var(--r-full);
  border: none; cursor: pointer; font-weight: 700;
  transition: all 0.15s;
}
.btn-sm:active { transform: scale(0.97); }
.btn-sm-brand { background: var(--brand-l); color: var(--brand-d); }
.btn-sm-green { background: var(--green-l); color: var(--green-d); }
.btn-sm-ghost { background: var(--g100); color: var(--g600); }

/* ── FAB (Floating Action Button) ── */
.fab {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--brand-grad);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: white;
  box-shadow: var(--shadow-brand);
  transition: transform 0.15s;
  flex-shrink: 0;
}
.fab:active { transform: scale(0.94); }

/* ── Tags ── */
.tag {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 11px; font-weight: 650;
  letter-spacing: 0.02em;
}
.tag-brand { background: var(--brand-l); color: var(--brand-d); }
.tag-green { background: var(--green-l); color: var(--green-d); }
.tag-blue { background: var(--blue-l); color: var(--blue-d); }
.tag-pink { background: var(--pink-l); color: var(--pink-d); }
.tag-amber { background: var(--amber-l); color: var(--amber-d); }
.tag-purple { background: var(--purple-l); color: var(--purple-d); }

/* ── Forms ── */
.form-group { display: flex; flex-direction: column; gap: 10px; }
.form-label { font-size: 12px; font-weight: 650; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.06em; }
input[type="text"], input[type="number"], input[type="tel"], input[type="url"], input[type="email"], select, textarea {
  width: 100%;
  padding: 13px 16px;
  border: 2px solid var(--border);
  border-radius: var(--r);
  font-size: 15px; font-weight: 600;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color 0.15s;
  -webkit-appearance: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); }
textarea { resize: none; line-height: 1.6; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }

/* ── Modal ── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  display: flex; align-items: flex-end;
  z-index: 1000;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s;
}
.modal-backdrop.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--surface);
  border-radius: 28px 28px 0 0;
  padding: 12px 20px 32px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  transform: translateY(40px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-backdrop.open .modal { transform: translateY(0); }
.modal-handle {
  width: 36px; height: 4px;
  background: var(--g200);
  border-radius: 2px;
  margin: 0 auto 16px;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.modal-title { font-size: 20px; font-weight: 700; letter-spacing: -0.3px; }
.modal-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--g100);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 14px; color: var(--g500);
  border: none;
}

/* ── Progress bars ── */
.progress-wrap {
  height: 8px; background: var(--g100);
  border-radius: var(--r-full); overflow: hidden;
}
.progress-bar {
  height: 100%; border-radius: var(--r-full);
  transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Stat Grid ── */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.stat-card {
  background: var(--surface);
  border-radius: var(--r-l);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}
.stat-num { font-size: 32px; font-weight: 700; letter-spacing: -1px; }
.stat-label { font-size: 12px; font-weight: 700; color: var(--text-2); margin-bottom: 4px; }
.stat-sub { font-size: 11px; font-weight: 600; color: var(--text-3); margin-top: 2px; }

/* ── Quick Status ── */
.qs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.qs-card {
  background: var(--surface);
  border-radius: var(--r-l);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  text-align: center;
  border: 2px solid transparent;
  transition: border-color 0.2s;
}
.qs-card.done { border-color: var(--green); background: var(--green-l); }
.qs-card.notdone { border-color: var(--border); }
.qs-emoji { font-size: 26px; margin-bottom: 4px; }
.qs-name { font-size: 12px; font-weight: 650; }
.qs-pts { font-size: 11px; color: var(--text-2); font-weight: 600; margin-top: 2px; }

/* ── Horizontal Scroll ── */
.h-scroll {
  display: flex; gap: 10px;
  overflow-x: auto; padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.h-scroll::-webkit-scrollbar { display: none; }

/* ── Feature Cards (horizontal scroll) ── */
.feat-card {
  flex-shrink: 0;
  width: 140px;
  background: var(--surface);
  border-radius: var(--r-l);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.15s;
}
.feat-card:active { transform: scale(0.97); }
.feat-card-icon { font-size: 28px; margin-bottom: 8px; }
.feat-card-title { font-size: 13px; font-weight: 650; }
.feat-card-sub { font-size: 11px; color: var(--text-2); font-weight: 600; margin-top: 2px; }

/* ── Map Placeholder ── */
.map-card {
  background: linear-gradient(135deg, #74b9ff, #0984e3);
  border-radius: var(--r-xl);
  padding: 20px;
  margin-bottom: 12px;
  color: white;
  min-height: 160px;
  display: flex; flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.map-member-dot {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.2);
  border-radius: var(--r-full);
  padding: 6px 12px;
  font-size: 13px; font-weight: 700;
  margin-right: 8px; margin-bottom: 8px;
}

/* ── Album Grid ── */
.album-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  border-radius: var(--r);
  overflow: hidden;
  margin-bottom: 12px;
}
.album-item {
  aspect-ratio: 1;
  background: var(--g200);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  cursor: pointer;
  overflow: hidden;
}
.album-item img { width: 100%; height: 100%; object-fit: cover; }

/* ── Kid View ── */
.kid-app {
  height: 100vh; height: 100dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.kid-header {
  padding: 20px 20px 0;
  display: flex; align-items: center;
  justify-content: space-between;
}
.kid-hero-card {
  margin: 16px;
  border-radius: var(--r-xl);
  padding: 24px;
  color: white;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.kid-pts-big { font-size: 72px; font-weight: 700; line-height: 1; letter-spacing: -3px; }
.kid-pts-label { font-size: 15px; font-weight: 700; opacity: 0.85; margin-top: 4px; }
.kid-stars { display: flex; justify-content: center; gap: 4px; margin-top: 10px; font-size: 24px; }
.kid-section { padding: 0 16px; margin-bottom: 20px; }
.kid-chore {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface);
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  border: 2.5px solid transparent;
  transition: all 0.2s;
}
.kid-chore.done { border-color: var(--green); background: var(--green-l); }
.kid-chore-ico { font-size: 30px; flex-shrink: 0; }
.kid-chore-name { font-size: 16px; font-weight: 650; flex: 1; }
.kid-chore-pts { font-size: 14px; font-weight: 700; color: var(--green); flex-shrink: 0; }
.kid-chore-check { font-size: 26px; flex-shrink: 0; }

/* ── Achievements ── */
.achievement {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface);
  border-radius: var(--r-l);
  padding: 12px 14px;
  margin-bottom: 8px;
  border: 2px solid var(--border);
  transition: all 0.2s;
}
.achievement.unlocked { border-color: var(--amber); background: var(--amber-l); }
.achievement.locked { opacity: 0.4; filter: grayscale(0.5); }
.ach-icon { font-size: 26px; flex-shrink: 0; }
.ach-name { font-size: 13px; font-weight: 650; }
.ach-desc { font-size: 11px; color: var(--text-2); font-weight: 600; margin-top: 2px; }

/* ── Streak Badge ── */
.streak {
  display: inline-flex; align-items: center; gap: 5px;
  background: linear-gradient(135deg, #FF6B35, #FF8C5A);
  color: white; border-radius: var(--r-full);
  padding: 5px 12px; font-size: 13px; font-weight: 650;
  box-shadow: 0 4px 12px rgba(255,107,53,0.3);
}

/* ── Wheel ── */
.wheel-btn {
  width: 100%; padding: 14px;
  background: var(--amber-grad);
  color: white; border: none;
  border-radius: var(--r-l);
  font-size: 15px; font-weight: 650;
  cursor: pointer; margin-bottom: 10px;
  box-shadow: 0 4px 12px rgba(255,184,0,0.3);
}
.wheel-result {
  background: var(--surface); border-radius: var(--r-l);
  padding: 14px; text-align: center;
  font-size: 16px; font-weight: 650;
  border: 2px solid var(--amber);
  display: none; margin-bottom: 10px;
}

/* ── Reward Shop ── */
.reward-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface);
  border-radius: var(--r-l);
  padding: 14px;
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.reward-ico { font-size: 32px; flex-shrink: 0; }
.reward-info { flex: 1; }
.reward-name { font-size: 14px; font-weight: 650; }
.reward-cost { font-size: 12px; font-weight: 700; color: var(--amber-d); margin-top: 2px; }
.reward-buy {
  padding: 8px 14px;
  background: var(--green-grad);
  color: white; border: none;
  border-radius: var(--r-full);
  font-size: 13px; font-weight: 650;
  cursor: pointer; flex-shrink: 0;
}
.reward-buy:disabled { background: var(--g200); color: var(--g400); cursor: not-allowed; }

/* ── Weather ── */
.weather-card {
  background: var(--blue-grad);
  border-radius: var(--r-xl);
  padding: 18px 20px;
  margin-bottom: 12px;
  color: white;
  display: flex; align-items: center; gap: 16px;
  box-shadow: var(--shadow-blue);
}
.weather-ico { font-size: 48px; flex-shrink: 0; }
.weather-temp { font-size: 36px; font-weight: 700; letter-spacing: -1px; }
.weather-desc { font-size: 13px; font-weight: 700; opacity: 0.9; }
.weather-tip { font-size: 12px; opacity: 0.8; margin-top: 4px; font-weight: 600; }

/* ── Birthday ── */
.birthday-card {
  background: linear-gradient(135deg, #f093fb, #f5576c);
  border-radius: var(--r-xl);
  padding: 18px 20px;
  margin-bottom: 12px;
  color: white;
  display: flex; align-items: center; gap: 14px;
  box-shadow: 0 8px 24px rgba(245,87,108,0.3);
}
@keyframes bounce { from{transform:translateY(0)} to{transform:translateY(-6px)} }
.bday-cake { font-size: 40px; animation: bounce 1s infinite alternate; }
.bday-name { font-size: 17px; font-weight: 700; }
.bday-days { font-size: 13px; font-weight: 700; opacity: 0.9; margin-top: 2px; }

/* ── Morning Msg ── */
.morning-card {
  background: linear-gradient(135deg, #fdcb6e, #e17055);
  border-radius: var(--r-xl);
  padding: 16px 20px;
  margin-bottom: 12px;
  color: white;
  box-shadow: 0 8px 24px rgba(225,112,85,0.25);
}
.morning-title { font-size: 14px; font-weight: 650; opacity: 0.85; margin-bottom: 4px; }
.morning-text { font-size: 13px; font-weight: 600; line-height: 1.6; }

/* ── Family Goal ── */
.goal-card {
  background: var(--purple-grad);
  border-radius: var(--r-xl);
  padding: 18px 20px;
  margin-bottom: 12px;
  color: white;
  box-shadow: 0 8px 24px rgba(124,77,255,0.25);
}
.goal-title { font-size: 16px; font-weight: 700; margin-bottom: 3px; }
.goal-reward { font-size: 12px; opacity: 0.85; margin-bottom: 12px; font-weight: 600; }
.goal-bar-wrap { background: rgba(255,255,255,0.25); border-radius: var(--r-full); height: 8px; }
.goal-bar-fill { background: white; border-radius: var(--r-full); height: 8px; transition: width 0.5s; }
.goal-pct { font-size: 11px; opacity: 0.8; margin-top: 5px; font-weight: 700; }

/* ── Sticky Notes ── */
.sticky {
  background: #FFF9C4;
  border-radius: var(--r-l);
  padding: 14px;
  margin-bottom: 8px;
  box-shadow: 2px 3px 10px rgba(0,0,0,0.08);
  position: relative;
  font-size: 13px; font-weight: 600;
  line-height: 1.6; color: var(--text);
}
.sticky-author { font-size: 11px; font-weight: 650; color: var(--amber-d); margin-bottom: 4px; }

/* ── Chat ── */
.chat-wrap {
  display: flex; flex-direction: column;
  height: 300px; overflow-y: auto;
  padding: 12px;
  -webkit-overflow-scrolling: touch;
}
.chat-bubble {
  max-width: 80%;
  padding: 10px 14px;
  font-size: 13px; font-weight: 600;
  line-height: 1.5;
  margin-bottom: 8px;
  border-radius: 18px;
}
.chat-bubble.me {
  background: var(--brand-grad);
  color: white;
  border-radius: 18px 18px 4px 18px;
  align-self: flex-end;
}
.chat-bubble.other {
  background: var(--surface);
  color: var(--text);
  border-radius: 18px 18px 18px 4px;
  align-self: flex-start;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.chat-sender { font-size: 10px; font-weight: 650; opacity: 0.7; margin-bottom: 3px; }
.chat-time { font-size: 10px; opacity: 0.6; margin-top: 3px; text-align: right; }

/* ── Bulletin ── */
.bulletin {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--amber-l);
  border-radius: var(--r-l);
  padding: 14px;
  margin-bottom: 12px;
  border-left: 4px solid var(--amber);
}

/* ── Meal Rows ── */
.meal-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.meal-row:last-child { border-bottom: none; }
.meal-day { font-size: 12px; font-weight: 650; color: var(--text-2); width: 28px; flex-shrink: 0; }
.meal-today { background: var(--brand-l); margin: 0 -16px; padding: 12px 16px; border-radius: var(--r); border-bottom: none !important; }
.meal-today .meal-day { color: var(--brand-d); }

/* ── Shop ── */
.shop-cat { font-size: 11px; font-weight: 650; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em; padding: 8px 0 4px; }

/* ── Packlist ── */
.packlist-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface);
  border-radius: var(--r-l);
  padding: 14px 16px;
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}
.packlist-ico { font-size: 26px; }
.packlist-name { font-size: 14px; font-weight: 650; flex: 1; }
.packlist-count { font-size: 12px; color: var(--text-2); font-weight: 600; }
.packlist-arrow { font-size: 16px; color: var(--g300); }

/* ── AI Output ── */
.ai-output {
  background: var(--surface);
  border-radius: var(--r-l);
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  font-size: 13px; font-weight: 600;
  line-height: 1.7; color: var(--text);
}
.ai-btn {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface);
  border-radius: var(--r-l);
  padding: 14px 16px;
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  border: 1px solid var(--border);
  transition: transform 0.15s;
}
.ai-btn:active { transform: scale(0.98); }
.ai-btn-ico {
  width: 42px; height: 42px;
  border-radius: var(--r);
  background: var(--brand-l);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.ai-btn-title { font-size: 14px; font-weight: 650; }
.ai-btn-sub { font-size: 12px; color: var(--text-2); font-weight: 600; margin-top: 2px; }

/* ── Account Card ── */
.account-card {
  border-radius: var(--r-xl);
  padding: 18px 20px;
  margin-bottom: 10px;
  color: white;
  display: flex; align-items: center; gap: 14px;
  box-shadow: var(--shadow);
}
.account-ico { font-size: 28px; flex-shrink: 0; }
.account-name { font-size: 12px; font-weight: 700; opacity: 0.85; }
.account-bal { font-size: 26px; font-weight: 700; letter-spacing: -0.5px; }
.account-type { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.7; }

/* ── Graph ── */
.graph-wrap { display: flex; align-items: flex-end; gap: 8px; height: 100px; }
.graph-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.graph-bar { width: 100%; border-radius: 6px 6px 0 0; min-height: 4px; background: var(--g200); transition: height 0.5s; }
.graph-bar.current { background: var(--brand-grad); }
.graph-val { font-size: 9px; font-weight: 700; color: var(--text-2); text-align: center; }
.graph-label { font-size: 10px; font-weight: 700; color: var(--text-3); }

/* ── Transaction ── */
.tx-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.tx-row:last-child { border-bottom: none; }
.tx-ico {
  width: 38px; height: 38px;
  border-radius: var(--r);
  background: var(--g100);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.tx-desc { font-size: 14px; font-weight: 700; }
.tx-cat { font-size: 11px; color: var(--text-2); font-weight: 600; margin-top: 1px; }
.tx-amt { font-size: 14px; font-weight: 650; flex-shrink: 0; }
.tx-income { color: var(--green-d); }
.tx-expense { color: var(--red); }

/* ── Pickup ── */
.pickup-card {
  border-radius: var(--r-xl);
  padding: 16px 18px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  border: 2px solid var(--border);
  background: var(--surface);
}
.pickup-who { font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
.pickup-time { font-size: 16px; font-weight: 650; }
.pickup-status { font-size: 12px; color: var(--text-2); font-weight: 600; margin-top: 3px; }
.pickup-btn {
  margin-top: 10px;
  padding: 10px;
  width: 100%;
  border-radius: var(--r-full);
  border: none; cursor: pointer;
  font-size: 13px; font-weight: 650;
  transition: all 0.15s;
}
.pickup-btn:active { transform: scale(0.97); }

/* ── Document Card ── */
.doc-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface);
  border-radius: var(--r-l);
  padding: 14px;
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}
.doc-ico {
  width: 44px; height: 44px;
  border-radius: var(--r);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.doc-name { font-size: 14px; font-weight: 650; }
.doc-sub { font-size: 12px; color: var(--text-2); font-weight: 600; margin-top: 2px; }
.doc-exp { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: var(--r-full); }
.doc-exp-ok { background: var(--green-l); color: var(--green-d); }
.doc-exp-warn { background: var(--amber-l); color: var(--amber-d); }
.doc-exp-bad { background: var(--red-l); color: var(--red); }

/* ── Vehicle Card ── */
.vehicle-card {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 18px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.vehicle-header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.vehicle-ico { font-size: 36px; }
.vehicle-name { font-size: 17px; font-weight: 700; }
.vehicle-reg { font-size: 12px; color: var(--text-2); font-weight: 700; }
.vehicle-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-top: 1px solid var(--border); }
.vehicle-row-label { font-size: 12px; color: var(--text-2); font-weight: 600; }
.vehicle-row-value { font-size: 13px; font-weight: 650; }

/* ── Location (Map placeholder) ── */
.location-member {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.location-member:last-child { border-bottom: none; }
.location-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.location-name { font-size: 14px; font-weight: 650; }
.location-place { font-size: 12px; color: var(--text-2); font-weight: 600; margin-top: 2px; }
.location-time { font-size: 11px; color: var(--text-3); font-weight: 600; flex-shrink: 0; }

/* ── Homework ── */
.hw-card {
  background: var(--surface);
  border-radius: var(--r-l);
  padding: 14px;
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--blue);
}
.hw-subject { font-size: 12px; font-weight: 650; color: var(--blue-d); text-transform: uppercase; letter-spacing: 0.06em; }
.hw-title { font-size: 14px; font-weight: 650; margin-top: 2px; }
.hw-due { font-size: 11px; color: var(--text-2); font-weight: 600; margin-top: 4px; }

/* ── Onboarding ── */
#onboarding {
  position: fixed; inset: 0;
  background: var(--brand-grad);
  display: none; flex-direction: column;
  overflow-y: auto; z-index: 10000;
  -webkit-overflow-scrolling: touch;
}
.ob-step { display: none; flex-direction: column; min-height: 100vh; height: 100dvh; padding: 52px 24px 40px; }
.ob-step.active { display: flex; }
.ob-logo { font-size: 28px; font-weight: 700; color: white; margin-bottom: 4px; letter-spacing: -0.5px; }
.ob-logo span { color: rgba(255,255,255,0.6); }
.ob-step-label { font-size: 12px; color: rgba(255,255,255,0.6); font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 32px; }
.ob-title { font-size: 28px; font-weight: 700; color: white; line-height: 1.2; margin-bottom: 8px; letter-spacing: -0.5px; }
.ob-sub { font-size: 15px; color: rgba(255,255,255,0.8); font-weight: 600; line-height: 1.6; margin-bottom: 24px; }
.ob-card { background: white; border-radius: 20px; padding: 20px; margin-bottom: 14px; }
.ob-input {
  width: 100%; padding: 14px 16px;
  border: 2px solid var(--border); border-radius: var(--r);
  font-size: 15px; font-weight: 600;
  margin-bottom: 10px; box-sizing: border-box;
  outline: none; font-family: inherit;
}
.ob-input:focus { border-color: var(--brand); }
.ob-btn {
  width: 100%; padding: 16px;
  background: white; color: var(--brand-d);
  border: none; border-radius: var(--r-full);
  font-size: 17px; font-weight: 700;
  cursor: pointer; margin-top: auto;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  transition: transform 0.15s;
}
.ob-btn:active { transform: scale(0.98); }
.ob-btn-outline {
  width: 100%; padding: 14px;
  background: rgba(255,255,255,0.15);
  color: white; border: 2px solid rgba(255,255,255,0.4);
  border-radius: var(--r-full); font-size: 15px; font-weight: 700;
  cursor: pointer; margin-top: 10px; font-family: inherit;
}
.ob-member { display: flex; align-items: center; gap: 12px; background: var(--g100); border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; }
.ob-member-emoji { font-size: 28px; }
.ob-member-name { font-size: 15px; font-weight: 650; flex: 1; }
.ob-member-role { font-size: 12px; color: var(--text-2); font-weight: 600; }
.ob-member-del { font-size: 18px; color: var(--g400); cursor: pointer; }
.ob-add-row { display: flex; gap: 8px; margin-bottom: 10px; align-items: center; }
.ob-emoji-btn { font-size: 24px; padding: 10px; background: var(--g100); border: 2px solid var(--border); border-radius: var(--r); cursor: pointer; flex-shrink: 0; }
.ob-role-sel { padding: 10px 12px; border: 2px solid var(--border); border-radius: var(--r); font-size: 14px; font-weight: 600; background: white; flex-shrink: 0; font-family: inherit; outline: none; }
.ob-toggle { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.ob-toggle:last-child { border-bottom: none; }
.ob-toggle-title { font-size: 15px; font-weight: 650; }
.ob-toggle-sub { font-size: 12px; color: var(--text-2); font-weight: 600; margin-top: 2px; }
.ob-switch { position: relative; width: 48px; height: 28px; flex-shrink: 0; }
.ob-switch input { opacity: 0; width: 0; height: 0; }
.ob-slider { position: absolute; inset: 0; background: var(--g200); border-radius: 28px; cursor: pointer; transition: 0.3s; }
.ob-slider:before { content:''; position:absolute; height:22px; width:22px; left:3px; bottom:3px; background:white; border-radius:50%; transition:0.3s; box-shadow: var(--shadow-sm); }
.ob-switch input:checked + .ob-slider { background: var(--brand); }
.ob-switch input:checked + .ob-slider:before { transform: translateX(20px); }
.ob-privacy { font-size: 12px; color: var(--text-2); line-height: 1.8; margin-bottom: 16px; }
.ob-privacy a { color: var(--brand); font-weight: 700; }
.ob-check { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.ob-check input { width: 20px; height: 20px; margin-top: 2px; flex-shrink: 0; accent-color: var(--brand); }
.ob-check label { font-size: 13px; font-weight: 600; color: var(--g600); line-height: 1.5; cursor: pointer; }
.ob-dots { display: flex; gap: 6px; justify-content: center; margin-bottom: 24px; }
.ob-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.3); transition: all 0.3s; }
.ob-dot.active { background: white; width: 20px; border-radius: 3px; }

/* ── User Picker ── */
#user-picker {
  position: fixed; inset: 0;
  background: linear-gradient(160deg, #1A1A2E 0%, #16213E 50%, #0F3460 100%);
  display: none; flex-direction: column;
  align-items: center; justify-content: center;
  z-index: 9999; padding: 32px 24px;
}
.picker-logo { font-size: 32px; font-weight: 700; color: white; margin-bottom: 4px; letter-spacing: -0.5px; }
.picker-logo span { color: var(--brand); }
.picker-sub { font-size: 14px; color: rgba(255,255,255,0.5); font-weight: 600; margin-bottom: 40px; }
.picker-btn {
  width: 100%; max-width: 320px;
  padding: 16px 20px;
  border: none; border-radius: 20px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.12);
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 16px;
  cursor: pointer;
  transition: all 0.2s;
}
.picker-btn:active { transform: scale(0.97); background: rgba(255,255,255,0.12); }
.picker-avatar { font-size: 40px; flex-shrink: 0; }
.picker-name { font-size: 18px; font-weight: 700; color: white; display: block; }
.picker-role { font-size: 12px; color: rgba(255,255,255,0.5); font-weight: 600; display: block; margin-top: 2px; }
.picker-btn.child-btn { background: rgba(255,107,53,0.15); border-color: rgba(255,107,53,0.3); }

/* ── Kid View ── */
#kid-view { display: none; }
#kid-view.active {
  display: block;
  height: 100vh; height: 100dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--bg);
}
.kid-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}
.kid-greeting-sm { font-size: 16px; font-weight: 700; }
.kid-switch { background: var(--g100); border: none; border-radius: var(--r-full); padding: 8px 14px; font-size: 13px; font-weight: 700; cursor: pointer; color: var(--text-2); }
.kid-content { padding: 0 0 32px; }

/* ── Timer ── */
@keyframes pulse { 0%{opacity:1} 50%{opacity:0.4} 100%{opacity:1} }
.timer-display { font-size: 72px; font-weight: 700; text-align: center; letter-spacing: -3px; color: var(--text); font-variant-numeric: tabular-nums; padding: 20px 0; }
.timer-display.running { color: var(--brand); animation: pulse 1s infinite; }
.timer-presets { display: flex; gap: 8px; justify-content: center; margin-bottom: 16px; flex-wrap: wrap; }
.timer-preset { padding: 8px 16px; background: var(--g100); border: none; border-radius: var(--r-full); font-size: 14px; font-weight: 700; cursor: pointer; transition: all 0.15s; }
.timer-preset:active { background: var(--brand-l); color: var(--brand-d); }

/* ── Settings ── */
.settings-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.settings-row:last-child { border-bottom: none; }
.settings-info { flex: 1; }
.settings-title { font-size: 15px; font-weight: 650; }
.settings-sub { font-size: 12px; color: var(--text-2); font-weight: 600; margin-top: 2px; }

/* ── Confetti ── */
.confetti-piece {
  position: fixed; z-index: 9999;
  pointer-events: none;
  animation: fall linear forwards;
}
@keyframes fall {
  0% { transform: translateY(-10px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ── Empty State ── */
.empty {
  text-align: center; padding: 32px 16px;
  color: var(--text-3); font-size: 14px; font-weight: 600;
}
.empty-icon { font-size: 40px; margin-bottom: 8px; }

/* ── Sync Status ── */
.sync-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--green-l); color: var(--green-d);
  border-radius: var(--r-full); padding: 4px 12px;
  font-size: 11px; font-weight: 650;
  margin-bottom: 16px;
}

/* ── Dark Mode ── */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111111;
    --surface: #1C1C1E;
    --surface2: #2C2C2E;
    --border: #2C2C2E;
    --g100: #2C2C2E;
    --g200: #3A3A3C;
    --g300: #48484A;
    --g400: #8E8E93;
    --g500: #AEAEB2;
    --g600: #C7C7CC;
    --g700: #D1D1D6;
    --g800: #F2F2F7;
    --text: #F2F2F7;
    --text-2: #8E8E93;
    --text-3: #48484A;
    --brand-l: rgba(255,107,53,0.15);
    --green-l: rgba(0,196,140,0.15);
    --blue-l: rgba(76,111,255,0.15);
    --pink-l: rgba(255,78,138,0.15);
    --amber-l: rgba(255,184,0,0.15);
    --purple-l: rgba(124,77,255,0.15);
    --red-l: rgba(255,68,68,0.15);
  }
  .sticky { background: #2C2A1A; }
}

/* ── Animations ── */
@keyframes slideUp { from{transform:translateY(16px);opacity:0} to{transform:translateY(0);opacity:1} }
.page.active { animation: slideUp 0.25s ease; }
@keyframes choreCheck { 0%{transform:scale(1)} 40%{transform:scale(1.3)} 100%{transform:scale(1)} }
.chk.done { animation: choreCheck 0.3s ease; }

/* ── Misc ── */
.divider { height: 1px; background: var(--border); margin: 8px 0; }
.spacer { height: 12px; }
.color-pill { width: 28px; height: 28px; border-radius: 50%; cursor: pointer; border: 3px solid transparent; transition: border-color 0.15s; }
.color-pill.selected { border-color: var(--text); }

/* ═══ EMOJI PICKER ═══ */
.ob-emoji-choice {
  width: 100%; aspect-ratio: 1;
  font-size: 24px; border: 2px solid #e0e0e0;
  border-radius: 12px; background: #f5f5f5;
  cursor: pointer; transition: all 0.15s;
  display: flex; align-items: center; justify-content: center;
}
.ob-emoji-choice.selected { border-color: #FF6B35; background: #FFF0EB; transform: scale(1.1); }
.ob-emoji-choice:active { transform: scale(0.95); }

/* ═══ DASHBOARD ═══ */
/* ═══ DASH CARDS — premium enhetlig stil ═══ */
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.dash-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-l);
  padding: 18px 16px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
  display: flex; flex-direction: column;
  min-height: 116px;
  position: relative;
  overflow: hidden;
}
.dash-card:active { transform: scale(0.97); }
.dash-card:hover { box-shadow: var(--shadow); }
.dash-card-icon-wrap {
  width: 38px; height: 38px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  margin-bottom: 10px;
}
.dash-card-icon { font-size: 28px; margin-bottom: 8px; }
.dash-card-title { font-size: 13px; font-weight: 600; color: var(--text-2); letter-spacing: 0.01em; }
.dash-card-sub { font-size: 11px; color: var(--text-3); font-weight: 500; margin-top: 2px; }
.dash-card-value { font-size: 18px; font-weight: 650; margin-top: 6px; color: var(--text); letter-spacing: -0.01em; }
.dash-card-accent { position: absolute; bottom: -10px; right: -10px; font-size: 48px; opacity: 0.06; }

/* Färgade accent-baksidor istället för full ramfärg */
.dash-card-green .dash-card-icon-wrap { background: var(--green-l); color: var(--green-d); }
.dash-card-blue .dash-card-icon-wrap { background: var(--blue-l); color: var(--blue-d); }
.dash-card-pink .dash-card-icon-wrap { background: var(--pink-l); color: var(--pink-d); }
.dash-card-amber .dash-card-icon-wrap { background: var(--amber-l); color: var(--amber-d); }
.dash-card-brand .dash-card-icon-wrap { background: var(--brand-l); color: var(--brand-d); }
.dash-card-purple .dash-card-icon-wrap { background: var(--purple-l); color: var(--purple-d); }

.dash-wide {
  grid-column: span 2;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-l);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 14px;
}
.dash-wide:active { transform: scale(0.98); }
.dash-wide:hover { box-shadow: var(--shadow); }
.dash-wide-icon { font-size: 26px; flex-shrink: 0; }
.dash-wide-title { font-size: 14px; font-weight: 650; color: var(--text); }
.dash-wide-sub { font-size: 12px; color: var(--text-2); font-weight: 500; margin-top: 3px; }

/* ═══ AI CHAT IMPROVED ═══ */
.ai-chat-wrap {
  display: flex; flex-direction: column;
  gap: 18px; padding: 16px 14px 24px;
  height: 100%; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.ai-msg-row { display: flex; gap: 10px; align-items: flex-start; }
.ai-msg-row.me { flex-direction: row-reverse; }
.ai-bubble-wrap { display: flex; flex-direction: column; max-width: 80%; }
.ai-msg-row.me .ai-bubble-wrap { align-items: flex-end; }
.ai-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
  background: var(--brand-l);
}
.ai-avatar.me { background: var(--brand-grad); }
.ai-bubble {
  padding: 12px 16px;
  border-radius: 20px;
  font-size: 14px; font-weight: 500;
  line-height: 1.55; color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
.ai-bubble.me {
  background: var(--brand-grad);
  color: white; border: none;
  border-radius: 20px 20px 4px 20px;
  box-shadow: var(--shadow-brand);
  font-weight: 600;
}
.ai-bubble.other { border-radius: 20px 20px 20px 4px; }
.ai-time { font-size: 10px; opacity: 0.5; margin-top: 4px; padding: 0 6px; font-weight: 600; color: var(--text-3); }
.ai-time.me { text-align: right; }
.ai-typing {
  display: flex; gap: 5px; align-items: center;
  padding: 12px 16px;
}
.ai-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--g300);
  animation: aiDot 1.2s infinite;
}
.ai-dot:nth-child(2) { animation-delay: 0.2s; }
.ai-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes aiDot { 0%,60%,100%{transform:translateY(0)} 30%{transform:translateY(-6px)} }

/* ═══ DOCUMENT ANALYSIS ═══ */
.doc-photo-card {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 18px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.doc-photo-preview {
  width: 100%; border-radius: var(--r-l);
  margin-bottom: 12px; max-height: 200px;
  object-fit: cover;
}
.doc-ai-tag {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--amber-l); color: var(--amber-d);
  border-radius: var(--r-full); padding: 4px 10px;
  font-size: 11px; font-weight: 650; margin-bottom: 8px;
}
.reminder-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.reminder-item:last-child { border-bottom: none; }
.reminder-dot {
  width: 10px; height: 10px; border-radius: 50%;
  flex-shrink: 0;
}

/* ═══ KIOSK VIEW ═══ */
#kiosk-view {
  display: none;
  min-height: 100vh;
  background: #0F1117;
  color: white;
  padding: 32px;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
}
#kiosk-view.active { display: block; }
.kiosk-header {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}
.kiosk-logo { font-size: 28px; font-weight: 700; color: #FF6B35; }
.kiosk-time { font-size: 48px; font-weight: 700; letter-spacing: -2px; }
.kiosk-date { font-size: 18px; color: rgba(255,255,255,0.5); font-weight: 600; }
.kiosk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.kiosk-card {
  background: rgba(255,255,255,0.06);
  border-radius: 24px; padding: 24px;
  border: 1px solid rgba(255,255,255,0.1);
}
.kiosk-card-title {
  font-size: 14px; font-weight: 650;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: rgba(255,255,255,0.5); margin-bottom: 16px;
}
.kiosk-meal {
  font-size: 28px; font-weight: 700;
  line-height: 1.2; margin-bottom: 4px;
}
.kiosk-meal-icon { font-size: 48px; margin-bottom: 8px; }
.kiosk-chore {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
}
.kiosk-chore:last-child { border-bottom: none; }
.kiosk-chk {
  width: 32px; height: 32px; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; flex-shrink: 0;
  transition: all 0.2s;
}
.kiosk-chk.done { background: #00C48C; border-color: #00C48C; }
.kiosk-chore-name { font-size: 18px; font-weight: 700; flex: 1; }
.kiosk-chore-pts { font-size: 14px; font-weight: 650; color: #00C48C; }
.kiosk-pickup {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.kiosk-pickup:last-child { border-bottom: none; }
.kiosk-pickup-name { font-size: 18px; font-weight: 700; flex: 1; }
.kiosk-pickup-who { font-size: 14px; color: rgba(255,255,255,0.6); font-weight: 600; }
.kiosk-pts-big { font-size: 52px; font-weight: 700; letter-spacing: -2px; color: #FF6B35; }
.kiosk-pts-label { font-size: 14px; color: rgba(255,255,255,0.5); font-weight: 600; }
.kiosk-weather { display: flex; align-items: center; gap: 16px; }
.kiosk-weather-ico { font-size: 48px; }
.kiosk-weather-temp { font-size: 36px; font-weight: 700; }
.kiosk-weather-tip { font-size: 14px; color: rgba(255,255,255,0.6); font-weight: 600; margin-top: 4px; }
.kiosk-exit {
  position: fixed; top: 20px; right: 20px;
  background: rgba(255,255,255,0.1); border: none;
  border-radius: var(--r-full); padding: 8px 16px;
  color: rgba(255,255,255,0.5); font-size: 13px;
  font-weight: 700; cursor: pointer;
}

/* ═══ MANUAL / HELP ═══ */
.help-section { margin-bottom: 20px; }
.help-section-title {
  font-size: 16px; font-weight: 700;
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px; color: var(--text);
}
.help-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px; font-weight: 600;
  line-height: 1.6; color: var(--text-2);
}
.help-item:last-child { border-bottom: none; }
.help-cmd {
  display: inline-block;
  background: var(--brand-l); color: var(--brand-d);
  border-radius: 6px; padding: 2px 8px;
  font-size: 12px; font-weight: 650;
  font-family: monospace; margin: 2px 0;
}

/* ═══ AI BRIEFING WIDGET ═══ */
/* ═══ AI BRIEFING — Bo-kort, cremebaserat, premium ═══ */
.ai-briefing {
  background: var(--surface);
  border: 1px solid var(--brand-l);
  border-radius: var(--r-l);
  padding: 20px;
  margin-bottom: 16px;
  color: var(--text);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(201, 123, 94, 0.08);
}
.ai-briefing::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, var(--brand-l), transparent 70%);
  opacity: 0.6;
  pointer-events: none;
}
.ai-briefing-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 12px;
  position: relative;
}
.ai-briefing-avatar {
  width: 38px; height: 38px;
  background: var(--brand-grad);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(201, 123, 94, 0.20);
}
.ai-briefing-title {
  font-size: 11px; font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase; letter-spacing: 0.12em;
}
.ai-briefing-text {
  font-size: 14px; font-weight: 500;
  line-height: 1.6; color: var(--text);
  margin-bottom: 14px;
  position: relative;
}
.ai-briefing-alerts {
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 14px;
  position: relative;
}
.ai-alert {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13px; font-weight: 500;
  color: var(--text);
  border-left: 3px solid var(--brand);
}
.ai-alert.warning { border-left-color: var(--amber); }
.ai-alert.urgent { border-left-color: var(--red); }
.ai-alert.info { border-left-color: var(--blue); }
.ai-quick-ask {
  display: flex; gap: 8px;
  position: relative;
}
.ai-quick-input {
  flex: 1; padding: 11px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  color: var(--text);
  font-size: 13px; font-weight: 500;
  font-family: inherit; outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.ai-quick-input::placeholder { color: var(--text-3); }
.ai-quick-input:focus { border-color: var(--brand); background: var(--surface); }
.ai-quick-send {
  width: 40px; height: 40px;
  background: var(--brand-grad);
  border: none; border-radius: 50%;
  color: white; font-size: 18px;
  cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.15s;
  box-shadow: 0 2px 8px rgba(201, 123, 94, 0.25);
}
.ai-quick-send:active { transform: scale(0.92); }
.ai-quick-answer {
  margin-top: 10px;
  background: var(--brand-l);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px; font-weight: 500;
  line-height: 1.55; color: var(--text);
  display: none;
}

/* ═══ COLLAPSIBLE DOC CATEGORIES ═══ */
.doc-category {
  background: var(--surface);
  border-radius: var(--r-l);
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.doc-category-header {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}
.doc-category-header:active { background: var(--g100); }
.doc-category-icon { font-size: 22px; flex-shrink: 0; }
.doc-category-name { font-size: 15px; font-weight: 650; flex: 1; }
.doc-category-count {
  background: var(--g100);
  border-radius: var(--r-full);
  padding: 3px 10px;
  font-size: 12px; font-weight: 650;
  color: var(--text-2);
}
.doc-category-arrow { font-size: 16px; color: var(--g300); transition: transform 0.2s; }
.doc-category-arrow.open { transform: rotate(90deg); }
.doc-category-items { display: none; border-top: 1px solid var(--border); }
.doc-category-items.open { display: block; }
.doc-category-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.doc-category-item:last-child { border-bottom: none; }
.doc-item-icon { font-size: 20px; flex-shrink: 0; }
.doc-item-name { font-size: 14px; font-weight: 700; flex: 1; }
.doc-item-info { font-size: 11px; color: var(--text-2); font-weight: 600; margin-top: 2px; }

/* ═══ DOCUMENT DETAIL MODAL ═══ */
.doc-detail-img {
  width: 100%; border-radius: var(--r-l);
  margin-bottom: 16px; max-height: 220px;
  object-fit: cover; cursor: pointer;
}
.doc-detail-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.doc-detail-row:last-child { border-bottom: none; }
.doc-detail-label {
  font-size: 12px; font-weight: 650;
  color: var(--text-2); text-transform: uppercase;
  letter-spacing: 0.05em; width: 90px; flex-shrink: 0;
}
.doc-detail-value { font-size: 14px; font-weight: 700; flex: 1; }
.doc-due-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: var(--r-full);
  font-size: 13px; font-weight: 650; margin-bottom: 12px;
}
.doc-due-ok { background: var(--green-l); color: var(--green-d); }
.doc-due-warn { background: var(--amber-l); color: var(--amber-d); }
.doc-due-bad { background: var(--red-l); color: var(--red); }

/* ═══ TODOS ═══ */
.todo-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.todo-item:last-child { border-bottom: none; }
.todo-chk {
  width: 24px; height: 24px; border-radius: 6px;
  border: 2.5px solid var(--g300);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; margin-top: 1px;
  transition: all 0.2s; font-size: 12px; font-weight: 700; color: white;
}
.todo-chk.done { background: var(--green); border-color: var(--green); }
.todo-chk.urgent { border-color: var(--red); }
.todo-text { font-size: 14px; font-weight: 700; flex: 1; line-height: 1.4; }
.todo-text.done { text-decoration: line-through; color: var(--text-3); }
.todo-meta { font-size: 11px; color: var(--text-2); font-weight: 600; margin-top: 3px; }
.todo-source {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--g100); border-radius: 99px;
  padding: 2px 8px; font-size: 10px; font-weight: 650;
  color: var(--text-2); margin-top: 4px;
}
.todo-priority-urgent { border-left: 3px solid var(--red); padding-left: 10px; }
.todo-priority-normal { border-left: 3px solid var(--amber); padding-left: 10px; }

/* ═══ TODO DASH CARD ═══ */
.todo-dash {
  background: var(--surface); border-radius: var(--r-xl);
  padding: 16px; margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}
.todo-dash-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--border);
  font-size: 13px; font-weight: 700;
}
.todo-dash-item:last-child { border-bottom: none; }
.todo-dash-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}

/* ═══ TIP BUBBLES ═══ */
.tip-bubble {
  display: flex; align-items: flex-start; gap: 12px;
  background: linear-gradient(135deg, rgba(255,107,53,0.08), rgba(255,107,53,0.04));
  border: 1.5px solid rgba(255,107,53,0.2);
  border-radius: var(--r-xl);
  padding: 14px 16px;
  margin-bottom: 12px;
  animation: bubbleIn 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes bubbleIn {
  from { opacity:0; transform:translateY(8px) scale(0.97); }
  to { opacity:1; transform:translateY(0) scale(1); }
}
.tip-bubble-icon { font-size: 24px; flex-shrink: 0; margin-top: 1px; }
.tip-bubble-text { flex: 1; }
.tip-bubble-title { font-size: 14px; font-weight: 650; color: var(--brand-d); margin-bottom: 3px; }
.tip-bubble-body { font-size: 13px; font-weight: 600; color: var(--text-2); line-height: 1.6; }
.tip-bubble-cmd {
  display: inline-block; background: var(--brand-l);
  color: var(--brand-d); border-radius: 6px;
  padding: 1px 7px; font-size: 11px; font-weight: 650;
  font-family: monospace; margin: 2px 1px;
}
.tip-dismiss { font-size: 16px; color: var(--g300); cursor: pointer; flex-shrink: 0; padding: 2px; }

/* ═══ EMPTY STATE WITH TIP ═══ */
.empty-tip {
  text-align: center; padding: 28px 20px;
}
.empty-tip-icon { font-size: 44px; margin-bottom: 10px; }
.empty-tip-title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.empty-tip-text { font-size: 13px; font-weight: 600; color: var(--text-2); line-height: 1.7; margin-bottom: 14px; }
.empty-tip-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--brand-grad); color: white;
  border: none; border-radius: var(--r-full);
  padding: 10px 20px; font-size: 13px; font-weight: 650;
  cursor: pointer; box-shadow: var(--shadow-brand);
}

/* ═══ UPDATE POPUP ═══ */
.update-popup {
  position: fixed; bottom: 90px; left: 16px; right: 16px;
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 16px 18px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  z-index: 500;
  animation: slideUpPop 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes slideUpPop {
  from { opacity:0; transform:translateY(20px); }
  to { opacity:1; transform:translateY(0); }
}
.update-popup-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.update-popup-text { font-size: 13px; font-weight: 600; color: var(--text-2); line-height: 1.6; margin-bottom: 12px; }

/* ═══ MANUAL ═══ */
.manual-section { margin-bottom: 24px; }
.manual-section-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px; padding-bottom: 8px;
  border-bottom: 2px solid var(--brand-l);
}
.manual-section-icon { font-size: 24px; }
.manual-section-title { font-size: 17px; font-weight: 700; }
.manual-item { margin-bottom: 10px; }
.manual-item-title { font-size: 14px; font-weight: 650; color: var(--text); margin-bottom: 3px; }
.manual-item-text { font-size: 13px; font-weight: 600; color: var(--text-2); line-height: 1.7; }
.manual-ai-box {
  background: var(--brand-l);
  border: 1px solid var(--border);
  border-radius: var(--r-l); padding: 14px 16px;
  margin: 10px 0; color: var(--text);
}
.manual-ai-title { font-size: 12px; font-weight: 650; color: var(--brand-d); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 8px; }
.manual-cmd-row { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 6px; font-size: 12px; }
.manual-cmd { background: var(--surface); border: 1px solid var(--border); color: var(--brand-d); border-radius: 6px; padding: 2px 8px; font-family: monospace; font-weight: 600; flex-shrink: 0; }
.manual-cmd-desc { color: var(--text-2); font-weight: 500; line-height: 1.5; }

/* ═══ MER-SIDAN ═══ */
.big-menu-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 8px;
  border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background 0.15s;
  border-radius: var(--r);
}
.big-menu-item:last-child { border-bottom: none; }
.big-menu-item:active { background: var(--g100); }
.big-menu-icon {
  width: 44px; height: 44px;
  border-radius: var(--r-l);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.big-menu-title { font-size: 15px; font-weight: 650; color: var(--text); }
.big-menu-sub { font-size: 12px; color: var(--text-2); font-weight: 600; margin-top: 2px; }

/* ═══════════════════════════════════
   DESKTOP LAYOUT — 900px+
═══════════════════════════════════ */
@media (min-width: 900px) {

  body { background: var(--bg); overflow: auto; }

  .app-shell {
    max-width: 100%;
    height: 100vh;
    display: grid;
    grid-template-columns: 220px 1fr;
    grid-template-rows: 60px 1fr;
    grid-template-areas:
      "sidebar topbar"
      "sidebar content";
    overflow: hidden;
  }

  /* Topbar spans content area only */
  .topbar {
    grid-area: topbar;
    border-bottom: 1px solid var(--border);
    border-left: 1px solid var(--border);
    padding: 0 24px;
    height: 60px;
  }

  /* Hide mobile bottom nav */
  .bottom-nav { display: none; }

  /* Sidebar */
  .desktop-sidebar {
    grid-area: sidebar;
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 24px 0;
    height: 100vh;
    overflow-y: auto;
  }
  .desktop-sidebar-logo {
    font-size: 22px; font-weight: 700;
    letter-spacing: -.5px;
    padding: 0 20px 24px;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    margin-bottom: 12px;
  }
  .desktop-sidebar-logo span { color: var(--brand); }
  .desktop-nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 20px;
    cursor: pointer;
    border-radius: 0;
    color: var(--text-2);
    font-size: 14px; font-weight: 700;
    transition: all 0.15s;
    border-left: 3px solid transparent;
    margin-bottom: 2px;
  }
  .desktop-nav-item:hover { background: var(--g100); color: var(--text); }
  .desktop-nav-item.active {
    background: var(--brand-l);
    color: var(--brand-d);
    border-left-color: var(--brand);
  }
  .desktop-nav-icon { font-size: 20px; width: 24px; text-align: center; }
  .desktop-nav-label { font-size: 14px; font-weight: 700; }
  .desktop-sidebar-bottom {
    margin-top: auto;
    padding: 16px 20px;
    border-top: 1px solid var(--border);
  }
  .desktop-user-chip {
    display: flex; align-items: center; gap: 10px;
    background: var(--g100);
    border-radius: var(--r-l);
    padding: 10px 14px;
    cursor: pointer;
  }
  .desktop-user-avatar { font-size: 24px; }
  .desktop-user-name { font-size: 13px; font-weight: 650; }
  .desktop-user-role { font-size: 11px; color: var(--text-2); font-weight: 600; }

  /* Content area */
  .scroll-area {
    grid-area: content;
    overflow-y: auto;
    padding: 0;
  }

  /* Pages get wider layout */
  .page { max-width: 900px; margin: 0 auto; padding: 24px 32px; }

  /* Desktop grid for hem page */
  .desktop-hem-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
  }
  .desktop-hem-col { display: flex; flex-direction: column; gap: 16px; }

  /* Wider dash cards on desktop */
  .dash-grid { grid-template-columns: 1fr 1fr 1fr 1fr; }

  /* Modals centered on desktop */
  .modal-backdrop { align-items: center; }
  .modal {
    border-radius: 20px;
    max-width: 480px;
    margin: 0 auto;
    max-height: 85vh;
    padding: 24px;
  }

  /* AI widget wider */
  #ai-widget-container { padding: 0; }
  .ai-briefing { border-radius: var(--r-xl); }

  /* Better typography on desktop */
  .hero-value { font-size: 44px; }
  .section-title { font-size: 18px; }
}

/* ═══ DESKTOP STAT ROW ═══ */
.desktop-stats-row {
  display: none;
}
@media (min-width: 900px) {
  .desktop-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
  }
  .desktop-stat {
    background: var(--surface);
    border-radius: var(--r-l);
    padding: 16px 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
  }
  .desktop-stat-label { font-size: 12px; font-weight: 700; color: var(--text-2); margin-bottom: 4px; }
  .desktop-stat-value { font-size: 24px; font-weight: 700; letter-spacing: -.5px; }
  .desktop-stat-sub { font-size: 11px; color: var(--text-2); font-weight: 600; margin-top: 3px; }
}
