:root {
  color-scheme: light;
  --ink: #14201d; --muted: #63716c; --paper: #f3f5f1; --surface: #fff;
  --line: #dce3dd; --forest: #123f34; --forest-2: #082820;
  --mint: #bce8d1; --gold: #c9a85e; --danger: #a83d3d;
  --shadow: 0 24px 70px rgba(7, 38, 30, .13);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: radial-gradient(circle at 85% -10%, rgba(190,224,207,.38), transparent 28rem), var(--paper); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.brand { display: flex; align-items: center; gap: .75rem; font-size: 1.15rem; font-weight: 760; letter-spacing: -.02em; }
.brand.light { color: #fff; }
.brand-mark { display: grid; place-items: center; width: 2.35rem; height: 2.35rem; border: 1px solid rgba(211,181,111,.72); border-radius: .8rem; font-family: Georgia, serif; color: #e1c27b; background: linear-gradient(145deg, rgba(255,255,255,.1), rgba(255,255,255,.02)); box-shadow: inset 0 1px rgba(255,255,255,.22), 0 8px 20px rgba(0,0,0,.1); }
.eyebrow { margin: 0 0 .55rem; color: #458371; font-size: .72rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.muted { color: var(--muted); line-height: 1.6; }
.fineprint { color: var(--muted); font-size: .78rem; text-align: center; }
.totp-badge { display: grid; place-items: center; width: 3rem; height: 3rem; margin: 0 auto 1rem; border: 1px solid #b9cfc4; border-radius: 50%; color: var(--forest); font-size: .72rem; font-weight: 850; letter-spacing: .08em; background: #e9f3ed; }
h1, h2, p { margin-top: 0; }
h1 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; letter-spacing: -.03em; }
label { display: grid; gap: .45rem; margin: 1rem 0; font-size: .83rem; font-weight: 680; }
input, textarea { width: 100%; border: 1px solid var(--line); border-radius: .7rem; padding: .78rem .9rem; color: var(--ink); background: #fbfcfa; outline: none; transition: border-color .2s, box-shadow .2s; }
input:focus, textarea:focus { border-color: #4a917c; box-shadow: 0 0 0 3px rgba(74, 145, 124, .14); }
.button { display: inline-block; border: 0; border-radius: .7rem; padding: .78rem 1rem; font-weight: 750; text-align: center; transition: transform .15s, background .2s; }
.link-button { text-decoration: none; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .55; cursor: wait; transform: none; }
.button.primary { color: #fff; background: linear-gradient(135deg, #185647, #0c352c); box-shadow: inset 0 1px rgba(255,255,255,.18), 0 10px 24px rgba(12,53,44,.2); }
.button.primary:hover { background: linear-gradient(135deg, #1a604f, #092d25); }
.button.secondary { border: 1px solid #d4ded7; color: var(--forest); background: rgba(255,255,255,.68); box-shadow: inset 0 1px #fff; }
.button.danger { color: var(--danger); background: #f8e9e7; }
.button.text { color: var(--muted); background: transparent; }
.button.full { width: 100%; }
.notice { border-radius: .6rem; padding: .7rem .85rem; font-size: .82rem; line-height: 1.45; }
.notice.danger { color: #852d2d; background: #fbe9e7; }
.notice.success { color: var(--forest); background: #dff2e8; margin-bottom: 1rem; }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1.15fr .85fr; }
.auth-copy { position: relative; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 3rem clamp(3rem, 8vw, 8rem); color: #fff; background: radial-gradient(circle at 85% 15%, rgba(185,228,206,.2), transparent 27%), linear-gradient(135deg, #0b2a24, #17493e); }
.auth-copy::after { content: ""; position: absolute; width: 28rem; height: 28rem; right: -12rem; bottom: -12rem; border: 1px solid rgba(216,183,108,.34); border-radius: 50%; box-shadow: 0 0 0 4rem rgba(255,255,255,.025), 0 0 0 8rem rgba(255,255,255,.02); }
.auth-copy h1 { max-width: 650px; margin-bottom: 1.4rem; font-size: clamp(3rem, 6vw, 5.7rem); line-height: .94; }
.auth-copy p:not(.eyebrow) { max-width: 500px; color: #c4d7d0; font-size: 1.05rem; line-height: 1.7; }
.trust-line { display: flex; align-items: center; gap: .65rem; color: #a9c7bd; font-size: .8rem; }
.trust-line span { width: .55rem; height: .55rem; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 .3rem rgba(185,228,206,.12); }
.auth-card { align-self: center; width: min(430px, calc(100% - 3rem)); margin: auto; }
.auth-card h2 { margin-bottom: .5rem; font-family: Georgia, serif; font-size: 2rem; font-weight: 500; }
.mobile-brand { display: none; margin-bottom: 3rem; }
.center-shell, .install-shell { min-height: 100vh; display: grid; place-items: center; padding: 2rem; background: radial-gradient(circle at 50% 20%, #eef4ee, var(--paper) 55%); }
.panel { border: 1px solid rgba(255,255,255,.8); border-radius: 1.1rem; background: rgba(255,255,255,.9); box-shadow: var(--shadow), 0 0 0 1px rgba(19,63,52,.06); backdrop-filter: blur(18px); }
.unlock-panel { width: min(440px, 100%); padding: 2.4rem; text-align: center; }
.lock-orb { display: grid; place-items: center; width: 4rem; height: 4rem; margin: 0 auto 1.5rem; border-radius: 50%; color: var(--gold); font-size: 2rem; background: var(--forest); }
.unlock-panel h1 { font-size: 2.25rem; }
.unlock-panel label { text-align: left; }
.install-shell { align-content: center; gap: 1.5rem; }
.install-panel { width: min(540px, 100%); padding: 2.4rem; }
.install-panel h1 { font-size: 2.5rem; }
.app-layout { min-height: 100vh; display: grid; grid-template-columns: 250px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 1.5rem 1rem; color: #fff; background: radial-gradient(circle at 20% 5%, rgba(105,167,145,.18), transparent 14rem), linear-gradient(165deg, #0d352c, var(--forest-2) 65%); box-shadow: inset -1px 0 rgba(255,255,255,.06); z-index: 10; }
.sidebar-heading { display: flex; align-items: center; justify-content: space-between; padding: .2rem .55rem 2.2rem; }
.sidebar .brand { padding: 0; }
.sidebar nav { flex: 1; }
.nav-item { display: flex; align-items: center; gap: .75rem; width: 100%; border: 0; border-radius: .65rem; padding: .75rem; color: #b9cbc5; text-align: left; background: transparent; }
.nav-item:hover, .nav-item.active { color: #fff; background: rgba(255,255,255,.08); }
.sidebar-foot { border-top: 1px solid rgba(255,255,255,.1); padding-top: 1rem; }
.user-chip { display: flex; align-items: center; gap: .7rem; padding: .7rem; margin-bottom: .4rem; }
.user-chip > span { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; color: var(--forest); font-weight: 800; background: var(--mint); }
.user-chip div { min-width: 0; }
.user-chip strong, .user-chip small { display: block; overflow: hidden; text-overflow: ellipsis; }
.user-chip strong { font-size: .82rem; }
.user-chip small { margin-top: .18rem; color: #8fa9a1; font-size: .68rem; }
.workspace { min-width: 0; }
.topbar { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 1.6rem clamp(1.25rem, 4vw, 4rem) 1.35rem; border-bottom: 1px solid rgba(211,222,215,.85); background: rgba(248,250,247,.82); backdrop-filter: blur(20px) saturate(140%); z-index: 7; }
.topbar h1 { margin: 0; font-size: 2.25rem; }
.top-actions { display: flex; gap: .65rem; }
.content { max-width: 1600px; padding: 2rem clamp(1.25rem, 4vw, 4rem) 4rem; }
.toolbar { display: flex; align-items: end; gap: 1rem; margin-bottom: 1.25rem; }
.search { position: relative; width: min(480px, 100%); margin: 0; }
.search span { position: absolute; left: .9rem; top: .72rem; color: var(--muted); font-size: 1.25rem; }
.search input { padding-left: 2.5rem; background: #fff; }
.filter-group { display: flex; gap: .65rem; margin-left: auto; }
.compact-label { gap: .25rem; margin: 0; color: var(--muted); font-size: .68rem; font-weight: 700; }
select { min-height: 2.65rem; border: 1px solid var(--line); border-radius: .65rem; padding: .55rem 2rem .55rem .7rem; color: var(--ink); background: #fff; }
.count { flex: none; padding-bottom: .7rem; color: var(--muted); font-size: .8rem; }
.list-heading, .vault-row { display: grid; grid-template-columns: minmax(230px, 1.4fr) minmax(160px, 1fr) minmax(120px, .65fr) minmax(290px, auto); align-items: center; gap: 1rem; }
.list-heading { padding: .2rem 1rem .6rem 4.8rem; color: #788681; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.vault-list { display: grid; gap: .6rem; }
.vault-row { position: relative; border: 1px solid rgba(216,225,218,.95); border-radius: .9rem; padding: .9rem 1rem .9rem 4.8rem; background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(249,251,248,.94)); box-shadow: 0 4px 14px rgba(16,46,39,.035); cursor: pointer; transition: transform .15s, border-color .2s, box-shadow .2s; }
.vault-row:hover, .vault-row:focus-within, .vault-row:focus { transform: translateY(-1px); border-color: #a8c5ba; box-shadow: 0 10px 25px rgba(16,46,39,.07); outline: none; }
.service-icon { display: grid; place-items: center; width: 2.8rem; height: 2.8rem; border-radius: .75rem; color: var(--forest); font-family: Georgia, serif; font-size: 1.25rem; background: #e6f0ea; }
.vault-row .service-icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); }
.row-main, .row-username { min-width: 0; }
.row-main h2 { overflow: hidden; margin: 0 0 .25rem; font-size: .92rem; text-overflow: ellipsis; white-space: nowrap; }
.row-main p { overflow: hidden; margin: 0; color: var(--muted); font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.row-username { overflow: hidden; color: #3f504b; font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }
.row-actions { display: flex; justify-content: flex-end; gap: .35rem; }
.quick-action { border: 1px solid var(--line); border-radius: .55rem; padding: .5rem .6rem; color: var(--forest); font-size: .7rem; font-weight: 750; background: #f7f9f7; }
.quick-action:hover { border-color: #9ab9ad; background: #eaf2ed; }
.quick-action:disabled { opacity: .38; cursor: not-allowed; }
.tag { display: inline-block; border-radius: 99px; padding: .22rem .5rem; color: #527067; font-size: .65rem; background: #eef3ef; }
.empty-state { padding: 6rem 1rem; text-align: center; }
.empty-state > div { color: var(--gold); font-size: 3rem; }
.empty-state h2 { font-family: Georgia, serif; font-size: 1.8rem; font-weight: 500; }
.empty-state p { color: var(--muted); }
.no-results { border: 1px dashed #cbd7d0; border-radius: .9rem; padding: 3rem 1rem; color: var(--muted); text-align: center; background: rgba(255,255,255,.45); }
dialog { width: min(650px, calc(100% - 2rem)); max-height: calc(100vh - 2rem); border: 1px solid rgba(255,255,255,.65); border-radius: 1.1rem; padding: 0; color: var(--ink); background: rgba(255,255,255,.97); box-shadow: 0 30px 100px rgba(2,24,18,.32); }
dialog::backdrop { background: rgba(5,23,19,.65); backdrop-filter: blur(4px); }
dialog form { padding: 1.5rem; }
dialog header, dialog footer, .dialog-shell header, .dialog-shell footer { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
dialog h2 { margin: 0; font-family: Georgia, serif; font-size: 1.7rem; font-weight: 500; }
dialog footer { margin-top: 1.5rem; }
dialog footer span { flex: 1; }
.icon-button { border: 0; border-radius: .55rem; padding: .5rem .65rem; color: var(--muted); background: #edf1ee; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.input-action { display: flex; }
.input-action input { border-radius: .7rem 0 0 .7rem; }
.input-action button { border: 1px solid var(--line); border-left: 0; padding: 0 .7rem; color: var(--forest); font-size: .72rem; font-weight: 750; background: #edf2ee; }
.input-action button:last-child { border-radius: 0 .7rem .7rem 0; }
.generator-panel { border: 1px solid #cedbd4; border-radius: .8rem; padding: 1rem; background: #f3f7f4; }
.generator-head { display: flex; justify-content: space-between; gap: 1rem; color: var(--forest); font-size: .78rem; }
.generator-head span { color: var(--muted); }
.range-label { margin: .8rem 0; }
.range-label input { padding: 0; accent-color: var(--forest); }
.generator-options { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; margin-bottom: .9rem; }
.generator-options label { display: flex; align-items: center; gap: .45rem; margin: 0; font-weight: 600; }
.generator-options input { width: auto; accent-color: var(--forest); }
.wide-dialog { width: min(850px, calc(100% - 2rem)); }
.dialog-shell { padding: 1.5rem; }
.dialog-shell > header { margin-bottom: 1.3rem; }
.dialog-shell h2 { margin: 0; font-family: Georgia, serif; font-size: 1.8rem; font-weight: 500; }
.privacy-banner { display: flex; gap: .9rem; border: 1px solid #cfe0d7; border-radius: .85rem; padding: 1rem; color: var(--forest); background: linear-gradient(135deg, #edf7f1, #f7faf7); }
.privacy-banner > span { color: var(--gold); }
.privacy-banner p { margin: .25rem 0 0; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.import-summary { display: flex; align-items: center; gap: 1.2rem; border-radius: .85rem; padding: .9rem 1rem; color: #fff; background: linear-gradient(120deg, #123f34, #1e5c4d); }
.import-summary > div { display: grid; min-width: 5.5rem; text-align: center; }
.import-summary span { font-family: Georgia, serif; font-size: 2rem; color: #eed18d; }
.import-summary small { color: #bdd4cb; }
.import-summary p { margin: 0; font-size: .82rem; }
.field-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: .55rem .9rem; border: 1px solid var(--line); border-radius: .8rem; padding: .9rem 1rem 1rem; margin: 1rem 0; }
.field-picker legend { padding: 0 .4rem; color: var(--muted); font-size: .72rem; font-weight: 800; }
.field-picker label, .selection-bar label { display: flex; align-items: center; gap: .45rem; margin: 0; font-weight: 600; }
.field-picker input, .selection-bar input, .import-entry > input { width: auto; accent-color: var(--forest); }
.selection-bar { display: flex; justify-content: space-between; padding: .35rem .15rem .7rem; color: var(--muted); font-size: .75rem; }
.import-entry-list { max-height: min(38vh, 360px); overflow: auto; display: grid; gap: .4rem; padding-right: .25rem; }
.import-entry { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: .7rem; border: 1px solid var(--line); border-radius: .72rem; padding: .65rem .75rem; margin: 0; background: #fbfcfa; cursor: pointer; }
.import-entry:has(input:checked) { border-color: #a8c9bb; background: #f2f8f4; }
.import-entry-icon { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: .55rem; color: var(--forest); font-family: Georgia, serif; background: #e0eee6; }
.import-entry-details { min-width: 0; display: grid; gap: .15rem; }
.import-entry-details strong, .import-entry-details small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.import-entry-details small, .import-entry-meta { color: var(--muted); font-size: .68rem; }
.dialog-shell footer { margin-top: 1rem; }
.dialog-shell footer span { flex: 1; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.settings-card { border: 1px solid var(--line); border-radius: .9rem; padding: 1rem; background: linear-gradient(145deg, #fff, #f8faf7); }
.settings-card h3 { margin: 0 0 .35rem; font-family: Georgia, serif; font-size: 1.2rem; font-weight: 500; }
.settings-card > p { min-height: 2.6rem; margin: 0 0 .5rem; color: var(--muted); font-size: .72rem; line-height: 1.45; }
.settings-card label { margin: .7rem 0; }
.recovery-card { grid-column: 1 / -1; }
.recovery-result { display: grid; gap: .7rem; margin-top: .8rem; }
.recovery-result code { overflow-wrap: anywhere; border: 1px dashed #b8cbbf; border-radius: .7rem; padding: .8rem; color: var(--forest); font-size: .8rem; line-height: 1.7; background: #eff6f1; user-select: all; }
.totp-secret { display: block; overflow-wrap: anywhere; border: 1px dashed #b8cbbf; border-radius: .7rem; padding: .8rem; color: var(--forest); text-align: center; letter-spacing: .14em; background: #eff6f1; user-select: all; }
.audit-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: .7rem; margin-bottom: 1rem; }
.audit-summary > div { display: grid; gap: .2rem; border: 1px solid var(--line); border-radius: .8rem; padding: 1rem; text-align: center; background: linear-gradient(145deg, #fff, #f5f8f5); }
.audit-summary strong { color: var(--forest); font-family: Georgia, serif; font-size: 1.8rem; }
.audit-summary span { color: var(--muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; }
.audit-list { max-height: 50vh; overflow: auto; display: grid; gap: .45rem; }
.audit-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border: 1px solid var(--line); border-radius: .72rem; padding: .7rem .8rem; background: #fbfcfa; }
.audit-row > div:first-child { min-width: 0; display: grid; gap: .15rem; }
.audit-row strong, .audit-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audit-row small { color: var(--muted); }
.audit-tags { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .3rem; }
.audit-tags span { border-radius: 99px; padding: .25rem .5rem; color: #8d3c32; font-size: .65rem; background: #fae9e5; }
.second-factor-tabs { display: flex; gap: .4rem; margin-bottom: .6rem; }
.tab-button { flex: 1; border: 1px solid var(--line); border-radius: .55rem; padding: .5rem; background: #f7f9f7; color: var(--muted); font-size: .78rem; font-weight: 700; }
.tab-button.active { color: var(--forest); background: #eaf2ed; border-color: #a8c9bb; }
.import-entry-duplicate { grid-column: 1 / -1; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-top: .35rem; }
.duplicate-badge { border-radius: 99px; padding: .25rem .55rem; color: #8d6b1f; font-size: .65rem; font-weight: 700; background: #fbf0d6; }
.import-entry-duplicate select { width: auto; font-size: .72rem; padding: .3rem .5rem; }
.history-list { display: grid; gap: .5rem; max-height: min(45vh, 420px); overflow: auto; padding-right: .25rem; }
.trash-row, .history-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border: 1px solid var(--line); border-radius: .72rem; padding: .65rem .8rem; background: #fbfcfa; }
.trash-row > div:first-child, .history-row > div:first-child { min-width: 0; display: grid; gap: .15rem; }
.trash-row strong, .history-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trash-row small, .history-row small { color: var(--muted); font-size: .7rem; }
.field-row-inline { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .35rem 0; }
.field-row-inline select { width: auto; min-width: 55%; }
.quick-action.danger { color: var(--danger); border-color: #e4bdb6; background: #fbeeec; }
.quick-action.danger:hover { background: #f8e0dc; }
.toast { position: fixed; right: 1.5rem; bottom: 1.5rem; border-radius: .7rem; padding: .85rem 1rem; color: #fff; background: var(--forest); box-shadow: var(--shadow); z-index: 20; }
.menu-backdrop { position: fixed; inset: 0; border: 0; background: rgba(5,23,19,.55); z-index: 9; }
.mobile-only { display: none; }
@media (max-width: 1180px) {
  .list-heading, .vault-row { grid-template-columns: minmax(190px, 1.2fr) minmax(130px, .8fr) minmax(250px, auto); }
  .list-heading span:nth-child(3), .row-category { display: none; }
}
@media (max-width: 980px) {
  .toolbar { flex-wrap: wrap; }
  .search { width: 100%; }
  .filter-group { margin-left: 0; }
  .count { margin-left: auto; }
  .list-heading { display: none !important; }
  .vault-row { grid-template-columns: minmax(170px, 1fr) minmax(240px, auto); padding-left: 4.8rem; }
  .row-username { display: none; }
}
@media (max-width: 760px) {
  .auth-shell { grid-template-columns: 1fr; } .auth-copy { display: none; }
  .auth-card { padding: 2rem 0; } .mobile-brand { display: flex; color: var(--forest); }
  .app-layout { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: -270px; width: 250px; transition: left .25s; box-shadow: var(--shadow); }
  .sidebar.open { left: 0; } .mobile-only { display: inline-block; }
  .topbar { align-items: flex-start; flex-wrap: wrap; }
  .top-actions #lock-button { display: none; }
  .top-actions #import-button { display: inline-block; }
  .top-actions .primary { font-size: 0; } .top-actions .primary::after { content: "＋"; font-size: 1rem; }
  .vault-row { grid-template-columns: 1fr; gap: .7rem; }
  .row-actions { justify-content: flex-start; flex-wrap: wrap; }
  .quick-action { min-height: 2.35rem; }
  .field-picker { grid-template-columns: 1fr 1fr; }
  .import-entry { grid-template-columns: auto auto minmax(0, 1fr); }
  .import-entry-meta { display: none; }
  .settings-grid { grid-template-columns: 1fr; }
  .recovery-card { grid-column: auto; }
  .audit-summary { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .field-row { grid-template-columns: 1fr; gap: 0; } dialog footer { flex-wrap: wrap; }
  .filter-group { width: 100%; }
  .compact-label { flex: 1; }
  .compact-label select { width: 100%; }
  .count { margin-left: 0; }
  .generator-options { grid-template-columns: 1fr; }
  .topbar { gap: .75rem; }
  .topbar h1 { font-size: 1.75rem; }
  .top-actions { gap: .4rem; }
  .top-actions { width: 100%; justify-content: flex-end; }
  .top-actions .button { padding: .7rem .72rem; }
  .top-actions #import-button { font-size: .7rem; }
  .wide-dialog { width: 100%; max-width: none; max-height: 100%; height: 100%; border-radius: 0; }
  .dialog-shell { min-height: 100%; padding: 1rem; }
  .field-picker { grid-template-columns: 1fr; }
  .import-summary { align-items: flex-start; }
  .import-entry-list { max-height: 36vh; }
  .audit-row { align-items: flex-start; flex-direction: column; }
  .audit-tags { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ink: #e8efeb; --muted: #98aaa3; --paper: #071b16; --surface: #0d2821;
    --line: #28433a; --forest: #a9dbc5; --forest-2: #041510;
    --shadow: 0 24px 70px rgba(0,0,0,.3);
  }
  body { background: radial-gradient(circle at 85% -10%, rgba(40,104,82,.28), transparent 28rem), var(--paper); }
  input, textarea, select { color: var(--ink); border-color: var(--line); background: #0b241d; }
  .topbar { border-color: #213b32; background: rgba(7,27,22,.86); }
  .button.secondary, .icon-button { color: #b8dbc9; border-color: #345248; background: #17372e; box-shadow: none; }
  .panel, dialog { border-color: #2a463c; background: rgba(11,35,28,.98); }
  .vault-row, .settings-card, .audit-summary > div, .audit-row, .import-entry, .trash-row, .history-row {
    border-color: #29463c;
    background: linear-gradient(145deg, #0e2d25, #0a241d);
  }
  .tab-button { color: #98aaa3; border-color: #345248; background: #17372e; }
  .tab-button.active { color: #a9dbc5; background: #1d4136; border-color: #3f6a57; }
  .duplicate-badge { color: #e7cd8a; background: #3a2f14; }
  .quick-action.danger { color: #f0b5ab; border-color: #5a3831; background: #3a201c; }
  .search input { background: #0b241d; }
  .tag, .quick-action { color: #b7d8c9; border-color: #345147; background: #17362d; }
  .generator-panel, .recovery-result code, .privacy-banner, .totp-secret, .totp-badge { color: #c4e3d5; border-color: #315247; background: #102f27; }
  .no-results { background: rgba(15,45,36,.5); }
  .notice.success { color: #bce5d1; background: #174333; }
  .notice.danger, .audit-tags span { color: #f0b5ab; background: #49231f; }
}
