/* Stellaris — a quiet observatory for ideas. Shared design system. */
:root {
  color-scheme: dark;
  --bg: #0b0d16; --space-black: var(--bg); --space-card: #131622;
  --space-card-hover: #1a1d2d; --space-border: #262a3c; --space-border-glow: #7561a8;
  --text-main: #f4f3ff; --text-muted: #a4a7bf; --text-dim: #858ba6;
  --accent: #b6a1ff; --accent-star: var(--accent); --accent-star-glow: #b6a1ff33;
  --accent-cyan: #8dcfd0; --accent-purple: #b6a1ff; --success: #9bd5ba; --danger: #ffa5ab;
  --duo-red: var(--danger); --duo-red-light: #ffa5ab16;
  --radius-sm: 10px; --radius-md: 16px; --radius-lg: 22px; --radius-pill: 999px;
  --glass-blur: blur(18px); --sidebar-width: 236px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-synthesis: none; -webkit-font-smoothing: antialiased;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 28px; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text-main); font-size: 14px; line-height: 1.5; }
[hidden] { display: none !important; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { opacity: .45; cursor: not-allowed; transform: none !important; }
a { color: inherit; text-decoration: none; }
img, svg { vertical-align: middle; }
button svg, a svg { flex-shrink: 0; }
input, select, textarea { border: 1px solid var(--space-border); border-radius: var(--radius-sm); background: #10131f; color: var(--text-main); padding: 11px 13px; }
select { max-width: 100%; }
input::placeholder, textarea::placeholder { color: #8589a4; opacity: 1; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid #b6a1ff65; outline-offset: 2px; border-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
::selection { background: #a98af34d; }
h1, h2, h3, h4, p { margin-top: 0; }
.icon { display: inline-block; flex: 0 0 auto; }
[data-icon] { display: inline-flex; align-items: center; justify-content: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 500; top: -70px; left: 16px; padding: 12px 20px; background: var(--accent); color: #171123; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.btn-primary, .btn-subtle, .btn-outline, .btn-ghost, .icon-button, .btn-icon { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 40px; padding: 10px 18px; border: 1px solid transparent; border-radius: var(--radius-sm); font-size: 13px; font-weight: 550; line-height: 1.3; transition: background .18s, border-color .18s, transform .18s; white-space: nowrap; }
.btn-primary { background: #c4b2ff; color: #201735; box-shadow: 0 3px 12px #00000014, inset 0 1px #ffffff33; }
.btn-primary:hover { background: #d5c7ff; transform: translateY(-1px); }
.btn-subtle, .btn-outline { background: #ffffff04; border-color: var(--space-border); color: var(--text-main); }
.btn-subtle:hover, .btn-outline:hover { background: #ffffff09; border-color: #46435e; }
.btn-ghost, .icon-button, .btn-icon { color: var(--text-muted); background: transparent; }
.btn-ghost:hover, .icon-button:hover, .btn-icon:hover { color: var(--text-main); background: #ffffff09; }
.icon-button, .btn-icon { width: 38px; height: 38px; padding: 8px; }
.text-link { display: inline-flex; align-items: center; gap: 7px; color: var(--accent); font-size: 12px; border: 0; padding: 0; background: none; }
.text-link:hover { color: #d5c7ff; }
.text-link .icon { width: 15px; height: 15px; }
.card-box { border: 1px solid var(--space-border); background: var(--space-card); border-radius: var(--radius-lg); padding: 24px; }
.eyebrow { font-size: 10px; letter-spacing: 1.8px; font-weight: 600; text-transform: uppercase; color: var(--text-dim); }
.muted { color: var(--text-muted); }
.workspace-page {
  isolation: isolate;
  --star-dot: #ccbcff54;
  --star-glint: #e1d5ff98;
}
html[data-theme="light"] .workspace-page {
  --star-dot: #7654bd45;
  --star-glint: #7850c177;
}
.workspace-page::before,
.workspace-page::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  width: min(100%, var(--mobile-width, 100%));
  margin-inline: auto;
  pointer-events: none;
}
.workspace-page::before {
  background-image:
    radial-gradient(1.5px at 11% 28%, var(--star-dot) 60%, transparent),
    radial-gradient(1px at 37% 16%, var(--star-dot) 65%, transparent),
    radial-gradient(1.5px at 72% 32%, var(--star-dot) 60%, transparent),
    radial-gradient(1px at 94% 62%, var(--star-dot) 65%, transparent),
    radial-gradient(1.5px at 51% 74%, var(--star-dot) 60%, transparent);
  background-size: 270px 240px;
}
.workspace-page::after {
  background-image:
    radial-gradient(1px 5px at 8% 20%, var(--star-glint), transparent),
    radial-gradient(5px 1px at 8% 20%, var(--star-glint), transparent),
    radial-gradient(1px 4px at 64% 43%, var(--star-glint), transparent),
    radial-gradient(4px 1px at 64% 43%, var(--star-glint), transparent),
    radial-gradient(1px 6px at 90% 86%, var(--star-glint), transparent),
    radial-gradient(6px 1px at 90% 86%, var(--star-glint), transparent);
  background-size: 370px 340px;
  opacity: .65;
  animation: background-twinkle 7s ease-in-out infinite alternate;
}
@keyframes background-twinkle {
  from { opacity: .34; }
  to { opacity: .9; }
}
/* Navigation */
.app-sidebar { position: fixed; z-index: 60; inset: 0 auto 0 0; width: var(--sidebar-width); padding: 22px 16px 14px; background: radial-gradient(ellipse at 10% 0, #28213c70, transparent 300px), #0e101a; border-right: 1px solid var(--space-border); display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; }
.brand-link { display: inline-flex; align-items: center; gap: 10px; color: #f4f1ff; font-size: 25px; font-weight: 600; letter-spacing: -1px; }
.app-sidebar .brand-link { min-height: 48px; padding: 0 12px; border-radius: var(--radius-sm); }
.brand-link img { width: 35px; height: 35px; }
.brand-period { color: var(--accent); }
.brand-caption { margin: 6px 0 22px 58px; font-size: 9px; letter-spacing: 2px; color: #9697b0; }
.nav-group-label { color: var(--text-dim); font-size: 10px; letter-spacing: .08em; font-weight: 650; padding: 15px 12px 6px; }
.side-nav { display: flex; flex-direction: column; gap: 3px; }
.side-link { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 9px 12px; border-radius: 10px; color: var(--text-muted); font-size: 13px; font-weight: 520; transition: background .18s, color .18s; }
.side-link .icon { width: 18px; height: 18px; }
.side-link:hover { color: var(--text-main); background: var(--space-card-hover); }
.side-link.active { background: linear-gradient(100deg, #aa8ef02e, #aa8ef00e); color: #e1d5ff; box-shadow: inset 0 0 0 1px #b89bf029; font-weight: 650; }
.side-link.active::after { content: ''; margin-left: auto; width: 5px; height: 5px; flex: 0 0 auto; background: var(--accent); border-radius: 50%; }
.app-sidebar :is(.side-link, .brand-link, .profile-card):focus-visible { outline-offset: -2px; }
.sidebar-bottom { margin-top: auto; padding-top: 18px; }
.sidebar-settings { width: 100%; border: 0; background: transparent; text-align: left; }
.profile-card { min-height: 52px; border: 1px solid var(--space-border); border-radius: var(--radius-sm); background: var(--space-card); margin-top: 10px; padding: 7px 9px; display: flex; align-items: center; gap: 8px; }
.profile-avatar { width: 33px; height: 33px; background: #b49bdb26; border: 1px solid #b49bdb36; color: #d2b7f5; border-radius: 50%; display: grid; place-items: center; font-size: 11px; flex-shrink: 0; }
.profile-detail { min-width: 0; flex: 1; }
.profile-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; }
.profile-caption { display: block; color: var(--text-dim); font-size: 10px; margin-top: 1px; }
.profile-card .icon-button { width: 28px; padding: 5px; }
.workspace-main { margin-left: var(--sidebar-width); min-height: 100vh; }
.workspace-header { min-height: 66px; border-bottom: 1px solid var(--space-border); padding: 0 38px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.breadcrumb { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 5px 8px; color: var(--text-muted); font-size: 12px; }
.breadcrumb > .icon, .breadcrumb > [data-icon] { color: #bfa7f7; }
.breadcrumb .separator { color: var(--text-dim); padding: 0 1px; }
.breadcrumb .separator + span { color: var(--text-main); font-weight: 620; }
.breadcrumb a:hover { color: var(--text-main); text-decoration: underline; }
.header-actions { display: flex; align-items: center; gap: 17px; }
.today-date { font-size: 11px; color: #989ab0; }
.header-status { font-size: 10px; color: #a3a6bc; display: flex; align-items: center; gap: 7px; }
.status-dot { width: 5px; height: 5px; border-radius: 50%; background: #a4a7bf; }
.header-status.online .status-dot { background: #9bd5ba; box-shadow: 0 0 7px #9bd5ba33; }
.header-status.offline .status-dot { background: #d6ac7d; }
.mobile-menu { display: none; }
.sidebar-scrim { display: none; }
.dashboard-content { max-width: 1440px; margin: 0 auto; padding: 30px 38px 26px; }
.page-intro { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 24px; }
.page-intro h1 { font-size: 24px; font-weight: 500; letter-spacing: -.8px; margin: 0 0 5px; }
.page-intro p { margin: 0; color: var(--text-muted); font-size: 12px; }
/* Observatory hero */
.cosmic-hero { position: relative; isolation: isolate; overflow: hidden; border: 1px solid #4a3c633e; border-radius: 19px; background: #161627; min-height: 282px; display: flex; align-items: center; margin-bottom: 28px; }
.cosmic-hero::before { content: ''; position: absolute; z-index: -1; inset: 0; background: radial-gradient(ellipse at 70% 65%,#49327933,transparent 65%), linear-gradient(115deg,#1b1a2e,#141626 70%); }
.hero-copy { position: relative; z-index: 2; padding: 32px 36px; width: 61%; }
.hero-copy h2 { font-size: clamp(29px,3vw,44px); font-weight: 450; line-height: 1.16; letter-spacing: -1.4px; margin: 0 0 13px; }
.hero-copy h2 em { font-family: Georgia, 'Times New Roman', serif; font-weight: 400; color: #c4acf0; letter-spacing: -.9px; }
.hero-copy p { max-width: 365px; font-size: 14px; line-height: 1.55; color: var(--text-muted); margin: 0 0 20px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-actions .btn-primary, .hero-actions .btn-subtle { min-height: 44px; padding: 9px 14px; font-size: 12px; }
.hero-actions .icon { width: 15px; height: 15px; }
.hero-art { position: absolute; z-index: 1; width: 55%; height: 112%; object-fit: cover; right: -3%; top: -6%; pointer-events: none; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.section-heading h2 { font-size: 16px; font-weight: 500; letter-spacing: -.3px; margin: 0; }
.section-heading p { font-size: 11px; color: var(--text-dim); margin: 3px 0 0; }
.section-heading > span { font-size: 10px; color: var(--text-dim); }
.tool-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 13px; margin-bottom: 29px; }
.tool-card { position: relative; display: block; padding: 18px; border: 1px solid var(--space-border); border-radius: 13px; background: #11141f; transition: background .2s, border-color .2s, transform .2s; }
.tool-card:hover { background: #181b2a; border-color: #504368; transform: translateY(-3px); }
.tool-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #b29bf019; color: #c9b2f7; margin-bottom: 15px; }
.tool-card:nth-child(2) .tool-icon { background: #84c5bf15; color: #91cbc6; }
.tool-card:nth-child(3) .tool-icon { background: #daa08315; color: #deae91; }
.tool-card:nth-child(4) .tool-icon { background: #90aeea16; color: #a5b9eb; }
.tool-card .tool-arrow { position: absolute; top: 22px; right: 16px; color: #636780; }
.tool-card .tool-arrow .icon { width: 15px; height: 15px; }
.tool-card h3 { font-size: 12px; font-weight: 550; margin: 0 0 6px; }
.tool-card p { font-size: 10px; line-height: 1.7; color: #969bb2; margin: 0; }
.dashboard-columns { display: grid; grid-template-columns: minmax(0,1fr) 260px; gap: 23px; align-items: start; }
.library-section { min-width: 0; scroll-margin-top: 25px; }
.count-badge { margin-left: 6px; padding: 2px 6px; font-size: 9px; border-radius: 5px; color: #b6aecb; background: #b7a2e416; vertical-align: middle; }
.search-field { min-width: 0; height: 48px; display: flex; align-items: center; gap: 9px; border: 1px solid var(--space-border); border-radius: 12px; background: var(--space-card); padding: 0 13px; }
.search-field .icon { color: var(--text-dim); width: 17px; height: 17px; }
.search-field input { border: 0; outline: 0; background: transparent; width: 100%; min-width: 0; min-height: 0; padding: 0; height: 100%; font-size: 14px; }
.search-field:focus-within { outline: 2px solid #b6a1ff65; border-color: var(--accent); }
.view-switch { display: flex; border: 1px solid var(--space-border); border-radius: 12px; padding: 1px; }
.view-switch .icon-button { min-height: 44px; width: 44px; height: 44px; padding: 6px; border-radius: 10px; }
.view-switch .icon { width: 17px; height: 17px; }
.view-switch .active { color: var(--accent); background: #b6a1ff15; }
.filter-tabs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.filter-tab { min-height: 44px; font-size: 12px; color: var(--text-muted); border: 1px solid transparent; background: none; padding: 6px 10px; border-radius: var(--radius-pill); }
.filter-tab:hover { color: var(--text-main); background: var(--space-card-hover); }
.filter-tab.active { color: #cbb5f8; border-color: #a58bda24; background: #a58bda0e; }
.sort-select { min-height: 44px; color: var(--text-muted); background: var(--space-card); padding: 5px 8px; border: 1px solid var(--space-border); font-size: 12px; max-width: 145px; }
.document-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.document-card { position: relative; min-width: 0; border: 1px solid var(--space-border); border-radius: 12px; background: #121520; padding: 16px; transition: border-color .18s; }
.document-card:hover { border-color: #56506d; }
.document-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
.file-badge { display: inline-flex; align-items: center; gap: 7px; color: #c5addd; font-size: 8px; letter-spacing: .6px; }
.file-badge .icon { width: 16px; height: 16px; }
.document-card:nth-child(even) .file-badge { color: #90c8c7; }
.doc-delete { min-height: 24px; width: 24px; height: 24px; padding: 4px; }
.doc-delete:hover { color: var(--danger); background: #ffa5ab0c; }
.doc-delete .icon { width: 13px; height: 13px; }
.document-card h3 { font-size: 12px; font-weight: 500; margin: 0 0 5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.document-card h3 a::after { content: ''; position: absolute; inset: 51px 10px 59px; }
.document-meta { font-size: 10px; color: #8d93ab; margin: 0; }
.document-bottom { margin-top: 18px; padding-top: 11px; border-top: 1px solid #26293a; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.document-date { font-size: 9px; color: #7f859f; }
.document-bottom a { font-size: 10px; }
.document-grid.list-view { grid-template-columns: 1fr; }
.list-view .document-card { display: grid; grid-template-columns: 62px 1fr auto; align-items: center; gap: 15px; padding: 12px 15px; }
.list-view .document-top { margin: 0; }
.list-view .doc-delete { position: absolute; right: 8px; top: 8px; }
.list-view .document-bottom { border: 0; margin: 0; padding: 0 20px 0 0; }
.list-view .document-date { display: none; }
.list-view .document-card h3 a::after { inset: 0 110px 0 65px; }
.library-empty { grid-column: 1/-1; text-align: center; padding: 27px 20px 24px; background: radial-gradient(ellipse at center,#9c80d00a,transparent 70%); border: 1px solid #232639; border-radius: 12px; }
.empty-orbit { position: relative; width: 77px; height: 55px; margin: 0 auto 15px; display: grid; place-items: center; }
.empty-orbit::before { content: ''; position: absolute; width: 76px; height: 32px; border: 1px solid #79629e55; border-radius: 50%; transform: rotate(-25deg); }
.empty-orbit::after { content: ''; position: absolute; width: 4px; height: 4px; background: #b8a1e5; border-radius: 50%; top: 7px; right: 15px; box-shadow: 0 0 10px #cbb5ff66; }
.empty-orbit .icon { width: 26px; height: 26px; color: #bba3eb; }
.library-empty h3 { font-size: 13px; font-weight: 500; margin-bottom: 7px; }
.library-empty p { font-size: 11px; color: #969ab3; margin-bottom: 13px; line-height: 1.8; }
.library-empty .btn-subtle { font-size: 10px; padding: 7px 12px; min-height: 32px; }
.dropzone-wide { display: block; margin-top: 13px; padding: 17px 15px; border: 1px dashed #4e426358; border-radius: 11px; cursor: pointer; text-align: center; background: #aa8ad305; transition: background .2s, border-color .2s; }
.dropzone-wide:hover, .dropzone-wide.is-over, .dropzone-wide:focus-within { background: #aa8ad30c; border-color: #a487cb; }
.dropzone-wide input[type=file] { position: absolute; opacity: 0; width: 1px; height: 1px; padding: 0; }
.dropzone-title { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 11px; color: #aba0c5; }
.dropzone-title .icon { width: 15px; height: 15px; }
.dropzone-title strong { color: #c5aedf; font-weight: 500; }
.dropzone-caption { display: block; font-size: 9px; color: #7d819b; margin-top: 5px; }
.upload-status { font-size: 11px; margin-top: 10px; overflow-wrap: anywhere; color: var(--success); }
.upload-status:empty { display: none; }
.upload-status.error { color: var(--danger); }
.progress { height: 3px; background: #292238; border-radius: 8px; overflow: hidden; margin-top: 12px; }
.progress span { display: block; width: 0; height: 100%; background: var(--accent); transition: width .2s; }
/* Focus and real activity */
.focus-card { overflow: hidden; padding: 19px; border: 1px solid #303044; border-radius: 14px; background: radial-gradient(ellipse at 85% 0,#7b5ca61a,transparent 70%),#141623; text-align: center; }
.focus-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.focus-heading h2 { margin: 0; font-size: 12px; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.focus-heading .icon { color: #bea9e9; width: 16px; height: 16px; }
.focus-tag { font-size: 8px; color: #b5a4d7; border: 1px solid #a082d326; padding: 3px 7px; border-radius: 20px; }
.focus-timer { width: 142px; height: 142px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; position: relative; background: conic-gradient(from 0deg, #bba2ef var(--timer-progress,0%), #343047 0%); padding: 2px; }
.focus-timer::before { content: ''; position: absolute; inset: 2px; border-radius: 50%; background: #151624; }
.timer-inner { z-index: 1; }
.timer-value { display: block; font-size: 33px; font-weight: 300; font-variant-numeric: tabular-nums; letter-spacing: 1px; color: #e5dff2; line-height: 1.3; }
.timer-label { color: #9391ac; letter-spacing: 1.8px; font-size: 7px; text-transform: uppercase; }
.focus-subtitle { color: #9595af; font-size: 10px; margin-bottom: 15px; }
.focus-buttons { display: flex; align-items: center; gap: 7px; }
.focus-buttons .btn-primary { flex: 1; min-height: 34px; font-size: 10px; padding: 8px 11px; background: #b9a3e926; color: #d0bbf0; border: 1px solid #b9a3e936; }
.focus-buttons .btn-primary:hover { background: #b9a3e93a; }
.focus-buttons .icon { width: 13px; height: 13px; }
.focus-buttons .icon-button { width: 32px; height: 32px; min-height: 32px; border: 1px solid #2c293f; }
.focus-sessions { border-top: 1px solid #2b293e; padding-top: 12px; margin: 15px 0 0; color: #7f819b; font-size: 9px; }
.activity-card { padding: 19px 0 0; }
.activity-card h2 { font-size: 12px; font-weight: 500; margin: 0 0 13px; }
.activity-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #202332; }
.activity-row:last-child { border: 0; }
.activity-icon { color: #a4a6c4; width: 30px; height: 30px; border: 1px solid #25283a; border-radius: 8px; display: grid; place-items: center; }
.activity-icon .icon { width: 14px; height: 14px; }
.activity-info { flex: 1; min-width: 0; }
.activity-info strong { display: block; font-size: 10px; font-weight: 450; color: #b9bbce; }
.activity-info span { font-size: 9px; color: #7e85a0; }
.activity-number { font-size: 15px; font-weight: 400; color: #c6b4e6; }
.exam-history { margin-top: 23px; }
.exam-history h2 { font-size: 13px; font-weight: 500; }
.exam-history-list { display: grid; gap: 8px; }
.exam-history-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 13px; border: 1px solid #26293a; border-radius: 9px; font-size: 11px; }
.exam-history-item p { margin: 0; color: var(--text-muted); font-size: 9px; }
.exam-grade { color: var(--accent); white-space: nowrap; }
.dashboard-footer { margin-top: 24px; border-top: 1px solid var(--space-border); color: var(--text-muted); font-size: 12px; }
.dashboard-footer a { display: inline-flex; align-items: center; min-height: 44px; }
.dashboard-footer a:hover { color: var(--text-main); text-decoration: underline; }
.notice-banner { display: flex; align-items: center; gap: 12px; border: 1px solid #bd9c662b; border-radius: 10px; padding: 12px 16px; color: #cdbba5; font-size: 11px; margin-bottom: 20px; background: #bc965b07; }
.notice-banner p { margin: 0; flex: 1; }
.notice-banner button { font-size: 10px; }
/* Dialogs and feedback */
dialog { background: #151824; color: var(--text-main); border: 1px solid #44405c; border-radius: 18px; padding: 28px; width: min(460px,calc(100% - 32px)); max-height: calc(100dvh - 48px); overflow: auto; box-shadow: 0 30px 100px #0008; }
dialog::backdrop { background: #080912b8; backdrop-filter: blur(5px); }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.dialog-header h2 { font-size: 19px; font-weight: 500; margin: 0; }
.dialog-copy { font-size: 12px; color: var(--text-muted); line-height: 1.8; }
.form-field { margin: 20px 0; }
.form-field label { display: block; font-size: 12px; color: #c5c3d8; margin-bottom: 7px; }
.form-field input, .form-field select { width: 100%; }
.field-hint { font-size: 10px; color: var(--text-dim); margin: 7px 0 0; line-height: 1.7; }
.dialog-actions { display: flex; justify-content: end; gap: 8px; margin-top: 24px; }
.form-error { color: var(--danger); font-size: 12px; }
.toast { position: fixed; z-index: 200; bottom: 24px; left: 50%; transform: translateX(-50%); max-width: min(520px,calc(100vw - 32px)); padding: 13px 20px; background: #29243b; border: 1px solid #63507c; color: #e7ddfa; border-radius: 12px; box-shadow: 0 10px 50px #0006; font-size: 12px; }
.toast.error { color: #ffd1d5; border-color: #774751; background: #34232d; }
.empty { color: var(--text-muted); font-size: 12px; padding: 24px; text-align: center; }
.error { color: var(--danger); }
.loading-shimmer { height: 142px; border: 1px solid #242839; border-radius: 12px; background: linear-gradient(100deg,#11141f 20%,#1b1d2c 50%,#11141f 80%); background-size: 200% 100%; animation: shimmer 1.6s infinite; }
.pop-in { animation: appear .25s ease both; }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes appear { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@media (min-width: 1600px) { .dashboard-content { padding-top: 40px; } .cosmic-hero { min-height: 320px; } .hero-copy h2 { font-size: 48px; } .tool-card { padding: 23px; } }
@media (max-width: 1180px) { :root { --sidebar-width: 210px; } .dashboard-content { padding: 26px; } .workspace-header { padding: 0 26px; } .dashboard-columns { grid-template-columns: minmax(0,1fr) 220px; gap: 19px; } .hero-copy { padding: 28px; width: 65%; } .tool-card { padding: 15px; } .tool-card p { font-size: 9px; } .app-sidebar { padding-left: 13px; padding-right: 13px; } .hero-art { right: -7%; } }
@media (max-width: 980px) { .dashboard-columns { grid-template-columns: 1fr; } .dashboard-aside { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; } .activity-card { padding: 10px 5px; } .hero-copy { width: 70%; } .hero-art { opacity: .65; right: -14%; width: 70%; } .tool-grid { gap: 9px; } .tool-card h3 { font-size: 11px; } .header-status { display: none; } }
@media (max-width: 760px) {
  :root { --sidebar-width: 236px; }
  .workspace-main { margin-left: 0; }
  .app-sidebar { transform: translateX(-100%); transition: transform .22s ease; }
  body.nav-open .app-sidebar { transform: translateX(0); }
  body.nav-open .sidebar-scrim { display: block; position: fixed; inset: 0; z-index: 50; background: #050712b8; border: 0; }
  .mobile-menu { display: inline-flex; }
  .workspace-header { padding: 0 18px; min-height: 64px; gap: 8px; }
  .workspace-header .breadcrumb { margin-right: auto; }
  .today-date { font-size: 10px; }
  .header-actions { gap: 8px; }
  .dashboard-content { padding: 24px 20px; }
  .page-intro h1 { font-size: 23px; }
  .page-intro p { font-size: 11px; }
  .cosmic-hero { min-height: 290px; }
  .hero-copy { width: 78%; padding: 27px; }
  .hero-copy h2 { font-size: 35px; }
  .hero-art { width: 80%; right: -21%; opacity: .55; }
  .hero-copy p { max-width: 280px; }
  .tool-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .tool-card { padding: 18px; }
  .tool-card h3 { font-size: 12px; }
  .tool-card p { font-size: 10px; }
  .tool-icon { margin-bottom: 12px; }
}
@media (max-width: 440px) {
  .dashboard-content { padding: 22px 16px; }
  .hero-copy { width: 100%; padding: 25px; }
  .hero-copy h2 { font-size: 32px; }
  .hero-copy p { max-width: 245px; }
  .hero-art { right: -45%; opacity: .27; width: 110%; }
  .hero-actions { gap: 8px; }
  .hero-actions .btn-primary, .hero-actions .btn-subtle { padding: 9px 10px; }
  .hero-actions .btn-subtle .icon { display: none; }
  .dashboard-aside { grid-template-columns: 1fr; }
  .activity-card { padding: 0; }
  .document-grid { grid-template-columns: 1fr; }
  .filter-tabs { gap: 3px; }
  .filter-tab { padding: 6px 7px; }
  .notice-banner { align-items: start; flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
.folder-grid { display:flex; gap:9px; overflow-x:auto; padding-bottom:10px; margin-bottom:13px; }
.folder-card { display:flex; gap:10px; align-items:center; flex:0 0 auto; max-width:230px; text-align:left; background:#121520; color:#b7b0ca; border:1px solid #29273b; border-radius:10px; padding:12px 14px; font-size:11px; }
.folder-card span { overflow:hidden; text-overflow:ellipsis; }
.folder-card small { display:block; color:var(--text-dim); font-size:9px; margin-top:3px; }
.folder-card.active { background:#b6a1ff15; border-color:#9e83cc70; color:#d4bfff; }
.folder-actions { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin-bottom:16px; }
.folder-actions .btn-subtle { font-size:10px; padding:8px 12px; min-height:32px; }
.upload-destination { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:20px 0 0; font-size:11px; color:var(--text-muted); }
.upload-destination select { font-size:11px; max-width:65%; padding:8px; }
.document-folder { display:block; margin-top:10px; position:relative; z-index:1; }
.document-folder select { width:100%; padding:5px 8px; font-size:10px; color:#bbaad5; }
.list-view .document-folder { grid-column:2; margin:0; }
.document-card h3 a::after { display:none; }
.upload-batch { margin-top:16px; padding:16px; border:1px solid var(--space-border); border-radius:12px; background:var(--space-card); }
.upload-batch .section-heading { flex-wrap:wrap; margin-bottom:8px; }
.upload-batch h3 { font-size:12px; font-weight:500; margin:0; }
.upload-batch ul { list-style:none; padding:0; margin:0; max-height:280px; overflow-y:auto; }
.upload-file-row { display:flex; align-items:baseline; justify-content:space-between; gap:14px; padding:10px 0; border-top:1px solid var(--space-border); font-size:11px; }
.upload-file-name { min-width:0; overflow-wrap:anywhere; }
.upload-file-state { color:var(--text-dim); text-align:right; flex:0 1 55%; font-size:10px; overflow-wrap:anywhere; }
.upload-file-row[data-state="done"] .upload-file-state { color:var(--success); }
.upload-file-row[data-state="uploading"] .upload-file-state { color:var(--accent); }
.upload-file-row[data-state="error"] .upload-file-state { color:var(--danger); }

/* The account menu remains keyboard-operable through its native disclosure. */
.profile-menu summary { cursor: pointer; list-style: none; }
.profile-menu summary::-webkit-details-marker { display: none; }
.profile-menu summary > span:last-child { color: var(--text-muted); }
.profile-menu-links { display: grid; gap: 2px; margin: 8px 0 0; padding: 4px; background: var(--space-card); border: 1px solid var(--space-border); border-radius: var(--radius-sm); }
.profile-menu-links .side-link { width: 100%; }
.profile-avatar { overflow: hidden; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }

.library-view .dashboard-content { max-width: 1210px; }
.library-view .dashboard-columns { grid-template-columns: minmax(0, 1fr); }
.library-view .library-section { scroll-margin-top: 106px; }
.library-view :is(.page-intro, .cosmic-hero, [aria-labelledby="tools-title"], .dashboard-aside) { display: none; }
.library-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding: clamp(16px, 2.6vw, 28px);
  border: 1px solid #3c3457;
  border-radius: var(--radius-lg);
  background: radial-gradient(ellipse at 85% -20%, #69509c55, transparent 65%), linear-gradient(110deg, #151729, #131521);
}
.library-heading-copy { display: flex; align-items: center; gap: 12px; }
.library-heading-icon { width: 46px; height: 46px; flex: none; border-radius: 14px; color: var(--accent); background: var(--accent-soft, #b6a1ff21); }
.library-heading-icon .icon { width: 22px; height: 22px; }
.library-heading h2 { margin: 0; font-size: clamp(24px, 3.4vw, 34px); font-weight: 690; line-height: 1.1; letter-spacing: -.04em; }
.library-heading p { margin: 4px 0 0; color: var(--text-muted); font-size: 13px; }
.library-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.library-actions button { min-height: 44px; }
.library-actions .icon { width: 16px; height: 16px; }
.library-organization { display: grid; gap: 12px; margin-bottom: 20px; }
.library-organization > section { min-width: 0; margin: 0; padding: 15px; border: 1px solid var(--space-border); border-radius: var(--radius-md); background: var(--space-card); }
.library-folders h3, .library-documents > h3 { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -.02em; }
.library-folders .section-heading { margin-bottom: 8px; }
.library-folders :is(.btn-subtle, .text-link) { min-height: 44px; font-size: 12px; }
.library-folders #new-folder { padding: 6px 10px; }
.library-folders .folder-grid { gap: 8px; padding: 5px; margin: 0 -5px; scrollbar-width: thin; scrollbar-color: var(--space-border-glow) transparent; }
.library-folders .folder-actions { margin: 8px 0 0; }
.library-folders .folder-actions .btn-subtle { padding-inline: 10px; }
.library-folders #remove-folder:hover { color: var(--danger); }
.library-folders .folder-card { gap: 9px; min-height: 62px; min-width: 0; padding: 9px 12px 9px 9px; border-radius: 12px; }
.folder-card:hover { border-color: #655785; }
.folder-card .folder-icon { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 9px; color: var(--accent); background: #b6a1ff16; }
.folder-icon .icon { width: 17px; height: 17px; }
.folder-card .folder-name strong { display: block; overflow: hidden; color: var(--text-main); font-size: 12px; font-weight: 570; text-overflow: ellipsis; white-space: nowrap; }
.folder-card .folder-name small { color: var(--text-muted); font-size: 11px; }
.library-import { display: grid; align-content: start; gap: 9px; }
.library-import .upload-destination { display: grid; gap: 5px; margin: 0; font-size: 13px; }
.library-import .upload-destination select { width: 100%; max-width: none; min-height: 44px; font-size: 14px; }
.library-import .dropzone-wide { display: grid; align-content: center; min-height: 62px; margin: 0; padding: 9px; }
.library-import .dropzone-title { font-size: 13px; }
.library-import .dropzone-caption { color: var(--text-muted); font-size: 11px; }
.library-import .dropzone-wide:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.library-import .progress, .library-import .upload-status { display: block; }
.library-import .upload-status:empty { display: none; }
.library-section .upload-batch { margin: 0 0 16px; }
.library-section .upload-batch #upload-batch-count { display: inline; }
.library-documents > h3 { margin-bottom: 9px; }
.library-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px 10px; margin-bottom: 14px; align-items: center; }
.library-search { min-width: 0; }
.library-refine { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 8px; }
.library-refine .filter-tabs { margin: 0; }
.library-documents .document-card { border-radius: var(--radius-md); background: var(--space-card); }
.library-documents .document-card h3 { font-size: 15px; font-weight: 650; }
.library-documents .document-card h3 a:hover { text-decoration: underline; }
.library-documents .document-info { min-width: 0; }
.library-documents .document-meta { color: var(--text-muted); font-size: 12px; }
.library-documents .document-folder select { min-height: 44px; font-size: 13px; }
.library-documents .document-date { font-size: 11px; }
.library-documents .document-bottom a { min-height: 44px; font-size: 12px; }
.library-documents .doc-delete { min-height: 44px; width: 44px; height: 44px; }
.library-documents .doc-delete .icon { width: 17px; height: 17px; }
.library-documents .library-empty { border-radius: var(--radius-md); }
.library-documents .library-empty h3 { font-size: 17px; }
.library-documents .library-empty p { color: var(--text-muted); font-size: 13px; }
.library-documents .library-empty button { min-height: 44px; font-size: 12px; }
.library-documents .list-view .document-card {
  grid-template: "type document" auto "folder folder" auto "action action" auto / 34px minmax(0, 1fr);
  gap: 8px;
  padding: 14px;
}
.library-documents .list-view .document-top { grid-area: type; align-self: center; }
.library-documents .list-view .file-badge { font-size: 0; }
.library-documents .list-view .document-info { grid-area: document; padding-right: 46px; }
.library-documents .list-view .document-folder { grid-area: folder; min-width: 0; }
.library-documents .list-view .document-bottom { grid-area: action; padding: 0; }
.library-documents .list-view .doc-delete { top: 4px; right: 5px; margin: 0; }

@media (min-width: 940px) {
  body:not(.mobile-app) .library-view .library-organization { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
  body:not(.mobile-app) .library-view .list-view .document-card {
    grid-template: "type document folder action" auto / 76px minmax(0, 1fr) minmax(112px, .65fr) auto;
    gap: 12px;
    padding-right: 54px;
  }
  body:not(.mobile-app) .library-view .list-view .file-badge { font-size: 8px; padding-inline: 6px; }
  body:not(.mobile-app) .library-view .list-view .document-info { padding-right: 0; }
  body:not(.mobile-app) .library-view .list-view .doc-delete { top: 50%; transform: translateY(-50%); }
}
@media (min-width: 1080px) {
  body:not(.mobile-app) .library-view .library-toolbar { grid-template-columns: minmax(0, 1fr) auto auto; }
  body:not(.mobile-app) .library-view .library-refine { grid-column: auto; }
}
@media (min-width: 1370px) {
  body:not(.mobile-app) .library-view .document-grid:not(.list-view) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .library-heading { align-items: flex-start; }
  .library-actions { width: 100%; }
  .library-actions button { flex: 1 1 auto; padding-inline: 11px; }
  .library-import .upload-destination select, .library-toolbar .search-field input { font-size: 16px; }
  .library-toolbar .view-switch .icon-button { min-width: 44px; }
  .library-refine .sort-select { max-width: 124px; }
}

/* Light palette and shared workspace surfaces. */
html[data-theme="light"] {
  color-scheme: light;
  background: #edebf7;
  --bg: #f7f7fc;
  --space-card: #fff;
  --space-card-hover: #f7f3ff;
  --space-border: #e4dff0;
  --space-border-glow: #b5a1f1;
  --control-border: #a39ab5;
  --surface-raised: #fff;
  --text-main: #201935;
  --text-muted: #574e6a;
  --text-dim: #685f7b;
  --accent: #6843e8;
  --accent-purple: var(--accent);
  --accent-star-glow: #6843e82e;
  --accent-soft: #eee9ff;
  --accent-hover: #5230c5;
  --accent-cyan: #16756f;
  --success: #187154;
  --danger: #aa304d;
  --duo-red-light: #fceaf0;
  --shadow-soft: 0 4px 16px #3c286c0a;
}

html[data-theme="light"] body { background: var(--bg); }

html[data-theme="light"] :where(input, select, textarea) { background: var(--surface-raised); }

html[data-theme="light"] :where(input, textarea)::placeholder { color: var(--text-dim); }

html[data-theme="light"] :where(input, select, textarea):focus {
  outline-color: var(--accent-star-glow);
}

html[data-theme="light"] :where(.btn-primary, .skip-link) {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 3px 8px #6843e832;
}

html[data-theme="light"] :where(.btn-primary):hover { background: var(--accent-hover); }

html[data-theme="light"] :where(.btn-subtle, .btn-outline) {
  background: var(--surface-raised);
  color: var(--text-main);
}

html[data-theme="light"] :where(.btn-subtle, .btn-outline):hover {
  background: var(--space-card-hover);
  border-color: var(--space-border-glow);
}

html[data-theme="light"] :where(.btn-ghost, .icon-button, .btn-icon):hover {
  background: var(--accent-soft);
  color: var(--text-main);
}

html[data-theme="light"] :where(.text-link):hover { color: var(--accent-hover); }

html[data-theme="light"] .app-sidebar {
  background: linear-gradient(170deg, #f5f0ff, #fff 230px);
  border-color: var(--space-border);
}

html[data-theme="light"] .brand-link { color: var(--text-main); }

html[data-theme="light"] :is(.brand-caption, .nav-group-label, .profile-caption) { color: var(--text-dim); }

html[data-theme="light"] .side-link {
  color: var(--text-muted);
  border-radius: 12px;
  font-weight: 500;
}

html[data-theme="light"] .side-link:hover {
  background: var(--space-card-hover);
  color: var(--text-main);
}

html[data-theme="light"] .side-link.active {
  color: #492caa;
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px #dcd0ff;
  font-weight: 650;
}

html[data-theme="light"] :is(.profile-card, .workspace-header) { border-color: var(--space-border); }

html[data-theme="light"] :is(.profile-avatar, .mobile-header-profile) {
  background: var(--accent-soft);
  border-color: #dbd1f5;
  color: var(--accent-hover);
}

html[data-theme="light"] .workspace-header { background: #ffffffed; }

html[data-theme="light"] :is(.breadcrumb, .today-date, .header-status) { color: var(--text-muted); }

html[data-theme="light"] .breadcrumb :is(.icon, [data-icon]) { color: var(--accent); }

html[data-theme="light"] .breadcrumb .separator { color: var(--text-dim); }

html[data-theme="light"] .header-status.online .status-dot { background: var(--success); }

html[data-theme="light"] .header-status.offline .status-dot { background: #aa631e; }

html[data-theme="light"] body.nav-open .sidebar-scrim { background: #21193763; }

html[data-theme="light"] .mobile-brand-dot { color: var(--accent); }

html[data-theme="light"] nav.mobile-tabbar {
  background: #fffffff2;
  border-color: var(--space-border);
  box-shadow: 0 -6px 24px #3524570f;
}

html[data-theme="light"] nav.mobile-tabbar .mobile-tab { color: var(--text-muted); }

html[data-theme="light"] nav.mobile-tabbar .mobile-tab.active {
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-weight: 650;
}

html[data-theme="light"] nav.mobile-tabbar .mobile-tab.active .icon { filter: none; }

html[data-theme="light"] .mobile-offline-notice {
  background: #fff2dc;
  border-color: #edca96;
  color: #6f440f;
}

/* Library, imports and document states. */
html[data-theme="light"] .library-heading {
  background: radial-gradient(ellipse at 92% 2%, #e5d9ff, transparent 64%), #f7f3ff;
  border-color: #ded2f8;
  box-shadow: var(--shadow-soft);
}

html[data-theme="light"] .library-heading h2 { font-weight: 720; }

html[data-theme="light"] .library-organization > section { box-shadow: var(--shadow-soft); }

html[data-theme="light"] .library-folders .folder-card {
  background: #faf8ff;
  border-color: var(--space-border);
  color: var(--text-muted);
}

html[data-theme="light"] .library-folders .folder-card:hover { border-color: var(--space-border-glow); }

html[data-theme="light"] .library-folders .folder-card.active {
  background: var(--accent-soft);
  border-color: #b8a3f6;
}

html[data-theme="light"] .folder-card .folder-icon { background: #e7defe; }

html[data-theme="light"] :is(.library-import .upload-destination select, .search-field, .sort-select) { border-color: var(--control-border); }

html[data-theme="light"] .library-import .dropzone-wide {
  background: #fbf9ff;
  border-color: #a68bd9;
  border-radius: 14px;
}

html[data-theme="light"] .library-import .dropzone-wide:is(:hover, .is-over, :focus-within) {
  background: var(--accent-soft);
  border-color: var(--accent);
}

html[data-theme="light"] :is(.dropzone-title, .dropzone-title strong) { color: var(--accent-hover); }

html[data-theme="light"] .dropzone-caption { color: var(--text-muted); }

html[data-theme="light"] .progress { background: var(--accent-soft); }

html[data-theme="light"] .search-field input { background: transparent; outline: none; }

html[data-theme="light"] .search-field:focus-within {
  outline-color: var(--accent-star-glow);
  border-color: var(--accent);
}

html[data-theme="light"] .view-switch {
  background: var(--surface-raised);
}

html[data-theme="light"] .view-switch .active { background: var(--accent-soft); }

html[data-theme="light"] .filter-tab.active {
  color: var(--accent-hover);
  background: var(--accent-soft);
  border-color: #d9cdf8;
}

html[data-theme="light"] .library-section .document-card {
  background: var(--space-card);
  box-shadow: var(--shadow-soft);
}

html[data-theme="light"] .document-card:hover { border-color: var(--space-border-glow); }

html[data-theme="light"] .document-card .file-badge {
  color: var(--accent-hover);
  background: var(--accent-soft);
  padding: 6px 9px;
  border-radius: 8px;
  font-weight: 650;
}

html[data-theme="light"] .document-card:nth-child(even) .file-badge {
  color: #1d6e6a;
  background: #e5f6f4;
}

html[data-theme="light"] .document-card .document-folder select {
  color: var(--text-muted);
  background: #faf9fd;
  border-color: var(--space-border);
}

html[data-theme="light"] :is(.document-date, .library-empty p) { color: var(--text-dim); }

html[data-theme="light"] :is(.document-bottom, .upload-file-row, .exam-history-item) {
  border-color: var(--space-border);
}

html[data-theme="light"] .doc-delete:hover {
  color: var(--danger);
  background: var(--duo-red-light);
}

html[data-theme="light"] .library-empty {
  background: radial-gradient(ellipse at 50% 8%, #f0eaff, transparent 68%), var(--space-card);
  border-color: var(--space-border);
}

html[data-theme="light"] .empty-orbit .icon { color: var(--accent); }

html[data-theme="light"] .loading-shimmer {
  border-color: var(--space-border);
  background: linear-gradient(100deg, #f0edf8 20%, #fcfbff 50%, #f0edf8 80%) 0 / 200% 100%;
}

/* Overview and study timer. */
html[data-theme="light"] .cosmic-hero {
  border-color: #e0d5f9;
  background: #f7f2ff;
}

html[data-theme="light"] .cosmic-hero::before {
  background: radial-gradient(ellipse at 72% 65%, #e4d3ff, transparent 65%);
}

html[data-theme="light"] .hero-copy h2 em { color: var(--accent-hover); }

html[data-theme="light"] :is(.tool-card p, .tool-arrow) { color: var(--text-muted); }

html[data-theme="light"] .hero-actions .btn-subtle { background: var(--space-card); }

html[data-theme="light"] .dashboard-page .tool-card {
  background: var(--space-card);
  border-color: var(--space-border);
  box-shadow: var(--shadow-soft);
}

html[data-theme="light"] .dashboard-page .tool-card:hover {
  background: var(--space-card-hover);
  border-color: var(--space-border-glow);
}

html[data-theme="light"] .dashboard-page .tool-icon { color: var(--accent-hover); background: var(--accent-soft); }
html[data-theme="light"] .dashboard-page .tool-card:nth-child(2) .tool-icon { color: #1d6e6a; background: #e5f6f4; }
html[data-theme="light"] .dashboard-page .tool-card:nth-child(3) .tool-icon { color: #88481e; background: #fff0df; }
html[data-theme="light"] .dashboard-page .tool-card:nth-child(4) .tool-icon { color: #315aaa; background: #e9f0ff; }

html[data-theme="light"] .focus-card {
  background: radial-gradient(ellipse at 90% 0%, #f1eaff, transparent 75%), var(--space-card);
  border-color: var(--space-border);
}

html[data-theme="light"] .focus-heading .icon { color: var(--accent); }

html[data-theme="light"] .focus-tag {
  color: var(--accent-hover);
  border-color: var(--space-border);
}

html[data-theme="light"] .focus-timer {
  background: conic-gradient(var(--accent) var(--timer-progress, 0%), #e9defc 0%);
}

html[data-theme="light"] .focus-timer::before { background: var(--space-card); }

html[data-theme="light"] .timer-value { color: var(--text-main); }

html[data-theme="light"] :is(.timer-label, .focus-subtitle, .focus-sessions, .activity-info span, .dashboard-footer) {
  color: var(--text-muted);
}

html[data-theme="light"] .focus-buttons .btn-primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

html[data-theme="light"] .focus-buttons .btn-primary:hover { background: var(--accent-hover); }

html[data-theme="light"] :is(.focus-buttons .icon-button, .focus-sessions, .activity-row, .activity-icon, .dashboard-footer) {
  border-color: var(--space-border);
}

html[data-theme="light"] :is(.activity-icon, .activity-number) { color: var(--accent); }

html[data-theme="light"] .activity-info strong { color: var(--text-main); }

/* Dialogs and feedback shared by workspace screens. */
html[data-theme="light"] .notice-banner {
  color: #6f440f;
  background: #fff5e5;
  border-color: #efd3a7;
}

html[data-theme="light"] :where(dialog) {
  background: var(--surface-raised);
  border-color: var(--space-border);
  box-shadow: 0 28px 76px #21193730;
}

html[data-theme="light"] :where(dialog)::backdrop { background: #21193770; }

html[data-theme="light"] .form-field label { color: var(--text-muted); }

html[data-theme="light"] .toast {
  background: var(--surface-raised);
  border-color: var(--space-border-glow);
  color: var(--text-main);
  box-shadow: 0 10px 44px #21193722;
}

html[data-theme="light"] .toast.error {
  background: var(--duo-red-light);
  border-color: #e9b2c0;
  color: var(--danger);
}

@media (min-width: 561px) {
  html[data-theme="light"] body.mobile-app {
    border-inline-color: var(--space-border);
    box-shadow: 0 0 80px #21193714;
  }
}

.theme-symbol {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  font-size: 20px;
  line-height: 1;
}
