.notification-bell{position:relative}.notification-bell summary{list-style:none;position:relative;cursor:pointer}.notification-bell summary::-webkit-details-marker{display:none}.notification-count{position:absolute;top:-3px;right:-4px;background:#e84050;color:#fff;border:2px solid var(--panel,#fff);border-radius:20px;min-width:20px;height:20px;padding:0 4px;display:grid;place-items:center;font-size:10px;font-weight:800}.notification-popover{position:absolute;right:0;top:48px;width:360px;max-width:calc(100vw - 32px);background:var(--panel,#fff);color:var(--text,#18243b);border:1px solid var(--border,#e3e8f0);border-radius:16px;box-shadow:0 16px 55px #182b4c26;z-index:100;padding:16px}.notification-popover-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.notification-popover a{color:inherit}.notification-preview{display:flex;flex-direction:column;gap:5px;padding:13px 10px;border-bottom:1px solid var(--border,#e3e8f0);text-decoration:none;border-radius:7px}.notification-preview span,.notification-preview small{font-size:12px;opacity:.75}.notification-settings-link{display:block;padding-top:16px;font-size:12px}.is-unread{background:#4d7df20b;border-left:3px solid #547bed}.notification-row{padding:20px;display:flex;align-items:center;justify-content:space-between;gap:20px;border-bottom:1px solid var(--border,#e3e8f0)}.notification-row h3{margin:0 0 8px}.notification-row p{margin:0 0 8px;max-width:750px}.notification-row small{opacity:.6}.integration-overview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-bottom:25px}.integration-summary{border:1px solid var(--border,#e3e8f0);background:var(--panel,#fff);border-radius:15px;padding:20px;display:flex;align-items:center;gap:13px;flex-wrap:wrap}.integration-summary h3{font-size:15px;margin:0 0 5px}.integration-summary p{font-size:12px;color:var(--muted,#77839b);margin:0}.integration-logo{width:43px;height:43px;display:grid;place-items:center;border-radius:12px}.email-logo{background:#e9efff;color:#5379dd}.shopify-logo{background:#ecf5df;color:#6a922b}.amazon-logo{background:#fff2da;color:#d2982e}.integration-status{font-size:11px;font-weight:650;border-radius:20px;padding:5px 10px;background:#8d9bb115;color:var(--muted,#687589);white-space:nowrap}.integration-summary>.integration-status{margin-left:auto}.integration-status.connected{background:#e4f7ed;color:#218659}.integration-tabs{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:22px;border-bottom:1px solid var(--border,#e3e8f0);padding-bottom:10px}.integration-tabs a{padding:11px 15px;border-radius:9px;text-decoration:none;color:var(--muted,#6e7b92);font-size:13px;font-weight:600}.integration-tabs a.active{background:#5379dd12;color:#5379dd}.integration-panel{max-width:1100px}.integration-panel h2{margin-top:0}.integration-note{background:#5379dd09;border:1px solid #5379dd20;border-radius:10px;padding:16px;font-size:13px;line-height:1.8}.integration-buttons{display:flex;flex-wrap:wrap;gap:10px}.integration-event-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:20px 0}.integration-event{display:flex;gap:12px;align-items:start;padding:16px;border:1px solid var(--border,#e3e8f0);border-radius:10px}.integration-event input{width:17px;height:17px;flex-shrink:0}.integration-event small{display:block;margin-top:6px;opacity:.6;font-size:11px;line-height:1.6}.integration-pause{margin-top:20px}.recovery-card{max-width:460px}.recovery-card form{display:grid;gap:16px;margin:20px 0}.recovery-card label{display:grid;gap:8px}.recovery-card input{box-sizing:border-box;width:100%;height:48px;padding:10px 14px;border:1px solid #cad5e1;border-radius:10px;background:#ffffffa8;color:#24334e;font-size:16px}.recovery-card p{line-height:1.6}.recovery-card a{color:#3e639d}.recovery-resend{background:transparent;border:1px solid #b6c6df;color:#345986;padding:12px;border-radius:9px;cursor:pointer}.recovery-resend:disabled{opacity:.5;cursor:default}[data-resend-timer]{font-size:12px;color:#59708d}.signin-forgot{display:block;text-align:right;margin-top:12px;color:#446793;font-size:13px}.integration-panel input[type=checkbox],.table-scroll input[type=checkbox]{width:18px;height:18px;accent-color:#547bed}@media(max-width:1000px){.integration-overview{grid-template-columns:1fr}.integration-event-grid{grid-template-columns:1fr}}@media(max-width:600px){.notification-popover{position:fixed;right:16px;top:75px}.notification-row{align-items:start;flex-direction:column}.integration-tabs a{padding:9px}.integration-buttons .btn{width:100%}}
.integration-logo img{display:block;object-fit:contain;max-width:100%;flex-shrink:0}.integration-logo.email-logo{background:#fff;border:1px solid var(--border,#e3e8f0)}.integration-logo.shopify-logo{background:#fff;border:1px solid var(--border,#e3e8f0)}.integration-logo.amazon-logo{width:86px;background:#fff;border:1px solid var(--border,#e3e8f0);padding:9px}.integration-logo:hover{opacity:1}.integration-logo:focus-visible{outline:2px solid var(--primary,#176458);outline-offset:3px}

.smtp-setup-progress{display:flex;flex-wrap:wrap;gap:10px;margin:18px 0 10px}.smtp-setup-progress span{background:var(--primary-soft,#ecf6f2);color:var(--text,#1c2835);border:1px solid var(--border,#e3e8f0);border-radius:8px;padding:10px 14px;font-size:12px}.integration-buttons button:disabled{opacity:.45;cursor:not-allowed}
.smtp-live-badge{display:inline-flex;align-items:center;gap:8px;padding:7px 14px;border-radius:999px;background:#e7f7ee;color:#137a43;border:1px solid #b6e5c9;font-size:13px;font-weight:600;white-space:nowrap}.smtp-live-badge i{width:9px;height:9px;border-radius:50%;background:#1fa45a;box-shadow:0 0 0 0 rgba(31,164,90,.5);animation:smtpPulse 2s infinite}.smtp-live-badge.is-off{background:#f4f5f8;color:#5b6577;border-color:#e3e8f0}.smtp-live-badge.is-off i{background:#a5adbb;animation:none}
@keyframes smtpPulse{70%{box-shadow:0 0 0 8px rgba(31,164,90,0)}100%{box-shadow:0 0 0 0 rgba(31,164,90,0)}}
.smtp-stepper{--smtp-progress:0;position:relative;display:grid;grid-template-columns:repeat(4,1fr);list-style:none;margin:22px 0 18px;padding:0}.smtp-stepper::before,.smtp-stepper::after{content:"";position:absolute;top:17px;left:12.5%;height:4px;border-radius:4px}.smtp-stepper::before{right:12.5%;background:var(--border,#e3e8f0)}.smtp-stepper::after{width:calc(75% * var(--smtp-progress));background:linear-gradient(90deg,#1fa45a,#33c27a);transition:width .4s}
.smtp-stepper li{position:relative;z-index:1;display:flex;flex-direction:column;align-items:center;text-align:center;gap:4px;font-size:13px}.smtp-stepper .dot{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:var(--surface,#fff);border:2px solid var(--border,#d5dbe5);color:#7a8496;font-weight:700}.smtp-stepper small{color:#7a8496;font-size:11.5px}
.smtp-stepper li.done .dot{background:#1fa45a;border-color:#1fa45a;color:#fff}.smtp-stepper li.done small{color:#137a43}.smtp-stepper li.current .dot{border-color:var(--primary,#2563eb);color:var(--primary,#2563eb);box-shadow:0 0 0 4px rgba(37,99,235,.14)}
.smtp-live-card{display:flex;flex-wrap:wrap;justify-content:space-between;gap:10px;align-items:center;padding:14px 16px;margin-bottom:16px;border-radius:10px;background:#f1faf5;border:1px solid #c9ebd7;font-size:13px;color:#4b5565}.smtp-live-card div{display:flex;flex-direction:column;gap:2px}.smtp-live-card b{color:#137a43;font-size:14px}
.secret-field{position:relative;display:flex;align-items:center}.secret-field input{width:100%;padding-right:96px}.secret-field.is-saved input::placeholder{color:#1c2835;letter-spacing:2px;opacity:.75}.secret-saved{position:absolute;right:44px;font-size:11px;font-weight:600;color:#137a43;background:#e7f7ee;border-radius:999px;padding:2px 8px}.secret-toggle{position:absolute;right:6px;border:0;background:none;padding:6px;cursor:pointer;color:#7a8496;border-radius:6px}.secret-toggle:hover,.secret-toggle.is-on{color:var(--primary,#2563eb);background:rgba(37,99,235,.08)}
.email-chips{display:flex;flex-wrap:wrap;align-items:center;gap:6px;min-height:44px;padding:6px 8px;border:1px solid var(--border,#d5dbe5);border-radius:8px;background:#fff;cursor:text}.email-chips:focus-within{border-color:var(--primary,#2563eb);box-shadow:0 0 0 3px rgba(37,99,235,.12)}.email-chips.is-invalid{border-color:#dc2626;box-shadow:0 0 0 3px rgba(220,38,38,.12)}
.email-chip{display:inline-flex;align-items:center;gap:4px;max-width:100%;padding:4px 4px 4px 10px;border-radius:999px;background:#eef2ff;color:#1e3a8a;font-size:13px;overflow-wrap:anywhere}.email-chip button{border:0;background:none;width:20px;height:20px;border-radius:50%;cursor:pointer;color:#475569;font-size:15px;line-height:1}.email-chip button:hover{background:#c7d2fe;color:#111827}
.email-to{display:flex;flex-direction:column;gap:6px;margin-bottom:12px}.email-to-label{font-weight:600;font-size:13px}.email-to-label small{font-weight:400;margin-left:4px}.email-chips-hint{font-size:12px;color:#6b7280}.email-chips-hint.is-error{color:#dc2626}
.email-chips-add{flex:none;width:30px;height:30px;border-radius:50%;border:1px solid var(--border,#d5dbe5);background:#f8fafc;color:var(--primary,#2563eb);font-size:20px;line-height:1;cursor:pointer;display:grid;place-items:center;padding:0}.email-chips-add:hover{background:var(--primary,#2563eb);color:#fff;border-color:var(--primary,#2563eb)}.email-chips-add[hidden]{display:none}.email-chip>span{overflow-wrap:anywhere}
.email-chips .email-chips-input{flex:1;min-width:140px;border:0!important;box-shadow:none!important;outline:0;padding:4px!important;margin:0;background:transparent}
@media(max-width:640px){.smtp-stepper small{display:none}.smtp-stepper b{font-size:11.5px}}

/* Marketplace connection states + sync cards */
.smtp-live-badge.is-pending{background:#eff6ff;color:#1d4ed8;border-color:#bfdbfe}.smtp-live-badge.is-pending i{background:#3b82f6;animation:none}.smtp-live-badge.is-error{background:#fef2f2;color:#b91c1c;border-color:#fecaca}.smtp-live-badge.is-error i{background:#dc2626;animation:none}
.smtp-stepper li.failed .dot{background:#dc2626;border-color:#dc2626;color:#fff}.smtp-stepper li.failed small{color:#b91c1c}
.sync-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:0;border:1px solid var(--border,#e5e7eb);border-radius:10px;overflow:hidden;margin:16px 0}.sync-item{display:flex;flex-direction:column;gap:3px;padding:16px 18px}.sync-item+.sync-item{border-left:1px solid var(--border,#e5e7eb)}
.sync-item-head{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:13px}.sync-state{font-size:11px;font-weight:600;padding:2px 8px;border-radius:999px;background:#f3f4f6;color:#6b7280}.sync-state.ok{background:#e7f7ee;color:#137a43}.sync-state.bad{background:#fef2f2;color:#b91c1c}
.sync-item strong{font-size:26px;font-weight:650;margin-top:8px;font-variant-numeric:tabular-nums}.sync-item small{font-size:12px;color:#6b7280}.sync-last{flex:1;margin:10px 0 12px;font-size:12px;line-height:1.5;color:#4b5563}.sync-last span{color:#9ca3af}.sync-item .btn{align-self:flex-start}
.sync-footer{display:flex;justify-content:flex-end;align-items:center;gap:14px;flex-wrap:wrap}.sync-footer label{display:flex;align-items:center;gap:8px;font-size:13px;white-space:nowrap}.sync-footer input{width:90px}
@media(max-width:640px){.sync-item+.sync-item{border-left:0;border-top:1px solid var(--border,#e5e7eb)}.sync-footer{justify-content:stretch}.sync-footer .btn{width:100%}}

/* Icon row actions (invoice list, receipts) */
.icon-actions{display:flex;flex-wrap:nowrap;align-items:center;gap:2px;justify-content:flex-end}.icon-actions .icon-action{display:inline-grid;place-items:center;width:32px;height:32px;min-height:32px;padding:0;border-radius:8px;color:#6b7280;text-decoration:none}.icon-actions .icon-action:hover{background:#eef2ff;color:#2563eb}.icon-actions svg{width:17px;height:17px}

.icon-action{display:inline-grid;place-items:center;width:32px;height:32px;min-height:32px;padding:0;margin:0 1px;border-radius:8px;color:#6b7280;text-decoration:none;vertical-align:middle}.icon-action:hover,.icon-action:focus-visible{background:#eef2ff;color:#2563eb}.icon-action svg{width:17px;height:17px}

/* Settings: Microsoft-style two-pane layout */
.settings-layout{display:grid;grid-template-columns:220px minmax(0,1fr);gap:28px;align-items:start;max-width:1100px}
.settings-nav{position:sticky;top:84px;display:flex;flex-direction:column;gap:2px}
.settings-nav a{position:relative;display:flex;align-items:center;gap:10px;padding:9px 12px;border-radius:6px;color:var(--text,#242424);font-size:14px;text-decoration:none}
.settings-nav a svg{width:18px;height:18px;color:var(--muted,#616161)}
.settings-nav a:hover{background:rgba(0,0,0,.04)}
.settings-nav a.active{background:rgba(15,108,189,.08);font-weight:600}.settings-nav a.active svg{color:#0f6cbd}
.settings-nav a.active::before{content:"";position:absolute;left:0;top:9px;bottom:9px;width:3px;border-radius:2px;background:#0f6cbd}
.settings-main{display:flex;flex-direction:column;gap:16px;min-width:0}
.settings-main .panel{max-width:none;margin:0;padding:24px 28px;border-radius:8px;border:1px solid var(--border,#e0e0e0);box-shadow:0 1px 2px rgba(0,0,0,.04);scroll-margin-top:84px}
.settings-anchor{scroll-margin-top:84px}
.settings-main .panel>h2,.settings-card-head h2{margin:0 0 4px;font-size:18px;font-weight:600;letter-spacing:0}
.settings-main .panel>h2+p,.settings-card-head p{margin:0 0 20px;padding-bottom:16px;border-bottom:1px solid var(--border,#e0e0e0);color:var(--muted,#616161);font-size:13px}
.settings-main .form-footer{margin-top:8px;padding-top:16px;border-top:1px solid var(--border,#e0e0e0);display:flex;justify-content:flex-end}
.settings-main label small{color:var(--muted,#616161)}
.settings-links{display:flex;flex-direction:column}
.settings-links a{display:flex;align-items:center;gap:14px;padding:12px 4px;color:inherit;text-decoration:none;border-bottom:1px solid var(--border,#eee)}.settings-links a:last-child{border-bottom:0}
.settings-links a:hover{background:rgba(0,0,0,.025)}.settings-links a>svg:first-child{width:20px;height:20px;color:#0f6cbd}.settings-links a>svg:last-child{margin-left:auto;width:16px;color:#9e9e9e}
.settings-links span{display:flex;flex-direction:column}.settings-links b{font-weight:600;font-size:14px}.settings-links small{font-size:12px;color:var(--muted,#616161)}
.settings-health{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:0 24px}
.settings-health div{display:flex;justify-content:space-between;align-items:center;padding:10px 0;border-bottom:1px solid var(--border,#eee);font-size:13px}
.settings-health b{display:inline-flex;align-items:center;gap:6px;font-weight:600}.settings-health b i{width:8px;height:8px;border-radius:50%;background:#107c10}.settings-health b.bad i{background:#c50f1f}
@media(max-width:900px){.settings-layout{grid-template-columns:1fr;gap:12px}.settings-nav{position:sticky;top:56px;z-index:5;flex-direction:row;overflow-x:auto;background:var(--bg,#f5f5f5);padding:6px 0;scrollbar-width:none}.settings-nav a{white-space:nowrap;flex:none}.settings-nav a.active::before{left:12px;right:12px;top:auto;bottom:0;width:auto;height:3px}.settings-main .panel{padding:18px 16px}}

.settings-layout.is-tabbed .settings-main>[hidden]{display:none!important}.settings-nav a[aria-current=page]{font-weight:600}

/* System health: animated score ring + staggered scan */
.health-hero{display:flex;align-items:center;gap:32px;padding:24px;margin-bottom:20px;border-radius:12px;background:linear-gradient(135deg,#f0fdf4,#ecfeff);border:1px solid #bbf7d0;--c:#16a34a}
.health-hero.is-warn{background:linear-gradient(135deg,#fffbeb,#fff7ed);border-color:#fde68a;--c:#d97706}.health-hero.is-bad{background:linear-gradient(135deg,#fef2f2,#fff1f2);border-color:#fecaca;--c:#dc2626}
.health-ring{position:relative;flex:none;width:132px;height:132px}.health-ring svg{width:100%;height:100%;transform:rotate(-90deg)}
.health-ring circle{fill:none;stroke-width:10;stroke-linecap:round}.health-ring .track{stroke:rgba(0,0,0,.07)}
.health-ring .fill{stroke:var(--c);stroke-dasharray:0 100;filter:drop-shadow(0 0 6px color-mix(in srgb,var(--c) 45%,transparent))}
.is-run .health-ring .fill{animation:healthFill 1.6s cubic-bezier(.2,.8,.2,1) forwards}
@keyframes healthFill{to{stroke-dasharray:var(--pct) 100}}
.health-ring-value{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.health-ring-value b{font-size:34px;font-weight:700;line-height:1;color:#111827;font-variant-numeric:tabular-nums}.health-ring-value b::after{content:"%";font-size:16px;margin-left:1px;color:#6b7280}.health-ring-value small{font-size:11px;letter-spacing:1px;text-transform:uppercase;color:#6b7280;margin-top:4px}
.health-pulse{position:absolute;inset:6px;border-radius:50%;border:2px solid var(--c);opacity:0}.is-run .health-pulse{animation:healthPulse 2.4s ease-out 1.6s infinite}
@keyframes healthPulse{0%{transform:scale(.85);opacity:.5}100%{transform:scale(1.25);opacity:0}}
.health-summary{display:flex;flex-direction:column;align-items:flex-start;gap:8px;min-width:0}
.health-status{display:inline-flex;align-items:center;gap:8px;font-size:13px;font-weight:600;color:var(--c)}.health-status i{width:9px;height:9px;border-radius:50%;background:var(--c);animation:smtpPulse 2s infinite}
.health-summary h3{margin:0;font-size:20px;font-weight:650;color:#111827}
.health-legend{display:flex;gap:14px;flex-wrap:wrap;font-size:12.5px;color:#4b5563}.health-legend span::before{content:"";display:inline-block;width:8px;height:8px;border-radius:2px;margin-right:6px;vertical-align:1px}.health-legend .ok::before{background:#16a34a}.health-legend .warn::before{background:#d97706}.health-legend .bad::before{background:#dc2626}
.health-summary .btn{margin-top:4px}.health-summary .btn svg{width:15px;height:15px;margin-right:6px}.health-summary .btn.is-spinning svg{animation:healthSpin .8s linear infinite}
.health-groups{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:16px}
.health-group{border:1px solid var(--border,#e5e7eb);border-radius:10px;padding:6px 16px 8px}.health-group h4{margin:10px 0 4px;font-size:11px;letter-spacing:1.2px;text-transform:uppercase;color:#6b7280}
.health-row{display:flex;align-items:center;gap:12px;padding:9px 0;border-top:1px solid #f1f5f9;font-size:13px;opacity:0;transform:translateY(6px)}.health-group h4+.health-row{border-top:0}
.is-run .health-row{animation:healthIn .4s ease forwards;animation-delay:var(--d)}
@keyframes healthIn{to{opacity:1;transform:none}}
.health-icon{position:relative;flex:none;display:grid;place-items:center;width:24px;height:24px;border-radius:50%}
.health-icon svg{width:14px;height:14px;opacity:0;transform:scale(.4)}.is-run .health-icon svg{animation:healthPop .35s cubic-bezier(.3,1.6,.5,1) forwards;animation-delay:calc(var(--d) + .45s)}
.health-icon .spin{position:absolute;inset:0;border-radius:50%;border:2px solid #e5e7eb;border-top-color:#3b82f6}.is-run .health-icon .spin{animation:healthSpin .6s linear infinite,healthHide .01s forwards;animation-delay:0s,calc(var(--d) + .45s)}
.is-ok .health-icon{background:#dcfce7;color:#15803d}.is-warn .health-icon{background:#fef3c7;color:#b45309}.is-bad .health-icon{background:#fee2e2;color:#b91c1c}
@keyframes healthPop{to{opacity:1;transform:none}}@keyframes healthSpin{to{transform:rotate(360deg)}}@keyframes healthHide{to{opacity:0;visibility:hidden}}
.health-label{flex:1;color:#374151}.health-value{font-weight:600;color:#111827;text-align:right;font-variant-numeric:tabular-nums}.is-warn .health-value{color:#b45309}.is-bad .health-value{color:#b91c1c}
@media(max-width:640px){.health-hero{flex-direction:column;align-items:flex-start;gap:18px}.health-groups{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.health-row,.health-icon svg{opacity:1!important;transform:none!important;animation:none!important}.health-icon .spin{display:none}.health-ring .fill{stroke-dasharray:var(--pct) 100;animation:none!important}}

.health-errors{margin-top:18px;border:1px solid var(--border,#e5e7eb);border-radius:10px;overflow:hidden}.health-errors-head{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;background:#f9fafb;border-bottom:1px solid var(--border,#e5e7eb)}.health-errors-head h4{margin:0;font-size:11px;letter-spacing:1.2px;text-transform:uppercase;color:#6b7280}.health-errors-head span{font-size:12px;color:#6b7280}
.health-errors-empty{display:flex;align-items:center;gap:10px;padding:18px 16px;color:#15803d;font-size:13px}.health-errors-empty svg{width:20px;height:20px}
.health-error{display:flex;flex-direction:column;gap:3px;padding:10px 16px 10px 14px;border-left:3px solid #dc2626;border-top:1px solid #f1f5f9;font-size:12.5px}.health-error:first-of-type{border-top:0}.health-error.is-warn{border-left-color:#d97706}.health-error b{font-weight:600;color:#111827;font-family:ui-monospace,Consolas,monospace;font-size:12px;overflow-wrap:anywhere}.health-error span{color:#6b7280;font-size:11.5px}

/* Compact health layout */
.health-hero{gap:18px;padding:12px 16px;margin-bottom:12px;border-radius:10px}
.health-ring{width:76px;height:76px}.health-ring circle{stroke-width:11}.health-ring-value b{font-size:20px}.health-ring-value b::after{font-size:11px}.health-ring-value small{display:none}
.health-summary{flex-direction:row;flex-wrap:wrap;align-items:center;gap:6px 16px;flex:1}
.health-summary h3{font-size:15px;order:2}.health-status{order:1;width:100%}.health-legend{order:3;font-size:12px}.health-summary .btn{order:4;margin:0 0 0 auto;min-height:32px;padding:4px 12px;font-size:12.5px}
.health-groups{grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:10px}
.health-group{padding:2px 12px 4px;border-radius:8px}.health-group h4{margin:8px 0 2px;font-size:10px}
.health-row{gap:8px;padding:5px 0;font-size:12.5px}.health-icon{width:18px;height:18px}.health-icon svg{width:11px;height:11px}.health-icon .spin{border-width:1.5px}
.health-errors{margin-top:12px;border-radius:8px}.health-errors-head{padding:8px 12px}.health-errors-empty{padding:10px 12px;font-size:12.5px}
.health-error{padding:7px 12px 7px 10px;gap:1px}.health-error b{font-size:11.5px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.health-more summary{padding:8px 12px;font-size:12px;color:#2563eb;cursor:pointer;border-top:1px solid #f1f5f9;list-style:none}.health-more summary::-webkit-details-marker{display:none}.health-more[open] summary{display:none}
@media(max-width:640px){.health-hero{flex-direction:row;align-items:center}.health-summary .btn{margin-left:0}}
.health-card .is-run{}.health-block[hidden]{display:none}
.health-tabs{display:inline-flex;gap:2px;padding:3px;margin-bottom:12px;border-radius:8px;background:#f3f4f6}
.health-tabs a{display:inline-flex;align-items:center;gap:6px;padding:6px 14px;border-radius:6px;font-size:13px;font-weight:600;color:#4b5563;text-decoration:none}.health-tabs a svg{width:15px;height:15px}
.health-tabs a.active{background:#fff;color:#111827;box-shadow:0 1px 2px rgba(0,0,0,.08)}
.health-summary h3{display:inline-flex;align-items:center;gap:6px}.health-summary h3 svg{width:16px;height:16px;color:var(--c)}

/* Health v3: three score rings + issues-first list */
.health-rings{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:14px}
.health-score{--c:#16a34a;display:flex;align-items:center;gap:14px;padding:14px 16px;border-radius:10px;border:1px solid #d1fae5;background:linear-gradient(135deg,#f0fdf4,#fff);text-align:left;cursor:pointer;font:inherit;color:inherit;transition:box-shadow .2s,transform .2s}
.health-score.is-warn{--c:#d97706;border-color:#fde68a;background:linear-gradient(135deg,#fffbeb,#fff)}.health-score.is-bad{--c:#dc2626;border-color:#fecaca;background:linear-gradient(135deg,#fef2f2,#fff)}
.health-score:hover{transform:translateY(-1px);box-shadow:0 4px 14px rgba(0,0,0,.06)}.health-score.is-active{box-shadow:0 0 0 2px var(--c)}
.health-score .health-ring{width:72px;height:72px}.health-score-text{display:flex;flex-direction:column;gap:3px;min-width:0}
.health-score-text b{display:flex;align-items:center;gap:6px;font-size:15px;font-weight:650}.health-score-text b svg{width:16px;height:16px;color:var(--c)}
.health-score-text em{font-style:normal;font-size:11px;font-weight:700;padding:1px 7px;border-radius:999px;background:color-mix(in srgb,var(--c) 14%,#fff);color:var(--c)}.health-score-text small{font-size:12px;color:#6b7280}
.is-run .health-score .fill{animation:healthFill 1.4s cubic-bezier(.2,.8,.2,1) forwards}.is-run .health-score .health-pulse{animation:healthPulse 2.4s ease-out 1.4s infinite}
.health-list-head{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:8px 2px;font-size:13px;font-weight:600;color:#374151}
.health-link{display:inline-flex;align-items:center;gap:5px;border:0;background:none;color:#2563eb;font:inherit;font-size:12.5px;font-weight:600;cursor:pointer;padding:4px 6px;border-radius:6px}.health-link:hover{background:#eff6ff}.health-link svg{width:13px;height:13px}.health-link.is-spinning svg{animation:healthSpin .8s linear infinite}
.health-list{border:1px solid var(--border,#e5e7eb);border-radius:10px;padding:0 14px}
.health-list .health-row{border-top:1px solid #f1f5f9}.health-list .health-row:not([hidden])~.health-row:not([hidden]){border-top:1px solid #f1f5f9}
.health-list .health-label{display:flex;flex-direction:column}.health-list .health-label small{font-size:11px;color:#9ca3af}
.is-run .health-list .health-row{animation:healthIn .35s ease forwards;animation-delay:var(--d)}
.health-allgood{display:flex;align-items:center;gap:8px;padding:12px 0;color:#15803d;font-size:13px}.health-allgood svg{width:18px;height:18px}
@media(max-width:820px){.health-rings{grid-template-columns:1fr}}

/* Score colours: 90+ green, 80-89 blue, below 80 yellow */
.health-score.is-green{--c:#16a34a;border-color:#bbf7d0;background:linear-gradient(135deg,#f0fdf4,#fff)}.health-score.is-blue{--c:#2563eb;border-color:#bfdbfe;background:linear-gradient(135deg,#eff6ff,#fff)}.health-score.is-yellow{--c:#ca8a04;border-color:#fde68a;background:linear-gradient(135deg,#fefce8,#fff)}

/* Health v4: polished score cards + stat tiles */
.health-card .settings-card-head p{margin-bottom:16px}
.health-rings{gap:14px;margin-bottom:16px}
.health-score{position:relative;gap:16px;padding:18px 18px 18px 16px;border-radius:14px;border:1px solid color-mix(in srgb,var(--c) 22%,#e5e7eb);background:radial-gradient(120% 140% at 0% 0%,color-mix(in srgb,var(--c) 9%,#fff) 0%,#fff 60%);box-shadow:0 1px 2px rgba(16,24,40,.04);cursor:default;overflow:hidden}
.health-score::after{content:"";position:absolute;left:0;right:0;bottom:0;height:3px;background:linear-gradient(90deg,var(--c),color-mix(in srgb,var(--c) 30%,transparent))}
.health-score:hover{transform:translateY(-2px);box-shadow:0 10px 24px -10px color-mix(in srgb,var(--c) 45%,transparent)}
.health-score .health-ring{width:78px;height:78px}.health-score .health-ring circle{stroke-width:9}
.health-score .health-ring-value b{font-size:22px;font-weight:750;letter-spacing:-.5px}
.health-score-text{flex:1;gap:4px}
.health-score-name{display:flex;align-items:center;gap:7px;font-size:15px;font-weight:650;color:#111827;white-space:nowrap}.health-score-name svg{width:17px;height:17px;color:var(--c)}
.health-score-meta{font-size:12.5px;color:#4b5563;white-space:nowrap}
.health-score-flags{display:flex;flex-wrap:wrap;gap:4px;margin-top:2px}.health-score-flags span{font-size:11px;font-weight:600;padding:1px 7px;border-radius:999px;white-space:nowrap}.health-score-flags .warn{background:#fef3c7;color:#92400e}.health-score-flags .bad{background:#fee2e2;color:#991b1b}
.health-grade{position:absolute;top:12px;right:14px;display:grid;place-items:center;width:30px;height:30px;border-radius:9px;font-size:15px;font-weight:800;color:var(--c);background:color-mix(in srgb,var(--c) 12%,#fff);border:1px solid color-mix(in srgb,var(--c) 25%,#fff)}
.health-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.health-stat{display:flex;align-items:center;gap:12px;padding:14px 16px;border:1px solid var(--border,#e5e7eb);border-radius:12px;background:#fff;opacity:0;transform:translateY(6px)}
.is-run .health-stat{animation:healthIn .4s ease forwards;animation-delay:var(--d)}
.health-stat-icon{display:grid;place-items:center;flex:none;width:38px;height:38px;border-radius:10px;background:#f1f5f9;color:#334155}.health-stat-icon svg{width:19px;height:19px}
.health-stat>span:nth-child(2){display:flex;flex-direction:column;min-width:0;flex:1}.health-stat small{font-size:11.5px;color:#6b7280;text-transform:uppercase;letter-spacing:.6px}.health-stat b{font-size:18px;font-weight:700;color:#111827;font-variant-numeric:tabular-nums}
.health-stat-ok{width:18px;height:18px;color:#16a34a}.health-stat.is-warn .health-stat-ok{color:#d97706}.health-stat.is-bad .health-stat-ok{color:#dc2626}
@media(max-width:820px){.health-stats{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.health-stat{opacity:1;transform:none;animation:none!important}}

.health-score{padding-right:56px}.health-score-text{align-items:flex-start;text-align:left}.health-score-flags{flex-wrap:nowrap}

.health-rings .health-score{justify-content:flex-start!important;text-align:left!important;white-space:normal}.health-rings .health-score-text{align-items:flex-start!important;min-width:0}.health-rings .health-score-flags{flex-wrap:wrap}.health-rings .health-score-name{padding-right:4px}

.health-score-text{display:flex;flex-direction:column}.health-score-name{max-width:calc(100% - 8px)}

.health-rings .health-score{padding:16px;gap:14px;align-items:center}.health-rings .health-grade{position:static;align-self:flex-start;flex:none;margin-left:auto}.health-rings .health-score-text{flex:1 1 auto;min-width:0;width:auto}.health-rings .health-score-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}

/* Card grid: header row (name + grade), then ring beside details */
.health-rings .health-score{display:grid;grid-template-columns:auto 1fr auto;grid-template-areas:'name name grade' 'ring meta meta' 'ring flags flags';column-gap:14px;row-gap:4px;align-items:center;padding:14px 16px 16px}
.health-rings .health-score-text{display:contents}
.health-rings .health-score-name{grid-area:name;overflow:visible;font-size:14.5px}.health-rings .health-grade{grid-area:grade;margin:0}
.health-rings .health-ring{grid-area:ring;margin-top:6px}.health-rings .health-score-meta{grid-area:meta;align-self:end;font-size:13px}.health-rings .health-score-flags{grid-area:flags;align-self:start}

.health-rings .health-score{grid-template-areas:'name name name' 'ring meta meta' 'ring flags flags'}

/* Backups tab */
.bk-status{display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) auto;gap:10px;margin:4px 0 14px;align-items:stretch}
.bk-status>div{border:1px solid var(--line,#e4e8ef);border-radius:10px;padding:10px 12px;display:flex;flex-direction:column;gap:2px;min-width:0}
.bk-status span{font-size:12px;color:var(--muted,#667085)}.bk-status b{font-size:15px}.bk-status small{font-size:12px;color:var(--muted,#667085);overflow-wrap:anywhere}.bk-status small.neg{color:#c4320a}
.bk-status .bk-actions{flex-direction:row;align-items:center;gap:8px;border:0;padding:0}.bk-actions form{margin:0}
.bk-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);gap:12px}
.bk-card{border:1px solid var(--line,#e4e8ef);border-radius:10px;padding:14px;display:flex;flex-direction:column;gap:10px;min-width:0}
.bk-card h3{margin:0;font-size:15px}.bk-card h3 small{font-weight:400;color:var(--muted,#667085)}
.bk-card label{display:flex;flex-direction:column;gap:4px;font-size:13px;font-weight:600}.bk-card label small{font-weight:400;color:var(--muted,#667085)}
.bk-card .btn{align-self:flex-start}
.bk-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.bk-switch{flex-direction:row!important;align-items:center;gap:8px!important}
.bk-formats{border:0;padding:0;margin:0;display:flex;flex-wrap:wrap;gap:6px 16px}.bk-formats legend{font-size:13px;font-weight:600;margin-bottom:4px;padding:0}.bk-formats label{flex-direction:row;align-items:center;gap:6px;font-weight:400}
.bk-drive{display:flex;flex-direction:column;gap:10px}
.bk-copy{display:flex;gap:6px}.bk-copy input{flex:1;min-width:0;font-family:ui-monospace,Consolas,monospace;font-size:12px}
.bk-drive-actions{display:flex;flex-wrap:wrap;gap:8px}.bk-drive-actions form{margin:0}
.bk-steps{margin:0;padding-left:18px;font-size:13px;color:var(--muted,#475467);display:grid;gap:3px}
.bk-files{margin-top:12px}.bk-files table{width:100%;font-size:13px}.bk-files td:last-child{text-align:right}.bk-files form{margin:0}
@media (max-width:900px){.bk-status{grid-template-columns:1fr 1fr}.bk-status .bk-actions{grid-column:1/-1}.bk-grid{grid-template-columns:1fr}}
@media (max-width:520px){.bk-status{grid-template-columns:1fr}.bk-row{grid-template-columns:1fr}}
.bk-running{display:flex;gap:12px;align-items:center;padding:12px 14px;margin-bottom:12px;border-radius:10px;background:#eef4ff;border:1px solid #c9dafd;color:#1d3f8f}
.bk-running small{display:block;color:#3b5aa6;font-size:12px}
.bk-spin{width:18px;height:18px;border-radius:50%;border:2.5px solid #b9cdf7;border-top-color:#1f5fd1;animation:bkspin .8s linear infinite;flex:none}
@keyframes bkspin{to{transform:rotate(360deg)}}
.bk-link{font-size:12px;font-weight:600;margin-top:2px}
.bk-folder{align-self:flex-start}.bk-note{font-size:12px;color:var(--muted,#667085);margin-top:-4px}
.bk-drive input[type=file]{font-size:13px}
@media (prefers-color-scheme:dark){:root:not([data-theme=light]) .bk-running{background:#14213d;border-color:#26407a;color:#cfe0ff}:root:not([data-theme=light]) .bk-running small{color:#a9c2f5}}
:root[data-theme=dark] .bk-running{background:#14213d;border-color:#26407a;color:#cfe0ff}:root[data-theme=dark] .bk-running small{color:#a9c2f5}
