/* ===================================================================
   NATUREFLOW PLANNER — MAIN STYLESHEET
   Anime + Nature · Glassmorphism · Peaceful
   =================================================================== */
/* ===================================== */
/* CSS VARIABLES / DESIGN TOKENS         */
/* ===================================== */
:root {
  --forest: #2f6b4f;
  --forest-2: #4f9d7d;
  --soft-blue: #a8d5e2;
  --sky-blue: #cfe9f5;
  --river-blue: #6fb3d0;
  --warm-white: #fbfaf5;
  --cream: #f4ead5;
  --brown: #8a6a4b;
  --gray: #e6ebe8;
  --accent: #4f9d7d;
  --text: #22322a;
  --text-muted: #5a6b62;
  --panel-bg: rgba(255, 255, 255, 0.55);
  --panel-border: rgba(255, 255, 255, 0.6);
  --panel-shadow: 0 10px 40px -12px rgba(30, 60, 45, 0.25);
  --blur: 18px;
  --radius: 18px;
  --radius-sm: 12px;
  --anim: 1;
  --card-scale: 1;
  --font-size: 16px;
  --p-low: #8bc48a;
  --p-med: #f0c36d;
  --p-high: #ec8e5a;
  --p-crit: #e26b6b;
}
.theme-dark {
  --forest: #0f1e18;
  --forest-2: #1f3b2e;
  --soft-blue: #2a4a5c;
  --sky-blue: #16283a;
  --river-blue: #3a6d88;
  --warm-white: #eaf2ee;
  --cream: #2a2b28;
  --gray: #1b2622;
  --text: #eaf2ee;
  --text-muted: #9db2a7;
  --panel-bg: rgba(20, 32, 26, 0.55);
  --panel-border: rgba(255, 255, 255, 0.08);
  --panel-shadow: 0 10px 40px -12px rgba(0, 0, 0, 0.55);
}
/* ===================================== */
/* GLOBAL RESET / BASE                   */
/* ===================================== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Poppins', 'Nunito', system-ui, sans-serif;
  font-size: var(--font-size);
  color: var(--text);
  background: var(--sky-blue);
  overflow-x: hidden;
  min-height: 100vh;
  transition: background 0.6s ease, color 0.3s ease;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; color: inherit; }
ul { list-style: none; }
a { color: inherit; }
.muted { color: var(--text-muted); }
.tiny { font-size: 0.75rem; }
/* ===================================== */
/* GLASSMORPHISM UTILITY                 */
/* ===================================== */
.glass {
  background: var(--panel-bg);
  backdrop-filter: blur(var(--blur)) saturate(130%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(130%);
  border: 1px solid var(--panel-border);
  box-shadow: var(--panel-shadow);
  border-radius: var(--radius);
}
/* ===================================================================
   ANIMATED NATURE SCENE (BACKGROUND)
   =================================================================== */
.scene {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.sky {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, #cfe9f5 0%, #e6f2f0 55%, #dbeecf 100%);
  transition: background 0.6s ease;
}
.theme-dark .sky {
  background: linear-gradient(180deg, #0a1626 0%, #12253a 55%, #0d2020 100%);
}
.sun-moon {
  position: absolute; top: 8%; right: 12%;
  width: 90px; height: 90px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff3c4, #ffd97a 60%, transparent 70%);
  box-shadow: 0 0 80px 20px rgba(255, 220, 130, 0.5);
  transition: all 0.8s ease;
}
.theme-dark .sun-moon {
  background: radial-gradient(circle at 30% 30%, #f0f4ff, #cbd6ec 60%, transparent 70%);
  box-shadow: 0 0 60px 15px rgba(200, 220, 255, 0.3);
}
/* Clouds */
.cloud {
  position: absolute;
  background: rgba(255,255,255,0.85);
  border-radius: 100px;
  filter: blur(2px);
  animation: cloudMove calc(120s / var(--anim)) linear infinite;
}
.theme-dark .cloud { background: rgba(180,200,220,0.15); }
.c1 { top: 12%; left: -20%; width: 240px; height: 60px; }
.c2 { top: 22%; left: -40%; width: 180px; height: 45px; animation-duration: calc(160s / var(--anim)); }
.c3 { top: 6%;  left: -30%; width: 300px; height: 70px; animation-duration: calc(200s / var(--anim)); }
@keyframes cloudMove { to { transform: translateX(140vw); } }
/* Mountains */
.mountains {
  position: absolute; bottom: 32%; left: 0; right: 0; height: 30%;
  background:
    radial-gradient(ellipse at 20% 100%, #7a95a8 0%, transparent 55%),
    radial-gradient(ellipse at 55% 100%, #8fa8b8 0%, transparent 55%),
    radial-gradient(ellipse at 85% 100%, #7a95a8 0%, transparent 55%);
  opacity: 0.7;
}
.mountains.near { bottom: 28%; opacity: 0.9; filter: brightness(0.95); }
.theme-dark .mountains { filter: brightness(0.35); }
/* Forest */
.forest {
  position: absolute; bottom: 26%; left: 0; right: 0; height: 12%;
  background: linear-gradient(180deg, #4f7a5a, #2f5a45);
  clip-path: polygon(0 50%, 5% 30%, 10% 45%, 15% 25%, 22% 40%, 28% 20%, 35% 40%, 42% 25%, 50% 45%, 58% 20%, 66% 40%, 74% 30%, 82% 45%, 90% 25%, 96% 40%, 100% 30%, 100% 100%, 0 100%);
}
.theme-dark .forest { background: linear-gradient(180deg, #16362a, #0b1f18); }
/* River */
.river {
  position: absolute; bottom: 0; left: 0; right: 0; height: 26%;
  background: linear-gradient(180deg, #7fc0d6 0%, #4f9dbf 50%, #3a7d9e 100%);
  overflow: hidden;
}
.theme-dark .river { background: linear-gradient(180deg, #1e3a52 0%, #0f2338 100%); }
.water-shine {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg,
    transparent 0, transparent 40px,
    rgba(255,255,255,0.15) 42px, rgba(255,255,255,0.15) 48px,
    transparent 50px, transparent 90px);
  animation: waterFlow calc(14s / var(--anim)) linear infinite;
}
.water-shine.s2 { opacity: 0.5; animation-duration: calc(24s / var(--anim)); background-position: 30px 0; }
@keyframes waterFlow { to { transform: translateX(-90px); } }
/* Grass */
.grass {
  position: absolute; bottom: 20%; left: 0; width: 42%; height: 8%;
  background: linear-gradient(180deg, #7bbd6f, #4c8a4a);
  border-top-right-radius: 50% 100%;
}
.theme-dark .grass { background: linear-gradient(180deg, #2c4d2f, #16301c); }
/* Character (simple stylized figure) */
.character {
  position: absolute; bottom: 22%; left: 26%;
  width: 40px; height: 60px;
  animation: breathe 4s ease-in-out infinite;
}
.char-body { position: absolute; bottom: 0; left: 6px; width: 28px; height: 30px; background: #6b8ec9; border-radius: 12px 12px 6px 6px; }
.char-head { position: absolute; bottom: 26px; left: 10px; width: 20px; height: 20px; background: #f2d3b2; border-radius: 50%; }
.char-hair { position: absolute; bottom: 40px; left: 8px; width: 24px; height: 12px; background: #3b2a1e; border-radius: 50% 50% 40% 40%; }
@keyframes breathe { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
/* Trees */
.tree { position: absolute; bottom: 22%; width: 60px; height: 90px; }
.tree::before {
  content:''; position: absolute; bottom: 0; left: 26px; width: 8px; height: 30px; background: #6b4a2b; border-radius: 3px;
}
.tree::after {
  content:''; position: absolute; bottom: 22px; left: 0; width: 60px; height: 70px;
  background: radial-gradient(circle at 50% 60%, #5da560, #2f6b4f);
  border-radius: 50%;
}
.t1 { left: 4%; }
.t2 { left: 14%; transform: scale(0.75); }
.theme-dark .tree::after { background: radial-gradient(circle at 50% 60%, #2a5540, #143024); }
/* Birds */
.birds { position: absolute; top: 18%; left: 30%; font-size: 18px; color: #333; opacity: 0.7; }
.theme-dark .birds { color: #e0e0e0; opacity: 0.5; }
.bird { position: absolute; animation: birdFly calc(40s / var(--anim)) linear infinite; }
.b2 { top: 30px; left: 20px; animation-delay: -20s; }
@keyframes birdFly { 0%{transform:translateX(0)} 100%{transform:translateX(70vw)} }
/* Leaves */
.leaves { position: absolute; inset: 0; }
.leaf {
  position: absolute; top: -10px;
  width: 10px; height: 10px;
  background: #7ea87a;
  border-radius: 0 100% 0 100%;
  opacity: 0.8;
  animation: leafFall calc(18s / var(--anim)) linear infinite;
}
.leaf:nth-child(1) { left: 15%; animation-delay: 0s; }
.leaf:nth-child(2) { left: 35%; animation-delay: -4s; background: #c69a5a; }
.leaf:nth-child(3) { left: 55%; animation-delay: -8s; }
.leaf:nth-child(4) { left: 75%; animation-delay: -12s; background: #c69a5a; }
.leaf:nth-child(5) { left: 92%; animation-delay: -16s; }
@keyframes leafFall {
  0%   { transform: translate(0, -10vh) rotate(0deg); opacity: 0; }
  10%  { opacity: 0.8; }
  100% { transform: translate(-40px, 110vh) rotate(720deg); opacity: 0; }
}
/* Fireflies (dark mode only) */
.fireflies { position: absolute; inset: 0; opacity: 0; transition: opacity 0.6s; }
.theme-dark .fireflies { opacity: 1; }
.fireflies span {
  position: absolute;
  width: 4px; height: 4px; border-radius: 50%;
  background: #fff4a3;
  box-shadow: 0 0 8px 2px rgba(255, 244, 163, 0.8);
  animation: flicker calc(4s / var(--anim)) ease-in-out infinite;
}
.fireflies span:nth-child(1) { top: 40%; left: 10%; animation-delay: 0s; }
.fireflies span:nth-child(2) { top: 55%; left: 22%; animation-delay: -1s; }
.fireflies span:nth-child(3) { top: 65%; left: 34%; animation-delay: -2s; }
.fireflies span:nth-child(4) { top: 48%; left: 48%; animation-delay: -0.5s; }
.fireflies span:nth-child(5) { top: 60%; left: 58%; animation-delay: -1.5s; }
.fireflies span:nth-child(6) { top: 42%; left: 72%; animation-delay: -2.5s; }
.fireflies span:nth-child(7) { top: 58%; left: 84%; animation-delay: -3s; }
.fireflies span:nth-child(8) { top: 70%; left: 92%; animation-delay: -3.5s; }
@keyframes flicker {
  0%,100% { opacity: 0.2; transform: translateY(0); }
  50%     { opacity: 1;   transform: translateY(-10px); }
}
/* ===================================================================
   ANIMATION CONTROL
   The scene (clouds/water/character/birds/leaves/fireflies) and the
   Critical-task pulse both loop forever by default. Two independent
   guards keep that from burning CPU/GPU when it isn't buying anyone
   anything:
   1. prefers-reduced-motion — respects the user's OS-level motion
      setting. The Critical pulse still needs to *read* as urgent
      without moving, so it gets a static ring instead of no signal.
   2. .anim-paused (toggled by animation.js via visibilitychange) —
      freezes everything while the tab is in the background, since
      an off-screen animation can't be seen and shouldn't be costing
      anything. This is independent of the --anim speed slider in
      Settings, which still controls speed whenever motion does run.
   =================================================================== */
@media (prefers-reduced-motion: reduce) {
  .scene * {
    animation: none !important;
  }
  .task.p-critical {
    animation: none !important;
    box-shadow: 0 0 0 3px rgba(226,107,107,0.5);
  }
}
body.anim-paused .scene *,
body.anim-paused .task.p-critical {
  animation-play-state: paused !important;
}
/* ===================================================================
   APP SHELL LAYOUT
   =================================================================== */
.app {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
  gap: 18px;
  padding: 18px;
}
/* ===================================== */
/* SIDEBAR STYLING                       */
/* ===================================== */
.sidebar {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 18px;
  height: calc(100vh - 36px);
  animation: slideInLeft 0.5s ease;
}
@keyframes slideInLeft { from { transform: translateX(-20px); opacity: 0; } to { transform: none; opacity: 1; } }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(135deg, var(--forest-2), var(--river-blue));
  display: grid; place-items: center; font-size: 20px;
  box-shadow: 0 6px 18px -6px var(--accent);
}
.brand-name { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.01em; }
.brand-sub  { font-size: 0.75rem; color: var(--text-muted); }
.nav { display: flex; flex-direction: column; gap: 4px; flex: 1; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  font-size: 0.92rem; color: var(--text); font-weight: 500;
  transition: all 0.2s ease;
  text-align: left;
}
.nav-item:hover { background: rgba(255,255,255,0.35); transform: translateX(2px); }
.theme-dark .nav-item:hover { background: rgba(255,255,255,0.06); }
.nav-item.active {
  background: linear-gradient(135deg, color-mix(in oklab, var(--accent) 25%, transparent), transparent);
  color: var(--accent);
  font-weight: 600;
}
.nav-item i { width: 18px; height: 18px; }
.sidebar-foot { border-top: 1px solid var(--panel-border); padding-top: 12px; }
/* ===================================== */
/* MAIN AREA STYLING                     */
/* ===================================== */
.main {
  display: flex; flex-direction: column; gap: 18px;
  min-width: 0;
}
/* Topbar */
.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 18px;
  animation: slideDown 0.4s ease;
}
@keyframes slideDown { from { transform: translateY(-10px); opacity: 0; } to { transform: none; opacity: 1; } }
.search-wrap {
  flex: 1; display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.4);
  border: 1px solid var(--panel-border);
  border-radius: 12px; padding: 8px 12px;
  transition: all 0.2s;
}
.theme-dark .search-wrap { background: rgba(255,255,255,0.06); }
.search-wrap:focus-within { box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 30%, transparent); }
.search-wrap input { flex: 1; background: transparent; border: none; outline: none; font-size: 0.95rem; }
.search-wrap i { width: 16px; color: var(--text-muted); }
.top-actions { display: flex; align-items: center; gap: 10px; }
.clock { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 0.9rem; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.35);
  border: 1px solid var(--panel-border);
  transition: all 0.2s;
}
.icon-btn:hover { background: rgba(255,255,255,0.6); transform: scale(1.05); }
.theme-dark .icon-btn { background: rgba(255,255,255,0.06); }
.theme-dark .icon-btn:hover { background: rgba(255,255,255,0.12); }
.icon-btn i { width: 18px; height: 18px; }
.mobile-only { display: none; }
/* ===================================== */
/* VIEW / PANEL STYLING                  */
/* ===================================== */
.view { display: none; animation: fadeUp 0.4s ease; }
.view.active { display: block; }
@keyframes fadeUp { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
.view-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 18px; gap: 12px; flex-wrap: wrap; }
.view-head h2 { font-size: 1.7rem; font-weight: 700; letter-spacing: -0.02em; }
.panel { padding: 20px; transform: scale(var(--card-scale)); transform-origin: top left; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.panel-head h3 { font-size: 1.05rem; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.panel-head i { width: 18px; height: 18px; color: var(--accent); }
/* ===================================== */
/* DASHBOARD STATS                       */
/* ===================================== */
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px; margin-bottom: 20px;
}
.stat { padding: 18px 20px; }
.stat-label { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 6px; }
.stat-value { font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; color: var(--accent); }
.progress-stat .progress-bar {
  margin-top: 10px; height: 8px; background: rgba(0,0,0,0.08);
  border-radius: 999px; overflow: hidden;
}
.theme-dark .progress-stat .progress-bar { background: rgba(255,255,255,0.1); }
.progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--forest-2), var(--river-blue));
  transition: width 0.6s ease;
}
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.quote-text { font-style: italic; font-size: 1rem; line-height: 1.6; color: var(--text); }
.mini-list li { padding: 8px 0; border-bottom: 1px dashed var(--panel-border); font-size: 0.95rem; }
.mini-list li:last-child { border-bottom: none; }
/* ===================================== */
/* SECTIONS GRID (BLOCKS)                */
/* ===================================== */
.sections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}
.sections-grid.two { grid-template-columns: repeat(2, 1fr); }
.sections-grid.one { grid-template-columns: 1fr; max-width: 720px; }
/* ===================================== */
/* TASK LIST + TASK ITEM                 */
/* ===================================== */
.task-list { display: flex; flex-direction: column; gap: 8px; min-height: 40px; }
.task-list.drag-over { background: color-mix(in oklab, var(--accent) 10%, transparent); border-radius: 12px; }
.task {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center; gap: 10px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.5);
  border: 1px solid var(--panel-border);
  border-left: 3px solid var(--p-med);
  border-radius: 10px;
  transition: all 0.2s;
  cursor: grab;
}
.theme-dark .task { background: rgba(255,255,255,0.05); }
.task:hover { transform: translateY(-1px); box-shadow: 0 4px 14px -6px rgba(0,0,0,0.15); }
.task.dragging { opacity: 0.5; }
.task.p-low  { border-left-color: var(--p-low); }
.task.p-medium { border-left-color: var(--p-med); }
.task.p-high { border-left-color: var(--p-high); }
.task.p-critical { border-left-color: var(--p-crit); animation: pulseCrit 2s ease-in-out infinite; }
@keyframes pulseCrit { 0%,100% { box-shadow: 0 0 0 0 rgba(226,107,107,0.4); } 50% { box-shadow: 0 0 0 6px rgba(226,107,107,0); } }
.task.done .task-title { text-decoration: line-through; color: var(--text-muted); }
.task-check {
  width: 20px; height: 20px; border-radius: 6px;
  border: 2px solid var(--forest-2);
  display: grid; place-items: center;
  transition: all 0.2s;
  flex-shrink: 0;
}
.task-check.checked { background: var(--forest-2); }
.task-check.checked::after { content: '✓'; color: white; font-size: 12px; font-weight: bold; }
.task-body { min-width: 0; }
.task-title { font-weight: 500; font-size: 0.95rem; }
.task-meta { display: flex; gap: 8px; font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; flex-wrap: wrap; }
.task-meta .pill { padding: 1px 8px; border-radius: 999px; background: rgba(0,0,0,0.06); }
.theme-dark .task-meta .pill { background: rgba(255,255,255,0.08); }
.task-actions { display: flex; gap: 4px; opacity: 0; transition: opacity 0.2s; }
.task:hover .task-actions { opacity: 1; }
.task-actions button {
  width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center;
  transition: background 0.2s;
}
.task-actions button:hover { background: rgba(0,0,0,0.08); }
.theme-dark .task-actions button:hover { background: rgba(255,255,255,0.1); }
.task-actions i { width: 14px; height: 14px; }
/* ===================================== */
/* BUTTONS                               */
/* ===================================== */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 16px; border-radius: 10px;
  font-weight: 500; font-size: 0.9rem;
  transition: all 0.2s;
  border: 1px solid transparent;
}
.btn.primary { background: linear-gradient(135deg, var(--forest-2), var(--river-blue)); color: white; box-shadow: 0 6px 20px -8px var(--accent); }
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 8px 24px -8px var(--accent); }
.btn.ghost { background: rgba(255,255,255,0.4); border-color: var(--panel-border); }
.btn i { width: 16px; height: 16px; }
.btn-mini {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; font-size: 0.8rem; border-radius: 8px;
  background: rgba(255,255,255,0.5); border: 1px solid var(--panel-border);
  transition: all 0.2s;
}
.btn-mini:hover { background: var(--accent); color: white; }
.btn-mini i { width: 12px; height: 12px; }
.chip {
  padding: 8px 14px; border-radius: 999px;
  background: rgba(255,255,255,0.4); border: 1px solid var(--panel-border);
  font-size: 0.85rem; transition: all 0.2s;
}
.chip:hover { background: var(--accent); color: white; }
.chip.danger:hover { background: var(--p-crit); }
.btn-group { display: flex; gap: 6px; flex-wrap: wrap; }
/* ===================================== */
/* FLASHCARDS                            */
/* ===================================== */
.flash-toolbar {
  display: flex; gap: 10px; padding: 12px; margin-bottom: 16px; align-items: center;
}
.flash-toolbar input, .flash-toolbar select {
  padding: 8px 12px; border-radius: 8px;
  background: rgba(255,255,255,0.4);
  border: 1px solid var(--panel-border); outline: none;
}
.flash-toolbar input { flex: 1; }
.flash-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.flash-card {
  padding: 16px; border-radius: var(--radius);
  background: var(--panel-bg);
  backdrop-filter: blur(var(--blur));
  border: 1px solid var(--panel-border);
  border-top: 4px solid var(--accent);
  box-shadow: var(--panel-shadow);
  display: flex; flex-direction: column; gap: 8px;
  transition: all 0.25s;
  position: relative;
  animation: fadeUp 0.35s ease;
}
.flash-card:hover { transform: translateY(-3px); }
.flash-card.pinned::after {
  content: '📌'; position: absolute; top: 8px; right: 10px;
}
.flash-card h4 { font-size: 1.05rem; font-weight: 600; padding-right: 22px; }
.flash-card .cat { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.flash-card p { font-size: 0.9rem; line-height: 1.5; }
.flash-card .tags { display: flex; gap: 4px; flex-wrap: wrap; }
.flash-card .tag { font-size: 0.7rem; padding: 2px 8px; border-radius: 999px; background: rgba(0,0,0,0.06); }
.theme-dark .flash-card .tag { background: rgba(255,255,255,0.08); }
.flash-card .flash-actions { display: flex; gap: 6px; margin-top: auto; padding-top: 8px; border-top: 1px dashed var(--panel-border); }
.flash-card .flash-actions button { padding: 4px 8px; border-radius: 6px; font-size: 0.75rem; background: rgba(255,255,255,0.35); }
.flash-card .flash-actions button:hover { background: var(--accent); color: white; }
.flash-card .flash-actions button.fav.on { color: #e26b6b; }
/* ===================================== */
/* SETTINGS PANEL                        */
/* ===================================== */
.settings-panel { max-width: 640px; display: flex; flex-direction: column; gap: 18px; }
.setting-row { display: grid; grid-template-columns: 160px 1fr; align-items: center; gap: 12px; }
.setting-row label { font-weight: 500; }
.setting-row input[type="range"] { width: 100%; }
.setting-row input[type="color"] { width: 44px; height: 30px; border: none; background: transparent; cursor: pointer; }
/* ===================================== */
/* MODALS                                */
/* ===================================== */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(10, 22, 30, 0.35);
  backdrop-filter: blur(6px);
  display: grid; place-items: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}
.modal-backdrop[hidden] { display: none !important; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  max-width: 520px; width: 100%; padding: 24px;
  animation: modalIn 0.25s ease;
}
@keyframes modalIn { from { transform: scale(0.96) translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-body { display: flex; flex-direction: column; gap: 12px; }
.modal-body label { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; font-weight: 500; color: var(--text-muted); }
.modal-body input, .modal-body textarea, .modal-body select {
  padding: 10px 12px; border-radius: 10px;
  background: rgba(255,255,255,0.5); border: 1px solid var(--panel-border);
  outline: none; font-size: 0.95rem; color: var(--text);
  transition: all 0.15s;
}
.theme-dark .modal-body input, .theme-dark .modal-body textarea, .theme-dark .modal-body select {
  background: rgba(255,255,255,0.06);
}
.modal-body input:focus, .modal-body textarea:focus, .modal-body select:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 25%, transparent);
}
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
/* ===================================== */
/* RESPONSIVE                            */
/* ===================================== */
@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; padding: 12px; gap: 12px; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: 260px; height: 100vh;
    transform: translateX(-110%); transition: transform 0.3s ease;
    z-index: 90; border-radius: 0 var(--radius) var(--radius) 0;
  }
  .sidebar.open { transform: translateX(0); }
  .mobile-only { display: grid; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .sections-grid.two { grid-template-columns: 1fr; }
  .setting-row { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .view-head h2 { font-size: 1.4rem; }
  .clock { display: none; }
  .row-2 { grid-template-columns: 1fr; }
}
