/* Temas da área autenticada. A entrada e a recuperação de senha mantêm seu visual original. */
.app,.app ~ .modal-back,.app ~ .toast{
  --theme-background:#090911;
  --theme-surface:rgba(22,19,35,.84);
  --theme-surface-raised:rgba(30,24,49,.92);
  --theme-card:linear-gradient(145deg,rgba(32,26,51,.9),rgba(15,15,26,.94));
  --theme-border:rgba(166,122,230,.3);
  --theme-divider:rgba(179,155,213,.16);
  --theme-text:#f8f6fc;
  --theme-secondary:#c8c0d6;
  --theme-muted:#aaa1ba;
  --theme-primary:#9b4dff;
  --theme-primary-hover:#b366ff;
  --theme-primary-soft:rgba(155,77,255,.18);
  --theme-accent:#d27aff;
  --theme-input:rgba(13,12,24,.9);
  --theme-progress:#242039;
  --theme-glass:rgba(23,19,37,.86);
  --theme-sidebar:linear-gradient(180deg,rgba(13,11,23,.97),rgba(8,8,17,.96));
  --theme-header:linear-gradient(105deg,rgba(21,17,37,.94),rgba(40,18,71,.89));
  --theme-shadow:0 18px 42px rgba(0,0,0,.32),inset 0 1px rgba(255,255,255,.08);
  --theme-hover-shadow:0 24px 50px rgba(0,0,0,.4),0 0 26px rgba(153,83,234,.12);
  --theme-ring:#252039;
  --theme-ring-inner:#13111e;
  --theme-danger:#ffadc1;
  --theme-success:#9eebcf;
  --theme-overlay:rgba(3,2,9,.72);
  --theme-placeholder:#928aa2;
  --theme-focus:#ba82ff;
  --theme-tint:rgba(186,130,255,.15);
  --bg:var(--theme-background);
  --panel:var(--theme-surface);
  --panel2:var(--theme-surface-raised);
  --line:var(--theme-border);
  --text:var(--theme-text);
  --muted:var(--theme-muted);
  --purple:var(--theme-primary);
  --purple2:var(--theme-primary-hover);
  --purple3:#7430d5;
  --shadow:var(--theme-shadow);
}
html[data-studyvoid-theme="light"] .app,
html[data-studyvoid-theme="light"] .app ~ .modal-back,
html[data-studyvoid-theme="light"] .app ~ .toast{
  --theme-background:#f1f1f6;
  --theme-surface:rgba(255,255,255,.86);
  --theme-surface-raised:rgba(255,255,255,.96);
  --theme-card:linear-gradient(145deg,rgba(255,255,255,.94),rgba(250,248,255,.84));
  --theme-border:rgba(97,70,139,.18);
  --theme-divider:rgba(80,65,106,.13);
  --theme-text:#1c142b;
  --theme-secondary:#4e455d;
  --theme-muted:#665e72;
  --theme-primary:#8224dd;
  --theme-primary-hover:#992fff;
  --theme-primary-soft:rgba(140,44,225,.12);
  --theme-accent:#8c21e7;
  --theme-input:rgba(250,249,253,.92);
  --theme-progress:#e6e2ee;
  --theme-glass:rgba(255,255,255,.78);
  --theme-sidebar:linear-gradient(180deg,rgba(255,255,255,.93),rgba(248,246,253,.91));
  --theme-header:linear-gradient(105deg,rgba(250,246,255,.94),rgba(241,232,252,.9));
  --theme-shadow:0 14px 36px rgba(39,28,60,.08),inset 0 1px rgba(255,255,255,.9);
  --theme-hover-shadow:0 19px 38px rgba(71,44,104,.13),0 0 23px rgba(147,65,211,.07);
  --theme-ring:#e7e0ef;
  --theme-ring-inner:#faf9fe;
  --theme-danger:#a92650;
  --theme-success:#08644a;
  --theme-overlay:rgba(28,18,47,.38);
  --theme-placeholder:#787083;
  --theme-focus:#8932db;
  --theme-tint:rgba(145,57,229,.11);
  --purple3:#6223bb;
}
.app{color:var(--theme-text);color-scheme:dark;background:radial-gradient(850px 560px at 70% -12%,var(--theme-primary-soft),transparent 68%),var(--theme-background)}
html[data-studyvoid-theme="light"] .app{color-scheme:light;background:radial-gradient(930px 600px at 88% -8%,rgba(177,113,238,.14),transparent 70%),linear-gradient(150deg,#f9f9fc,var(--theme-background) 65%)}
.app .sidebar{background:var(--theme-sidebar);border-color:var(--theme-border);box-shadow:var(--theme-shadow)}
.app .side-brand strong{color:var(--theme-text)}
.app .nav button{color:var(--theme-secondary)}
.app .nav button:hover{color:var(--theme-text);background:var(--theme-primary-soft)}
.app .nav button.active{color:var(--theme-text);background:linear-gradient(95deg,var(--theme-primary-soft),transparent);border-color:var(--theme-primary);box-shadow:inset 0 1px rgba(255,255,255,.3),0 5px 18px var(--theme-primary-soft)}
.app .nav button .nav-icon{color:var(--nav-accent);text-shadow:none}
html[data-studyvoid-theme="light"] .app .nav button .nav-icon{color:color-mix(in srgb,var(--nav-accent) 76%,#1c142b)}
.app .side-user{color:var(--theme-text);background:var(--theme-surface);border-color:var(--theme-border);box-shadow:var(--theme-shadow)}
.app .side-user:hover{background:var(--theme-surface-raised);border-color:var(--theme-primary)}
.app .profile-arrow{color:var(--theme-muted)}
.app .logout{color:var(--theme-danger);background:color-mix(in srgb,var(--theme-danger) 7%,transparent);border-color:color-mix(in srgb,var(--theme-danger) 24%,transparent)}
.app .logout:hover{background:color-mix(in srgb,var(--theme-danger) 13%,transparent);border-color:var(--theme-danger)}
.app .topbar{color:var(--theme-text);background:var(--theme-header);border-color:var(--theme-border);box-shadow:var(--theme-shadow)}
.app .topbar::before{background:linear-gradient(90deg,transparent 35%,var(--theme-primary-soft),transparent 80%)}
.app .topbar h1,.app .section-head h2,.app .day-head strong,.app .kpi,.app .week-day-head b{color:var(--theme-text);text-shadow:none}
.app .topbar h1 .profile-name{color:var(--theme-accent)}
.app .topbar p,.app .section-head p,.app .kpi-heading,.app .kpi-sub,.app .card .kpi-sub,.app .week-stats,.app .timer-status,.app .timer-duration label{color:var(--theme-secondary)}
.app .sync-status{color:var(--theme-muted)}
.app .card,.app .day,.app .home-kpi,.app .week-day-card{color:var(--theme-text);background:var(--theme-card);border-color:var(--theme-border);box-shadow:var(--theme-shadow)}
.app .card:hover,.app .day:hover{border-color:var(--theme-primary);box-shadow:var(--theme-hover-shadow)}
.app .card::before{background:radial-gradient(260px circle at var(--glow-x,50%) var(--glow-y,0%),var(--theme-tint),transparent 65%)}
.app .home-kpi::after{background:radial-gradient(circle,var(--theme-primary-soft),transparent 68%)}
.app .home-kpi .kpi small{color:var(--theme-text)}
.app .week-day-card:hover,.app .week-day-card.today,.app .day.today{border-color:var(--theme-primary)}
.app .week-day-head small,.app .week-stats .empty,.app .material-status{color:var(--theme-muted)}
.app .week-ring{background:conic-gradient(var(--theme-primary) calc(var(--week-p)*1%),var(--theme-progress) 0)}
.app .week-ring::before{background:var(--theme-ring-inner)}
.app .list-item,.app .task{background:var(--theme-glass);border-color:var(--theme-divider);color:var(--theme-text)}
.app .list-item:hover,.app .task:hover{background:var(--theme-primary-soft);border-color:var(--theme-primary)}
.app .goal-state{color:var(--theme-primary);background:var(--theme-primary-soft);border-color:var(--theme-border)}
.app .badge{color:var(--theme-secondary);background:var(--theme-glass);border-color:var(--theme-border)}
.app .secondary,.app .icon-btn,.app .mini,.app .rename-button,.app .mode-row button{color:var(--theme-text);background:var(--theme-surface-raised);border-color:var(--theme-border);box-shadow:inset 0 1px rgba(255,255,255,.16)}
.app .secondary:hover,.app .icon-btn:hover,.app .mini:hover,.app .rename-button:hover,.app .mode-row button:hover{background:var(--theme-primary-soft);border-color:var(--theme-primary);box-shadow:var(--theme-shadow)}
.app .mode-row button.active{color:var(--theme-text);background:var(--theme-primary-soft);border-color:var(--theme-primary)}
.app .primary,.app .header-goal{color:#fff!important;background:linear-gradient(110deg,var(--theme-primary),var(--theme-primary-hover))!important;border-color:transparent!important;box-shadow:0 10px 23px var(--theme-primary-soft)}
.app .primary:hover,.app .header-goal:hover{box-shadow:0 14px 28px var(--theme-primary-soft)}
.app .input,.app textarea,.app select{color:var(--theme-text);background:var(--theme-input);border-color:var(--theme-border)}
.app .input::placeholder,.app textarea::placeholder{color:var(--theme-placeholder);opacity:1}
.app .input:focus,.app textarea:focus,.app select:focus{border-color:var(--theme-focus);box-shadow:0 0 0 3px var(--theme-primary-soft)}
.app label,.app .note,.app .muted,.app .task small,.app .day-date,.app .table th{color:var(--theme-muted)}
.app .table td,.app .table th{border-color:var(--theme-divider)}
.app .progress,.app .bar,.app .home-kpi .progress{background:var(--theme-progress);border-color:var(--theme-divider)}
.app .progress i,.app .bar i,.app .home-kpi .progress i{background:linear-gradient(90deg,var(--purple3),var(--theme-primary-hover));box-shadow:none}
.app .circle{background:conic-gradient(var(--theme-primary) 0deg,var(--theme-progress) 0deg);box-shadow:inset 0 0 0 18px var(--theme-ring),var(--theme-shadow)}
.app .circle-inner{background:var(--theme-ring-inner);box-shadow:inset 0 1px var(--theme-border)}
.app .danger{color:var(--theme-danger)!important}.app .success{color:var(--theme-success)!important}
.app button:disabled{opacity:.48;cursor:not-allowed;box-shadow:none}
.app :focus-visible,.app:not(.hidden) ~ .modal-back :focus-visible{outline:2px solid var(--theme-focus);outline-offset:3px}
.app:not(.hidden) ~ .modal-back{background:var(--theme-overlay);color-scheme:dark;color:var(--theme-text)}
html[data-studyvoid-theme="light"] .app:not(.hidden) ~ .modal-back{color-scheme:light}
.app:not(.hidden) ~ .modal-back .modal{color:var(--theme-text);background:var(--theme-surface-raised);border-color:var(--theme-border);box-shadow:var(--theme-shadow)}
.app:not(.hidden) ~ .modal-back .input,.app:not(.hidden) ~ .modal-back textarea,.app:not(.hidden) ~ .modal-back select{color:var(--theme-text);background:var(--theme-input);border-color:var(--theme-border)}
.app:not(.hidden) ~ .modal-back .input::placeholder,.app:not(.hidden) ~ .modal-back textarea::placeholder{color:var(--theme-placeholder);opacity:1}
.app:not(.hidden) ~ .modal-back label,.app:not(.hidden) ~ .modal-back .note,.app:not(.hidden) ~ .modal-back .muted,.app:not(.hidden) ~ .modal-back .material-picker-note,.app:not(.hidden) ~ .modal-back .profile-photo-actions small{color:var(--theme-muted)}
.app:not(.hidden) ~ .modal-back .profile-editor-photo{background:var(--theme-glass);border-color:var(--theme-border)}
.app:not(.hidden) ~ .modal-back .primary{color:#fff;background:linear-gradient(110deg,var(--theme-primary),var(--theme-primary-hover))}
.app:not(.hidden) ~ .modal-back .secondary,.app:not(.hidden) ~ .modal-back .icon-btn,.app:not(.hidden) ~ .modal-back .mini,.app:not(.hidden) ~ .modal-back .file-picker::file-selector-button{color:var(--theme-text);background:var(--theme-surface);border-color:var(--theme-border)}
.app:not(.hidden) ~ .modal-back .badge{color:var(--theme-secondary);background:var(--theme-glass);border-color:var(--theme-border)}
.app:not(.hidden) ~ .toast{color:var(--theme-text);background:var(--theme-surface-raised);border-color:var(--theme-border);box-shadow:var(--theme-shadow)}
.app .appearance-picker{display:flex;gap:10px;flex-wrap:wrap}
.app .appearance-card{margin-bottom:16px}
.app .appearance-option{min-width:132px;min-height:54px;padding:12px 17px;display:inline-flex;align-items:center;justify-content:center;gap:9px;border:1px solid var(--theme-border);border-radius:12px;color:var(--theme-text);background:var(--theme-surface-raised);transition:background .2s ease,border-color .2s ease,box-shadow .2s ease,transform .2s ease}
.app .appearance-option:hover{transform:translateY(-2px);border-color:var(--theme-primary);background:var(--theme-primary-soft)}
.app .appearance-option[aria-pressed="true"]{border-color:var(--theme-primary);background:var(--theme-primary-soft);box-shadow:inset 0 0 0 1px var(--theme-primary),0 7px 18px var(--theme-primary-soft);font-weight:700}
.app .appearance-option[aria-pressed="true"]::after{content:"✓";font-size:12px;color:var(--theme-accent)}
@media(max-width:480px){.app .appearance-option{flex:1;min-width:0}}
@media(prefers-reduced-motion:reduce){.app .appearance-option{transition:none}.app .appearance-option:hover{transform:none}}
