/* ============================================================
   FOKUS — Pomodoro Timer
   Design language: near-black glass cards, warm ember glow,
   soft depth, fluid micro-interactions.
   ============================================================ */

:root{
  --bg:        #08060a;
  --bg-2:      #0d0a0c;
  --card:      #100c0e;
  --card-2:    #171114;
  --stroke:    rgba(255,255,255,.07);
  --stroke-2:  rgba(255,255,255,.12);
  --txt:       #f4efee;
  --muted:     #8b8189;
  --muted-2:   #5f575e;
  --ember:     #ff5a2b;
  --ember-2:   #ff8a3d;
  --ember-3:   #ff2d1a;
  --ok:        #4ade80;
  --radius:    30px;
  --radius-sm: 16px;
  --ease:      cubic-bezier(.22,1,.36,1);
  --ease-soft: cubic-bezier(.4,0,.2,1);
  --shadow:    0 30px 60px -30px rgba(0,0,0,.9), 0 2px 0 rgba(255,255,255,.03) inset;
}

*{ box-sizing:border-box; margin:0; padding:0; }

html{ -webkit-text-size-adjust:100%; }

body{
  min-height:100dvh;
  font-family:"Inter",-apple-system,BlinkMacSystemFont,"SF Pro Display","Segoe UI",system-ui,sans-serif;
  background:var(--bg);
  color:var(--txt);
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
  letter-spacing:-.01em;
}

/* ---------------- ambient glow ---------------- */
.ambient{ position:fixed; inset:0; z-index:0; pointer-events:none; overflow:hidden; }
.orb{
  position:absolute; border-radius:50%; filter:blur(90px); opacity:.55;
  will-change:transform;
}
.orb-a{
  width:56vw; height:56vw; left:-14vw; top:-14vw;
  background:radial-gradient(circle at 40% 40%, #ff6a2b 0%, #ff2d1a 40%, transparent 70%);
  animation:drift 22s var(--ease-soft) infinite alternate;
}
.orb-b{
  width:46vw; height:46vw; right:-12vw; bottom:-16vw;
  background:radial-gradient(circle at 50% 50%, #ff9a3d 0%, #ff3d1a 45%, transparent 72%);
  opacity:.35;
  animation:drift 28s var(--ease-soft) infinite alternate-reverse;
}
@keyframes drift{
  from{ transform:translate3d(0,0,0) scale(1); }
  to  { transform:translate3d(6vw,4vw,0) scale(1.18); }
}
.grain{
  position:absolute; inset:-50%; opacity:.035; mix-blend-mode:overlay;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
  animation:grain 8s steps(6) infinite;
}
@keyframes grain{
  0%,100%{ transform:translate(0,0); } 20%{ transform:translate(-4%,3%); }
  40%{ transform:translate(3%,-4%); } 60%{ transform:translate(-3%,-3%); }
  80%{ transform:translate(4%,4%); }
}

/* ---------------- stage ---------------- */
.stage{
  position:relative; z-index:1;
  max-width:1120px; margin:0 auto;
  padding:clamp(20px,4vw,52px) clamp(16px,3.4vw,40px) 40px;
  display:flex; flex-direction:column; gap:clamp(18px,2.6vw,30px);
  min-height:100dvh;
}

/* ---------------- topbar ---------------- */
.topbar{ display:flex; align-items:center; justify-content:space-between; gap:16px; }
.brand{ display:flex; align-items:center; gap:14px; }
.brand-dot{
  width:12px; height:12px; border-radius:50%;
  background:linear-gradient(140deg,var(--ember-2),var(--ember-3));
  box-shadow:0 0 0 5px rgba(255,90,43,.12), 0 0 22px 4px rgba(255,90,43,.5);
  animation:pulse 2.6s var(--ease-soft) infinite;
}
@keyframes pulse{
  0%,100%{ box-shadow:0 0 0 5px rgba(255,90,43,.12), 0 0 22px 4px rgba(255,90,43,.5); }
  50%    { box-shadow:0 0 0 9px rgba(255,90,43,.06), 0 0 30px 6px rgba(255,90,43,.65); }
}
.brand-text h1{ font-size:clamp(20px,3vw,26px); font-weight:800; letter-spacing:-.04em; line-height:1; }
.brand-text h1 span{ color:var(--ember); }
.brand-text p{ font-size:12.5px; color:var(--muted); margin-top:3px; }
.topbar-right{ display:flex; align-items:center; gap:10px; }

.streak{
  display:flex; align-items:center; gap:7px;
  padding:9px 14px; border-radius:999px;
  background:rgba(255,255,255,.04); border:1px solid var(--stroke);
  font-weight:700; font-size:14px;
  transition:background .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.streak:hover{ background:rgba(255,90,43,.1); border-color:rgba(255,90,43,.3); transform:translateY(-2px); }
.streak .ico{ width:15px; height:15px; stroke:var(--ember-2); }

/* account chip in topbar */
.account-btn{
  display:flex; align-items:center; gap:9px;
  padding:7px 15px 7px 8px; border-radius:999px; cursor:pointer;
  background:rgba(255,255,255,.04); border:1px solid var(--stroke);
  color:var(--muted); font-family:inherit; font-size:12.5px; font-weight:700;
  transition:all .35s var(--ease); max-width:190px;
}
.account-btn:hover{ background:rgba(255,255,255,.09); color:#e9e3e4; transform:translateY(-2px); }
.account-btn.signed{ color:#e9e3e4; }
.account-avatar{
  width:26px; height:26px; border-radius:50%; flex:none;
  background:linear-gradient(135deg,var(--ember-2),var(--ember-3));
  display:grid; place-items:center; font-size:11px; font-weight:800; color:#fff;
  background-size:cover; background-position:center;
  box-shadow:0 0 0 2px rgba(255,255,255,.08);
}
.account-avatar[hidden]{ display:none; }
#accountLabel{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sync-dot{
  width:8px; height:8px; border-radius:50%; flex:none;
  background:var(--muted-2); transition:all .4s var(--ease);
}
.sync-dot.on{ background:var(--ok); box-shadow:0 0 10px 2px rgba(74,222,128,.6); }
.sync-dot.busy{ background:var(--ember-2); box-shadow:0 0 10px 2px rgba(255,138,61,.6); animation:blink .9s ease-in-out infinite; }
.sync-dot.err{ background:#ff5a5a; box-shadow:0 0 10px 2px rgba(255,90,90,.6); }
@keyframes blink{ 0%,100%{ opacity:1; } 50%{ opacity:.25; } }

/* ---------------- generic card ---------------- */
.card{
  position:relative;
  background:linear-gradient(165deg, var(--card-2) 0%, var(--card) 55%, #0b0809 100%);
  border:1px solid var(--stroke);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  overflow:hidden;
  transition:transform .5s var(--ease), border-color .5s var(--ease), box-shadow .5s var(--ease);
  isolation:isolate;
}
.card::before{
  content:""; position:absolute; inset:0; border-radius:inherit; pointer-events:none;
  background:radial-gradient(120% 90% at 12% 0%, rgba(255,255,255,.06), transparent 55%);
  opacity:.9;
}
.card:hover{
  transform:translateY(-6px);
  border-color:var(--stroke-2);
  box-shadow:0 42px 80px -34px rgba(0,0,0,.95), 0 0 0 1px rgba(255,90,43,.12), 0 0 60px -20px rgba(255,90,43,.35);
}

/* ---------------- grid ---------------- */
.grid{
  display:grid;
  grid-template-columns:1.35fr 1fr;
  grid-template-areas:
    "timer tasks"
    "timer stats";
  gap:clamp(16px,2vw,24px);
  flex:1;
  align-content:start;
}
.card-timer{ grid-area:timer; }
.card-tasks{ grid-area:tasks; }
.card-stats{ grid-area:stats; }

/* ============================================================
   TIMER CARD
   ============================================================ */
.card-timer{
  padding:clamp(22px,3vw,34px);
  display:flex; flex-direction:column; gap:clamp(16px,2.2vw,26px);
  min-height:520px;
}
.card-glow{
  position:absolute; width:340px; height:340px; left:50%; top:52%;
  transform:translate(-50%,-50%); border-radius:50%;
  background:radial-gradient(circle, rgba(255,90,43,.30), transparent 65%);
  filter:blur(30px); opacity:.7; pointer-events:none; z-index:-1;
  transition:opacity .8s var(--ease), transform .8s var(--ease);
  animation:breathe 6s var(--ease-soft) infinite;
}
@keyframes breathe{ 0%,100%{ transform:translate(-50%,-50%) scale(1); } 50%{ transform:translate(-50%,-50%) scale(1.1); } }
.card-timer.is-running .card-glow{ opacity:1; }

.timer-head{ display:flex; justify-content:center; }
.mode-chip{
  display:inline-flex; align-items:center; gap:8px;
  padding:8px 16px; border-radius:999px;
  background:rgba(255,255,255,.05); border:1px solid var(--stroke);
  font-size:11.5px; font-weight:800; letter-spacing:.16em; color:#d8d2d4;
  transition:all .4s var(--ease);
}
.mode-dot{ width:7px; height:7px; border-radius:50%; background:var(--ember); box-shadow:0 0 10px 2px rgba(255,90,43,.7); }
.card-timer[data-mode="short"] .mode-dot{ background:#4ade80; box-shadow:0 0 10px 2px rgba(74,222,128,.7); }
.card-timer[data-mode="long"]  .mode-dot{ background:#60a5fa; box-shadow:0 0 10px 2px rgba(96,165,250,.7); }
.card-timer[data-mode="short"] .mode-chip,
.card-timer[data-mode="long"]  .mode-chip{ color:#e6e1e2; }

/* dial */
.dial-wrap{
  position:relative; flex:1;
  display:grid; place-items:center;
  min-height:250px;
}
.dial{ width:min(340px,80%); aspect-ratio:1; overflow:visible; }
.dial-track{ fill:none; stroke:rgba(255,255,255,.06); stroke-width:10; }
.dial-track2{ fill:none; stroke:rgba(255,255,255,.025); stroke-width:1; }
.dial-progress{
  fill:none; stroke:url(#ringGrad); stroke-width:10; stroke-linecap:round;
  stroke-dasharray:653.45; stroke-dashoffset:0;
  filter:url(#ringGlow);
  transition:stroke-dashoffset .35s linear;
}
.card-timer[data-mode="short"] .dial-progress{ stroke:#4ade80; filter:drop-shadow(0 0 8px rgba(74,222,128,.6)); }
.card-timer[data-mode="long"]  .dial-progress{ stroke:#60a5fa; filter:drop-shadow(0 0 8px rgba(96,165,250,.6)); }

.dial-center{
  position:absolute; inset:0;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:8px; pointer-events:none;
}
.eye{ width:22px; height:22px; fill:none; stroke:var(--muted-2); stroke-width:1.6; }
.time{
  font-size:clamp(52px,9.5vw,76px); font-weight:800; letter-spacing:-.045em;
  font-variant-numeric:tabular-nums; line-height:1;
  background:linear-gradient(180deg,#ffffff 30%,#cbc3c6 100%);
  -webkit-background-clip:text; background-clip:text; color:transparent;
}
.pips{ display:flex; gap:5px; margin-top:2px; }
.pips i{
  width:4px; height:4px; border-radius:2px; background:var(--muted-2);
  transition:all .4s var(--ease);
}
.pips i.on{ background:var(--ember); box-shadow:0 0 8px 1px rgba(255,90,43,.7); height:11px; }
.phase-caption{ font-size:11.5px; letter-spacing:.2em; text-transform:uppercase; color:var(--muted); font-weight:700; }

/* timer actions */
.timer-actions{
  display:flex; align-items:center; justify-content:center; gap:14px;
}
.icon-btn{
  width:48px; height:48px; flex:none;
  display:grid; place-items:center;
  border-radius:16px; cursor:pointer;
  background:rgba(255,255,255,.05); border:1px solid var(--stroke);
  color:#cfc8ca;
  transition:transform .35s var(--ease), background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}
.icon-btn .ico{ width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; }
.icon-btn:hover{ background:rgba(255,255,255,.1); color:#fff; transform:translateY(-3px) scale(1.05); border-color:var(--stroke-2); }
.icon-btn:active{ transform:translateY(-1px) scale(.97); }
.icon-btn.ghost{ background:transparent; }
.icon-btn.ghost:hover{ background:rgba(255,255,255,.07); }

.pill{
  border:none; cursor:pointer; font-family:inherit;
  font-size:13.5px; font-weight:800; letter-spacing:.14em;
  padding:15px 46px; border-radius:999px;
  transition:transform .35s var(--ease), box-shadow .35s var(--ease), background .35s var(--ease), color .35s var(--ease);
}
.pill-main{
  color:#fff;
  background:linear-gradient(135deg,#3a3236,#211c1f);
  border:1px solid rgba(255,255,255,.1);
  box-shadow:0 10px 30px -12px rgba(0,0,0,.9);
  position:relative; overflow:hidden;
}
.pill-main::after{
  content:""; position:absolute; inset:0; border-radius:inherit;
  background:linear-gradient(135deg,rgba(255,138,61,.9),rgba(255,45,26,.9));
  opacity:0; transition:opacity .4s var(--ease);
}
.pill-main span,.pill-main{ position:relative; z-index:1; }
.pill-main:hover{ transform:translateY(-3px); box-shadow:0 18px 40px -14px rgba(255,90,43,.7); }
.pill-main:hover::after{ opacity:1; }
.pill-main:active{ transform:translateY(-1px) scale(.98); }
.card-timer.is-running .pill-main::after{ opacity:1; }
.card-timer.is-running .pill-main{ box-shadow:0 16px 40px -16px rgba(255,90,43,.75); }

.pill-ghost{
  background:rgba(255,255,255,.05); border:1px solid var(--stroke); color:#e9e3e4;
}
.pill-ghost:hover{ background:rgba(255,255,255,.11); transform:translateY(-2px); }
.pill-ghost.danger:hover{ background:rgba(255,60,60,.16); border-color:rgba(255,60,60,.4); color:#ff9b9b; }
.wide{ width:100%; padding:15px; letter-spacing:.06em; }

.timer-foot{
  display:flex; align-items:center; justify-content:center; gap:10px;
  font-size:12.5px; color:var(--muted); font-weight:600;
}
.dot-sep{ width:3px; height:3px; border-radius:50%; background:var(--muted-2); }

/* ============================================================
   TASKS CARD
   ============================================================ */
.card-tasks{ padding:clamp(20px,2.4vw,26px); display:flex; flex-direction:column; gap:16px; }
.card-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.card-head h2{ font-size:16.5px; font-weight:800; letter-spacing:-.02em; }
.card-head .muted{ font-size:12px; color:var(--muted); margin-top:3px; }
.muted.small{ font-size:11.5px; }
.badge{
  font-size:12px; font-weight:800; padding:6px 12px; border-radius:999px;
  background:rgba(255,90,43,.14); color:var(--ember-2); border:1px solid rgba(255,90,43,.25);
  transition:all .4s var(--ease);
}
.badge.done{ background:rgba(74,222,128,.15); color:var(--ok); border-color:rgba(74,222,128,.3); }

.task-list{ list-style:none; display:flex; flex-direction:column; gap:10px; }
.task-empty{
  list-style:none; text-align:center; padding:24px 12px;
  color:var(--muted); font-size:13px; font-weight:600;
  border:1px dashed rgba(255,255,255,.09); border-radius:var(--radius-sm);
}

.task{
  display:flex; align-items:center; gap:12px;
  padding:13px 14px; border-radius:var(--radius-sm);
  background:rgba(255,255,255,.028); border:1px solid var(--stroke);
  cursor:pointer; position:relative; overflow:hidden;
  transition:transform .4s var(--ease), background .4s var(--ease), border-color .4s var(--ease), opacity .4s var(--ease);
  animation:taskIn .55s var(--ease) backwards;
}
@keyframes taskIn{ from{ opacity:0; transform:translateY(12px) scale(.97); } }
.task::before{
  content:""; position:absolute; left:0; top:0; bottom:0; width:3px;
  background:linear-gradient(180deg,var(--ember-2),var(--ember-3));
  opacity:0; transition:opacity .4s var(--ease);
}
.task:hover{ background:rgba(255,255,255,.06); transform:translateX(5px); border-color:var(--stroke-2); }
.task:hover::before{ opacity:1; }
.task:hover .task-del{ opacity:1; transform:scale(1); }

.tick{
  width:22px; height:22px; flex:none; border-radius:8px;
  border:1.8px solid var(--muted-2); display:grid; place-items:center;
  transition:all .4s var(--ease);
}
.tick svg{ width:13px; height:13px; fill:none; stroke:#0b0809; stroke-width:3; stroke-linecap:round; stroke-linejoin:round;
  stroke-dasharray:24; stroke-dashoffset:24; transition:stroke-dashoffset .4s var(--ease) .05s; }
.task.done .tick{ background:var(--ok); border-color:var(--ok); transform:scale(1.08) rotate(-4deg); }
.task.done .tick svg{ stroke-dashoffset:0; }

.task-body{ flex:1; min-width:0; }
.task-title{ font-size:14px; font-weight:600; color:#efe9ea; transition:all .4s var(--ease); word-break:break-word; }
.task.done .task-title{ color:var(--muted-2); text-decoration:line-through; text-decoration-color:rgba(255,255,255,.25); }
.task-meta{ font-size:11px; color:var(--muted-2); margin-top:2px; font-weight:600; letter-spacing:.04em; }

.task-del{
  opacity:0; transform:scale(.7); flex:none;
  width:28px; height:28px; border-radius:9px; border:none; cursor:pointer;
  background:rgba(255,60,60,.12); color:#ff8b8b; display:grid; place-items:center;
  transition:all .35s var(--ease);
}
.task-del:hover{ background:rgba(255,60,60,.25); transform:scale(1.08); }
.task-del svg{ width:13px; height:13px; fill:none; stroke:currentColor; stroke-width:2.4; stroke-linecap:round; }

.task-add{ display:flex; gap:9px; margin-top:auto; }
.task-add input{
  flex:1; font-family:inherit; font-size:13.5px;
  padding:13px 16px; border-radius:14px;
  background:rgba(255,255,255,.04); border:1px solid var(--stroke);
  color:var(--txt); outline:none;
  transition:all .35s var(--ease);
}
.task-add input::placeholder{ color:var(--muted-2); }
.task-add input:focus{ background:rgba(255,255,255,.07); border-color:rgba(255,90,43,.45); box-shadow:0 0 0 4px rgba(255,90,43,.1); }
.add-btn{
  width:48px; flex:none; border-radius:14px; border:none; cursor:pointer;
  background:linear-gradient(135deg,var(--ember-2),var(--ember-3)); color:#fff;
  display:grid; place-items:center;
  transition:transform .35s var(--ease), box-shadow .35s var(--ease), filter .35s var(--ease);
}
.add-btn svg{ width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:2.4; stroke-linecap:round; }
.add-btn:hover{ transform:translateY(-2px) scale(1.04); box-shadow:0 12px 26px -10px rgba(255,90,43,.8); }
.add-btn:active{ transform:scale(.95); }

/* ============================================================
   STATS CARD
   ============================================================ */
.card-stats{ padding:clamp(20px,2.4vw,26px); display:flex; flex-direction:column; gap:18px; }
.stat-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
.stat{ display:flex; flex-direction:column; gap:4px; }
.stat-num{
  font-size:clamp(24px,3.4vw,32px); font-weight:800; letter-spacing:-.04em;
  font-variant-numeric:tabular-nums;
  background:linear-gradient(180deg,#fff,#bfb6b9); -webkit-background-clip:text; background-clip:text; color:transparent;
  transition:transform .4s var(--ease);
}
.stat:hover .stat-num{ transform:translateY(-3px); }
.stat-lbl{ font-size:11px; letter-spacing:.16em; text-transform:uppercase; color:var(--muted); font-weight:700; }

.bars{ display:flex; align-items:flex-end; gap:6px; height:52px; }
.bars span{
  flex:1; border-radius:6px 6px 3px 3px;
  background:linear-gradient(180deg,rgba(255,138,61,.85),rgba(255,45,26,.35));
  min-height:5px;
  transition:height .7s var(--ease), opacity .4s var(--ease);
  opacity:.55;
}
.bars span:hover{ opacity:1; }
.bars span.today{ background:linear-gradient(180deg,#ffb347,#ff2d1a); opacity:1; box-shadow:0 0 18px -2px rgba(255,90,43,.7); }

/* ---------------- footer ---------------- */
.foot{ text-align:center; font-size:11.5px; color:var(--muted-2); font-weight:600; }
kbd{
  font-family:inherit; font-size:10.5px; font-weight:800;
  padding:2px 6px; border-radius:6px; margin:0 1px;
  background:rgba(255,255,255,.06); border:1px solid var(--stroke); color:#b9b1b4;
}

/* ============================================================
   SETTINGS SHEET
   ============================================================ */
.overlay{
  position:fixed; inset:0; z-index:50;
  display:grid; place-items:center; padding:20px;
  background:rgba(4,3,4,.66); backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px);
  animation:fadeIn .3s var(--ease);
}
.overlay[hidden]{ display:none; }
@keyframes fadeIn{ from{ opacity:0; } }

.sheet{
  width:min(420px,100%);
  background:linear-gradient(165deg,#181215,#0e0a0c);
  border:1px solid var(--stroke-2); border-radius:26px;
  padding:22px; box-shadow:0 40px 80px -30px rgba(0,0,0,.95);
  animation:sheetIn .45s var(--ease);
  max-height:88dvh; overflow:auto;
}
@keyframes sheetIn{ from{ opacity:0; transform:translateY(24px) scale(.96); } }
.sheet-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:18px; }
.sheet-head h2{ font-size:18px; font-weight:800; letter-spacing:-.02em; }

.tabs{
  display:flex; gap:4px; padding:4px; border-radius:14px;
  background:rgba(255,255,255,.045); margin-bottom:18px;
}
.tab{
  flex:1; padding:10px; border:none; cursor:pointer; border-radius:11px;
  background:transparent; color:var(--muted); font-family:inherit;
  font-size:11.5px; font-weight:800; letter-spacing:.12em;
  transition:all .35s var(--ease);
}
.tab:hover{ color:#ddd6d8; }
.tab.active{ background:rgba(255,255,255,.09); color:#fff; box-shadow:0 4px 14px -6px rgba(0,0,0,.8); }

.tab-panel{ display:none; flex-direction:column; gap:2px; }
.tab-panel.active{ display:flex; animation:panelIn .4s var(--ease); }
@keyframes panelIn{ from{ opacity:0; transform:translateY(8px); } }

.row{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:13px 4px; border-bottom:1px solid rgba(255,255,255,.045);
  font-size:13.5px; color:#ddd6d8; font-weight:600;
}
.row:last-child{ border-bottom:none; }

.stepper{ display:flex; align-items:center; gap:12px; }
.stepper button{
  width:34px; height:34px; flex:none; border-radius:11px; cursor:pointer;
  background:rgba(255,255,255,.055); border:1px solid var(--stroke); color:#e9e3e4;
  font-size:17px; font-weight:600; line-height:1; display:grid; place-items:center;
  transition:all .3s var(--ease);
}
.stepper button:hover{ background:rgba(255,90,43,.16); border-color:rgba(255,90,43,.4); color:#fff; transform:scale(1.08); }
.stepper button:active{ transform:scale(.92); }
.stepper b{ min-width:58px; text-align:right; font-size:17px; font-weight:800; font-variant-numeric:tabular-nums; }
.stepper small{ font-size:10.5px; color:var(--muted); font-weight:700; margin-left:3px; }

.switch-row{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 4px; border-bottom:1px solid rgba(255,255,255,.045);
  font-size:13.5px; color:#ddd6d8; font-weight:600; cursor:pointer;
}
.switch-row input{ display:none; }
.switch{
  width:46px; height:27px; border-radius:999px; flex:none; position:relative;
  background:rgba(255,255,255,.09); border:1px solid var(--stroke);
  transition:all .4s var(--ease);
}
.switch::after{
  content:""; position:absolute; top:3px; left:3px;
  width:19px; height:19px; border-radius:50%; background:#8b8189;
  transition:all .4s var(--ease);
}
.switch-row input:checked + .switch{ background:linear-gradient(135deg,var(--ember-2),var(--ember-3)); border-color:transparent; }
.switch-row input:checked + .switch::after{ left:23px; background:#fff; box-shadow:0 2px 8px rgba(0,0,0,.4); }

input[type=range]{
  -webkit-appearance:none; appearance:none; width:130px; height:5px; border-radius:99px;
  background:rgba(255,255,255,.12); outline:none; cursor:pointer;
}
input[type=range]::-webkit-slider-thumb{
  -webkit-appearance:none; width:17px; height:17px; border-radius:50%;
  background:linear-gradient(135deg,var(--ember-2),var(--ember-3)); cursor:pointer;
  box-shadow:0 0 12px rgba(255,90,43,.7); transition:transform .25s var(--ease);
}
input[type=range]::-webkit-slider-thumb:hover{ transform:scale(1.2); }

/* ---------------- sync panel ---------------- */
.sync-help{ font-size:12.5px; color:var(--muted); line-height:1.55; margin-bottom:14px; }
.sync-help b{ color:#ddd6d8; }

.mini-btn{
  font-family:inherit; font-size:11px; font-weight:800; letter-spacing:.06em;
  padding:7px 13px; border-radius:999px; cursor:pointer;
  background:rgba(255,255,255,.06); border:1px solid var(--stroke); color:#d8d2d4;
  transition:all .3s var(--ease);
}
.mini-btn:hover{ background:rgba(255,90,43,.16); border-color:rgba(255,90,43,.4); color:#fff; transform:translateY(-1px); }

/* tombol login Google */
.gsi-wrap{
  display:flex; justify-content:center; align-items:center;
  min-height:52px; margin:6px 0 4px;
}
.gsi-slot{ display:flex; justify-content:center; }
.gsi-slot > div{ border-radius:12px !important; overflow:hidden; }

/* kartu profil */
.profile{
  display:flex; align-items:center; gap:14px;
  padding:16px; border-radius:18px; margin-bottom:14px;
  background:rgba(255,255,255,.04); border:1px solid var(--stroke);
  animation:panelIn .4s var(--ease);
}
.profile-pic{
  width:52px; height:52px; border-radius:50%; flex:none; object-fit:cover;
  background:rgba(255,255,255,.08);
  box-shadow:0 0 0 2px rgba(255,90,43,.35);
}
.profile-info{ display:flex; flex-direction:column; gap:3px; min-width:0; }
.profile-info b{ font-size:14.5px; font-weight:700; color:#f4efee; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.profile-info span{ font-size:12px; color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

.sync-status{
  display:flex; align-items:center; gap:9px;
  padding:12px 15px; border-radius:14px; margin-bottom:14px;
  background:rgba(255,255,255,.03); border:1px solid var(--stroke);
  font-size:12.5px; font-weight:600; color:var(--muted);
}
.sync-actions{ display:flex; gap:10px; margin-bottom:10px; }
.sync-actions .pill{ flex:1; padding:14px 12px; }
.sync-note{ font-size:11.5px; color:var(--muted-2); text-align:center; margin-top:12px; line-height:1.5; min-height:16px; }
.sync-note.ok{ color:var(--ok); }
.sync-note.err{ color:#ff8b8b; }

/* ============================================================
   ALARM MODAL
   ============================================================ */
.alarm{
  position:fixed; inset:0; z-index:80; display:grid; place-items:center; padding:20px;
  background:rgba(4,3,4,.72); backdrop-filter:blur(16px); -webkit-backdrop-filter:blur(16px);
  animation:fadeIn .3s var(--ease);
}
.alarm[hidden]{ display:none; }
.alarm-box{
  position:relative; width:min(360px,100%); text-align:center;
  background:linear-gradient(165deg,#1c1418,#0d090b);
  border:1px solid rgba(255,90,43,.28); border-radius:28px;
  padding:40px 28px 28px;
  box-shadow:0 40px 90px -30px rgba(255,45,26,.4), 0 0 0 1px rgba(255,255,255,.04) inset;
  animation:alarmIn .55s var(--ease);
}
@keyframes alarmIn{ from{ opacity:0; transform:scale(.9) translateY(20px); } }
.alarm-ring{
  position:absolute; inset:-40%; border-radius:50%;
  background:radial-gradient(circle,rgba(255,90,43,.22),transparent 60%);
  animation:ringPulse 2s var(--ease-soft) infinite; pointer-events:none;
}
@keyframes ringPulse{ 0%{ transform:scale(.85); opacity:.9; } 100%{ transform:scale(1.25); opacity:0; } }
.alarm-emoji{ font-size:44px; animation:shake 1.4s var(--ease-soft) infinite; }
@keyframes shake{ 0%,100%{ transform:rotate(0); } 25%{ transform:rotate(-14deg); } 75%{ transform:rotate(14deg); } }
.alarm-box h2{ font-size:22px; font-weight:800; margin:12px 0 6px; letter-spacing:-.03em; position:relative; }
.alarm-box p{ font-size:13.5px; color:var(--muted); margin-bottom:24px; position:relative; }
.alarm-actions{ display:flex; gap:10px; justify-content:center; position:relative; }
.alarm-actions .pill{ padding:14px 32px; }

/* ---------------- responsive ---------------- */
@media (max-width:900px){
  .grid{
    grid-template-columns:1fr;
    grid-template-areas:"timer" "tasks" "stats";
  }
  .card-timer{ min-height:auto; }
  .dial{ width:min(300px,72%); }
}
@media (max-width:520px){
  :root{ --radius:24px; }
  .stage{ padding:18px 14px 28px; }
  .streak{ padding:8px 12px; font-size:13px; }
  .timer-actions{ gap:10px; }
  .pill{ padding:14px 30px; }
  .stat-grid{ gap:8px; }
}

/* ---------------- motion preferences ---------------- */
@media (prefers-reduced-motion:reduce){
  *{ animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; }
}
