/* Shared admin surfaces, based on the Excelsis administration. */
.admin-shell { --admin-bg:#edf2f5;--admin-surface:#fff;--admin-input:#f8fafc;--admin-text:#143246;--admin-muted:#607586;--admin-border:#cbd5e1;--admin-link:#14566d;background:var(--admin-bg);color:var(--admin-text);font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;grid-template-columns:240px minmax(0,1fr); }
[data-theme="dark"] .admin-shell { color-scheme:dark;--admin-bg:#071923;--admin-surface:#102b38;--admin-input:#0b202c;--admin-text:#e3edf3;--admin-muted:#a7bdca;--admin-border:#365260;--admin-link:#8bd0e6; }
.admin-shell .admin-main { min-width:0;padding:32px;max-width:1440px;width:100%;margin:0 auto; }
.admin-shell .admin-main>header { align-items:center;gap:20px;margin-bottom:26px; }
.admin-shell h1 { font:700 clamp(1.5rem,2.5vw,2rem)/1.25 system-ui,sans-serif;letter-spacing:-.03em; }
.admin-shell h2,.admin-shell .admin-section-title h2 { font:700 1.1rem/1.4 system-ui,sans-serif; }
.admin-shell .kicker { color:var(--admin-muted);font-size:.7rem;margin-bottom:6px; }
.admin-shell .admin-sidebar { background:linear-gradient(160deg,#143246,#071923);padding:26px 18px; }
.admin-shell .admin-sidebar img { height:48px;margin:0 10px; }
.admin-shell .admin-sidebar nav { margin-top:20px; }
.admin-shell .admin-sidebar nav p { color:#a7bdca;margin:20px 10px 6px;font-size:.65rem; }
.admin-shell .admin-sidebar nav a { font:500 .88rem/1.4 system-ui,sans-serif;padding:8px 10px;border-radius:8px; }
.admin-shell .admin-sidebar nav a:hover,.admin-shell .admin-sidebar a[aria-current] { background:#234b60;color:#fff; }
.admin-theme { display:flex;gap:5px;margin-top:24px;padding:4px;background:#071923;border:1px solid #365260;border-radius:10px; }
.admin-theme button { background:transparent;color:#c5d5df;border:0;border-radius:6px;padding:9px 8px;flex:1;font:600 .8rem system-ui;cursor:pointer; }
.admin-theme button[aria-pressed="true"] { background:#dceaf0;color:#143246; }
.admin-shell .admin-logout { padding:20px 10px 0;margin-top:0;color:#bed0db; }
.admin-shell .admin-table,.admin-shell .admin-editor>div,.admin-shell .admin-editor>aside,.admin-shell .admin-stats article,.admin-shell .admin-message-card { background:var(--admin-surface);border:1px solid var(--admin-border);border-radius:16px 6px 16px 6px;box-shadow:0 12px 35px #0719230a;padding:24px; }
.admin-shell .admin-editor { gap:22px;grid-template-columns:minmax(0,1fr) 340px;align-items:start; }
.admin-shell .admin-editor-section { border:1px solid var(--admin-border);border-radius:8px;padding:20px; }
.admin-shell .admin-editor-heading { border-color:var(--admin-border);margin-bottom:20px;padding-bottom:14px;align-items:start;gap:12px; }
.admin-shell .admin-editor-heading p,.admin-shell .admin-editor-heading span,.admin-shell label small,.admin-shell .admin-lead { color:var(--admin-muted); }
.admin-shell label { font-size:.84rem;line-height:1.5;font-weight:650;letter-spacing:0;text-transform:none; }
.admin-shell .admin-editor label { margin-bottom:18px; }
.admin-shell input:not([type="checkbox"]),.admin-shell textarea,.admin-shell select { background:var(--admin-input);color:var(--admin-text);border:1px solid var(--admin-border);border-radius:7px;padding:10px 12px;font:400 .92rem/1.5 system-ui,sans-serif;min-width:0;max-width:100%; }
.admin-shell input::placeholder,.admin-shell textarea::placeholder { color:var(--admin-muted); }
.admin-shell :is(input,textarea,select,button,a,summary):focus-visible { outline:3px solid #d7a849;outline-offset:3px; }
.admin-shell .admin-editor input[type="checkbox"] { display:inline-block;width:18px;height:18px;min-height:0;margin:0;accent-color:#14566d;flex-shrink:0; }
.admin-shell .admin-toggle { display:flex;align-items:center;gap:10px; }
.admin-shell .admin-toggle input { appearance:none;position:relative;width:40px!important;height:24px!important;background:var(--admin-border);border-radius:20px;padding:0;border:0;cursor:pointer; }
.admin-shell .admin-toggle input::before { content:"";position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:white;transition:transform .15s; }
.admin-shell .admin-toggle input:checked { background:#258765; }
.admin-shell .admin-toggle input:checked::before { transform:translateX(16px); }
.admin-shell :is(.admin-action,.admin-save,.admin-reply-action,button[type="submit"]) { align-items:center;justify-content:center;display:inline-flex;min-height:41px;background:linear-gradient(135deg,#14566d,#0b2b39);border:1px solid #14566d;border-radius:13px 4px 13px 4px;color:#fff;font:700 .85rem/1.2 system-ui,sans-serif;text-transform:none;letter-spacing:0;padding:11px 18px;cursor:pointer; }
.admin-shell :is(.admin-action,.admin-save,button[type="submit"]):hover { background:linear-gradient(135deg,#1c6f8b,#0f3a4d);box-shadow:0 8px 20px #14566d26; }
.admin-shell .admin-secondary,.admin-shell button.admin-delete,.admin-shell button.admin-message-delete { display:inline-flex;align-items:center;justify-content:center;min-height:41px;background:var(--admin-input);color:var(--admin-text);border:1px solid var(--admin-border);border-radius:13px 4px 13px 4px;padding:10px 16px;font-size:.84rem; }
.admin-shell button.admin-delete,.admin-shell button.admin-message-delete { color:#c64d59;border-color:#c64d59; }
.admin-shell .admin-table { overflow-x:auto; }
.admin-shell .admin-table th { background:var(--admin-input);color:var(--admin-muted);font-size:.7rem; }
.admin-shell .admin-table td,.admin-shell .admin-table th { border-color:var(--admin-border);padding:14px 12px; }
.admin-shell .admin-table td { font-size:.86rem; }
.admin-shell .admin-table td a { color:var(--admin-link);font-weight:650; }
.admin-shell .admin-stats span { font:700 2.2rem system-ui; }
.admin-shell .admin-stats p { color:var(--admin-muted); }
.admin-shell .admin-search,.admin-shell .admin-search-meta,.admin-shell .admin-message-row,.admin-shell .admin-message-card>footer,.admin-shell .admin-inventory>div { background:var(--admin-surface);color:var(--admin-text);border-color:var(--admin-border);border-radius:8px; }
.admin-shell .admin-search input { background:transparent;border:0; }
.admin-shell .admin-search-meta span,.admin-shell .admin-search-meta a { color:var(--admin-muted); }
.admin-shell .status { display:inline-block;border-radius:5px;font-size:.7rem;text-transform:none;background:var(--admin-input);color:var(--admin-muted); }
.admin-shell .status-published { background:#dcf3e8;color:#146347; }
.admin-publication { border:1px solid var(--admin-border);border-radius:8px;padding:12px;margin:0 0 18px;min-width:0; }
.admin-publication legend { font-size:.84rem;font-weight:650;padding:0 5px; }
.admin-shell .admin-publication label { margin:0; }
.admin-publication .admin-field-grid { gap:12px;grid-template-columns:repeat(2,minmax(0,1fr)); }
.admin-shell .admin-publication input,.admin-shell .admin-publication select { width:100%;height:44px;margin-top:6px; }
.admin-error { background:#fff1f2;color:#9f1239;border:1px solid #fda4af;padding:15px;border-radius:8px;margin-bottom:20px; }
.admin-menu-toggle { display:none; }
@media(max-width:1100px){.admin-shell .admin-editor{grid-template-columns:minmax(0,1fr)}.admin-shell .admin-main{padding:24px}.admin-shell .admin-editor>aside{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.admin-shell .admin-editor>aside>label{margin:0}.admin-shell .admin-editor>aside>.admin-toggle{grid-column:1/-1}}
@media(max-width:920px){.admin-shell{grid-template-columns:minmax(0,1fr)}.admin-shell .admin-sidebar{height:auto;position:static;padding:16px 22px}.admin-shell .admin-sidebar img{height:38px}.admin-menu-toggle{display:block;position:absolute;right:22px;top:18px;padding:9px 14px;background:#234b60;color:white;border:1px solid #365260;border-radius:6px}.admin-shell .admin-sidebar nav.is-open{display:block}.admin-theme{max-width:240px;margin-top:15px}.admin-shell .admin-logout{padding-top:12px}}
@media(max-width:620px){.admin-shell .admin-main{padding:20px 14px}.admin-shell .admin-main>header{align-items:start;flex-direction:column}.admin-shell .admin-editor>aside{display:block}.admin-shell .admin-editor>aside>label{margin-bottom:18px}.admin-shell .admin-editor>div,.admin-shell .admin-editor>aside{padding:16px}.admin-shell .admin-editor-section{padding:14px}.admin-shell .admin-editor-heading{display:block}}
.admin-field-hint { color:var(--admin-muted);font-size:.85rem;margin-bottom:18px; }

/* Compact contributor editor: bounded width, aligned controls and small remove action. */
.admin-shell .admin-contributors { max-width:680px; }
.admin-shell .admin-contributors .admin-editor-heading { margin-bottom:14px;padding-bottom:12px; }
.admin-contributor-row { display:grid;grid-template-columns:minmax(0,1fr) minmax(130px,180px) 34px;gap:10px;align-items:end;margin-bottom:12px;padding:12px;background:var(--admin-input);border:1px solid var(--admin-border);border-radius:8px; }
.admin-shell .admin-contributor-row label { margin:0;font-size:.78rem;min-width:0; }
.admin-shell .admin-contributor-row select { margin-top:5px;padding:8px;min-height:38px;font-size:.84rem;background:var(--admin-surface); }
.admin-shell .admin-contributor-row button { margin:0 0 2px;padding:0;width:34px;min-height:34px;border-radius:6px;font-size:1.35rem;line-height:1; }
.admin-shell .admin-contributors [data-add-contributor] { min-height:34px;padding:7px 12px;font-size:.8rem; }
@media(max-width:620px){.admin-contributor-row{grid-template-columns:minmax(0,1fr) 34px;gap:8px}.admin-contributor-row label{grid-column:1}.admin-shell .admin-contributor-row button{grid-column:2;grid-row:1/3;align-self:center}}

/* Numeric dimensions retain native validation without increment controls. */
.admin-shell .admin-physical-fields input[type="number"] { appearance:textfield;-moz-appearance:textfield; }
.admin-shell .admin-physical-fields input::-webkit-inner-spin-button,
.admin-shell .admin-physical-fields input::-webkit-outer-spin-button { -webkit-appearance:none;margin:0; }

/* Only the upper sidebar scrolls; account controls stay in view. */
.admin-shell .admin-sidebar { height:100vh;height:100dvh;padding:0;overflow:hidden;scrollbar-gutter:auto; }
.admin-sidebar-scroll { flex:1 1 auto;min-height:0;padding:26px 18px 16px;overflow-x:hidden;overflow-y:auto;overscroll-behavior-y:contain;scrollbar-width:thin;scrollbar-color:#a78d4d transparent; }
.admin-sidebar-footer { flex:0 0 auto;border-top:1px solid #365260;margin:0;padding:14px 18px 26px; }
.admin-sidebar-footer .admin-theme { margin-top:0; }
.admin-shell .admin-sidebar-footer .admin-logout { display:block;padding-top:14px; }
@media(max-width:920px){
 .admin-shell .admin-sidebar { position:sticky;top:0;z-index:30;height:auto;max-height:70vh;max-height:70dvh; }
 .admin-sidebar-scroll { max-height:calc(70vh - 140px);max-height:calc(70dvh - 140px);padding:16px 22px 12px; }
 .admin-sidebar-footer { display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0;padding:12px 22px 16px; }
 .admin-sidebar-footer .admin-theme { flex:1;max-width:200px; }
 .admin-shell .admin-sidebar-footer .admin-logout { padding:0; }
}

.admin-login-panel .admin-login-field select { width:100%;min-height:50px;padding:10px 12px;background:var(--paper);color:var(--ink);border:1px solid var(--line);border-radius:7px;font:400 .88rem/1.4 system-ui,sans-serif; }
.admin-login-panel .admin-login-field select:focus-visible { outline:3px solid #d7a849;outline-offset:2px; }
.admin-session-help { color:var(--muted);font-size:.73rem;line-height:1.5;margin:0 0 18px; }
