/* Appearance and account tools share the same surfaces as the collection. */
:root{--surface-soft:#f0f3eb;--surface-hover:#eaf0e4;--accent-ink:#fff;--danger:#b54d45}
.header-icon{display:grid;place-items:center;width:42px;height:42px;flex-shrink:0;padding:0;border:1px solid var(--line);border-radius:12px;background:var(--surface-soft);color:var(--green)}
.header-icon:hover{background:var(--surface-hover)}
.header-icon svg{width:22px;height:22px;pointer-events:none}
.topbar nav{gap:12px}
.nav-admin .nav-add-text{margin-left:0}
.settings-dialog{width:min(440px,calc(100% - 24px));max-height:90vh;max-height:90dvh;padding:0;border:1px solid var(--line);border-radius:22px;background:var(--white);color:var(--ink);box-shadow:0 24px 90px #0003;overflow-y:auto;overscroll-behavior:contain}
.settings-dialog::backdrop{background:#14221e80;backdrop-filter:blur(5px)}
.settings-heading{position:sticky;top:0;z-index:1;display:flex;align-items:center;justify-content:space-between;padding:16px 22px;background:var(--white);border-bottom:1px solid var(--line)}
.settings-heading h2{margin:0;font-size:19px;font-weight:600}
.settings-heading .dialog-close{position:static;flex-shrink:0;width:38px;height:38px;background:var(--surface-soft);color:var(--ink)}
.settings-body{padding:18px 22px 22px}
.appearance-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:20px;font-size:15px}
.appearance-row>span{display:flex;align-items:center;gap:12px}
.appearance-row select{max-width:60%;border:1px solid var(--line);border-radius:9px;background:var(--surface-soft);color:var(--ink);padding:10px;font-size:14px;min-height:42px}
.cloud-status{display:flex;align-items:center;gap:8px;margin:0 0 10px;font-size:12px;color:var(--muted)}
.cloud-status::before{content:'';width:6px;height:6px;background:var(--muted);border-radius:50%}
.cloud-status.connected::before{background:var(--green)}
.settings-action{display:flex;align-items:center;gap:14px;width:100%;min-height:56px;padding:14px 10px;border:0;border-radius:10px;background:none;color:var(--ink);text-align:left;font-size:16px;line-height:1.4}
.settings-action>svg{width:22px;height:22px;color:var(--green)}
.settings-action:hover{background:var(--surface-soft)}
.settings-action small{display:block;margin-top:5px;color:var(--muted);font-size:12px;font-weight:400;line-height:1.6}
.settings-divider{height:1px;background:var(--line);margin:15px 0 8px}
.settings-action.danger-action,.danger-action>svg{color:var(--danger)}
.backup-hint{font-size:12px;line-height:1.7;color:var(--muted);margin:10px 10px 0}
.settings-form{padding:14px 0 8px}
.settings-form label{display:block;font-size:14px;margin-bottom:16px;color:var(--muted)}
.settings-form input{display:block;width:100%;margin-top:8px;padding:11px 12px;border:1px solid var(--line);border-radius:9px;background:var(--surface-soft);color:var(--ink);font-size:16px}
.settings-form .primary-btn{width:100%;justify-content:center}
.settings-message{color:var(--green);font-size:13px;line-height:1.7;margin:14px 0 0;overflow-wrap:anywhere}
.settings-message:empty{display:none}.settings-message.is-error{color:var(--danger)}
.restore-preview{margin:12px 0;padding:16px;background:var(--surface-soft);border:1px solid var(--line);border-radius:12px}
.restore-preview h3{font-size:15px;margin:0 0 10px}
.restore-preview p{font-size:13px;line-height:1.8;color:var(--muted);margin-bottom:12px}
.restore-actions{display:flex;gap:8px;flex-wrap:wrap}
.restore-actions button{font-size:14px}
@media(max-width:600px){.topbar nav{gap:7px}.topbar nav .nav-current{display:none}.topbar .nav-admin{display:flex;align-items:center;justify-content:center;min-height:42px;padding:8px 10px}.topbar .nav-admin span{margin-left:4px}.topbar .nav-admin .nav-add-text{margin-left:0}.settings-dialog{border-radius:18px}.settings-heading{padding:14px 18px}.settings-body{padding:16px 18px 20px}}
@media(max-width:370px){.topbar .nav-admin .nav-add-text{display:none}.topbar .nav-admin{width:42px;padding:0}.topbar .nav-admin span{margin:0;font-size:23px}.admin-body nav>a{font-size:12px}}

/* Muted evergreen surfaces keep dark mode comfortable without losing contrast. */
:root[data-theme=dark]{--paper:#101b20;--white:#18272c;--ink:#e1eae6;--muted:#a2b5ac;--line:#30434a;--green:#abc9b1;--green-dark:#bfd9bf;--lime:#304c3d;--surface-soft:#203239;--surface-hover:#2a4147;--accent-ink:#14231b;--danger:#f39b91;color-scheme:dark}
[data-theme=dark] .topbar{background:#142127ed}
[data-theme=dark] .brand-mark{background:#3f6254;color:#e7f0d3}
[data-theme=dark] .hero-kicker,[data-theme=dark] .chip,[data-theme=dark] .section-head h2>span,[data-theme=dark] .card-heading h2>span,[data-theme=dark] .dialog-tags span{background:var(--surface-soft);color:var(--muted)}
[data-theme=dark] .chip.active,[data-theme=dark] .chip.active:hover{background:var(--lime);color:#e0edc8}
[data-theme=dark] .chip:hover,[data-theme=dark] .outline-btn:hover,[data-theme=dark] .subtle-btn:hover,[data-theme=dark] .item-actions button:hover{background:var(--surface-hover);color:var(--ink);border-color:#50675a}
[data-theme=dark] .quote-card{background:#192a30;border-color:var(--line)}
[data-theme=dark] .quote-card:nth-child(4n+2){background:#253229;border-color:#3c4b3b}
[data-theme=dark] .quote-card:nth-child(4n+3){background:#302e29;border-color:#4b463a}
[data-theme=dark] .quote-card:nth-child(4n){background:#203235;border-color:#344a4c}
[data-theme=dark] .quote-card:hover{border-color:#839c82;box-shadow:0 8px 24px #0002}
[data-theme=dark] .quote-dialog{border-color:var(--line)}
[data-theme=dark] .quote-dialog-header{background:#18272cf5}
[data-theme=dark] .dialog-close,[data-theme=dark] .subtle-btn,[data-theme=dark] .item-actions button{background:var(--surface-soft);color:var(--ink)}
[data-theme=dark] .brand-tag,[data-theme=dark] nav a,[data-theme=dark] .hero p,[data-theme=dark] .search-hint,[data-theme=dark] .sidebar-title,[data-theme=dark] .sidebar-note,[data-theme=dark] .section-head p,[data-theme=dark] .card-top,[data-theme=dark] .card-kind,[data-theme=dark] .overline,[data-theme=dark] .dialog-tags,[data-theme=dark] .quote-note p,[data-theme=dark] .footer,[data-theme=dark] .footer-brand,[data-theme=dark] .admin-heading p,[data-theme=dark] .login-card>p,[data-theme=dark] .login-note,[data-theme=dark] .admin-empty,[data-theme=dark] .admin-card label,[data-theme=dark] .admin-card label>small,[data-theme=dark] .optional,[data-theme=dark] .upload-zone small,[data-theme=dark] .item-meta,[data-theme=dark] .admin-item small,[data-theme=dark] .password-settings summary,[data-theme=dark] .password-settings summary>span,[data-theme=dark] .password-settings form>p:first-child{color:var(--muted)}
[data-theme=dark] .primary-btn{background:var(--green);border-color:var(--green);color:var(--accent-ink)}
[data-theme=dark] .primary-btn:hover{background:var(--green-dark);border-color:var(--green-dark)}
[data-theme=dark] .collection-tools select{color:var(--ink);background:var(--white);border-color:var(--line)}
[data-theme=dark] .admin-card input:not([type=file]),[data-theme=dark] .admin-card select,[data-theme=dark] .admin-card textarea{background:var(--paper);color:var(--ink);border-color:var(--line)}
[data-theme=dark] .admin-card input:focus,[data-theme=dark] .admin-card textarea:focus,[data-theme=dark] .admin-card select:focus{background:var(--surface-soft);outline-color:#4c6858}
[data-theme=dark] input::placeholder,[data-theme=dark] textarea::placeholder{color:#99aaa2}
[data-theme=dark] .upload-zone,[data-theme=dark] .dialog-image,[data-theme=dark] .image-preview{background:var(--paper);border-color:var(--line);color:var(--muted)}
[data-theme=dark] .upload-zone:hover{background:var(--surface-soft)}
[data-theme=dark] .empty-state,[data-theme=dark] .loading-state{border-color:var(--line)}
[data-theme=dark] .empty-state h3{color:var(--ink)}
[data-theme=dark] .empty-state p{color:var(--muted)}
[data-theme=dark] .toast{background:var(--green);color:var(--accent-ink)}
[data-theme=dark] .form-error{color:var(--danger)}
[data-theme=dark] .quote-dialog::backdrop,[data-theme=dark] .add-dialog::backdrop,[data-theme=dark] .settings-dialog::backdrop{background:#030c11b3}
