/* AchieveX — focus.html styles */

/* ═══════════════════════════════════════════
   DESIGN SYSTEM — same tokens as dashboard
═══════════════════════════════════════════ */
:root {
  --font-sans:'DM Sans',-apple-system,BlinkMacSystemFont,sans-serif;
  --font-display:'Sora',sans-serif;
  --blue-50:#EFF6FF; --blue-100:#DBEAFE; --blue-200:#BFDBFE;
  --blue-400:#60A5FA; --blue-500:#3B82F6; --blue-600:#2563EB;
  --blue-700:#1D4ED8; --blue-900:#1E3A8A;
  --green-500:#22C55E; --green-100:#DCFCE7;
  --amber-500:#F59E0B; --amber-100:#FEF3C7;
  --red-500:#EF4444;   --red-100:#FEE2E2;
  --purple-500:#A855F7; --purple-100:#F3E8FF;
  --cyan-500:#06B6D4;   --cyan-100:#CFFAFE;
  --orange-500:#F97316;
  --bg:#F8F9FA; --bg2:#F1F3F4; --bg3:#E8EAED;
  --surface:#FFFFFF; --surface2:#F8F9FA; --surface3:#F1F3F4;
  --surface4:rgba(255,255,255,.92);
  --border:rgba(0,0,0,.06); --border-m:rgba(0,0,0,.10);
  --border-s:rgba(59,130,246,.18);
  --txt:#202124; --txt2:#3C4043; --txt3:#5F6368; --txt4:#9AA0A6;
  --glass:rgba(255,255,255,.88); --glass-border:rgba(255,255,255,.65);
  --primary:var(--blue-500); --primary-d:var(--blue-600); --primary-l:var(--blue-400);
  --shadow-xs:0 1px 2px rgba(60,64,67,.07),0 1px 3px rgba(60,64,67,.05);
  --shadow-sm:0 1px 3px rgba(60,64,67,.09),0 2px 8px rgba(60,64,67,.06);
  --shadow:0 2px 6px rgba(60,64,67,.10),0 4px 16px rgba(60,64,67,.07);
  --shadow-md:0 4px 12px rgba(60,64,67,.12),0 8px 32px rgba(60,64,67,.08);
  --shadow-lg:0 8px 24px rgba(60,64,67,.14),0 16px 56px rgba(60,64,67,.10);
  --shadow-xl:0 16px 48px rgba(60,64,67,.16),0 32px 80px rgba(60,64,67,.12);
  --shadow-blue:0 4px 16px rgba(59,130,246,.32),0 2px 6px rgba(59,130,246,.18);
  --shadow-blue-lg:0 8px 32px rgba(59,130,246,.38),0 4px 12px rgba(59,130,246,.22);
  --r-xs:6px; --r-sm:8px; --r:12px; --r-lg:16px;
  --r-xl:20px; --r-2xl:24px; --r-3xl:32px; --r-full:9999px;
  --nav-h:60px; --side-w:240px;
  --ease:cubic-bezier(.25,.46,.45,.94);
  --ease-out:cubic-bezier(.16,1,.3,1);
  --ease-spring:cubic-bezier(.34,1.56,.64,1);
  --ease-google:cubic-bezier(.4,0,.2,1);
}
.dark {
  --bg:#1A1B1E; --bg2:#202124; --bg3:#2D2E31;
  --surface:#28292C; --surface2:#303134; --surface3:#3C4043;
  --surface4:rgba(40,41,44,.92);
  --border:rgba(255,255,255,.06); --border-m:rgba(255,255,255,.10);
  --glass:rgba(30,31,34,.92); --glass-border:rgba(255,255,255,.08);
  --txt:#E8EAED; --txt2:#BDC1C6; --txt3:#9AA0A6; --txt4:#5F6368;
  --shadow-xs:0 1px 3px rgba(0,0,0,.4),0 1px 4px rgba(0,0,0,.3);
  --shadow-sm:0 2px 6px rgba(0,0,0,.5),0 1px 3px rgba(0,0,0,.3);
  --shadow:0 4px 12px rgba(0,0,0,.55),0 2px 6px rgba(0,0,0,.35);
  --shadow-md:0 8px 24px rgba(0,0,0,.60),0 4px 12px rgba(0,0,0,.4);
  --shadow-lg:0 16px 48px rgba(0,0,0,.70),0 8px 20px rgba(0,0,0,.45);
  --shadow-xl:0 24px 72px rgba(0,0,0,.75),0 12px 32px rgba(0,0,0,.50);
}

/* ═══ RESET ═══ */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth;-webkit-tap-highlight-color:transparent}
body{
  font-family:var(--font-sans);background:var(--bg);color:var(--txt);
  -webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;
  overflow-x:hidden;overscroll-behavior:none;line-height:1.6;
  transition:background .35s var(--ease-google),color .35s var(--ease-google);
  max-width:100vw;
}
::selection{background:rgba(59,130,246,.15);color:var(--txt)}
::-webkit-scrollbar{width:5px;height:5px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:var(--bg3);border-radius:20px}
::-webkit-scrollbar-thumb:hover{background:var(--txt4)}
a{text-decoration:none;color:inherit}
ul{list-style:none}
button{font-family:inherit;cursor:pointer;border:none;background:none}
img,svg{display:block;max-width:100%}
input,textarea,select{font-family:inherit;outline:none}

/* ═══ KEYFRAMES ═══ */
@keyframes fadeUp{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:translateY(0)}}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}
@keyframes scaleIn{from{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}
@keyframes shimmer{from{background-position:200% 0}to{background-position:-200% 0}}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.45}}
@keyframes timerPulse{0%,100%{box-shadow:0 0 0 0 rgba(59,130,246,.22)}50%{box-shadow:0 0 0 16px rgba(59,130,246,0)}}
@keyframes timerPulseRed{0%,100%{box-shadow:0 0 0 0 rgba(239,68,68,.2)}50%{box-shadow:0 0 0 14px rgba(239,68,68,0)}}
@keyframes timerPulseGreen{0%,100%{box-shadow:0 0 0 0 rgba(34,197,94,.2)}50%{box-shadow:0 0 0 14px rgba(34,197,94,0)}}
@keyframes cardIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@keyframes insightSlide{from{opacity:0;transform:translateX(-10px)}to{opacity:1;transform:translateX(0)}}
@keyframes toastIn{from{opacity:0;transform:translateY(8px) scale(.97)}to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes toastOut{to{opacity:0;transform:translateY(8px) scale(.97)}}
@keyframes spin{to{transform:rotate(360deg)}}
@keyframes breathe{0%,100%{transform:scale(1);opacity:.7}50%{transform:scale(1.08);opacity:1}}
@keyframes ringReveal{from{stroke-dashoffset:628}to{stroke-dashoffset:0}}

/* ═══ TOAST ═══ */
#toast-container{position:fixed;bottom:20px;right:20px;z-index:9000;display:flex;flex-direction:column;gap:8px;pointer-events:none}
.toast{
  display:flex;align-items:center;gap:10px;
  padding:10px 14px;border-radius:var(--r-lg);min-width:220px;max-width:340px;
  background:var(--surface);border:1px solid var(--border);
  box-shadow:var(--shadow-md);pointer-events:auto;
  animation:toastIn .32s var(--ease-out) both;
}
.toast.hide{animation:toastOut .28s var(--ease) forwards}
.toast-icon{width:20px;height:20px;border-radius:var(--r-xs);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.toast.success .toast-icon{background:rgba(34,197,94,.12);color:var(--green-500)}
.toast.error   .toast-icon{background:rgba(239,68,68,.12);color:var(--red-500)}
.toast.info    .toast-icon{background:rgba(59,130,246,.12);color:var(--blue-500)}
.toast.warning .toast-icon{background:rgba(245,158,11,.12);color:var(--amber-500)}
.toast-msg{font-size:13px;font-weight:500;color:var(--txt2);flex:1;line-height:1.4}

/* ═══ LAYOUT ═══ */
.app-layout{display:flex;min-height:100vh;min-height:100dvh}

/* ═══ SIDEBAR ═══ */
.sidebar{
  width:var(--side-w);height:100vh;height:100dvh;
  position:fixed;top:0;left:0;z-index:300;
  background:var(--surface);border-right:1px solid var(--border);
  display:flex;flex-direction:column;
  transition:transform .32s var(--ease-out),background .35s var(--ease-google);
  box-shadow:var(--shadow-sm);overflow:hidden;
}
@media(max-width:1023px){
  .sidebar{transform:translateX(-100%);box-shadow:var(--shadow-xl);z-index:300}
  .sidebar.open{transform:translateX(0)}
}
.sidebar-header{
  display:flex;align-items:center;justify-content:space-between;
  padding:16px;border-bottom:1px solid var(--border);
  flex-shrink:0;height:var(--nav-h);
}
.sidebar-logo{display:flex;align-items:center;gap:10px;text-decoration:none}
.sidebar-logo-mark{
  width:30px;height:30px;border-radius:8px;
  background:linear-gradient(145deg,#4F93F8 0%,#1D4ED8 100%);
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 2px 8px rgba(59,130,246,.35);flex-shrink:0;
  transition:transform .22s var(--ease-spring),box-shadow .22s;
}
.sidebar-logo-mark:hover{transform:scale(1.07) rotate(-3deg);box-shadow:0 4px 14px rgba(59,130,246,.4)}
.sidebar-logo-name{font-family:var(--font-display);font-size:16px;font-weight:700;letter-spacing:-.04em;color:var(--txt)}
.sidebar-close{
  width:28px;height:28px;border-radius:var(--r-sm);
  background:var(--surface2);border:1px solid var(--border);
  display:none;align-items:center;justify-content:center;
  color:var(--txt3);transition:all .18s;flex-shrink:0;
}
@media(max-width:1023px){.sidebar-close{display:flex}}
.sidebar-close:hover{background:var(--surface3);color:var(--txt)}
.sidebar-nav{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:10px;display:flex;flex-direction:column;gap:1px}
.sidebar-section-label{font-size:9.5px;font-weight:700;text-transform:uppercase;letter-spacing:.9px;color:var(--txt4);padding:10px 10px 4px}
.sidebar-link{
  display:flex;align-items:center;gap:11px;
  padding:9px 12px;border-radius:var(--r);
  font-size:13px;font-weight:500;color:var(--txt3);
  transition:background .15s,color .15s;
  position:relative;cursor:pointer;user-select:none;
}
.sidebar-link:hover{background:var(--surface2);color:var(--txt)}
.sidebar-link.active{background:rgba(59,130,246,.09);color:var(--blue-600)}
.sidebar-link.active .sidebar-link-icon{color:var(--blue-600)}
.sidebar-link-icon{
  width:30px;height:30px;border-radius:var(--r-sm);
  display:flex;align-items:center;justify-content:center;
  flex-shrink:0;color:var(--txt4);transition:color .15s;
}
.sidebar-link:hover .sidebar-link-icon{color:var(--txt3)}
.sidebar-link-label{flex:1}
.sidebar-badge{
  font-size:9.5px;font-weight:700;
  background:var(--blue-500);color:#fff;
  padding:1px 6px;border-radius:var(--r-full);
}
.sidebar-badge.green{background:var(--green-500)}
.sidebar-badge.amber{background:var(--amber-500)}
.sidebar-badge.ai{background:linear-gradient(135deg,#A855F7,#7C3AED)}
.sidebar-footer{padding:12px;border-top:1px solid var(--border);flex-shrink:0}
.sidebar-user{
  display:flex;align-items:center;gap:10px;
  padding:9px 10px;border-radius:var(--r);
  background:var(--surface2);border:1px solid var(--border);
  cursor:pointer;transition:background .15s;
}
.sidebar-user:hover{background:var(--surface3)}
.sidebar-avatar{
  width:32px;height:32px;border-radius:var(--r-full);
  background:linear-gradient(135deg,#4F93F8,#A855F7);
  display:flex;align-items:center;justify-content:center;
  color:#fff;font-size:12px;font-weight:700;flex-shrink:0;
}
.sidebar-user-info{flex:1;min-width:0}
.sidebar-user-name{font-size:12.5px;font-weight:600;color:var(--txt);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sidebar-user-role{font-size:11px;color:var(--txt4)}

/* ═══ SIDEBAR OVERLAY ═══ */
/* ═══ NAVBAR ═══ */
.navbar{
  height:var(--nav-h);
  background:var(--surface);
  border-bottom:1px solid var(--border);
  display:flex;align-items:center;gap:10px;
  padding:0 16px;
  position:sticky;top:0;z-index:100;
  transition:background .35s var(--ease-google);
  flex-shrink:0;
}
.navbar-menu-btn{
  width:32px;height:32px;border-radius:var(--r-sm);
  display:none;align-items:center;justify-content:center;
  color:var(--txt3);transition:all .18s;
  background:var(--surface2);border:1px solid var(--border);
  flex-shrink:0;
}
@media(max-width:1023px){.navbar-menu-btn{display:flex}}
.navbar-menu-btn:hover{background:var(--surface3);color:var(--txt)}
.navbar-title-group{flex:1;min-width:0}
.navbar-title{font-family:var(--font-display);font-size:15px;font-weight:700;color:var(--txt);letter-spacing:-.03em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.navbar-subtitle{font-size:11px;color:var(--txt4);margin-top:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:320px}
.navbar-actions{display:flex;align-items:center;gap:6px;flex-shrink:0}
.nav-btn{
  height:32px;padding:0 12px;border-radius:var(--r-sm);
  font-size:12.5px;font-weight:600;
  display:flex;align-items:center;gap:6px;
  transition:all .18s;white-space:nowrap;
}
.nav-btn-icon{
  width:32px;height:32px;border-radius:var(--r-sm);
  display:flex;align-items:center;justify-content:center;
  color:var(--txt3);transition:all .18s;
  background:var(--surface2);border:1px solid var(--border);
  flex-shrink:0;
}
.nav-btn-icon:hover{background:var(--surface3);color:var(--txt)}
.nav-btn-primary{
  background:linear-gradient(135deg,var(--blue-500),var(--blue-700));
  color:#fff;border:none;box-shadow:var(--shadow-blue);
}
.nav-btn-primary:hover{transform:translateY(-1px);box-shadow:var(--shadow-blue-lg)}
.nav-btn-primary:active{transform:translateY(0)}
.nav-btn-ghost{background:var(--surface2);border:1px solid var(--border);color:var(--txt2)}
.nav-btn-ghost:hover{background:var(--surface3);color:var(--txt)}
.nav-btn-danger{background:rgba(239,68,68,.09);border:1px solid rgba(239,68,68,.18);color:var(--red-500)}
.nav-btn-danger:hover{background:rgba(239,68,68,.15)}
.nav-status-dot{width:7px;height:7px;border-radius:50%;flex-shrink:0}
.nav-status-dot.running{background:var(--green-500);animation:pulse 1.8s ease-in-out infinite}
.nav-status-dot.paused{background:var(--amber-500)}
.nav-status-dot.idle{background:var(--txt4)}

/* Status chip in navbar */
.status-chip{
  display:flex;align-items:center;gap:5px;
  padding:4px 10px;border-radius:var(--r-full);
  background:var(--surface2);border:1px solid var(--border);
  font-size:11.5px;font-weight:600;color:var(--txt3);
  transition:all .2s;
}
.status-chip.running{background:rgba(34,197,94,.08);border-color:rgba(34,197,94,.2);color:var(--green-500)}
.status-chip.paused{background:rgba(245,158,11,.08);border-color:rgba(245,158,11,.2);color:var(--amber-500)}
@media(max-width:640px){.status-chip{display:none}}

/* ═══ PROFILE DROPDOWN ═══ */
.profile-btn{
  display:flex;align-items:center;gap:7px;
  padding:3px 9px 3px 3px;
  background:var(--surface2);border:1px solid var(--border);
  border-radius:var(--r-full);transition:all .18s;cursor:pointer;
}
.profile-btn:hover{background:var(--surface3);border-color:var(--border-m)}
.profile-avatar{
  width:26px;height:26px;border-radius:50%;
  background:linear-gradient(135deg,var(--blue-500),var(--blue-700));
  display:flex;align-items:center;justify-content:center;
  font-size:10px;font-weight:700;color:#fff;flex-shrink:0;
}
.profile-name{font-size:12px;font-weight:600;color:var(--txt)}
@media(max-width:600px){.profile-name{display:none}}
.profile-wrap{position:relative}
.profile-dropdown{
  position:absolute;top:calc(100% + 8px);right:0;z-index:600;
  min-width:200px;
  background:var(--surface);border:1px solid var(--border);
  border-radius:var(--r-lg);box-shadow:var(--shadow-lg);
  overflow:hidden;
  opacity:0;visibility:hidden;transform:translateY(-6px) scale(.97);
  transition:opacity .18s var(--ease),transform .18s var(--ease),visibility .18s;
  pointer-events:none;
}
.profile-dropdown.open{opacity:1;visibility:visible;transform:none;pointer-events:all}
.profile-dropdown-user{padding:12px 14px;border-bottom:1px solid var(--border);background:var(--surface2)}
.profile-dropdown-uname{font-size:13px;font-weight:700;color:var(--txt)}
.profile-dropdown-email{font-size:11.5px;color:var(--txt4);margin-top:2px}
.dropdown-item{
  display:flex;align-items:center;gap:10px;
  padding:10px 14px;font-size:13px;font-weight:500;color:var(--txt2);
  cursor:pointer;transition:background .12s,color .12s;
}
.dropdown-item:hover{background:var(--surface2);color:var(--txt)}
.dropdown-item.danger{color:var(--red-500)}
.dropdown-item.danger:hover{background:rgba(239,68,68,.06)}
.dropdown-sep{height:1px;background:var(--border);margin:2px 0}

/* ═══ MAIN ═══ */
.main-wrap{
  margin-left:var(--side-w);flex:1;min-width:0;
  display:flex;flex-direction:column;
  min-height:100vh;min-height:100dvh;
}
@media(max-width:1023px){.main-wrap{margin-left:0}}
.main-content{flex:1;padding:22px clamp(14px,3vw,28px);max-width:1200px;width:100%}

/* ═══ FOCUS OVERLAY ═══ */
#focus-overlay{
  position:fixed;inset:0;z-index:300;
  background:var(--bg);
  display:none;flex-direction:column;align-items:center;justify-content:center;
  padding:24px;
  transition:background .35s var(--ease-google);
}
#focus-overlay.active{display:flex;animation:fadeIn .25s var(--ease)}
.focus-overlay-exit{
  position:absolute;top:16px;right:16px;
  height:34px;padding:0 14px;border-radius:var(--r-sm);
  background:var(--surface2);border:1px solid var(--border);
  font-size:12.5px;font-weight:600;color:var(--txt3);
  display:flex;align-items:center;gap:6px;
  transition:all .18s;
}
.focus-overlay-exit:hover{background:var(--surface3);color:var(--txt)}
.focus-overlay-subject{
  font-size:13px;font-weight:600;color:var(--txt3);
  letter-spacing:.04em;text-transform:uppercase;margin-bottom:18px;
}
.focus-overlay-ring{position:relative;width:260px;height:260px;flex-shrink:0}
.focus-overlay-ring svg{transform:rotate(-90deg)}
.focus-ring-bg{fill:none;stroke:var(--bg3);stroke-width:7}
.focus-ring-fill{
  fill:none;stroke:var(--blue-500);stroke-width:7;stroke-linecap:round;
  transition:stroke-dashoffset .7s var(--ease-out),stroke .3s;
}
.focus-overlay-time{
  position:absolute;inset:0;display:flex;flex-direction:column;
  align-items:center;justify-content:center;gap:4px;
}
.focus-overlay-digits{
  font-family:var(--font-display);font-size:58px;font-weight:700;
  letter-spacing:-.04em;color:var(--txt);line-height:1;
  user-select:none;
}
.focus-overlay-mode-label{font-size:11.5px;font-weight:600;color:var(--txt4);text-transform:uppercase;letter-spacing:.1em}
.focus-overlay-controls{display:flex;align-items:center;gap:12px;margin-top:28px}
.focus-ctrl-btn{
  height:46px;padding:0 28px;border-radius:var(--r-full);
  font-size:14px;font-weight:700;font-family:var(--font-display);
  display:flex;align-items:center;gap:8px;
  transition:all .22s;letter-spacing:-.01em;
}
.focus-ctrl-primary{background:linear-gradient(135deg,var(--blue-500),var(--blue-700));color:#fff;box-shadow:var(--shadow-blue)}
.focus-ctrl-primary:hover{transform:translateY(-2px);box-shadow:var(--shadow-blue-lg)}
.focus-ctrl-ghost{background:var(--surface2);border:1px solid var(--border);color:var(--txt2)}
.focus-ctrl-ghost:hover{background:var(--surface3)}
.focus-ctrl-btn:active{transform:scale(.96)}
.focus-overlay-info{display:flex;gap:24px;margin-top:20px}
.focus-overlay-stat{display:flex;flex-direction:column;align-items:center;gap:2px}
.focus-overlay-stat-val{font-family:var(--font-display);font-size:20px;font-weight:700;color:var(--txt);letter-spacing:-.04em}
.focus-overlay-stat-lbl{font-size:10.5px;color:var(--txt4);text-transform:uppercase;letter-spacing:.08em}
.focus-overlay-sep{width:1px;background:var(--border);align-self:stretch}
.focus-overlay-sounds{display:flex;gap:8px;margin-top:18px;flex-wrap:wrap;justify-content:center}
.focus-sound-pill{
  height:30px;padding:0 14px;border-radius:var(--r-full);
  font-size:11.5px;font-weight:600;
  display:flex;align-items:center;gap:5px;
  background:var(--surface2);border:1px solid var(--border);
  color:var(--txt3);transition:all .18s;cursor:pointer;
}
.focus-sound-pill.active{background:rgba(59,130,246,.1);border-color:var(--border-s);color:var(--blue-600)}
.focus-sound-pill:hover{background:var(--surface3)}

/* ═══ SECTION HEADER ═══ */
.section-hd{
  display:flex;align-items:center;justify-content:space-between;
  margin-bottom:16px;gap:12px;flex-wrap:wrap;
}
.section-title{font-family:var(--font-display);font-size:15px;font-weight:700;color:var(--txt);letter-spacing:-.03em}
.section-sub{font-size:12px;color:var(--txt4);margin-top:1px}

/* ═══ TIMER CARD ═══ */
.timer-card{
  background:var(--surface);border:1px solid var(--border);
  border-radius:var(--r-2xl);padding:28px 24px;
  box-shadow:var(--shadow);
  display:flex;flex-direction:column;align-items:center;
  animation:cardIn .4s var(--ease) both;
  position:relative;overflow:hidden;
}
.timer-card::before{
  content:'';position:absolute;inset:0;
  background:radial-gradient(ellipse 70% 50% at 50% 0%,rgba(59,130,246,.04),transparent);
  pointer-events:none;
}
.timer-mode-tabs{
  display:flex;background:var(--surface2);border:1px solid var(--border);
  border-radius:var(--r-sm);padding:3px;gap:2px;margin-bottom:24px;
  width:100%;max-width:320px;
}
.timer-mode-tab{
  flex:1;height:30px;padding:0 10px;border-radius:var(--r-xs);
  font-size:12px;font-weight:600;color:var(--txt3);
  cursor:pointer;transition:all .18s;white-space:nowrap;
  display:flex;align-items:center;justify-content:center;gap:5px;
}
.timer-mode-tab.active{background:var(--surface);color:var(--txt);box-shadow:var(--shadow-xs)}
.timer-mode-tab:not(.active):hover{color:var(--txt2)}

/* Timer ring – r=100, circumference=628.3 */
.timer-ring-wrap{position:relative;width:220px;height:220px;flex-shrink:0;margin-bottom:20px}
.timer-ring-wrap svg{transform:rotate(-90deg);overflow:visible}
.timer-ring-bg{fill:none;stroke:var(--bg3);stroke-width:7}
.timer-ring-fill{
  fill:none;stroke:var(--blue-500);stroke-width:7;stroke-linecap:round;
  stroke-dasharray:628;stroke-dashoffset:628;
  transition:stroke-dashoffset .8s var(--ease-out),stroke .3s;
}
.timer-ring-fill.break-mode{stroke:var(--green-500)}
.timer-ring-fill.long-break-mode{stroke:var(--purple-500)}
.timer-inner{
  position:absolute;inset:0;display:flex;flex-direction:column;
  align-items:center;justify-content:center;gap:3px;
}
.timer-digits{
  font-family:var(--font-display);font-size:52px;font-weight:700;
  letter-spacing:-.04em;color:var(--txt);line-height:1;
  transition:color .3s;user-select:none;
}
.timer-digits.running{color:var(--blue-500)}
.timer-digits.break-running{color:var(--green-500)}
.timer-mode-lbl{font-size:11px;font-weight:700;color:var(--txt4);text-transform:uppercase;letter-spacing:.1em}
.timer-pomo-row{display:flex;align-items:center;gap:8px;margin-top:4px}
.timer-pomo-label{font-size:11.5px;color:var(--txt4);font-weight:500}
.session-dots{display:flex;gap:4px}
.session-dot{width:8px;height:8px;border-radius:50%;background:var(--bg3);transition:background .3s}
.session-dot.done{background:var(--blue-500)}
.session-dot.current{background:var(--blue-400);animation:pulse 1.8s ease-in-out infinite}

.timer-controls{display:flex;align-items:center;gap:10px;margin-bottom:18px}
.tc-btn{
  height:44px;border-radius:var(--r-full);
  font-size:13.5px;font-weight:700;font-family:var(--font-display);
  display:flex;align-items:center;gap:7px;
  transition:all .22s;letter-spacing:-.01em;
}
.tc-btn-play{
  padding:0 32px;
  background:linear-gradient(135deg,var(--blue-500),var(--blue-700));
  color:#fff;box-shadow:var(--shadow-blue);
}
.tc-btn-play:hover{transform:translateY(-2px);box-shadow:var(--shadow-blue-lg)}
.tc-btn-play:active{transform:translateY(0)}
.tc-btn-play.running{background:linear-gradient(135deg,#F59E0B,#D97706)}
.tc-btn-play.break-active{background:linear-gradient(135deg,var(--green-500),#16A34A)}
.tc-btn-sm{
  width:44px;height:44px;border-radius:var(--r-full);
  background:var(--surface2);border:1px solid var(--border);
  color:var(--txt3);transition:all .18s;
  display:flex;align-items:center;justify-content:center;
  flex-shrink:0;
}
.tc-btn-sm:hover{background:var(--surface3);color:var(--txt)}
.tc-btn-skip{color:var(--blue-500)}
.tc-btn-skip:hover{background:rgba(59,130,246,.08);border-color:var(--border-s);color:var(--blue-600)}
.tc-btn:active{transform:scale(.95)}

/* Custom duration row */
#custom-dur-row{display:none;align-items:center;gap:8px;margin-bottom:10px;flex-wrap:wrap;justify-content:center}

/* ═══ SUBJECT + NOTES ═══ */
.session-meta-card{
  background:var(--surface);border:1px solid var(--border);
  border-radius:var(--r-xl);padding:20px;
  box-shadow:var(--shadow-xs);
  animation:cardIn .4s .08s var(--ease) both;
}
.form-label{font-size:12px;font-weight:600;color:var(--txt3);display:block;margin-bottom:6px;letter-spacing:.01em}
.form-input{
  width:100%;height:38px;padding:0 12px;
  border-radius:var(--r-sm);
  background:var(--surface2);border:1px solid var(--border);
  font-size:13px;color:var(--txt);
  transition:all .18s;
}
.form-input:focus{background:var(--surface);border-color:var(--border-s);box-shadow:0 0 0 3px rgba(59,130,246,.08)}
.form-input::placeholder{color:var(--txt4)}
.form-textarea{
  width:100%;padding:10px 12px;
  border-radius:var(--r-sm);
  background:var(--surface2);border:1px solid var(--border);
  font-size:13px;color:var(--txt);resize:vertical;min-height:72px;
  transition:all .18s;line-height:1.5;
}
.form-textarea:focus{background:var(--surface);border-color:var(--border-s);box-shadow:0 0 0 3px rgba(59,130,246,.08)}
.form-textarea::placeholder{color:var(--txt4)}
.form-select{
  width:100%;height:38px;padding:0 10px;
  border-radius:var(--r-sm);
  background:var(--surface2);border:1px solid var(--border);
  font-size:13px;color:var(--txt);
  cursor:pointer;transition:all .18s;
  appearance:none;-webkit-appearance:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239AA0A6' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 10px center;padding-right:28px;
}
.form-select:focus{background-color:var(--surface);border-color:var(--border-s);box-shadow:0 0 0 3px rgba(59,130,246,.08)}

/* ═══ SETTINGS CARD ═══ */
.settings-card{
  background:var(--surface);border:1px solid var(--border);
  border-radius:var(--r-xl);padding:20px;
  box-shadow:var(--shadow-xs);
  animation:cardIn .4s .12s var(--ease) both;
}
.settings-row{
  display:flex;align-items:center;justify-content:space-between;
  padding:10px 0;border-bottom:1px solid var(--border);gap:12px;
}
.settings-row:last-child{border-bottom:none;padding-bottom:0}
.settings-row:first-child{padding-top:0}
.settings-row-label{font-size:13px;font-weight:500;color:var(--txt2)}
.settings-row-sub{font-size:11px;color:var(--txt4);margin-top:1px}
.settings-input-num{
  width:64px;height:32px;padding:0 8px;
  border-radius:var(--r-sm);text-align:center;
  background:var(--surface2);border:1px solid var(--border);
  font-size:13px;font-weight:600;color:var(--txt);
  transition:all .18s;
}
.settings-input-num:focus{background:var(--surface);border-color:var(--border-s);box-shadow:0 0 0 3px rgba(59,130,246,.08)}

/* Toggle */
.toggle-wrap{position:relative;display:inline-flex;cursor:pointer;user-select:none;align-items:center;flex-shrink:0}
.toggle-input{position:absolute;opacity:0;width:0;height:0}
.toggle-track{
  width:36px;height:20px;border-radius:var(--r-full);
  background:var(--bg3);border:1px solid var(--border-m);
  transition:background .22s,border-color .22s;position:relative;flex-shrink:0;
}
.toggle-input:checked + .toggle-track{background:var(--blue-500);border-color:var(--blue-500)}
.toggle-track .toggle-thumb{
  position:absolute;top:2px;left:2px;
  width:14px;height:14px;border-radius:50%;
  background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.2);
  transition:transform .22s var(--ease-spring);
}
.toggle-input:checked + .toggle-track .toggle-thumb{transform:translateX(16px)}

/* ═══ STAT CARDS ═══ */
.stat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
@media(max-width:900px){.stat-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:480px){.stat-grid{grid-template-columns:repeat(2,1fr)}}
.stat-card{
  background:var(--surface);border:1px solid var(--border);
  border-radius:var(--r-xl);padding:16px;
  box-shadow:var(--shadow-xs);
  transition:box-shadow .18s,transform .18s;
  animation:cardIn .4s var(--ease) both;
}
.stat-card:hover{box-shadow:var(--shadow-sm);transform:translateY(-2px)}
.stat-card-top{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:10px}
.stat-card-icon{
  width:34px;height:34px;border-radius:var(--r-sm);
  display:flex;align-items:center;justify-content:center;
  flex-shrink:0;
}
.stat-card-val{font-family:var(--font-display);font-size:24px;font-weight:700;color:var(--txt);letter-spacing:-.04em;line-height:1}
.stat-card-lbl{font-size:11.5px;color:var(--txt3);margin-top:4px;font-weight:500}
.stat-card-change{display:flex;align-items:center;gap:4px;margin-top:8px;font-size:11px;font-weight:600}
.stat-card-change.up{color:var(--green-500)}
.stat-card-change.down{color:var(--red-500)}
.stat-card-change.neutral{color:var(--txt4)}

/* ═══ INSIGHTS ═══ */
.insights-grid{display:flex;flex-direction:column;gap:8px}
.insight-item{
  display:flex;align-items:flex-start;gap:12px;
  padding:12px 14px;border-radius:var(--r-lg);
  background:var(--surface);border:1px solid var(--border);
  box-shadow:var(--shadow-xs);
  animation:insightSlide .35s var(--ease) both;
  transition:box-shadow .18s,transform .18s;
}
.insight-item:hover{box-shadow:var(--shadow-sm);transform:translateX(2px)}
.insight-icon{
  width:36px;height:36px;border-radius:var(--r-sm);
  display:flex;align-items:center;justify-content:center;
  flex-shrink:0;
}
.insight-icon.blue{background:rgba(59,130,246,.1);color:var(--blue-600)}
.insight-icon.green{background:rgba(34,197,94,.1);color:var(--green-500)}
.insight-icon.amber{background:rgba(245,158,11,.1);color:var(--amber-500)}
.insight-icon.red{background:rgba(239,68,68,.1);color:var(--red-500)}
.insight-icon.purple{background:rgba(168,85,247,.1);color:var(--purple-500)}
.insight-icon.cyan{background:rgba(6,182,212,.1);color:var(--cyan-500)}
.insight-body{flex:1;min-width:0}
.insight-title{font-size:13px;font-weight:600;color:var(--txt);line-height:1.3}
.insight-desc{font-size:11.5px;color:var(--txt3);margin-top:2px;line-height:1.45}

/* ═══ SOUNDS PANEL ═══ */
.sounds-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
@media(max-width:540px){.sounds-grid{grid-template-columns:repeat(2,1fr)}}
.sound-card{
  padding:14px 12px;border-radius:var(--r-lg);
  background:var(--surface2);border:1px solid var(--border);
  display:flex;flex-direction:column;align-items:center;gap:8px;
  cursor:pointer;transition:all .18s;text-align:center;
}
.sound-card:hover{background:var(--surface);box-shadow:var(--shadow-xs);transform:translateY(-2px)}
.sound-card.active{background:rgba(59,130,246,.08);border-color:var(--border-s)}
.sound-icon{
  width:40px;height:40px;border-radius:var(--r);
  display:flex;align-items:center;justify-content:center;
  background:var(--surface);border:1px solid var(--border);
  font-size:18px;transition:all .18s;flex-shrink:0;
}
.sound-card.active .sound-icon{background:rgba(59,130,246,.1);border-color:rgba(59,130,246,.2)}
.sound-name{font-size:12px;font-weight:600;color:var(--txt2)}
.sound-card.active .sound-name{color:var(--blue-600)}
.sound-badge{font-size:9.5px;font-weight:700;padding:1px 7px;border-radius:var(--r-full);background:var(--bg3);color:var(--txt4)}
.sound-card.active .sound-badge{background:rgba(59,130,246,.12);color:var(--blue-600)}

/* ═══ SESSION HISTORY ═══ */
.history-list{display:flex;flex-direction:column;gap:8px}
.history-item{
  display:flex;align-items:center;gap:12px;
  padding:12px 14px;border-radius:var(--r-lg);
  background:var(--surface);border:1px solid var(--border);
  box-shadow:var(--shadow-xs);
  transition:box-shadow .18s;
  animation:cardIn .35s var(--ease) both;
}
.history-item:hover{box-shadow:var(--shadow-sm)}
.history-icon{
  width:36px;height:36px;border-radius:var(--r-sm);
  display:flex;align-items:center;justify-content:center;
  flex-shrink:0;font-size:13px;font-weight:700;
}
.history-icon.study{background:rgba(59,130,246,.1);color:var(--blue-600)}
.history-icon.break{background:rgba(34,197,94,.1);color:var(--green-500)}
.history-icon.long{background:rgba(168,85,247,.1);color:var(--purple-500)}
.history-info{flex:1;min-width:0}
.history-subject{font-size:13px;font-weight:600;color:var(--txt);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.history-time{font-size:11px;color:var(--txt4);margin-top:1px}
.history-meta{display:flex;align-items:center;gap:6px;flex-shrink:0}
.history-dur{font-family:var(--font-display);font-size:13px;font-weight:700;color:var(--txt2)}
.history-score{font-size:11px;font-weight:600;padding:2px 8px;border-radius:var(--r-full)}
.history-score.high{background:rgba(34,197,94,.1);color:var(--green-500)}
.history-score.mid{background:rgba(245,158,11,.1);color:var(--amber-500)}
.history-score.low{background:rgba(239,68,68,.1);color:var(--red-500)}
.history-empty{
  padding:36px 24px;text-align:center;
  border-radius:var(--r-xl);background:var(--surface2);
  border:1px dashed var(--border-m);
}
.history-empty-icon{
  width:48px;height:48px;border-radius:var(--r-xl);
  background:var(--surface);border:1px solid var(--border);
  display:flex;align-items:center;justify-content:center;
  color:var(--txt4);margin:0 auto 10px;
}
.history-empty h4{font-size:13.5px;font-weight:700;color:var(--txt3);margin-bottom:4px}
.history-empty p{font-size:12px;color:var(--txt4);line-height:1.5}

/* ═══ WEEKLY CHART ═══ */
.week-chart-wrap{display:flex;align-items:flex-end;gap:6px;height:80px;padding:0 2px}
.week-bar-col{flex:1;display:flex;flex-direction:column;align-items:center;gap:4px;min-width:0}
.week-bar-outer{flex:1;width:100%;background:var(--bg3);border-radius:4px;overflow:hidden;display:flex;flex-direction:column;justify-content:flex-end;min-height:4px}
.week-bar-fill{width:100%;border-radius:4px;transition:height 1s var(--ease-out);background:rgba(59,130,246,.35);min-height:0}
.week-bar-fill.today{background:var(--blue-500)}
.week-bar-lbl{font-size:10px;font-weight:600;color:var(--txt4)}

/* ═══ TASK LIST ═══ */
.task-list{display:flex;flex-direction:column;gap:6px}
.task-check-item{
  display:flex;align-items:center;gap:10px;
  padding:8px 10px;border-radius:var(--r-sm);
  background:var(--surface2);border:1px solid var(--border);
  transition:background .15s;cursor:pointer;
}
.task-check-item:hover{background:var(--surface3)}
.task-checkbox{
  width:16px;height:16px;border-radius:4px;
  border:1.5px solid var(--border-m);
  background:var(--surface);
  display:flex;align-items:center;justify-content:center;
  flex-shrink:0;transition:all .18s;
}
.task-check-item.done .task-checkbox{background:var(--blue-500);border-color:var(--blue-500)}
.task-check-label{font-size:12.5px;font-weight:500;color:var(--txt2);flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.task-check-item.done .task-check-label{text-decoration:line-through;color:var(--txt4)}
.task-del-btn{
  display:flex;align-items:center;justify-content:center;
  width:20px;height:20px;border-radius:4px;flex-shrink:0;
  color:var(--txt4);transition:all .15s;
}
.task-del-btn:hover{background:rgba(239,68,68,.08);color:var(--red-500)}
.task-add-row{display:flex;gap:6px;margin-top:6px}
.task-add-input{
  flex:1;height:34px;padding:0 10px;
  border-radius:var(--r-sm);
  background:var(--surface2);border:1px solid var(--border);
  font-size:12.5px;color:var(--txt);
  transition:all .18s;min-width:0;
}
.task-add-input:focus{background:var(--surface);border-color:var(--border-s);box-shadow:0 0 0 3px rgba(59,130,246,.08)}
.task-add-input::placeholder{color:var(--txt4)}
.task-add-btn{
  height:34px;padding:0 12px;border-radius:var(--r-sm);
  background:var(--blue-500);color:#fff;
  font-size:12.5px;font-weight:700;
  transition:all .18s;white-space:nowrap;flex-shrink:0;
}
.task-add-btn:hover{background:var(--blue-600)}

/* ═══ FOCUS SCORE ═══ */
.focus-score-wrap{display:flex;align-items:center;gap:16px}
.focus-score-ring{position:relative;width:72px;height:72px;flex-shrink:0}
.focus-score-ring svg{transform:rotate(-90deg)}
.score-ring-bg{fill:none;stroke:var(--bg3);stroke-width:5}
.score-ring-fill{fill:none;stroke:var(--green-500);stroke-width:5;stroke-linecap:round;transition:stroke-dashoffset 1s var(--ease-out),stroke .3s}
.focus-score-val{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-family:var(--font-display);font-size:18px;font-weight:700;color:var(--txt);letter-spacing:-.04em}
.focus-score-info{flex:1;min-width:0}
.focus-score-label{font-size:12px;font-weight:600;color:var(--txt3)}
.focus-score-desc{font-size:11.5px;color:var(--txt4);margin-top:2px;line-height:1.4}

/* ═══ GRID LAYOUTS ═══ */
.two-col{display:grid;grid-template-columns:1fr 1fr;gap:16px}
@media(max-width:768px){.two-col{grid-template-columns:1fr}}
.three-col{display:grid;grid-template-columns:1fr 1fr 1fr;gap:16px}
@media(max-width:900px){.three-col{grid-template-columns:1fr 1fr}}
@media(max-width:560px){.three-col{grid-template-columns:1fr}}
.main-grid{display:grid;grid-template-columns:1fr 360px;gap:20px;align-items:start}
@media(max-width:1100px){.main-grid{grid-template-columns:1fr}}

/* ═══ PAGE SECTIONS ═══ */
.page-section{margin-bottom:22px}

/* ═══ DIVIDER ═══ */
.divider{height:1px;background:var(--border);margin:16px 0}

/* ═══ CHIP ═══ */
.chip{
  display:inline-flex;align-items:center;gap:4px;
  padding:3px 10px;border-radius:var(--r-full);
  font-size:11px;font-weight:600;
}
.chip-blue{background:rgba(59,130,246,.1);color:var(--blue-600)}
.chip-green{background:rgba(34,197,94,.1);color:var(--green-500)}
.chip-amber{background:rgba(245,158,11,.1);color:var(--amber-500)}
.chip-red{background:rgba(239,68,68,.1);color:var(--red-500)}
.chip-purple{background:rgba(168,85,247,.1);color:var(--purple-500)}

/* ═══ LOADING SKELETON ═══ */
.skeleton{background:linear-gradient(90deg,var(--bg2) 25%,var(--bg3) 50%,var(--bg2) 75%);background-size:200% 100%;animation:shimmer 1.4s linear infinite;border-radius:var(--r-sm)}

/* ═══ RESPONSIVE ═══ */
@media(max-width:600px){
  .timer-card{padding:20px 16px}
  .timer-ring-wrap{width:190px;height:190px}
  .timer-digits{font-size:44px}
  .timer-ring-fill{stroke-dasharray:535;stroke-dashoffset:535}
  .timer-ring-bg{stroke-width:6}
  .timer-ring-fill{stroke-width:6}
  .stat-card-val{font-size:20px}
}
/* ═══ MOBILE FIXES ═══ */
@media(max-width:480px){
  .main-content{padding:14px 12px;}
  .timer-card{padding:16px 12px;}
  .timer-ring-wrap{width:170px;height:170px;}
  .timer-ring-wrap svg{width:170px;height:170px;}
  .timer-digits{font-size:38px;}
  .stat-grid{grid-template-columns:1fr 1fr;gap:8px;}
  .stat-card{padding:12px;}
  .stat-card-val{font-size:18px;}
  .session-meta-card{padding:14px;}
  .settings-card{padding:14px;}
  .timer-controls{gap:10px;}
  .tc-btn-play{min-width:100px;height:44px;font-size:14px;}
  .tc-btn-sm{width:40px;height:40px;}
  .main-grid{grid-template-columns:1fr;}
  .navbar-title-group{min-width:0;}
  .navbar-actions{gap:6px;}
  .section-title{font-size:14px;}
  #custom-dur-row{flex-wrap:wrap;gap:6px;}
  #custom-dur-row .settings-input-num{width:70px;}
  .form-input,.form-select,.form-textarea{font-size:16px;} /* prevent zoom on iOS */
  .task-add-input{font-size:16px;}
}
@media(max-width:360px){
  .timer-digits{font-size:32px;}
  .stat-grid{grid-template-columns:1fr;}
}
