/* Shared page structure, with optional theme palettes below. */
.container{width:min(calc(100% - 32px),960px);margin:0 auto;padding:18px 0 50px;min-width:0}
.tabs{display:flex;flex-wrap:wrap;gap:9px;margin-bottom:14px}
.tabs .btn{width:auto;flex:1 1 auto;min-width:88px;min-height:48px;padding:11px 12px;white-space:normal}
.card,.issue{overflow-wrap:anywhere}
.field{min-width:0}
.field input,.field textarea,.field select{min-width:0;max-width:100%;font-family:inherit;line-height:1.4}
.grid{grid-template-columns:repeat(2,minmax(0,1fr))}
#view>.card>.btn+.btn,#archiveResults>.btn+.btn{margin-top:12px}
.maintenance-queue-summary{color:var(--bad,#b91c1c);font-weight:700}
@media(max-width:600px){
  html[data-theme-style] .tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;overflow:visible;padding-bottom:0}
  html[data-theme-style] .tabs .btn{width:100%;min-width:0;height:100%;padding:11px 10px;white-space:normal;overflow-wrap:normal}
  .tabs .btn:last-child:nth-child(odd){grid-column:1/-1}
}
@media(max-width:360px){html[data-large-text="true"] .tabs .btn{font-size:1rem;padding-inline:6px}}
/* Issue timing and read receipts must pair text with their own background. */
.issue-age{margin:12px 0;padding:10px 12px;border-left:4px solid var(--hi,#bfdbfe);border-radius:6px;background:var(--subtle,#eff6ff);color:var(--subtle-fg,#1e3a8a)}
.issue-age.needs-update{background:#fef2f2;color:#7f1d1d;border-left-color:#b91c1c}
.issue-age-warning{display:block;margin-bottom:4px}
.issue-receipts{margin:12px 0;padding:12px;border-radius:10px;background:var(--raised,#f3f5f8);color:var(--fg,#25282c)}
html[data-theme-mode="dark"]:not([data-theme-style="classic"]) .issue-age.needs-update{background:#442329;color:#fee2e2;border-left-color:#f87171}
.issue-age .muted,.issue-receipts .muted,html[data-theme-style]:not([data-theme-style="classic"]) .issue-age .muted,html[data-theme-style]:not([data-theme-style="classic"]) .issue-receipts .muted{color:inherit}
.settings-title{margin:20px 0 14px}.settings-title h2,.settings-card h3{margin:0 0 8px}
.settings-card{margin:14px 0}.settings-card>p.muted{margin-top:3px}
.settings-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:14px}
.settings-choice{font:inherit;text-align:left;display:flex;flex-direction:column;gap:5px;min-width:0;padding:13px;background:#f8fafc;color:#1e293b;border:2px solid #cbd5e1;border-radius:13px;cursor:pointer}
.settings-choice.selected{border-color:#2563eb;box-shadow:0 0 0 1px #2563eb}
.settings-choice strong{font-size:15px}.settings-choice>span:not(.theme-preview){font-size:12px;color:#64748b}
.settings-choice .chosen{color:#2563eb}.theme-preview{display:flex;align-items:flex-end;gap:6px;height:58px;width:100%;padding:10px;background:#f5f3ef;border-radius:8px}
.theme-preview i{display:block;flex:1;height:27px;background:#fff;border-radius:5px}
.theme-preview i:nth-child(2){background:#155eef;height:20px}.theme-preview i:nth-child(3){background:#25282c;height:35px}
.theme-preview.basic{background:#e5eaf3}.theme-preview.basic i:nth-child(2){background:#2563eb}.theme-preview.basic i:nth-child(3){background:#fff;border:1px solid #cbd5e1}
.theme-preview.mechanical{background:#101b2b}.theme-preview.mechanical i{background:#20334b}.theme-preview.mechanical i:nth-child(2){background:#315784}.theme-preview.mechanical i:nth-child(3){background:#20334b;border:1px solid #40516a}
.settings-toggle{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 2px;border-bottom:1px solid #cbd5e1;cursor:pointer}
.settings-toggle:last-of-type{border-bottom:0}.settings-toggle>span{display:flex;flex-direction:column;gap:4px}
.settings-toggle strong{font-size:15px}.settings-toggle small{font-size:12px;line-height:1.4;color:#64748b}
.settings-toggle input{width:22px;height:22px;flex-shrink:0;accent-color:#2563eb}
.settings-actions{display:flex;flex-wrap:wrap;gap:10px}.settings-actions .btn{width:auto;flex:1;min-width:130px}
.settings-note{padding:4px 16px 28px}
@media(max-width:560px){.settings-choices{grid-template-columns:1fr}.theme-preview{height:42px}.settings-actions{flex-direction:column}}
/* Semantic palette for Basic and Mechanical, each in dark and light modes. */
html[data-theme-style="basic"][data-theme-mode="light"]{--bg:#f8fafc;--panel:#fff;--raised:#f1f5f9;--head:#eaf0f8;--fg:#0f172a;--muted:#475569;--border:#cbd5e1;--accent:#2563eb;--hover:#1d4ed8;--subtle:#dbeafe;--subtle-fg:#1e3a8a;--hi:#2563eb;--bad:#b91c1c}
html[data-theme-style="basic"][data-theme-mode="dark"]{--bg:#0f172a;--panel:#1e293b;--raised:#273449;--head:#111827;--fg:#f8fafc;--muted:#cbd5e1;--border:#475569;--accent:#2563eb;--hover:#3b82f6;--subtle:#304a70;--subtle-fg:#e0edff;--hi:#93c5fd;--bad:#fca5a5}
html[data-theme-style="mechanical"][data-theme-mode="dark"]{--bg:#101b2b;--panel:#20334b;--raised:#2a405c;--head:#111f32;--fg:#fff;--muted:#cbd5e1;--border:#40516a;--accent:#315784;--hover:#4074af;--subtle:#2a4463;--subtle-fg:#cde7ff;--hi:#93c5fd;--bad:#f87171}
html[data-theme-style="mechanical"][data-theme-mode="light"]{--bg:#eaf1f8;--panel:#fff;--raised:#e0eaf5;--head:#20334b;--fg:#1a2a3d;--muted:#405775;--border:#b5c8da;--accent:#315784;--hover:#26466b;--subtle:#d9e8f5;--subtle-fg:#214768;--hi:#315784;--bad:#b91c1c}
html[data-theme-style]:not([data-theme-style="classic"]) body{background:var(--bg);color:var(--fg);line-height:1.5;min-height:100vh}
html[data-theme-style="mechanical"] body{background-image:linear-gradient(#8fb0d009 1px,transparent 1px),linear-gradient(90deg,#8fb0d009 1px,transparent 1px);background-size:32px 32px}
html[data-theme-style]:not([data-theme-style="classic"]) header{background:var(--head);border-bottom:1px solid var(--border);box-shadow:0 2px 16px #0002}
html[data-theme-style="mechanical"] header{background:linear-gradient(115deg,#101b2b,#20334b)}
html[data-theme-style]:not([data-theme-style="classic"]) header h1{color:var(--hi);font-weight:900;letter-spacing:.03em}
html[data-theme-style]:not([data-theme-style="classic"]) header p{color:var(--muted)}
html[data-theme-style="mechanical"] header p{color:#b9cce1}
html[data-theme-style]:not([data-theme-style="classic"]) .container{width:min(calc(100% - 32px),1200px);margin:0 auto;padding:18px 0 50px}
html[data-theme-style]:not([data-theme-style="classic"]) .card{background:var(--panel);color:var(--fg);border:1px solid var(--border);box-shadow:0 7px 23px #0002;border-radius:16px;padding:20px}
html[data-theme-style="mechanical"] .card{border-top:2px solid var(--border)}
html[data-theme-style]:not([data-theme-style="classic"]) .issue{background:var(--raised);color:var(--fg);border:1px solid var(--border);padding:16px}
html[data-theme-style]:not([data-theme-style="classic"]) .btn{background:var(--accent);color:#fff;border:1px solid transparent}
html[data-theme-style]:not([data-theme-style="classic"]) .btn:hover{background:var(--hover)}
html[data-theme-style]:not([data-theme-style="classic"]) .btn.secondary{background:var(--subtle);color:var(--subtle-fg);border-color:var(--border);box-shadow:none}
html[data-theme-style]:not([data-theme-style="classic"]) .btn.secondary:hover{background:var(--raised)}
html[data-theme-style]:not([data-theme-style="classic"]) .btn.primary{background:var(--accent);color:#fff;border-color:var(--hover)}
html[data-theme-style]:not([data-theme-style="classic"]) .btn.danger{background:#9f2929;color:#fff}
html[data-theme-style]:not([data-theme-style="classic"]) .field input,html[data-theme-style]:not([data-theme-style="classic"]) .field textarea,html[data-theme-style]:not([data-theme-style="classic"]) .field select{background:var(--raised);color:var(--fg);border-color:var(--border)}
html[data-theme-style]:not([data-theme-style="classic"]) input::placeholder,html[data-theme-style]:not([data-theme-style="classic"]) textarea::placeholder{color:var(--muted)}
html[data-theme-style]:not([data-theme-style="classic"]) .muted,html[data-theme-style]:not([data-theme-style="classic"]) .small{color:var(--muted)}
html[data-theme-style]:not([data-theme-style="classic"]) .pill{background:var(--subtle);color:var(--subtle-fg);border:1px solid var(--border)}
html[data-theme-style]:not([data-theme-style="classic"]) .stat{color:var(--bad)}
html[data-theme-style]:not([data-theme-style="classic"]) a{color:var(--hi)}
html[data-theme-style]:not([data-theme-style="classic"]) .settings-choice{background:var(--raised);border-color:var(--border);color:var(--fg)}
html[data-theme-style]:not([data-theme-style="classic"]) .settings-choice.selected{border-color:var(--hi)}
html[data-theme-style]:not([data-theme-style="classic"]) .settings-choice .chosen{color:var(--hi)}
html[data-theme-style]:not([data-theme-style="classic"]) .settings-choice>span:not(.theme-preview),html[data-theme-style]:not([data-theme-style="classic"]) .settings-toggle small{color:var(--muted)}
html[data-theme-style]:not([data-theme-style="classic"]) .settings-toggle{border-color:var(--border)}
html[data-theme-style]:not([data-theme-style="classic"]) .settings-toggle input{accent-color:var(--accent)}
html[data-theme-style]:not([data-theme-style="classic"]) .btn:focus-visible,html[data-theme-style]:not([data-theme-style="classic"]) .settings-choice:focus-visible{outline:3px solid var(--hi);outline-offset:3px}
html[data-hide-profile-name="true"] .profile-card strong{display:none}
html[data-large-text="true"] .card,html[data-large-text="true"] .issue{font-size:1.12rem}
html[data-large-text="true"] .btn{font-size:1.08rem}
html[data-large-text="true"] .muted{font-size:.95rem}
@media(min-width:1100px){html[data-theme-style="mechanical"] .container{width:min(calc(100% - 60px),1360px)}}
@media(prefers-reduced-motion:reduce){.settings-choice{transition:none}}
/* In-app notification inbox and pop-up preferences. */
.notification-head{display:flex;justify-content:space-between;gap:18px;align-items:center;margin-bottom:16px}
.notification-head h2{margin:0 0 5px}.notification-head>div{min-width:0}
.notification-head-actions,.notification-row-actions{display:flex;flex-wrap:wrap;gap:8px;min-width:0;max-width:100%}
.notification-head-actions{flex-shrink:0}
.notification-head .btn,.notification-row .btn{width:auto;min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere}
.notification-head .btn:disabled{cursor:default}
.notification-row{display:flex;align-items:center;gap:14px;justify-content:space-between;padding:16px 12px;border-bottom:1px solid #d1d5db}
.notification-row.unread{border-left:4px solid #2563eb;background:#60a5fa12}
.notification-row-content{min-width:0;overflow-wrap:anywhere}.notification-row-content strong{display:block;margin-bottom:5px}
.notification-row-content small{display:block;margin-top:8px;font-size:12px;color:#64748b}
.notification-row-actions{flex-shrink:0}
.settings-notification-delivery{margin-top:20px}.settings-notification-delivery h4{margin:0 0 4px}
.settings-notification-delivery>.btn{width:auto;margin:12px 0}
.settings-notification-delivery .settings-actions{margin-top:14px}
.millfix-alert-toast{position:fixed;right:18px;bottom:18px;z-index:100;padding:18px 40px 16px 18px;background:#20334b;color:#fff;border:2px solid #93c5fd;border-radius:14px;box-shadow:0 10px 35px #0006;max-width:min(390px,calc(100vw - 30px))}
.millfix-alert-toast strong{display:block;margin-bottom:6px}.millfix-alert-toast p{margin:6px 0 12px}.millfix-alert-toast .btn{width:auto}
.millfix-toast-dismiss{position:absolute;right:8px;top:6px;padding:4px 9px;color:white;background:transparent;border:0;font-size:26px;cursor:pointer}
html[data-theme-style]:not([data-theme-style="classic"]) .notification-row{border-color:var(--border)}
html[data-theme-style]:not([data-theme-style="classic"]) .notification-row.unread{border-left-color:var(--hi)}
html[data-theme-style]:not([data-theme-style="classic"]) .notification-row-content small{color:var(--muted)}
@media(max-width:550px){.notification-head{align-items:stretch;flex-direction:column}.notification-head .btn{flex:1 1 130px}.notification-row{align-items:stretch;flex-direction:column}.notification-row .btn{align-self:flex-start}}

.millfix-push-settings{margin:14px 0 20px;padding:16px;border:1px solid #7999b8;border-radius:12px;background:#3157840b}
.millfix-push-settings h4{margin:0 0 8px}
.millfix-push-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:12px 0}
.millfix-push-choice{min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere}
.millfix-push-choice[aria-pressed="true"]{box-shadow:inset 0 0 0 2px currentColor}
.millfix-push-settings .settings-actions{margin:12px 0}
html[data-theme-style]:not([data-theme-style="classic"]) .millfix-push-settings{border-color:var(--border);background:var(--raised)}

