/* DIIRAZOM 2.5 — a coordinated, accessible light/dark system. This file intentionally loads LAST. */
html[data-theme="dark"]{color-scheme:dark;--surface-main:#192439;--surface-header:#203049;--surface-soft:#283852;--surface-border:#40506a;--surface-text:#eef3ff;--surface-sub:#afc0d6}
html[data-theme="light"]{color-scheme:light;--surface-main:#edf4f7;--surface-header:#ffffff;--surface-soft:#eaf2f6;--surface-border:#d4e2e8;--surface-text:#233847;--surface-sub:#617987}
/* Make service shortcuts compact, and reserve most of the sidebar for conversations. */
.tools-section{margin:0 16px 16px;padding:10px 10px 12px;border-radius:18px;background:#20293e;border:1px solid #ffffff15;flex:none}
.tools-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:2px 4px 10px;color:#d7e1f5;font-weight:800;font-size:11px;letter-spacing:.035em}
.tools-hint{color:#9aabc4;font-size:10px;font-weight:500;letter-spacing:0;white-space:nowrap}
.tools-section .quick-tools{padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.tools-section .quick-tile{min-height:72px;padding:9px 5px;border:1px solid #54617b80;border-radius:13px;display:flex;flex-direction:column;gap:5px;justify-content:center;align-items:center;text-align:center;background:#2c3850;color:#eef4ff;transition:background .15s,border-color .15s,transform .15s}
.tools-section .quick-tile:hover,.tools-section .quick-tile:focus-visible{background:#354763;border-color:#81cfbf;transform:translateY(-1px)}
.tools-section .quick-icon,.tools-section .quick-coin{height:26px;width:26px;border-radius:9px;display:grid;place-items:center;font-size:17px;background:#4a5f73;color:#c8fff0}
.tools-section .premium-tile{background:linear-gradient(145deg,#44375c,#323b59);border-color:#726d97}
.tools-section .premium-tile .quick-coin{color:#ffdf8f;background:#755e50}
.tools-section .notes-tile{background:#2b374b}
.tools-section .quick-copy strong{font-size:11px;white-space:nowrap;line-height:1.3;letter-spacing:0}
.tools-section .quick-counter{position:absolute;transform:translate(37px,-19px);background:#69e0c0;color:#183c34;padding:2px 5px;border-radius:8px;font-size:10px;font-weight:800}
.tools-section .quick-counter[hidden]{display:none}
.sidebar .search-container{margin-bottom:12px}
.sidebar .list-head{padding-top:0}
.sidebar .sidebar-greeting{padding-bottom:15px}
.sidebar .chat-list{min-height:80px}
/* Theme switch controls. */
.theme-switch-btn{font-size:18px}
.auth-theme-row{width:min(445px,100%);display:flex;justify-content:flex-end;margin-bottom:17px}
.auth-theme-button{border:1px solid #cbdde4;background:#fff;color:#365363;border-radius:12px;font-size:13px;font-weight:750;padding:9px 14px;display:inline-flex;align-items:center;gap:10px}
.auth-theme-button:hover{background:#edf7f6}
.theme-choice-line{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:12px 0 0}
.theme-choice-line button{display:flex;flex-direction:column;align-items:flex-start;gap:5px;text-align:left;min-width:0;padding:15px;border-radius:13px;border:1px solid #50627b;background:#24364c;color:#fff}
.theme-choice-line button small{font-size:11px;color:#b4c7dd;line-height:1.35}
.theme-choice-line button[aria-pressed="true"]{background:#174b49;border-color:#65d9b9;color:#dffff7;box-shadow:0 0 0 2px #50cfa22b}
.theme-option-icon{font-size:22px}
/* Non-destructive workspace with its own close button, never navigates away from selected chat. */
.workspace-backdrop{position:fixed;inset:0;background:#070d18bd;backdrop-filter:blur(8px);display:flex;align-items:center;justify-content:center;padding:clamp(7px,2vw,23px);z-index:1800}
.workspace-backdrop[hidden]{display:none}
.workspace-panel{width:min(1120px,100%);height:min(900px,94dvh);min-height:0;display:flex;flex-direction:column;border:1px solid #4b6076;background:#142137;border-radius:22px;overflow:hidden;box-shadow:0 30px 95px #040b1b90}
.workspace-titlebar{flex:none;display:flex;gap:20px;align-items:center;justify-content:space-between;padding:17px 22px;border-bottom:1px solid #ffffff1b;background:#1f2b43;color:#eef5ff}
.workspace-titlebar>div{display:flex;flex-direction:column;gap:3px;min-width:0}
.workspace-kicker{color:#90e5ce;letter-spacing:.13em;font-size:10px;font-weight:800}
.workspace-titlebar strong{font-size:20px;line-height:1.2}
.workspace-titlebar small{font-size:12px;color:#a8bacf}
.workspace-close{flex:none;width:39px;height:39px;background:#31445c;border:1px solid #607288;border-radius:12px;color:#f3f8ff;font-size:20px}
.workspace-close:hover{background:#405874}
.workspace-panel iframe{display:block;flex:1;width:100%;min-height:0;border:0;background:#17243a}
body.workspace-open{overflow:hidden}
.conversation-tools{margin-left:auto}
/* Dark theme: preserve existing styling, handle modal actions and readable type. */
html[data-theme="dark"] .tools-section{background:#1f2a3f;border-color:#ffffff1a}
html[data-theme="dark"] .modal-divider{border-color:#485670}
html[data-theme="dark"] .modal-link{background:#33435d;color:#e9e1ff}
html[data-theme="dark"] .modal-form label{color:#b9c9dc}
html[data-theme="dark"] .policy-content{background:#1d2a40;color:#eef5ff}
html[data-theme="dark"] .policy-content p{color:#b1c4da}
html[data-theme="dark"] .policy-accept{color:#bac9da}
html[data-theme="dark"] .auth-theme-button{background:#29374f;color:#ecf5ff;border-color:#51657e}
/* Light surfaces: avoid the half-dark, half-light collage. */
html[data-theme="light"] body{background:#eaf2f7;color:#263b4d}
html[data-theme="light"] .app-shell{background:radial-gradient(ellipse at 80% 0,#cfeee6 0,transparent 43%),#edf4f7}
html[data-theme="light"] .sidebar{background:#ffffff;border-color:#d3e1e8;box-shadow:0 9px 30px #17324213}
html[data-theme="light"] .app-brand,html[data-theme="light"] .sidebar-greeting h1,html[data-theme="light"] .list-head{color:#243a48}
html[data-theme="light"] .tools-section{background:#f2f7f9;border-color:#dbe7eb}
html[data-theme="light"] .tools-heading{color:#334f5d}
html[data-theme="light"] .tools-hint{color:#69808f}
html[data-theme="light"] .tools-section .quick-tile{background:#fff;color:#294153;border-color:#d5e4e9}
html[data-theme="light"] .tools-section .quick-tile:hover{background:#e9f7f1;border-color:#7ecdb5}
html[data-theme="light"] .tools-section .premium-tile{background:#f1ecfb;border-color:#ded1f6}
html[data-theme="light"] .tools-section .premium-tile .quick-coin{background:#f6e5c2;color:#966824}
html[data-theme="light"] .tools-section .quick-icon{background:#e0f4ec;color:#217f71}
html[data-theme="light"] .tools-section .notes-tile{background:#fff}
html[data-theme="light"] .sidebar .sidebar-subtitle,html[data-theme="light"] .item-presence{color:#5e798a}
html[data-theme="light"] .list-count{background:#e5eff7;color:#516d7b}
html[data-theme="light"] .chat-item,html[data-theme="light"] .result-item{color:#294454}
html[data-theme="light"] .chat-item.active{background:#e6f4f0;border-color:#98d0bf}
html[data-theme="light"] .item-heading time,html[data-theme="light"] .result-caption{color:#648190}
html[data-theme="light"] .sidebar-footer{background:#f7fafb;border-color:#dce7eb}
html[data-theme="light"] .chat-side{background:#f2f7f9;border-color:#d4e0e7;color:#243d4d}
html[data-theme="light"] .empty-state{color:#263a4a}
html[data-theme="light"] .empty-state p{color:#6b8292}
html[data-theme="light"] .conversation-header{background:#fff;border-bottom-color:#dbe7eb;color:#263b4a}
html[data-theme="light"] .peer-identity strong{color:#293d4b}
html[data-theme="light"] .peer-status{color:#708497}
html[data-theme="light"] .messages-region{background:#f2f7f9;color:#334b60}
html[data-theme="light"] .msg-row:not(.mine) .msg-bubble{background:#fff;color:#283b50;box-shadow:0 3px 12px #1c35400b;border:1px solid #e1eaee}
html[data-theme="light"] .time-divider{color:#718593}
html[data-theme="light"] .composer-area{background:#fff;border-top-color:#dae5e9}
html[data-theme="light"] .composer{background:#f3f7fa;border-color:#ccdce5;color:#334a5e}
html[data-theme="light"] .composer textarea{background:transparent;color:#263d4d}
html[data-theme="light"] .composer textarea::placeholder{color:#7d92a1}
html[data-theme="light"] .conversation-header .circle-btn{background:#edf4f8;color:#476071;border-color:#d4e2e8}
html[data-theme="light"] .user-identity{background:#ebf3f5;color:#2c4756}
html[data-theme="light"] .search-container input{background:#f2f7f9;border-color:#d8e5ec;color:#243b4c}
html[data-theme="light"] .search-symbol{color:#6b8292}
html[data-theme="light"] .modal,html[data-theme="light"] .policy-content{background:#fff;color:#253d4e;border-color:#d4e4e9}
html[data-theme="light"] .modal .muted,html[data-theme="light"] .policy-content p{color:#647b89}
html[data-theme="light"] .modal-divider{border-color:#dfe9ed}
html[data-theme="light"] .modal-link{background:#e8f1fc;color:#4d5e9c}
html[data-theme="light"] .profile-upload{background:#f0f7f7;border:1px solid #d4e5e7}
html[data-theme="light"] .theme-choice-line button{background:#f4f8fa;border-color:#d3e2e8;color:#294358}
html[data-theme="light"] .theme-choice-line button small{color:#708798}
html[data-theme="light"] .theme-choice-line button[aria-pressed="true"]{background:#def4eb;color:#175b50;border-color:#4cb79c}
html[data-theme="light"] .modal-form label{color:#526879}
html[data-theme="light"] .auth-area{background:#f3f8fa;color:#283c4b}
html[data-theme="light"] .auth-card{background:#fff;border-color:#dce7ea}
html[data-theme="light"] .auth-card h2{color:#253d4c}
html[data-theme="light"] .auth-pills{background:#eaf2f6}
html[data-theme="light"] .pill.active{background:#fff;color:#1f3a4b}
html[data-theme="light"] .field input{background:#f8fbfc;color:#243b4b;border-color:#d2e3e8}
html[data-theme="light"] .field label{color:#466071}
html[data-theme="light"] .auth-theme-button{background:#fff;border-color:#d1e3e8;color:#345769}
html[data-theme="light"] .auth-art{background:radial-gradient(ellipse at 25% 16%,#ebe4ff,transparent 44%),radial-gradient(ellipse at 76% 85%,#cdeee9,transparent 46%),#e4ecfb;color:#243d53}
html[data-theme="light"] .auth-brand{color:#243b4d}
html[data-theme="light"] .visual-card{color:#f4f8ff}
/* Coordinated premium modal light palette, with explicit selectors overriding old hardcoded colors. */
html[data-theme="light"] .modal.finance-dialog{background:#fff;color:#253d4e;border-color:#d3e4e8}
html[data-theme="light"] .modal.finance-dialog .modal-close{background:#ecf3f6;color:#466176;border-color:#d6e4e9}
html[data-theme="light"] .fm-root{--fm-bg:#fff;--fm-surface:#f4f8fa;--fm-line:#dae6eb;--fm-muted:#647c89;--fm-mint:#187c6d;--fm-lilac:#6554af;color:#2b4557}
html[data-theme="light"] .fm-cover{background:radial-gradient(ellipse at 92% 5%,#dcd6ff,transparent 46%),linear-gradient(125deg,#e7f6f2,#f6f7fd);border-bottom-color:#dae4ee}
html[data-theme="light"] .fm-heading{color:#263d4c!important}
html[data-theme="light"] .fm-subheading,html[data-theme="light"] .fm-eyebrow{color:#456979}
html[data-theme="light"] .fm-cover-mark{background:linear-gradient(135deg,#deebff,#e1f8f0)}
html[data-theme="light"] .fm-cover-mark span{color:#5c73aa}
html[data-theme="light"] .fm-tabs{background:#edf4f7;border-color:#dbe5ec}
html[data-theme="light"] .fm-tab{color:#617a8b}
html[data-theme="light"] .fm-tab[aria-selected="true"]{background:#fff;color:#2a4357;box-shadow:0 3px 10px #17304a15}
html[data-theme="light"] .fm-account-top,html[data-theme="light"] .fm-wallet-summary,html[data-theme="light"] .fm-perk,html[data-theme="light"] .fm-setting-card{background:#f4f9fb;color:#263d4d;border-color:#d6e4e9}
html[data-theme="light"] .fm-kicker,html[data-theme="light"] .fm-account-right small,html[data-theme="light"] .fm-micro,html[data-theme="light"] .fm-setting-card p{color:#687f90}
html[data-theme="light"] .fm-account-value,html[data-theme="light"] .fm-perk strong,html[data-theme="light"] .fm-subtitle{color:#2c4555}
html[data-theme="light"] .fm-status-pill{background:#e7ebfa;color:#5c5ea2}
html[data-theme="light"] .fm-status-pill.active{background:#d9f3e8;color:#166f5a}
html[data-theme="light"] .fm-offer{background:linear-gradient(142deg,#f5f1ff,#f6fbfb);border-color:#d5cdeb}
html[data-theme="light"] .fm-offer h3,html[data-theme="light"] .fm-offer-price>strong{color:#293d58}
html[data-theme="light"] .fm-offer-label{color:#6b5ba8}
html[data-theme="light"] .fm-offer p,html[data-theme="light"] .fm-offer-price>span{color:#607b8a}
html[data-theme="light"] .fm-comparison>div{border-bottom-color:#d9e3e9}
html[data-theme="light"] .fm-compare-title{color:#627a8a}
html[data-theme="light"] .fm-comparison .highlight{color:#187b68}
html[data-theme="light"] .fm-perk-icon{background:#deeee9;color:#277e6c}
html[data-theme="light"] .fm-perk p{color:#698294}
html[data-theme="light"] .fm-input,html[data-theme="light"] .fm-root select.fm-input{background:#fff;color:#253d4c;border-color:#d0e1e7}
html[data-theme="light"] .fm-input::placeholder{color:#849cac}
html[data-theme="light"] .fm-field label,html[data-theme="light"] .dn-form>label,html[data-theme="light"] .dn-options label{color:#36576a}
html[data-theme="light"] .fm-confirm,html[data-theme="light"] .dn-form,html[data-theme="light"] .dn-list-wrap{background:#f5f9fb;border-color:#d6e6ec;color:#2b455a}
html[data-theme="light"] .fm-secondary{background:#ecf3f8;color:#2d5265;border-color:#c9dce4}
html[data-theme="light"] .fm-details summary{color:#6e5689}
html[data-theme="light"] .dn-head{background:linear-gradient(125deg,#e5f5f1,#e9edf9);border-color:#d7e6ec}
html[data-theme="light"] .dn-head h3,html[data-theme="light"] .dn-item-copy strong{color:#2b4556}
html[data-theme="light"] .dn-head p,html[data-theme="light"] .dn-disclosure{color:#607b8e}
html[data-theme="light"] .dn-item{border-top-color:#d5e4e9}
html[data-theme="light"] .dn-optional{color:#678695}
html[data-theme="light"] .dn-locked{background:#fff5df;color:#825b2e;border-color:#eccd80}
html[data-theme="light"] .dn-created{background:#e7f8f1;color:#246a53;border-color:#80ccac}
html[data-theme="light"] .dn-created p{color:#447566}
html[data-theme="light"] .dn-alert-ok{background:#dff7ed;color:#256a59}
html[data-theme="light"] .dn-alert-error{background:#fff1f2;color:#a54c5c}
html[data-theme="light"] .toast{background:#fff;color:#244054;border-color:#a8c8d3;box-shadow:0 13px 38px #1e3d511d}
html[data-theme="light"] .toast.error{border-color:#dd8e9e;color:#9b4356}
html[data-theme="light"] .workspace-panel{background:#f3f8fa;border-color:#cbdde5}
html[data-theme="light"] .workspace-titlebar{background:#fff;color:#2c4457;border-bottom-color:#d3e4e9}
html[data-theme="light"] .workspace-titlebar small{color:#657f8f}
html[data-theme="light"] .workspace-kicker{color:#278b79}
html[data-theme="light"] .workspace-close{background:#eaf3f7;color:#486478;border-color:#d5e4ea}
html[data-theme="light"] .workspace-panel iframe{background:#eef4f6}
@media(max-width:800px){
  .tools-section{margin:0 15px 14px}
  .tools-section .quick-tile{min-height:69px}
  .workspace-backdrop{padding:0;align-items:stretch}
  .workspace-panel{height:100dvh;width:100%;border-radius:0;border:0}
  .workspace-titlebar{padding:14px 16px}
  .workspace-titlebar strong{font-size:19px}
}
@media(max-width:400px){
  .tools-heading{font-size:10px}
  .tools-hint{font-size:9px}
  .tools-section .quick-copy strong{font-size:10px}
  .theme-choice-line{gap:8px}
  .theme-choice-line button{padding:12px 10px}
}
