/* ============================================================
   PhysicsNP App Shell
   Mobile: bottom tabbar + single column
   Desktop (≥900px): fixed left sidebar + wide content grid
   ============================================================ */

/* ═══════════════ SHARED TOKENS ═══════════════ */
:root {
  --sidebar-w: 240px;
  --topbar-h:  64px;
}

/* ═══════════════ BASE SHELL ═══════════════ */
.app-shell { min-height: 100vh; background: var(--bg); }

/* ═══════════════ DESKTOP SIDEBAR NAV ═══════════════ */
.app-sidebar {
  display: none; /* mobile: hidden */
}

@media (min-width: 900px) {
  .app-sidebar {
    display: flex; flex-direction: column;
    position: fixed; top: 0; left: 0; bottom: 0;
    width: var(--sidebar-w); z-index: 100;
    background: var(--surface);
    border-right: 1px solid var(--glass-border);
    padding: 0 0 1.5rem;
    overflow-y: auto;
    scrollbar-width: none;
  }
  .app-sidebar::-webkit-scrollbar { display: none; }

  /* Sidebar brand / logo */
  .sb-brand {
    display: flex; align-items: center; gap: 10px;
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid var(--glass-border);
    text-decoration: none; flex-shrink: 0;
  }
  .sb-brand-logo {
    width: 80px; height: auto; flex-shrink: 0; display: block;
  }
  .sb-brand-name {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700; font-size: 1.05rem; color: var(--ink);
    letter-spacing: -.3px;
  }

  /* Nav sections */
  .sb-section { padding: 1rem .75rem .25rem; }
  .sb-section-label {
    font-size: .62rem; font-weight: 800; letter-spacing: 1.4px;
    text-transform: uppercase; color: var(--ink-faint);
    padding: 0 .5rem; margin-bottom: .4rem;
  }
  .sb-nav-item {
    display: flex; align-items: center; gap: 11px;
    padding: .65rem .85rem; border-radius: var(--r-md);
    text-decoration: none; color: var(--ink-soft);
    font-size: .875rem; font-weight: 600;
    transition: background .2s, color .2s; margin-bottom: 2px;
    position: relative;
  }
  .sb-nav-item i { width: 18px; text-align: center; font-size: .9rem; flex-shrink: 0; }
  .sb-nav-item:hover { background: var(--bg-soft); color: var(--brand); }
  .sb-nav-item.active {
    background: rgba(30,144,255,.10); color: var(--brand); font-weight: 700;
  }
  .sb-nav-item.active::before {
    content: ''; position: absolute; left: 0; top: 20%; bottom: 20%;
    width: 3px; border-radius: 3px; background: var(--brand);
  }
  .sb-nav-item .sb-badge {
    margin-left: auto; background: var(--accent); color: #fff;
    font-size: .6rem; font-weight: 800; padding: 2px 7px;
    border-radius: var(--r-pill);
  }

  /* Sidebar footer (user card) */
  .sb-user {
    margin-top: auto; padding: 1rem .75rem 0;
    border-top: 1px solid var(--glass-border);
  }
  .sb-user-card {
    display: flex; align-items: center; gap: 10px;
    padding: .75rem .85rem; border-radius: var(--r-md);
    background: var(--bg-soft); text-decoration: none;
    transition: background .2s;
  }
  .sb-user-card:hover { background: rgba(30,144,255,.08); }
  .sb-user-avatar {
    width: 36px; height: 36px; border-radius: 50%; object-fit: cover;
    border: 2px solid var(--glass-border); flex-shrink: 0;
  }
  .sb-user-name { font-size: .82rem; font-weight: 700; color: var(--ink); line-height: 1.2; }
  .sb-user-role { font-size: .68rem; color: var(--ink-faint); }
  .sb-theme-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: .65rem .85rem; margin-top: .5rem;
    font-size: .78rem; color: var(--ink-soft); font-weight: 600;
  }
}

/* ═══════════════ DESKTOP TOPBAR ═══════════════ */
.app-topbar { display: none; }

@media (min-width: 900px) {
  .app-topbar {
    display: flex; align-items: center; justify-content: space-between;
    position: fixed; top: 0; left: var(--sidebar-w); right: 0; z-index: 90;
    height: var(--topbar-h); padding: 0 2rem;
    background: var(--glass); backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
  }
  .app-topbar-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem; font-weight: 700; color: var(--ink);
  }
  .app-topbar-right { display: flex; align-items: center; gap: .75rem; }
  .app-topbar-search {
    display: flex; align-items: center; gap: .5rem;
    background: var(--bg-soft); border: 1.5px solid var(--glass-border);
    border-radius: var(--r-pill); padding: .45rem 1rem; width: 240px;
    transition: border-color .2s, width .3s;
  }
  .app-topbar-search:focus-within { border-color: var(--brand); width: 300px; }
  .app-topbar-search i { color: var(--ink-faint); font-size: .85rem; }
  .app-topbar-search input {
    border: none; outline: none; background: transparent;
    font-family: inherit; font-size: .85rem; color: var(--ink); width: 100%;
  }
  .app-topbar-search input::placeholder { color: var(--ink-faint); }
  .app-icon-btn {
    width: 38px; height: 38px; border-radius: 50%;
    background: var(--bg-soft); border: 1px solid var(--glass-border);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--ink-soft); font-size: .9rem;
    text-decoration: none; transition: all .2s;
  }
  .app-icon-btn:hover { background: rgba(30,144,255,.10); color: var(--brand); border-color: var(--brand); }

  /* Content area shifts right of sidebar */
  .app-content-area {
    margin-left: var(--sidebar-w);
    padding-top: var(--topbar-h);
    min-height: 100vh;
  }
}

/* ═══════════════ MOBILE APP BAR ═══════════════ */
.app-bar {
  position: sticky; top: 0; z-index: 80; height: var(--nav-h,60px);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1rem;
  background: var(--glass); backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
}
.app-bar-left { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.app-bar-title { font-weight: 800; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-bar-sub   { font-size: .7rem; color: var(--ink-faint); font-weight: 600; }
.app-bar-right { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
@media (min-width: 900px) { .app-bar { display: none; } }

/* ═══════════════ MOBILE MAIN ═══════════════ */
.app-main { flex: 1; padding-bottom: calc(var(--tabbar-h, 60px) + 1rem); }
@media (min-width: 900px) { .app-main { padding-bottom: 0; } }

/* ═══════════════ BOTTOM TAB BAR (mobile only) ═══════════════ */
.tabbar {
  position: fixed; bottom: 0; inset-inline: 0; z-index: 90;
  height: var(--tabbar-h, 70px);
  background: var(--glass); backdrop-filter: var(--glass-blur);
  border-top: 1px solid var(--glass-border);
  display: flex; 
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center;
  margin-bottom:15px;
  text-decoration: none; color: var(--ink-faint); font-size: .64rem; font-weight: 700;
  position: relative;
}
.tabbar a .ic { font-size: 1rem; transition: transform .25s var(--ease-snap); }
.tabbar a.active { color: var(--brand); }
.tabbar a.active .ic { transform: translateY(-2px) scale(1.1); }

@media (min-width: 900px) { .tabbar { display: none; } }

/* ═══════════════ DESKTOP GRID LAYOUTS ═══════════════ */
/* Wrapped inside .app-content-area on desktop */
.desk-page { padding: 2rem 2.5rem 3rem; }

/* Dashboard grid */
.desk-home-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem; align-items: start;
}
.desk-home-grid .desk-main { min-width: 0; }
.desk-home-grid .desk-side { min-width: 0; }

/* Welcome banner */
.desk-welcome {
  border-radius: var(--r-lg);
  padding: 2rem 2.25rem;
  background: var(--surface);
  border: 1px solid rgba(30,144,255,.16);
  position: relative; overflow: hidden; margin-bottom: 1.75rem;
}

.desk-welcome-glow {
  position: absolute; width: 280px; height: 280px; border-radius: 50%;
  background: rgba(30,144,255,.15); filter: blur(60px);
  top: -100px; right: -60px; pointer-events: none;
}
.desk-welcome h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem; font-weight: 700; margin-bottom: .3rem;
}
.desk-welcome p { font-size: .9rem; color: var(--ink-soft); margin-bottom: 1.25rem; }
.desk-stat-chips { display: flex; gap: .75rem; flex-wrap: wrap; }
.desk-stat-chip {
  display: flex; align-items: center; gap: 7px;
  background: var(--surface); border: 1px solid var(--glass-border);
  border-radius: var(--r-pill); padding: .45rem 1rem;
  font-size: .8rem; font-weight: 700; color: var(--ink-soft);
}
.desk-stat-chip i { color: var(--brand); font-size: .8rem; }
.desk-stat-chip b { color: var(--ink); }

/* Quick action tiles */
.desk-qa-grid {
  display: grid; grid-template-columns: repeat(4,1fr); gap: .85rem;
  margin-bottom: 1.75rem;
}
.desk-qa-tile {
  display: flex; align-items: center; gap: .9rem;
  padding: 1.1rem 1.15rem;
  background: var(--surface2); border: 1px solid var(--glass-border);
  border-radius: var(--r-lg); text-decoration: none;
  transition: transform .25s var(--ease-snap), box-shadow .25s, border-color .2s;
  overflow: hidden; position: relative;
}
.desk-qa-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-pop); border-color: rgba(30,144,255,.25); }
.desk-qa-tile::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--tile-c1,rgba(30,144,255,.05)), var(--tile-c2,transparent));
  pointer-events: none;
}
.desk-qa-icon {
  width: 46px; height: 46px; border-radius: 13px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 1.15rem;
}
.desk-qa-label { font-size: .85rem; font-weight: 800; color: var(--ink); line-height: 1.2; }
.desk-qa-sub   { font-size: .71rem; color: var(--ink-faint); margin-top: 1px; }

/* Section header */
.desk-sec-hd {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.1rem;
}
.desk-sec-hd h3 { font-size: 1rem; font-weight: 800; }
.desk-sec-hd a  { font-size: .8rem; font-weight: 700; color: var(--brand); text-decoration: none; }
.desk-sec-hd a:hover { text-decoration: underline; }

/* Course card grid (desktop) */
.desk-course-grid {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; margin-bottom: 2rem;
}
.desk-course-card {
  border-radius: var(--r-lg); border: 1px solid var(--glass-border);
  background: var(--surface2); overflow: hidden;
  box-shadow: var(--shadow-glass);
  transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
  text-decoration: none;
}
.desk-course-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-pop); border-color: rgba(30,144,255,.28); }
.desk-course-banner {
  height: 130px; position: relative;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; overflow: hidden;
}
.desk-course-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.desk-course-banner > i { opacity: .7; color: var(--brand); z-index: 1; filter: drop-shadow(0 4px 12px rgba(30,144,255,.3)); }
.desk-course-badge {
  position: absolute; top: .6rem; left: .6rem; z-index: 2;
  font-size: .6rem; font-weight: 800; padding: 2px 8px;
  border-radius: var(--r-pill); background: rgba(30,144,255,.18);
  color: var(--brand); border: 1px solid rgba(30,144,255,.25);
}
.desk-course-body { padding: 1rem 1.1rem 1.15rem; }
.desk-course-title { font-size: .9rem; font-weight: 800; line-height: 1.35; margin-bottom: .45rem; color: var(--ink); }
.desk-course-meta { display: flex; gap: .75rem; font-size: .72rem; color: var(--ink-faint); font-weight: 600; }
.desk-course-meta i { margin-right: 3px; }
.desk-course-meta .fa-star { color: #ffb020; }
.desk-course-progress { margin-top: .75rem; }
.desk-course-progress-bar { height: 4px; background: var(--glass-border); border-radius: 4px; overflow: hidden; margin-bottom: 3px; }
.desk-course-progress-fill { height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-light,#818cf8)); border-radius: 4px; }
.desk-course-progress-lbl { font-size: .65rem; color: var(--ink-faint); }

/* Paper card grid (desktop) */
.desk-paper-grid {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem;
}
.desk-paper-card {
  border-radius: var(--r-lg); border: 1px solid var(--glass-border);
  background: var(--surface2); overflow: hidden;
  box-shadow: var(--shadow-glass);
  transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
  text-decoration: none; display: flex; flex-direction: column;
}
.desk-paper-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-pop); border-color: rgba(255,107,43,.28); }
.desk-paper-thumb {
  height: 120px; position: relative;
  background: linear-gradient(135deg, rgba(255,107,43,.12), rgba(255,180,77,.07));
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem; overflow: hidden; flex-shrink: 0;
}
.desk-paper-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.desk-paper-body { padding: .95rem 1.1rem 1.1rem; flex: 1; display: flex; flex-direction: column; }
.desk-paper-year {
  position: absolute; top: .6rem; right: .6rem;
  font-size: .62rem; font-weight: 800; padding: 2px 8px; border-radius: var(--r-pill);
  background: rgba(255,107,43,.18); color: var(--accent); border: 1px solid rgba(255,107,43,.28);
}
.desk-paper-title { font-size: .88rem; font-weight: 800; line-height: 1.35; margin-bottom: .5rem; color: var(--ink); }
.desk-paper-meta { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: auto; }

/* Continue learning card (sidebar) */
.desk-continue-card {
  border-radius: var(--r-lg); border: 1px solid var(--glass-border);
  background: var(--surface); padding: 1.25rem; margin-bottom: 1.25rem;
  box-shadow: var(--shadow-glass); text-decoration: none; display: block;
  transition: border-color .2s, box-shadow .2s;
}
.desk-continue-card:hover { border-color: rgba(30,144,255,.3); box-shadow: var(--shadow-pop); }
.desk-continue-thumb {
  width: 100%; height: 100px; border-radius: 12px; overflow: hidden; margin-bottom: .85rem;
  background: linear-gradient(135deg,rgba(30,144,255,.15),rgba(255,107,43,.08));
  display: flex; align-items: center; justify-content: center; font-size: 2rem;
}
.desk-continue-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Activity / recent panel */
.desk-activity {
  border-radius: var(--r-lg); border: 1px solid var(--glass-border);
  background: var(--surface2); padding: 1.25rem; box-shadow: var(--shadow-glass);
}
.desk-activity-item {
  display: flex; align-items: center; gap: .85rem;
  padding: .7rem 0; border-bottom: 1px solid var(--glass-border);
}
.desk-activity-item:last-child { border-bottom: none; }
.desk-activity-icon {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: .85rem;
}

/* ═══════════════ DESKTOP FULL PAGES ═══════════════ */
/* Courses page — large grid */
.desk-courses-page .desk-course-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.desk-course-card.large .desk-course-banner { height: 180px; }
.desk-course-card.large .desk-course-body { padding: 1.25rem 1.35rem 1.4rem; }
.desk-course-card.large .desk-course-title { font-size: 1rem; }

/* Papers page — large grid */
.desk-paper-grid.large {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.desk-paper-card.large .desk-paper-thumb { height: 160px; }

/* Page controls bar */
.desk-page-controls {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem; margin-bottom: 1.75rem;
}
.desk-filter-group { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.desk-filter-btn {
  padding: .45rem 1rem; border-radius: var(--r-pill); font-size: .82rem; font-weight: 700;
  border: 1.5px solid var(--glass-border); background: var(--surface);
  color: var(--ink-soft); cursor: pointer; transition: all .2s; white-space: nowrap;
}
.desk-filter-btn:hover { border-color: var(--brand); color: var(--brand); }
.desk-filter-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ═══════════════ MOBILE-ONLY COMPONENTS ═══════════════ */
/* Greeting card */
.greet-card {
  margin: 1rem 1rem 0; border-radius: var(--r-lg); padding: 1.35rem 1.2rem;
  background: #27AE60;
  color: #fff;
  border: 1px solid rgba(30,144,255,.16); position: relative; overflow: hidden;
}
.greet-name { font-size: 1.15rem; font-weight: 800; letter-spacing: -.3px; }
.greet-sub  { font-size: .8rem; color: #fff; margin-top: .2rem; }
.greet-streak { display: flex; align-items: center; gap: 6px; margin-top: .85rem; font-size: .78rem; font-weight: 700; color: #033152; }

/* Section label (mobile) */
.app-sec-label {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1rem; margin: 1rem 0 .75rem;
}
.app-sec-label h3 { font-size: .95rem; font-weight: 800; }
.app-sec-label a  { font-size: .78rem; font-weight: 700; color: var(--brand); text-decoration: none; }

/* Quick-action chip grid (mobile) */
.qa-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: .6rem; padding: 0 1rem; }
.qa-chip {
  display: flex; flex-direction: column; align-items: center; gap: .4rem;
  padding: .9rem .3rem; border-radius: var(--r-md);
  background: var(--surface2); border: 2px solid var(--glass-border);
  text-decoration: none; transition: transform .2s var(--ease-snap);
}
.qa-chip:active { transform: scale(.94); }
.qa-chip .ic {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
  background: rgba(30,144,255,.10);
}
.qa-chip .ic i { font-size: 1.05rem; }
.qa-chip .ic.ic-purple { background: rgba(99,102,241,.12); color: var(--brand); }
.qa-chip .ic.ic-teal   { background: rgba(14,165,233,.12); color: var(--teal,#0ea5e9); }
.qa-chip .ic.ic-red    { background: rgba(255,77,109,.13);  color: #ff4d6d; }
.qa-chip .ic.ic-green    { background: rgba(255,77,109,.13);  color: #008000; }
.qa-chip .ic.ic-amber  { background: rgba(245,158,11,.12);  color: var(--accent); }
.qa-chip span.lbl { font-size: .66rem; font-weight: 700; color: var(--ink-soft); text-align: center; }

/* Horizontal rail (mobile) */
.rail { display: flex; gap: .85rem; overflow-x: auto; padding: 0 1rem .5rem; scroll-snap-type: x mandatory; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail-card {
  flex: 0 0 220px; scroll-snap-align: start;
  background: var(--surface); border: 1px solid var(--glass-border); border-radius: var(--r-md);
  overflow: hidden; text-decoration: none; transition: transform .25s var(--ease);
}
.rail-card:active { transform: scale(.97); }
.rail-banner { height: 110px; position: relative; background: linear-gradient(135deg,rgba(30,144,255,.18),rgba(56,189,248,.10)); display: flex; align-items: center; justify-content: center; font-size: 2rem; overflow: hidden; }
.rail-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rail-body { padding: .75rem; }
.rail-title { font-size: .83rem; font-weight: 700; line-height: 1.3; margin-bottom: .3rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rail-meta  { display: flex; gap: .4rem; font-size: .68rem; color: var(--ink-faint); }

/* App list rows (mobile) */
.app-list { padding: 0 1rem; }
.app-row {
  display: flex; align-items: center; gap: .85rem;
  padding: .85rem 0; border-bottom: 1px solid var(--glass-border); text-decoration: none;
}
.app-row:last-child { border-bottom: none; }
.app-row-thumb { width: 52px; height: 52px; border-radius: 13px; flex-shrink: 0; overflow: hidden; background: linear-gradient(135deg,rgba(30,144,255,.15),rgba(56,189,248,.1)); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.app-row-thumb img { width: 100%; height: 100%; object-fit: cover; }
.app-row-body   { flex: 1; min-width: 0; }
.app-row-title  { font-size: .875rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-row-sub    { font-size: .72rem; color: var(--ink-faint); margin-top: 1px; }
.app-row-trail  { flex-shrink: 0; font-size: .78rem; font-weight: 800; color: var(--brand); }

/* Search field */
.app-search {
  margin: 0 1rem 1rem; display: flex; align-items: center; gap: .5rem;
  background: var(--surface); border: 1.5px solid var(--glass-border);
  border-radius: var(--r-pill); padding: .65rem 1rem;
}
.app-search input { border: none; outline: none; background: transparent; flex: 1; font-size: .875rem; color: var(--ink); font-family: inherit; }
.app-search input::placeholder { color: var(--ink-faint); }

/* Segmented filter row */
.seg-row { display: flex; gap: .45rem; overflow-x: auto; padding: 1rem 1rem; scrollbar-width: none; }
.seg-row::-webkit-scrollbar { display: none; }
.seg-pill {
  flex-shrink: 0; padding: .4rem .9rem; border-radius: var(--r-pill);
  background: var(--surface); border: 1.5px solid var(--glass-border);
  font-size: .78rem; font-weight: 700; color: var(--ink-soft); cursor: pointer; white-space: nowrap;
}
.seg-pill.active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* Bottom sheet */
.sheet-layer { position: fixed; inset: 0; z-index: 500; background: rgba(8,10,18,.5); opacity: 0; pointer-events: none; transition: opacity .3s; }
.sheet-layer.open { opacity: 1; pointer-events: all; }
.sheet {
  position: absolute; bottom: 0; inset-inline: 0; background: var(--surface);
  border-radius: 22px 22px 0 0; padding: .75rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom,0));
  transform: translateY(100%); transition: transform .35s var(--ease);
  max-height: 86vh; overflow-y: auto;
}
.sheet-layer.open .sheet { transform: none; }
.sheet-handle { width: 36px; height: 4px; background: var(--glass-border); border-radius: 4px; margin: 0 auto 1rem; }

/* Empty state */
.empty-state { text-align: center; padding: 3rem 1.5rem; }
.empty-state .ic { font-size: 2.75rem; margin-bottom: .75rem; opacity: .7; }
.empty-state h4 { font-size: 1rem; font-weight: 800; margin-bottom: .35rem; }
.empty-state p  { font-size: .84rem; color: var(--ink-soft); margin-bottom: 1.25rem; }

/* Sliding theme toggle */
.theme-slider {
  display: inline-flex; align-items: center;
  width: 52px; height: 28px; border-radius: 14px;
  background: var(--bg-soft); border: 1.5px solid var(--glass-border);
  cursor: pointer; position: relative; transition: background .3s, border-color .3s; flex-shrink: 0;
}
.theme-slider[data-theme="dark"] { background: rgba(30,144,255,.20); border-color: var(--brand); }
.theme-slider .ts-knob {
  position: absolute; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--surface); box-shadow: 0 1px 4px rgba(0,0,0,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: .68rem; color: var(--ink);
  transition: left .3s var(--ease-snap), background .3s, color .3s;
}
.theme-slider[data-theme="dark"] .ts-knob { left: 27px; background: var(--brand); color: #fff; }

/* Pills */
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: var(--r-pill); font-size: .65rem; font-weight: 800; }
.pill-brand { background: rgba(30,144,255,.12); color: #033152; }
.pill-ink   { background: var(--bg-soft); color: var(--ink-soft); border: 1px solid var(--glass-border); }
.pill-accent { background: rgba(255,107,43,.12); color: var(--accent); }
.pill-ok    { background: rgba(22,199,132,.12); color: var(--ok); }
