/* Shared appearance controls stay available throughout the product. */
.theme-control{position:relative;display:inline-flex;align-items:center;flex-shrink:0;color:var(--ink)}
.theme-glyph{position:absolute;left:9px;display:flex;pointer-events:none}.theme-glyph .icon{width:17px;height:17px}
.theme-control select{appearance:none;cursor:pointer;border:1px solid var(--line);border-radius:9px;background:var(--paper);color:var(--ink);height:34px;padding:5px 10px 5px 32px;font-size:11px;max-width:165px}
.topbar>.topbar-controls{gap:8px;flex-shrink:0}.auth-utilities{position:absolute;top:24px;right:28px;display:flex;align-items:center;gap:10px}
html[data-theme=dark]{--bg:#101b19;--paper:#192823;--ink:#e6eee8;--muted:#a0b0a5;--line:#34443b;--green:#a6ce8e;--lime:#c9e798}
html[data-theme=dark] :is(.sidebar,.topbar,.panel,.stat-card,.kid-card,.job-card,.modal,.family-badge,.service-card,.grade-day-card,.grade-glance-day,.grade-refresh-icon,.grade-calendar-cards .grade-week-controls .icon-button){background:var(--paper);border-color:var(--line)}
html[data-theme=dark] :is(.field input,.field select,.field textarea,.chart-controls select,.month-control,.grade-kid-select select,.grade-week-controls input){background:#14221d;color:var(--ink);border-color:var(--line)}
html[data-theme=dark] :is(input,textarea)::placeholder{color:#85988c}
html[data-theme=dark] :is(.btn.secondary,.sidebar-note,.family-symbol,.settings-tabs,.service-card-tags>span,.service-open-arrow,.grade-entry-card,.grade-estimate-card,.grade-date-tile,.grade-today-tag,.nav-item.active,.nav-item:not(.active):hover,.nav-item small,.view-account,.role-tabs,.money-tabs,.field input[readonly],.grade-days-picker span,.grade-day .icon-button,.icon-button:hover){background:#27392f;color:#c0d4b2;border-color:var(--line)}
html[data-theme=dark] :is(.btn.primary,.btn.primary:hover){background:#b8da99;color:#17291c}
html[data-theme=dark] :is(.settings-tabs [role=tab][aria-selected=true],.money-tabs input:checked+span,.role-tabs button.active,.grade-days-picker input:checked+span){background:#3b5137;color:#e1efcf;border-color:#8daa73}
html[data-theme=dark] :is(.topbar strong,.grade-day-heading h3,.grade-entry-main h4,.grade-estimate-main h3,.grade-date-tile strong,.empty-state h3,.service-card-bottom>strong){color:#deebdc}
html[data-theme=dark] :is(.panel-heading p,.stat-label,.stat-foot,.kid-card-foot>span,.kid-card-head>div>span,.service-card>p,.sidebar-note p,.profile small,.family-badge small,.grade-entry-comment,.grade-day-heading p,.grade-estimate-meta,.grade-calendar-heading p,.grade-date-tile span,.grade-archived,.grade-day-empty,.grade-estimates-cards .panel-heading p,.glance-weekday,.glance-more,.glance-empty,.bank-setting-child>span:nth-child(2),.service-status,.service-status.ready,.auth-switch,.chart-footer>div,.chart-footer small){color:var(--muted)}
html[data-theme=dark] :is(.text-button,.service-back-button,.sidebar-service-back,.auth-switch button){color:#bbd49e}
html[data-theme=dark] :is(.sidebar-note button,.kid-card-foot,.service-card-bottom,.service-grades .service-card-bottom,.chat-setting-row){border-color:var(--line)}
html[data-theme=dark] :is(.service-card:hover,.add-kid-card:hover,.grade-glance-day:hover,.sidebar-service-back:hover){background:#22352a;border-color:#7b9865}
html[data-theme=dark] .service-app-icon{background:#354c2d;color:#c5dfa8}
html[data-theme=dark] .service-grades .service-app-icon{background:#40334f;color:#d6b9ef}
html[data-theme=dark] .service-grades .service-card-tags>span{background:#352c40;color:#d5bedf}
html[data-theme=dark] .service-chat .service-app-icon{background:#254153;color:#9bd4f4}
html[data-theme=dark] .total-card{background:#294b36;color:#f0f7e4}
html[data-theme=dark] .total-card :is(.stat-label,.stat-foot){color:#d0dfbf}
html[data-theme=dark] :is(.stat-icon.pale,.transaction-icon,.pill){background:#30462b;color:#bdd49e}
html[data-theme=dark] :is(.stat-icon.lavender,.transaction-icon.interest){background:#3a3046;color:#ccb7df}
html[data-theme=dark] .transaction-icon.expense{background:#4b3330;color:#f1b6a1}
html[data-theme=dark] :is(th,td){border-color:var(--line)}
html[data-theme=dark] thead{background:#213127}
html[data-theme=dark] .balance-chart line{stroke:#34443b}
html[data-theme=dark] .balance-chart path[stroke="#346a4f"]{stroke:#b0d48f}
html[data-theme=dark] .chart-label{fill:#adbea8}
html[data-theme=dark] .auth-story{background:#192f26}
html[data-theme=dark] .modal-overlay{background:#07120dc7}
html[data-theme=dark] .form-error{color:#ffafa3}
html[data-theme=dark] .grade-glance-day.is-weekend{background:#15231d}
html[data-theme=dark] .grade-glance-day.is-today{background:#35553e;border-color:#8dad72}
html[data-theme=dark] .grade-score.is-ungraded{background:#2a3a30;color:#afbfaa}
html[data-theme=dark] :is(.grade-score.is-graded.grade-good,.grade-glance-day .glance-grade.grade-good){background:#314e36;color:#d0edb0}
html[data-theme=dark] :is(.grade-score.is-graded.grade-middle,.grade-glance-day .glance-grade.grade-middle){background:#52422b;color:#ffda94}
html[data-theme=dark] :is(.grade-score.is-graded.grade-bad,.grade-glance-day .glance-grade.grade-bad){background:#542f35;color:#ffb0a8}
html[data-theme=dark] .grade-score :is(small,.grade-score-edit){color:inherit;opacity:.8}
/* Chat keeps its visual hierarchy without changing photos, videos or stickers. */
html[data-theme=dark] :is(.chat-layout,.chat-list-pane,.chat-room-header,.chat-composer,#chat-picker,#chat-notice){background:#19292e;color:#e7f0ec;border-color:#34454a}
html[data-theme=dark] .chat-conversation{background-color:#112021;background-image:radial-gradient(#61887520 1px,transparent 1px)}
html[data-theme=dark] :is(.chat-search,.chat-input,.chat-rich){background:#112126;color:#e7f0ec;border-color:#3a5055}
html[data-theme=dark] .chat-contact{color:#e7f0ec}
html[data-theme=dark] .chat-contact:hover{background:#243a40}
html[data-theme=dark] .chat-contact.active{background:#2d464c}
html[data-theme=dark] .chat-bubble{background:#273b40;color:#edf4ef}
html[data-theme=dark] .chat-bubble.mine{background:#304d3d}
html[data-theme=dark] :is(.chat-sender,.chat-text-button,.chat-notice-open strong){color:#98d3e4}
html[data-theme=dark] :is(.chat-contact small,.chat-room-header small,.chat-compose-hint,.chat-file-size,.chat-notice-open small,.chat-welcome,.chat-list-pane h3,.chat-bubble time,.chat-attach-options small){color:#b0c3bc}
html[data-theme=dark] .chat-message-text a{color:#9bd4ff}
html[data-theme=dark] :is(.chat-message-text code,.chat-message-text pre){background:#0a1c2470}
html[data-theme=dark] :is(.chat-toolbar button,.chat-latest,.chat-earlier,.chat-upload-progress,.chat-file-symbol,.chat-attach-options>button:hover,.chat-avatar,.chat-welcome small){background:#2d4449;color:#b5dae9;border-color:#40565a}
html[data-theme=dark] .chat-avatar.group{background:#433856;color:#dfc6f2}
html[data-theme=dark] .chat-welcome h2{color:#d2e3dc}
html[data-theme=dark] .chat-image-preview img{background:#102026}
html[data-theme=dark] .chat-upload-progress span{color:#bbdce7}
@media(max-width:1100px){.topbar-date{display:none}}
@media(max-width:700px){.theme-control select{width:35px;max-width:35px;padding:0;color:transparent;font-size:16px}.theme-control option{color:var(--ink);background:var(--paper);font-size:16px}.theme-glyph{left:9px}.topbar>.topbar-controls{gap:3px}.topbar{gap:8px}.auth-utilities{top:12px;right:20px}.auth-form-inner{padding-top:42px}}
@media(max-width:360px){.service-back-button span{display:none}.topbar{padding-inline:14px}}
html[data-theme=dark] .growth-card{background:#283d2c}
html[data-theme=dark] :is(.growth-icon,.job-illustration,.count,.round-button){background:#354d31;color:#c9dfa9}
html[data-theme=dark] :is(.growth-card p,.growth-card .eyebrow,.table-description small){color:#b2c4a6}
html[data-theme=dark] .growth-art i{background:#385232}
html[data-theme=dark] .positive{color:#b1d894}
html[data-theme=dark] .negative{color:#f2b09f}
