/* ============================================================
   OmNote — Dashboard shell (clinical, exam-platform style)
   Loaded LAST. Docked sidebar + slim topbar + home overview.
   Palette matches the landing page (clinical teal).
   ============================================================ */

:root {
  --dash-sidebar-w: 268px;
  --dash-rail-w: 68px;
  --dash-topbar-h: 60px;
  --dash-font-head: 'Sora', 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --dash-font-body: 'Manrope', 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --dash-teal: #0e7c86;
  --dash-teal-dark: #0b6770;
  --dash-teal-soft: #e6f4f5;
  --dash-ink: #0a3d4a;
  --dash-ink-2: #334e59;
  --dash-ink-3: #6b7f88;
  --dash-line: #e4eaee;
  --dash-line-2: #dbe3e7;
  --dash-surface: #ffffff;
  --dash-canvas: #f4f6f8;
  --dash-green: #0f8a5f;
  --dash-amber: #b8760b;
  --dash-red: #c0392b;
}

body,
#app-wrapper {
  font-family: var(--dash-font-body);
  color: var(--dash-ink);
}

#app-wrapper h1,
#app-wrapper h2,
#app-wrapper h3,
#app-wrapper h4,
.doc-title,
.home-title,
.sched-title {
  font-family: var(--dash-font-head);
  letter-spacing: -0.02em;
}

/* ---------- Kill leftover neon / glass ---------- */
#sidebar-menu,
#topbar {
  background: var(--dash-surface) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
}
#topbar::after,
.sidebar-header::after {
  display: none !important;
}
.home-hero-bg,
.hero-blob,
.hero-grid,
.upload-glow {
  display: none !important;
}

/* ============================================================
   SIDEBAR — docked on desktop, drawer on mobile
   ============================================================ */
#sidebar-menu {
  width: var(--dash-sidebar-w);
  border-right: 1px solid var(--dash-line);
}
.sidebar-header {
  height: var(--dash-topbar-h);
  padding: 0 16px;
  border-bottom: 1px solid var(--dash-line);
}
.sidebar-header h2 {
  font-family: var(--dash-font-head);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dash-ink);
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-content {
  padding: 14px 12px 24px;
  overflow-y: auto;
  flex: 1;
}

.nav-group + .nav-group { margin-top: 18px; }
.nav-group-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #90a2ab;
  padding: 0 10px 8px;
}
.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  margin-bottom: 2px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--dash-ink-2);
  font-family: var(--dash-font-body);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background .14s ease, color .14s ease, border-color .14s ease;
}
.nav-item:hover { background: #f1f5f6; color: var(--dash-ink); }
.nav-item.active,
.nav-item[aria-current="page"] {
  background: var(--dash-teal-soft);
  color: var(--dash-teal-dark);
}
.nav-item i,
.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; }
.nav-item .nav-label { flex: 1; min-width: 0; }
.nav-item.is-primary {
  background: var(--dash-teal);
  color: #fff;
  justify-content: center;
}
.nav-item.is-primary:hover { background: var(--dash-teal-dark); color: #fff; }
.nav-item.is-outline {
  border-color: var(--dash-line-2);
  background: #fff;
  justify-content: center;
}
.nav-item.is-outline:hover { border-color: var(--dash-teal); color: var(--dash-teal); background: #fff; }
.nav-row { display: flex; gap: 8px; }
.nav-row .nav-item { margin-bottom: 0; }
.nav-badge {
  background: var(--dash-red);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 999px;
  min-width: 20px;
  text-align: center;
}
.nav-divider { height: 1px; background: var(--dash-line); margin: 16px 4px; }

#streak-chip {
  background: #fdf5e6 !important;
  border: 1px solid #f0dcb4 !important;
  color: var(--dash-amber) !important;
  font-weight: 700;
  border-radius: 8px !important;
  padding: 8px 10px !important;
}

.sidebar-content .stat-card {
  background: #fff;
  border: 1px solid var(--dash-line);
  border-radius: 10px;
  padding: 12px;
  color: var(--dash-ink-3);
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: none;
}
.sidebar-content .stat-card #stat-mastered {
  font-family: var(--dash-font-head);
  font-size: 1.4rem !important;
  font-weight: 700 !important;
  color: var(--dash-teal) !important;
  background: none !important;
  -webkit-text-fill-color: var(--dash-teal) !important;
}

/* Docked layout */
@media (min-width: 1024px) {
  #sidebar-menu { left: 0 !important; box-shadow: none !important; }
  #sidebar-overlay { display: none !important; }
  #app-wrapper { padding-left: var(--dash-sidebar-w); }
  body.sidebar-rail #app-wrapper { padding-left: var(--dash-rail-w); }
  body.sidebar-rail #sidebar-menu { width: var(--dash-rail-w); }
  body.sidebar-rail #sidebar-menu .sidebar-header h2 span,
  body.sidebar-rail #sidebar-menu .nav-label,
  body.sidebar-rail #sidebar-menu .nav-group-label,
  body.sidebar-rail #sidebar-menu .sidebar-section-label,
  body.sidebar-rail #sidebar-menu #document-list,
  body.sidebar-rail #sidebar-menu .stat-card,
  body.sidebar-rail #sidebar-menu #streak-chip,
  body.sidebar-rail #sidebar-menu .nav-badge {
    display: none !important;
  }
  body.sidebar-rail #sidebar-menu .sidebar-content { padding: 12px 8px; }
  body.sidebar-rail #sidebar-menu .nav-item { justify-content: center; padding: 10px 0; }
  body.sidebar-rail #sidebar-menu .nav-row { flex-direction: column; gap: 8px; }
  /* Rail buttons must never spill their label outside the pill */
  body.sidebar-rail #sidebar-menu .nav-item {
    width: 100%;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: clip;
  }
  body.sidebar-rail #sidebar-menu .nav-item > i,
  body.sidebar-rail #sidebar-menu .nav-item [data-lucide] { flex: 0 0 auto; margin: 0; }
  /* Sidebar brand stays visible in rail mode; topbar no longer carries a logo. */
  .sidebar-header .btn-icon { display: none; }
}

/* ============================================================
   TOPBAR
   ============================================================ */
#topbar {
  min-height: var(--dash-topbar-h);
  border-bottom: 1px solid var(--dash-line);
  padding: 0 14px;
  gap: 10px;
}
#topbar .doc-title-group { border-left: 1px solid var(--dash-line); }
#topbar .doc-title { color: var(--dash-ink); font-family: var(--dash-font-head); }
#topbar .doc-subtitle { color: var(--dash-ink-3); letter-spacing: .1em; }
#topbar .btn-icon {
  background: transparent;
  border: 1px solid transparent;
  color: var(--dash-ink-2);
  border-radius: 8px;
}
#topbar .btn-icon:hover { background: #f1f5f6; color: var(--dash-ink); }

/* Tabs → underline bar */
.main-nav-tabs {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  gap: 4px !important;
}
.main-nav-tab {
  background: transparent !important;
  border: none !important;
  border-bottom: 2px solid transparent !important;
  border-radius: 0 !important;
  color: var(--dash-ink-3) !important;
  font-family: var(--dash-font-body);
  font-weight: 600;
  font-size: 13.5px !important;
  padding: 18px 12px !important;
  box-shadow: none !important;
}
.main-nav-tab:hover { color: var(--dash-ink) !important; }
.main-nav-tab.active {
  color: var(--dash-teal) !important;
  border-bottom-color: var(--dash-teal) !important;
}
.pomo-pill {
  margin-left: 10px;
  background: #fff !important;
  border: 1px solid var(--dash-line-2) !important;
  color: var(--dash-ink-2) !important;
  box-shadow: none !important;
}

.btn-upload-top {
  background: var(--dash-teal) !important;
  border: 1px solid var(--dash-teal) !important;
  color: #fff !important;
  font-family: var(--dash-font-body);
  font-weight: 700;
  border-radius: 8px !important;
  box-shadow: none !important;
}
.btn-upload-top:hover { background: var(--dash-teal-dark) !important; }

/* Overflow menu for secondary topbar actions */
.topbar-more { position: relative; }
.topbar-more-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: none;
  gap: 4px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--dash-line-2);
  border-radius: 10px;
  box-shadow: 0 12px 32px -12px rgba(10, 61, 74, 0.25);
  z-index: 400;
}
.topbar-more.open .topbar-more-panel { display: flex; }
.topbar-more-panel .btn-icon { width: 38px; height: 38px; }

#topbar .btn-logout {
  background: #fff !important;
  border: 1px solid var(--dash-line-2) !important;
  color: var(--dash-ink-2) !important;
  border-radius: 8px !important;
  font-weight: 600;
  box-shadow: none !important;
}
#topbar .btn-logout:hover { border-color: var(--dash-red) !important; color: var(--dash-red) !important; }

/* ============================================================
   HOME OVERVIEW
   ============================================================ */
#home-view { background: var(--dash-canvas); }
.home-header {
  background: #fff !important;
  border-bottom: 1px solid var(--dash-line);
  padding: 26px 32px !important;
}
.home-kicker {
  color: var(--dash-teal) !important;
  background: var(--dash-teal-soft) !important;
  border: none !important;
}
.home-title { font-size: 1.7rem !important; color: var(--dash-ink) !important; }
.home-subtitle { color: var(--dash-ink-3) !important; }

.btn-action {
  background: #fff !important;
  border: 1px solid var(--dash-line-2) !important;
  color: var(--dash-ink) !important;
  border-radius: 8px !important;
  font-family: var(--dash-font-body);
  font-weight: 600;
  box-shadow: none !important;
}
.btn-action:hover { border-color: var(--dash-teal) !important; color: var(--dash-teal) !important; }
.btn-action.primary,
.btn-action.violet {
  background: var(--dash-teal) !important;
  border-color: var(--dash-teal) !important;
  color: #fff !important;
}
.btn-action.violet { background: #fff !important; color: var(--dash-ink) !important; border-color: var(--dash-line-2) !important; }
.btn-action.primary:hover { background: var(--dash-teal-dark) !important; color: #fff !important; }

#dash-overview { padding: 24px 32px 8px; }
.dash-section { margin-bottom: 26px; }
.dash-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.dash-section-title {
  font-family: var(--dash-font-head);
  font-size: 15px;
  font-weight: 700;
  color: var(--dash-ink);
}
.dash-section-link {
  background: none;
  border: none;
  color: var(--dash-teal);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--dash-font-body);
}
.dash-section-link:hover { text-decoration: underline; }

.dash-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.dash-stat {
  background: #fff;
  border: 1px solid var(--dash-line);
  border-radius: 10px;
  padding: 16px;
  text-align: left;
  cursor: default;
}
.dash-stat.clickable { cursor: pointer; transition: border-color .14s ease; }
.dash-stat.clickable:hover { border-color: var(--dash-teal); }
.dash-stat-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--dash-ink-3);
}
.dash-stat-label i, .dash-stat-label svg { width: 14px; height: 14px; }
.dash-stat-value {
  font-family: var(--dash-font-head);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--dash-ink);
  margin-top: 6px;
  line-height: 1.1;
}
.dash-stat-value .unit { font-size: .85rem; font-weight: 600; color: var(--dash-ink-3); }
.dash-stat-hint { font-size: 12px; color: var(--dash-ink-3); margin-top: 4px; }
.dash-stat.accent .dash-stat-value { color: var(--dash-teal); }
.dash-stat.warn .dash-stat-value { color: var(--dash-amber); }

.dash-cols {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 16px;
}
.dash-card {
  background: #fff;
  border: 1px solid var(--dash-line);
  border-radius: 12px;
  padding: 16px 18px;
}
.dash-card-title {
  font-family: var(--dash-font-head);
  font-size: 14px;
  font-weight: 700;
  color: var(--dash-ink);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dash-card-title i, .dash-card-title svg { width: 16px; height: 16px; color: var(--dash-teal); }

.dash-list { display: flex; flex-direction: column; }
.dash-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--dash-line);
}
.dash-row:first-child { border-top: none; }
.dash-row-main { min-width: 0; }
.dash-row-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--dash-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-row-sub { font-size: 12px; color: var(--dash-ink-3); margin-top: 2px; }
.dash-chip {
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--dash-teal-soft);
  color: var(--dash-teal-dark);
  white-space: nowrap;
}
.dash-chip.exam { background: #fdecea; color: var(--dash-red); }
.dash-chip.srs { background: #fdf5e6; color: var(--dash-amber); }
.dash-mini-btn {
  background: #fff;
  border: 1px solid var(--dash-line-2);
  border-radius: 7px;
  padding: 5px 11px;
  font-family: var(--dash-font-body);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--dash-ink-2);
  cursor: pointer;
}
.dash-mini-btn:hover { border-color: var(--dash-teal); color: var(--dash-teal); }
.dash-empty { font-size: 13px; color: var(--dash-ink-3); padding: 10px 0; }

.dash-continue {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}
.dash-doc {
  text-align: left;
  background: #fff;
  border: 1px solid var(--dash-line);
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  transition: border-color .14s ease, box-shadow .14s ease;
  font-family: var(--dash-font-body);
}
.dash-doc:hover { border-color: var(--dash-teal); box-shadow: 0 6px 18px -12px rgba(10, 61, 74, .3); }
.dash-doc-top { display: flex; align-items: center; gap: 10px; }
.dash-doc-badge {
  width: 34px; height: 34px; flex-shrink: 0;
  border-radius: 8px;
  background: var(--dash-teal-soft);
  color: var(--dash-teal-dark);
  display: grid; place-items: center;
  font-family: var(--dash-font-head);
  font-weight: 700;
}
.dash-doc-name {
  min-width: 0; flex: 1;
  font-size: 13.5px; font-weight: 700; color: var(--dash-ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dash-doc-meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 10px; font-size: 12px; color: var(--dash-ink-3);
}
.dash-bar { height: 5px; border-radius: 999px; background: #eef2f4; margin-top: 10px; overflow: hidden; }
.dash-bar > span { display: block; height: 100%; background: var(--dash-teal); border-radius: 999px; }

/* Existing subject grid, calmed down */
#home-subjects-grid { padding: 0 32px 40px; }
.home-doc-card {
  background: #fff !important;
  border: 1px solid var(--dash-line) !important;
  border-radius: 12px !important;
  box-shadow: none !important;
  animation: none !important;
}
.home-doc-card:hover { border-color: var(--dash-teal) !important; transform: none !important; }
.doc-card-accent { display: none !important; }
.doc-card-icon {
  background: var(--dash-teal-soft) !important;
  color: var(--dash-teal-dark) !important;
  font-family: var(--dash-font-head);
}
.due-badge { background: #fdf5e6 !important; color: var(--dash-amber) !important; border: none !important; }
.home-subject-label { color: var(--dash-ink-3) !important; }
.subj-dot { background: var(--dash-teal) !important; }

#home-empty-state .btn-empty-upload {
  background: var(--dash-teal) !important;
  border: 1px solid var(--dash-teal) !important;
  color: #fff !important;
  box-shadow: none !important;
}
#home-empty-state .empty-illustration { color: var(--dash-teal) !important; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1279px) {
  .dash-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  #dash-overview { padding: 18px 18px 4px; }
  .home-header { padding: 20px 18px !important; }
  #home-subjects-grid { padding: 0 18px 32px; }
  .topbar-center { overflow-x: auto; }
  .main-nav-tabs { flex-wrap: nowrap; }
  .main-nav-tab { padding: 14px 10px !important; }
}
@media (max-width: 640px) {
  .dash-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .dash-stat-value { font-size: 1.35rem; }
  .home-title { font-size: 1.35rem !important; }
}

/* ============================================================
   SIDEBAR LIBRARY ITEMS (clinical light)
   ============================================================ */
#sidebar-menu .sidebar-section-label { display: flex; align-items: center; gap: 8px; overflow: hidden; }
#sidebar-menu .sidebar-section-label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
#sidebar-menu .sidebar-section-label i { width: 14px; height: 14px; opacity: .7; flex-shrink: 0; }
#sidebar-menu .doc-list-item {
  color: var(--text-primary);
  background: transparent;
  border: 1px solid transparent;
  font-size: .88rem;
  font-weight: 500;
  transform: none;
}
#sidebar-menu .doc-list-item:hover {
  background: var(--surface-subtle, rgba(13,148,136,.06));
  border-color: var(--border-soft, rgba(15,23,42,.08));
  color: var(--text-primary);
  transform: none;
}
#sidebar-menu .doc-list-item.active {
  background: var(--surface-accent, rgba(13,148,136,.1));
  border-color: var(--accent-teal, #0d9488);
  color: var(--text-primary);
  box-shadow: none;
}
#sidebar-menu .doc-list-item::before,
#sidebar-menu .doc-list-item:hover::before,
#sidebar-menu .doc-list-item.active::before { background: transparent; box-shadow: none; }
#sidebar-menu .doc-list-item.active::before { background: var(--accent-teal, #0d9488); }

/* ============================================================
   ACTIVE RECALL REDESIGN
   ============================================================ */
#recall-view {
  background: var(--dash-canvas);
  height: 100%;
  overflow-y: auto;
}
#recall-view .recall-studio {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
}
#recall-view .recall-hero {
  background: var(--dash-surface) !important;
  border: 1px solid var(--dash-line) !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02) !important;
  padding: 32px 40px;
  margin-bottom: 24px;
  position: relative;
}
#recall-view .recall-hero-orb, 
#recall-view .recall-hero-glow { display: none !important; }
#recall-view .recall-hero-inner { position: relative; z-index: 1; text-align: left; }
#recall-view .recall-hero-title { font-size: 1.8rem; font-family: var(--dash-font-head); color: var(--dash-ink); margin: 8px 0; background: none !important; -webkit-text-fill-color: var(--dash-ink) !important; }
#recall-view .sched-title { font-size: 1.8rem; font-family: var(--dash-font-head); color: var(--dash-ink); margin: 8px 0; background: none !important; -webkit-text-fill-color: var(--dash-ink) !important; }
#recall-view .recall-hero-sub,
#recall-view .sched-subtitle { font-size: 0.95rem; color: var(--dash-ink-3); margin: 0 0 24px 0; max-width: 600px; line-height: 1.5; }
#recall-view .recall-hero-kicker,
#recall-view .sched-kicker { color: var(--dash-teal); font-weight: 700; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; display: inline-flex; align-items: center; gap: 6px; margin-bottom: 12px; }
#recall-view .sched-kicker-dot { display: none; }
#recall-view .sched-kicker i,
#recall-view .recall-hero-kicker i { width: 14px; height: 14px; }
#recall-view .recall-hero-badge { color: var(--dash-teal); display: inline-flex; align-items: center; gap: 6px; }
#recall-view .recall-hero-doc { background: var(--dash-canvas) !important; color: var(--dash-ink) !important; border: 1px solid var(--dash-line) !important; border-radius: 6px; padding: 4px 8px; display: inline-flex; align-items: center; gap: 6px; margin-left: 12px; }

#recall-view .recall-hero-stats { display: flex; gap: 40px; align-items: flex-start; margin-top: 12px; }
#recall-view .recall-hero-stat,
#recall-view .recall-stat { border: none !important; text-align: left; padding: 0 !important; background: transparent; }
#recall-view .recall-hero-stat .rhs-num,
#recall-view .recall-stat-val { font-size: 2.2rem; font-family: var(--dash-font-head); font-weight: 700; color: var(--dash-ink); line-height: 1; -webkit-text-fill-color: var(--dash-ink); background: none; }
#recall-view .recall-hero-stat.is-due .rhs-num,
#recall-view .recall-stat-icon.due + div .recall-stat-val { color: var(--dash-red); -webkit-text-fill-color: var(--dash-red); }
#recall-view .recall-hero-stat .rhs-lbl,
#recall-view .recall-stat-lbl { font-size: 0.72rem; color: var(--dash-ink-3); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin-top: 8px; }
#recall-view .recall-stat-icon { display: none; }

#recall-view .recall-hero-progress-head { color: var(--dash-ink-3); }
#recall-view .recall-hero-progress-bar { background: var(--dash-line); border-radius: 4px; overflow: hidden; }
#recall-view .recall-hero-progress-bar > div { background: var(--dash-teal); }

/* Buttons */
#recall-view .recall-btn {
  font-family: var(--dash-font-head); font-weight: 600; font-size: 0.9rem;
  padding: 10px 18px; border-radius: 8px;
  display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer; transition: all 0.15s; border: none;
}
#recall-view .recall-btn.primary { background: var(--dash-teal); color: #fff; }
#recall-view .recall-btn.primary:hover:not(:disabled) { background: var(--dash-teal-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(14,124,134,0.25); }
#recall-view .recall-btn.soft { background: var(--dash-teal-soft); color: var(--dash-teal); border: 1px solid rgba(14,124,134,0.1); }
#recall-view .recall-btn.soft:hover:not(:disabled) { background: rgba(14,124,134,0.15); transform: translateY(-1px); }
#recall-view .recall-btn.ghost { background: transparent; color: var(--dash-ink-3); border: 1px solid var(--dash-line); }
#recall-view .recall-btn.ghost:hover:not(:disabled) { background: var(--dash-canvas); color: var(--dash-ink); }
#recall-view .recall-btn-count { background: rgba(255,255,255,0.2); border-radius: 20px; padding: 2px 8px; font-size: 0.75rem; font-weight: 700; }

/* Grid */
#recall-view .recall-doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

/* Document Cards */
#recall-view .recall-doc-card {
  background: var(--dash-surface) !important;
  border: 1px solid var(--dash-line) !important;
  border-radius: 12px !important;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02) !important;
  transition: border-color .15s ease, box-shadow .15s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
#recall-view .recall-doc-card:hover {
  border-color: var(--dash-teal) !important;
  transform: none !important;
}
#recall-view .recall-doc-glow { display: none !important; }
#recall-view .recall-doc-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}
#recall-view .recall-doc-icon {
  width: 40px; height: 40px;
  background: var(--dash-canvas);
  color: var(--dash-teal);
  border: 1px solid var(--dash-line);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
#recall-view .recall-doc-icon i { width: 18px; height: 18px; }
#recall-view .recall-doc-status {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 4px 10px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid transparent;
}
#recall-view .recall-doc-status i { width: 13px; height: 13px; }
#recall-view .recall-doc-card.status-needs .recall-doc-status { background: #fffdf5; color: var(--dash-amber); border-color: #fce7b0; }
#recall-view .recall-doc-card.status-empty .recall-doc-status { background: var(--dash-canvas); color: var(--dash-ink-3); border-color: var(--dash-line); }
#recall-view .recall-doc-card.status-mastered .recall-doc-status { background: #f2faf6; color: var(--dash-green); border-color: #b7e4d0; }
#recall-view .recall-doc-card.status-due .recall-doc-status { background: #fef6f6; color: var(--dash-red); border-color: #f8c8c9; }

#recall-view .recall-doc-title {
  font-size: 1.05rem; font-weight: 600; color: var(--dash-ink);
  font-family: var(--dash-font-head);
  margin-bottom: 16px; flex: 1; line-height: 1.4;
}

#recall-view .recall-doc-progress {
  height: 4px; border-radius: 2px;
  background: var(--dash-line); margin-bottom: 20px;
  overflow: hidden;
}
#recall-view .recall-doc-progress-fill { background: var(--dash-teal); height: 100%; border-radius: 2px; }

#recall-view .recall-doc-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.8rem; color: var(--dash-ink-3); font-weight: 600;
  border-top: 1px solid var(--dash-line);
  padding-top: 16px; margin-top: auto;
}
#recall-view .recall-doc-meta > span { display: flex; align-items: center; gap: 6px; }
#recall-view .recall-doc-meta i { width: 14px; height: 14px; }
#recall-view .recall-doc-cta {
  color: var(--dash-teal);
}
#recall-view .recall-doc-card.disabled .recall-doc-cta {
  color: var(--dash-ink-3);
}

/* Close Button Overrides */
#recall-view .recall-hero .btn-icon {
  background: transparent !important;
  border: 1px solid var(--dash-line-2) !important;
  color: var(--dash-ink-3) !important;
  border-radius: 8px;
}
#recall-view .recall-hero .btn-icon:hover {
  background: var(--dash-canvas) !important;
  color: var(--dash-ink) !important;
}

/* Empty State */
#recall-view .mm-empty {
  background: var(--dash-surface) !important;
  border: 1px solid var(--dash-line) !important;
  border-radius: 12px;
  padding: 60px;
}
#recall-view .mm-empty h3 { color: var(--dash-ink) !important; font-family: var(--dash-font-head); }
#recall-view .mm-empty p { color: var(--dash-ink-3) !important; }

/* Active Session Body */
#recall-view .recall-card {
  background: var(--dash-surface) !important;
  border: 1px solid var(--dash-line) !important;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02) !important;
  padding: 32px;
}
#recall-view .recall-meta { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--dash-ink-3); }
#recall-view .recall-prompt { font-size: 1.1rem; color: var(--dash-ink); font-family: var(--dash-font-body); margin: 24px 0; line-height: 1.6; }
#recall-view .recall-answer { background: var(--dash-canvas) !important; border: 1px solid var(--dash-line) !important; border-radius: 8px; padding: 16px; font-size: 1rem; color: var(--dash-ink) !important; }
#recall-view .recall-answer:focus { border-color: var(--dash-teal) !important; outline: none; }
#recall-view .btn-action.primary { background: var(--dash-teal); color: #fff; }
#recall-view .btn-action.primary:hover { background: var(--dash-teal-dark); }
#recall-view .btn-action { background: var(--dash-canvas); color: var(--dash-ink); border: 1px solid var(--dash-line); }
#recall-view .btn-action:hover { background: var(--dash-line); }

/* Dark mode overwrites for Recall */
body:not(.app-light-mode) #recall-view {
  --dash-surface: #101a1f;
  --dash-canvas: #0b1317;
  --dash-line: #1e2c33;
  --dash-line-2: #27383f;
  --dash-ink: #e6eef1;
  --dash-ink-2: #b8c7cd;
  --dash-ink-3: #7d919a;
  --dash-teal-soft: rgba(45, 212, 191, .12);
  --dash-teal: #2dd4bf;
  --dash-teal-dark: #14b8a6;
}
body:not(.app-light-mode) #recall-view .recall-doc-card.status-needs .recall-doc-status { background: rgba(184, 118, 11, 0.1); border-color: rgba(184, 118, 11, 0.3); }
body:not(.app-light-mode) #recall-view .recall-doc-card.status-due .recall-doc-status { background: rgba(192, 57, 43, 0.1); border-color: rgba(192, 57, 43, 0.3); }
body:not(.app-light-mode) #recall-view .recall-doc-card.status-mastered .recall-doc-status { background: rgba(15, 138, 95, 0.1); border-color: rgba(15, 138, 95, 0.3); }
body:not(.app-light-mode) #recall-view .recall-doc-card.status-empty .recall-doc-status { background: transparent; border-color: var(--dash-line-2); }

