/* Product layout; Bootstrap 6 owns controls and responsive utilities. */
body { background:#f8fafc; color:#1e293b; min-height:100vh; display:flex; flex-direction:column; }
header { display:flex; justify-content:space-between; align-items:center; gap:1.25rem; flex-wrap:wrap; background:#fff; border-bottom:1px solid #dce3e5; padding:1.4rem max(1.5rem,calc((100vw - 1080px)/2)); }
.brand { text-decoration:none; font-weight:750; font-size:1.25rem; color:#172c35; }
.brand span { font-size:.75rem; border-left:1px solid #b8c6cc; margin-left:.6rem; padding-left:.6rem; }
main.container { max-width:1080px; margin:3rem auto; min-height:65vh; flex:1 0 auto; min-width:0; }
h1 { letter-spacing:-.04em; margin:.75rem 0 1.25rem; }
nav { margin-bottom:1.75rem; }
.muted { color:#52666e; }
.eyebrow { font-size:.75rem; letter-spacing:.12em; font-weight:700; color:#11685e; }
.workspace,main .card { background:#fff; padding:1.6rem; margin:1.5rem 0; border:1px solid #dce3e5; border-radius:.75rem; box-shadow:0 4px 6px rgb(15 23 42 / 4%); }
.actions,.heading { display:flex; align-items:center; gap:1rem; flex-wrap:wrap; }
.heading { justify-content:space-between; }
.narrow { max-width:600px; }
.form-panel { max-width:42rem; padding:2rem; background:#fff; border:1px solid #dce3e5; border-radius:.85rem; box-shadow:0 3px 16px rgb(23 44 53 / 4%); }
.form-panel h1 { font-size:2rem; }
.form-panel > p { max-width:60ch; line-height:1.6; }
.field-row { width:100%; max-width:26rem; margin-bottom:1.25rem; }
.field-row:has(input[name="username"]) { max-width:20rem; }
.field-row:has(select) { max-width:12rem; }
.field-row:has(textarea) { max-width:36rem; }
.field-row:has(input[name="code"]) { max-width:34rem; }
.field-row .form-control, #invitation-code { width:100%; min-height:2.75rem; padding:.6rem .8rem; font-size:1rem; border-radius:.5rem; }
.field-row select.form-control { padding-right:2.5rem; }
.field-row textarea.form-control { min-height:9rem; resize:vertical; }
.field-row .form-text { margin-top:.4rem; font-size:.875rem; line-height:1.5; color:#52666e; }
.field-row .form-text ul { margin:.5rem 0; padding-left:1.2rem; }
.field-row.form-field { display:flex; align-items:center; flex-wrap:wrap; gap:.6rem; min-height:2.75rem; }
.field-row.form-field label { margin:0; }
.form-panel .actions { margin-top:1.5rem; }
.form-panel [class*="btn-"] { min-height:2.75rem; }
.section-heading { margin-top:2.5rem; margin-bottom:1rem; font-size:1.5rem; }
#invitation-code { max-width:34rem; font-family:monospace; }
label { display:block; font-weight:600; margin-bottom:.4rem; }
.form-field label { display:inline; }
.errorlist { color:#a32424; }
.table-responsive { margin-top:1.5rem; }
footer { padding:1.5rem; text-align:center; font-size:.75rem; margin-top:auto; background:#0f172a; color:#cbd5e1; }
@media(max-width:600px) { main.container { margin-top:1.5rem; } header { padding:1rem; } .actions { gap:.6rem; } .form-panel { padding:1.25rem; } .form-panel h1 { font-size:1.65rem; } }

/* Clean shared shell, informed by the retained SafetySystemStudio portal reference. */
.portal-header { background:linear-gradient(135deg,#1e3a8a,#0f172a); border:0; box-shadow:0 4px 6px rgb(15 23 42 / 12%); }
.portal-header .brand,.portal-header a { color:#f1f5f9; }
.portal-header a:hover { color:#bae6fd; }
.portal-header .brand span { border-color:#94a3b8; }
.account-navigation { display:flex; align-items:center; flex-wrap:wrap; gap:.85rem; margin:0; }
.account-navigation button { color:#f1f5f9; border-color:#94a3b8; }
.account-navigation button:hover { color:#0f172a; background:#f1f5f9; }
.workspace-navigation { background:#fff; border:1px solid #dce3e5; border-radius:.75rem; padding:1rem 1.25rem; }
.workspace-context { display:flex; flex-wrap:wrap; align-items:baseline; gap:.5rem 1rem; overflow-wrap:anywhere; }
.portal-links { display:flex; flex-wrap:wrap; gap:.35rem; list-style:none; padding:0; margin:.85rem 0 0; }
.portal-links li { max-width:100%; }
.portal-links a { display:block; padding:.55rem .75rem; border-radius:.4rem; color:#1e3a8a; text-decoration:none; overflow-wrap:anywhere; }
.portal-links a:hover { background:#eff6ff; }
.portal-links a[aria-current="page"] { background:#1e3a8a; color:#fff; }
.portal-administration { border-top:1px solid #e2e8f0; padding-top:.6rem; font-size:.9rem; }
.skip-link { position:absolute; top:-8rem; left:1rem; z-index:10; background:#fff; color:#0f172a; padding:.75rem 1rem; border:2px solid #1e3a8a; border-radius:.4rem; }
.skip-link:focus { top:1rem; }
a:focus-visible,button:focus-visible { outline:3px solid #0284c7; outline-offset:3px; }
.portal-header a:focus-visible,.portal-header button:focus-visible { outline-color:#7dd3fc; }
@media(max-width:600px) { .portal-header .brand { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem; } .portal-header .brand span { margin-left:0; } .workspace-navigation { padding:1rem; } }

.dashboard-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,17rem),1fr)); gap:1rem; }
main .dashboard-card,main .dashboard-empty { margin:0; }
.dashboard-card { display:flex; flex-direction:column; align-items:flex-start; gap:1rem; }
.dashboard-card h3 { margin:0; font-size:1.2rem; }
.dashboard-card a { margin-top:auto; }
.dashboard-empty { grid-column:1 / -1; }
