/* Theme tokens apply to every screen, including sign-in and dialogs. */
:root{--surface:#fff;--surface-soft:#f8faf6;--surface-hover:#edf4e9;--accent:#316847;--accent-text:#fff;--secondary:#758170;--faint:#85917f;--field:#fff;--glass:#ffffffee;--glow:none}
:root:not([data-theme=light]){--text:#e2e9e7;--muted:#a0aea9;--border:#2b3938;--bg:#101619;--white:#182124;--surface:#182124;--surface-soft:#1d282a;--surface-hover:#263937;--accent:#8ecbb0;--accent-text:#11271d;--green:#a0d5bc;--mint:#243c32;--secondary:#b2c2ba;--faint:#92a79b;--field:#121c20;--glass:#152023f2;--glow:0 12px 35px #00000014}
:root[data-theme=aurora]{--bg:radial-gradient(ellipse at 90% 5%,#53366d66,transparent 50%),radial-gradient(ellipse at 20% 95%,#0a8f8055,transparent 60%),#111923;--surface:#192631e8;--surface-soft:#23313bdd;--surface-hover:#34464e;--border:#52657066;--field:#15212ce6;--glass:#16222bea;--accent:#8be0cb;--accent-text:#122e2b;--green:#a0e7d7;--mint:#24443e;--glow:0 12px 45px #041d2b28}
:root[data-theme=sunset]{--bg:radial-gradient(ellipse at 95% 10%,#ad5f3b44,transparent 55%),radial-gradient(ellipse at 15% 90%,#74386766,transparent 55%),#211924;--surface:#30212ce8;--surface-soft:#392936e6;--surface-hover:#513549;--border:#835a7466;--field:#261d29e8;--glass:#2c202be8;--accent:#edb39a;--accent-text:#3b231e;--green:#f2c3b0;--mint:#493136;--text:#f3e7ed;--muted:#bfabb7;--secondary:#d3bdc8;--faint:#bba3af}
:root[data-theme=ocean]{--bg:radial-gradient(ellipse at 80% 0%,#1c5b9d66,transparent 60%),radial-gradient(ellipse at 15% 100%,#127b8166,transparent 60%),#101c2e;--surface:#162c40e8;--surface-soft:#1e384ce8;--surface-hover:#294c62;--border:#49759066;--field:#142537e8;--glass:#13273ce8;--accent:#83d6e5;--accent-text:#112b35;--green:#99e1ed;--mint:#20454e;--text:#e3eff7;--muted:#9cb7ca;--secondary:#b4cedd;--faint:#99b7ca}
body{background:var(--bg);background-attachment:fixed;min-height:100vh;color:var(--text)}
.sidebar,.topbar{background:var(--glass);backdrop-filter:blur(22px)}
.panel,.stat,.modal,.btn,.account-card,.sender-control,.filter-btn,.menu-popover button{background:var(--surface);border-color:var(--border);color:var(--text)}
.panel,.stat{box-shadow:var(--glow)}
.workspace,.help-card,.sender-row,.empty-sender,.notification-banner,.notice,th,.activity-icon{background:var(--surface-soft);border-color:var(--border)}
.settings-body textarea,.input-box,.form-field input,.form-field select,.form-field textarea,.search-input{background:var(--field);border-color:var(--border);color:var(--text)}
.search-input input,.input-box input{color:var(--text)}
button:hover{transition:background .15s,border-color .15s}
.btn:hover,.nav-btn:hover,.icon-btn:hover,.menu-popover button:hover{background:var(--surface-hover);color:var(--text);border-color:var(--accent)}
.btn.primary,.save-btn{background:var(--accent);border-color:var(--accent);color:var(--accent-text)}
.btn.primary:hover{background:var(--accent);filter:brightness(1.08);color:var(--accent-text)}
.nav-btn.active{background:var(--mint);color:var(--green)}
.nav-btn,.breadcrumb,.breadcrumb b,.subtitle,.stat-title,.stat-note,.account-phone,.channel-row,.sender-info small,.field-help,.progress-caption,.panel-footer,.hint,.form-field small,.activity-text small,.bottom-line,.top-actions,.settings-footer,.character-count,.inbox-message p,.inbox-message time,td small,th,.step p,.empty-state,.notification-banner p,.help-card p,.profile small,.workspace span,.settings-identity small,.switch-row p,.post-item footer{color:var(--muted)}
.nav-label,.search-input input::placeholder,.form-field input::placeholder,.form-field textarea::placeholder{color:var(--faint)}
.channel-row .link,.text-btn,.activity-text,.notice,.notification-banner strong,.empty-state h3{color:var(--green)}
.badge,.stat-tag,.nav-btn .count,.panel-heading h2 span,.tab-count,.demo-tag,.step>span{background:var(--mint);color:var(--green);border-color:var(--border)}
.badge.neutral{background:var(--surface-hover);color:var(--muted)}
.badge.warning{background:#765c262c;color:#d1ab6b}
.tab{color:var(--muted)}.tab.active{color:var(--green);border-color:var(--accent)}
.account-card.selected{border-color:var(--accent);box-shadow:0 0 0 1px color-mix(in srgb,var(--accent) 15%,transparent)}
.progress{background:var(--surface-hover)}.progress i,.switch.on{background:var(--accent)}
.switch{background:var(--border)}.switch i{background:#fff}.sender-control,.branch-icon,.icon-btn{color:var(--muted)}
.avatar{background:var(--surface-hover);color:var(--secondary)}
:root:not([data-theme=light]) .avatar.purple{background:#483d604f;color:#c8b5e8}
:root:not([data-theme=light]) .avatar.orange{background:#664c344d;color:#e2bc8b}
:root:not([data-theme=light]) .avatar.green{background:#335b494d;color:#a5d4b7}
:root:not([data-theme=light]) .avatar.blue{background:#304e7155;color:#a8c5e8}
:root:not([data-theme=light]) .error{background:#72373344;color:#f4b5aa}
:root:not([data-theme=light]) .btn.danger,:root:not([data-theme=light]) .menu-popover button.danger{color:#f1a39e}
.sender-row,.channel-row,.switch-row,.profile,.inbox-message,td{border-color:var(--border)}
.pagination button{color:var(--text);border-color:var(--border)}.pagination button.active{background:var(--mint);color:var(--green)}
.preview-telegram{background:var(--surface-hover)}.telegram-message{background:var(--surface);color:var(--text)}
.login-screen{background:var(--bg)}.login-art{background:linear-gradient(150deg,var(--surface-hover),var(--surface))}.login-art h1{color:var(--text)}.login-art p{color:var(--muted)}
.modal-overlay{background:#06101499}.modal{box-shadow:0 24px 100px #0005}
#toast{background:var(--accent);color:var(--accent-text)}
.theme-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin:16px 0 8px}.theme-card{border:1px solid var(--border);border-radius:9px;padding:9px;background:var(--surface);text-align:left;color:var(--text);min-width:0}.theme-card.selected{border:2px solid var(--accent);padding:8px}.theme-card:hover{border-color:var(--accent)}.theme-swatch{height:64px;display:block;border-radius:6px;margin-bottom:11px;position:relative;overflow:hidden}.theme-swatch:after{content:'';position:absolute;inset:13px 12px 0 25px;border:1px solid #ffffff35;border-radius:5px 5px 0 0;background:#ffffff15;box-shadow:-13px 0 0 #0002}.theme-card b{display:block;font-size:10px;line-height:1.5}.theme-card small{display:block;font-size:9px;color:var(--muted);line-height:1.6;margin-top:4px}.theme-section{margin-bottom:22px}.theme-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px}.theme-shortcut svg{width:18px;height:18px}.import-tabs{display:flex;gap:8px;margin-bottom:20px;flex-wrap:wrap}.import-tabs .active{background:var(--mint);color:var(--green);border-color:var(--accent)}.import-preview{max-height:260px;overflow:auto;border:1px solid var(--border);border-radius:7px;margin:15px 0}.import-preview label{display:flex;gap:10px;padding:12px;border-bottom:1px solid var(--border);font-size:11px}.import-preview label:last-child{border:0}.import-preview label span{flex:1}.import-preview small{display:block;color:var(--muted);margin-top:4px}.import-summary{font-size:11px;color:var(--secondary);line-height:1.8}.upload-label{display:flex;align-items:center;gap:10px;margin:12px 0;color:var(--muted);font-size:10px}.upload-label input{max-width:100%;font-size:10px}.json-example{white-space:pre-wrap;font:11px/1.8 ui-monospace,monospace;background:var(--surface-soft);padding:12px;border:1px solid var(--border);border-radius:7px;color:var(--secondary)}.message-policy{display:flex;align-items:center;gap:9px;margin-bottom:20px;padding:13px 16px;background:var(--surface-soft);border:1px solid var(--border);border-radius:8px;color:var(--secondary);font-size:11px;line-height:1.7}
@media(max-width:750px){.theme-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.theme-swatch{height:52px}.theme-toolbar{align-items:flex-start;flex-direction:column}.top-actions{gap:10px}}@media(max-width:450px){.theme-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.top-actions .demo-tag{font-size:8px;padding:4px}.breadcrumb{max-width:190px}.breadcrumb>span{display:none}}
