
:root {
    --bg: #f6f0ea;
    --surface: #ffffff;
    --surface-soft: #fcf8f4;
    --surface-alt: #f3ece6;
    --text: #24171b;
    --text-soft: #5f4951;
    --muted: #7f6a72;
    --border: rgba(120, 20, 40, 0.12);
    --border-strong: rgba(120, 20, 40, 0.18);
    --primary: #781428;
    --primary-hover: #651120;
    --primary-soft: rgba(120, 20, 40, 0.08);
    --success: #1f7a43;
    --success-bg: rgba(31, 122, 67, 0.1);
    --warning: #9a6a0a;
    --warning-bg: rgba(154, 106, 10, 0.12);
    --danger: #9f2331;
    --danger-bg: rgba(159, 35, 49, 0.1);
    --shadow: 0 18px 40px rgba(85, 57, 65, 0.08);
    --radius-xl: 26px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --heading-font: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
    --body-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(180deg, #fbf7f3 0%, #f5eee8 100%);
    color: var(--text);
    font-family: var(--body-font);
}

.site-chrome,
.utility-bar,
.page-frame,
.ambient-glow,
.site-grid,
.site-grain,
.frame-line { display: none !important; }

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover { color: var(--primary-hover); }

img { max-width: 100%; display: block; }
code {
    padding: 0.18rem 0.45rem;
    border-radius: 999px;
    background: #f7f1ec;
    border: 1px solid var(--border);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.86rem;
}

.page {
    min-height: calc(100vh - 88px);
}

.page-shell,
.topbar-inner,
.footer-inner {
    width: min(1240px, calc(100% - 48px));
    margin: 0 auto;
}

.page-shell {
    padding: 36px 0 48px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(251, 247, 243, 0.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(120, 20, 40, 0.08);
}

.topbar-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 88px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.brand-logo {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
}

.brand-logo img {
    display: block;
    width: 100%;
    height: auto;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.brand-copy strong {
    font-family: var(--heading-font);
    font-size: 1.15rem;
    line-height: 1;
    color: var(--text);
}

.brand-copy small,
.eyebrow,
.section-meta .eyebrow,
.table thead th,
.metric-card span,
label span,
.user-chip small,
.details dt,
.footer-inner small {
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.brand-copy small {
    color: var(--muted);
    font-size: 0.72rem;
}

.nav-shell {
    flex: 1;
    min-width: 0;
}

.nav,
.sidebar-nav {
    display: flex;
    gap: 8px;
}

.nav {
    align-items: center;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.nav::-webkit-scrollbar { display: none; }

.nav a,
.sidebar-nav a,
.sidebar-public-link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    color: var(--text-soft);
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid transparent;
}

.nav a:hover,
.sidebar-nav a:hover,
.sidebar-public-link:hover {
    background: var(--primary-soft);
    color: var(--primary);
}

.nav a.active,
.sidebar-nav a.active {
    background: var(--primary-soft);
    color: var(--primary);
    border-color: rgba(120, 20, 40, 0.14);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.user-chip {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 14px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.72);
}

.user-chip strong {
    font-size: 0.95rem;
    line-height: 1.2;
}

.user-chip small {
    color: var(--muted);
    font-size: 0.68rem;
}

.inline-form { margin: 0; }

button,
.button,
.ghost-button {
    appearance: none;
    border: 0;
    cursor: pointer;
    font: inherit;
    text-decoration: none;
}

button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, #8a1730 0%, #781428 100%);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 10px 24px rgba(120, 20, 40, 0.16);
}

button:hover,
.button:hover { background: linear-gradient(135deg, #7d162d 0%, #651120 100%); color: #fff; }

.button.secondary,
.ghost-button {
    background: #fff;
    color: var(--text);
    border: 1px solid var(--border);
    box-shadow: none;
}

.button.secondary:hover,
.ghost-button:hover {
    background: var(--surface-soft);
    color: var(--primary);
}

.nav-toggle {
    display: none;
    width: 46px;
    height: 46px;
    padding: 0;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: none;
    position: relative;
    flex-shrink: 0;
}

.nav-toggle span {
    position: absolute;
    left: 12px;
    right: 12px;
    height: 2px;
    background: var(--primary);
    border-radius: 999px;
}

.nav-toggle span:nth-child(1) { top: 15px; }
.nav-toggle span:nth-child(2) { top: 22px; }
.nav-toggle span:nth-child(3) { top: 29px; }

.flash {
    margin-bottom: 20px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: #fff;
}
.flash-success { border-color: rgba(31, 122, 67, 0.18); background: #f4fbf7; color: var(--success); }
.flash-error { border-color: rgba(159, 35, 49, 0.18); background: #fdf4f5; color: var(--danger); }

.card,
.hero,
.auth-card {
    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(120, 20, 40, 0.1);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}

.card,
.form-card,
.hero,
.auth-card {
    padding: 28px;
}

.card-highlight {
    background: linear-gradient(180deg, #ffffff 0%, #fcf8f4 100%);
}

.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.page-heading h1,
.hero h1,
.auth-card h1,
.section-meta h2 {
    margin: 0;
    font-family: var(--heading-font);
    line-height: 1.04;
    color: var(--text);
}

.page-heading h1,
.hero h1,
.auth-card h1 { font-size: clamp(2rem, 4vw, 3rem); }
.section-meta h2 { font-size: 1.45rem; }

.page-heading p,
.hero p,
.section-meta + p,
.card > p,
.muted {
    color: var(--text-soft);
}

.eyebrow {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
}

.hero,
.hero-v2 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    margin-bottom: 24px;
}

.hero-copy,
.hero-panel { min-width: 0; }
.hero-panel {
    padding: 22px;
    border-radius: 22px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
}
.hero-panel strong { display: block; font-size: 1.75rem; margin-bottom: 4px; }
.hero-panel small,
.panel-kicker { color: var(--muted); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.12em; }
.panel-list { margin: 10px 0 0; padding-left: 18px; color: var(--text-soft); }
.hero-actions,
.toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.signal-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}
.signal-pill {
    padding: 10px 14px;
    border-radius: 999px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    color: var(--text-soft);
    font-size: 0.95rem;
}
.signal-pill strong { color: var(--text); }

.metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin: 24px 0;
}
.metric-card {
    padding: 22px;
    border-radius: 22px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.94);
    box-shadow: var(--shadow);
}
.metric-card strong {
    display: block;
    margin: 10px 0 4px;
    font-size: 2rem;
    line-height: 1;
    color: var(--text);
}
.metric-card span {
    display: inline-block;
    font-size: 0.72rem;
    color: var(--muted);
    font-weight: 700;
}
.metric-card small { color: var(--text-soft); }
.metric-card-accent {
    background: linear-gradient(135deg, #8d1830 0%, #781428 100%);
    color: #fff;
    border-color: transparent;
}
.metric-card-accent span,
.metric-card-accent small,
.metric-card-accent strong { color: #fff; }

.grid {
    display: grid;
    gap: 20px;
}
.grid.two-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.two-cols-strong { grid-template-columns: 1.4fr 1fr; }
.grid.two-cols-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stack { display: grid; gap: 20px; }

.section-meta { margin-bottom: 18px; }
.section-meta .eyebrow { margin-bottom: 8px; }

.quick-links,
.quick-links-rich {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.quick-links a,
.quick-links-rich a {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: var(--surface-soft);
    min-width: 0;
}

.quick-links a span,
.quick-links-rich a span {
    font-weight: 700;
    color: var(--text);
}

.quick-links a small,
.quick-links-rich a small {
    color: var(--text-soft);
    font-size: 0.88rem;
    line-height: 1.4;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.status-box {
    padding: 16px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: var(--surface-soft);
}

.status-box strong {
    display: block;
    margin-top: 12px;
    font-size: 1.8rem;
}

.details {
    display: grid;
    gap: 12px;
    margin: 0;
}

.details > div {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(120, 20, 40, 0.08);
}

.details dt,
.details dd { margin: 0; }
.details dt { color: var(--muted); font-size: 0.72rem; font-weight: 700; }
.details dd { color: var(--text); }

label {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
}

label span {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    padding: 14px 15px;
    border-radius: 14px;
    border: 1px solid rgba(120, 20, 40, 0.14);
    background: #fff;
    color: var(--text);
    font: inherit;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(120, 20, 40, 0.4);
    box-shadow: 0 0 0 4px rgba(120, 20, 40, 0.08);
}

textarea { resize: vertical; }


.locked-prefix-field {
    display: flex;
    align-items: stretch;
    width: 100%;
    border: 1px solid rgba(120, 20, 40, 0.14);
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}

.locked-prefix-field:focus-within {
    border-color: rgba(120, 20, 40, 0.4);
    box-shadow: 0 0 0 4px rgba(120, 20, 40, 0.08);
}

.locked-prefix-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 16px;
    border-right: 1px solid rgba(120, 20, 40, 0.12);
    background: #f8f1ec;
    color: var(--primary);
    font-weight: 800;
    letter-spacing: 0.08em;
}

.locked-prefix-field input {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding-left: 14px;
    background: transparent;
}

.locked-prefix-field input:focus {
    border-color: transparent;
    box-shadow: none;
}

.checkbox {
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 12px;
}

.checkbox input {
    width: 18px;
    height: 18px;
    margin: 0;
}

.form-card.no-border {
    border: 0;
    box-shadow: none;
    padding: 0;
    background: transparent;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead th {
    padding: 0 0 12px;
    border-bottom: 1px solid rgba(120, 20, 40, 0.1);
    color: var(--muted);
    font-size: 0.72rem;
    text-align: left;
    font-weight: 700;
}

.table tbody td {
    padding: 14px 0;
    border-bottom: 1px solid rgba(120, 20, 40, 0.08);
    vertical-align: top;
}

.table tbody tr:last-child td { border-bottom: 0; }

.table-secondary tbody td { padding: 11px 0; }

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    border: 1px solid transparent;
}

.badge-in_stock,
.badge-recovered,
.badge-contacted,
.badge-closed { background: rgba(31, 122, 67, 0.1); color: var(--success); border-color: rgba(31, 122, 67, 0.14); }
.badge-assigned,
.badge-new,
.badge-open,
.badge-in_progress { background: rgba(24, 94, 181, 0.1); color: #185eb5; border-color: rgba(24, 94, 181, 0.14); }
.badge-reserved,
.badge-maintenance { background: rgba(154, 106, 10, 0.12); color: var(--warning); border-color: rgba(154, 106, 10, 0.16); }
.badge-lost,
.badge-stolen { background: rgba(159, 35, 49, 0.1); color: var(--danger); border-color: rgba(159, 35, 49, 0.14); }

.note-box {
    margin-top: 18px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: var(--surface-soft);
}
.note-box strong { display: block; margin-bottom: 6px; }
.note-box.success { background: #f4fbf7; border-color: rgba(31, 122, 67, 0.18); }
.note-box.danger { background: #fdf4f5; border-color: rgba(159, 35, 49, 0.18); }

.scan-widget,
.label-preview,
.json-preview {
    margin-top: 18px;
    padding: 18px;
    border-radius: 20px;
    border: 1px dashed rgba(120, 20, 40, 0.18);
    background: #fff;
}
.scan-video {
    width: 100%;
    max-width: 440px;
    border-radius: 16px;
    margin-bottom: 12px;
    background: #000;
}

.pre-line { white-space: pre-line; }

.empty-state {
    padding: 28px;
    border-radius: 20px;
    border: 1px dashed var(--border-strong);
    background: var(--surface-soft);
    color: var(--text-soft);
}

.footer {
    padding: 0 0 28px;
}
.footer-inner {
    color: var(--muted);
    text-align: center;
}

.auth-card,
.auth-card-v2 {
    max-width: 980px;
    margin: 40px auto 0;
}
.auth-grid { align-items: stretch; }
.showcase-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(180deg, #ffffff 0%, #fcf8f4 100%);
}

.admin-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 22px;
    background: rgba(255,255,255,0.72);
    backdrop-filter: blur(16px);
    border-right: 1px solid rgba(120, 20, 40, 0.08);
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.brand-sidebar .brand-mark {
    width: 42px;
    height: 42px;
}

.sidebar-nav {
    flex-direction: column;
    gap: 4px;
}

.sidebar-nav a,
.sidebar-public-link {
    width: 100%;
    justify-content: flex-start;
    min-height: 42px;
    border-radius: 14px;
}

.sidebar-footer {
    margin-top: auto;
    display: grid;
    gap: 12px;
}

.sidebar-logout .ghost-button { width: 100%; }

.admin-page {
    min-width: 0;
}

.admin-mobile-bar { display: none; }

@media (max-width: 1180px) {
    .grid.two-cols,
    .grid.two-cols-strong,
    .hero,
    .hero-v2,
    .metrics,
    .quick-links,
    .quick-links-rich {
        grid-template-columns: 1fr 1fr;
    }
    .page-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 1024px) {
    .admin-shell { grid-template-columns: 1fr; }
    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(320px, 88vw);
        transform: translateX(-105%);
        transition: transform 180ms ease;
        z-index: 90;
        box-shadow: 0 20px 50px rgba(0,0,0,0.16);
    }
    body.nav-open .sidebar { transform: translateX(0); }
    .admin-mobile-bar {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 18px 0 0;
    }
    .brand-mobile .brand-copy strong { font-size: 1rem; }
    .brand-mobile .brand-logo { width: 32px; flex-basis: 32px; }
    .nav-toggle { display: inline-flex; }
    .topbar-inner { flex-wrap: wrap; }
    .nav-shell { order: 3; width: 100%; display: none; }
    body.nav-open .topbar .nav-shell { display: block; }
    .topbar .nav { padding-top: 8px; }
}

@media (max-width: 820px) {
    .page-shell,
    .topbar-inner,
    .footer-inner { width: min(100% - 28px, 1240px); }
    .grid.two-cols,
    .grid.two-cols-strong,
    .grid.two-cols-form,
    .hero,
    .hero-v2,
    .metrics,
    .quick-links,
    .quick-links-rich,
    .status-grid {
        grid-template-columns: 1fr;
    }
    .details > div { grid-template-columns: 1fr; gap: 6px; }
    .card,
    .form-card,
    .hero,
    .auth-card { padding: 22px; }
    .topbar-actions { width: 100%; justify-content: flex-start; }
    .user-chip { max-width: 100%; }
}

/* V8 modal forms + incident workflow cleanup */
body.modal-open {
    overflow: hidden;
}

.page-heading-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.table-card {
    overflow-x: auto;
}

.list-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.list-toolbar h2 {
    margin: 0 0 6px;
}

.toolbar-form {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.toolbar-form label {
    min-width: 220px;
    margin-bottom: 0;
}

.table thead th,
.table tbody td {
    padding-right: 18px;
}

.table thead th:last-child,
.table tbody td:last-child {
    padding-right: 0;
}

.table tbody td {
    word-break: break-word;
}

.metrics-compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 20px;
}

.metrics-compact .metric-card {
    padding: 18px 20px;
}

.record-list {
    display: grid;
    gap: 16px;
}

.record-card {
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.9);
}

.record-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.record-card__head h3 {
    margin: 4px 0 0;
    font-size: 1.18rem;
    line-height: 1.25;
}

.record-statuses {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.record-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.record-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.record-grid > div {
    padding: 14px;
    border-radius: 16px;
    background: var(--surface-soft);
    border: 1px solid rgba(120, 20, 40, 0.08);
}

.record-grid strong {
    display: block;
    margin-top: 4px;
    font-size: 1rem;
    line-height: 1.35;
}

.record-note {
    margin: 0 0 16px;
    color: var(--text-soft);
    line-height: 1.55;
}

.record-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.record-inline-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
}

.record-inline-form input {
    flex: 1 1 300px;
    max-width: 360px;
}

.stack-sm {
    display: grid;
    gap: 6px;
}

.incident-description {
    white-space: pre-line;
}

.badge-damage,
.badge-retired {
    background: rgba(159, 35, 49, 0.1);
    color: var(--danger);
    border-color: rgba(159, 35, 49, 0.14);
}

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(33, 20, 24, 0.28);
    backdrop-filter: blur(8px);
}

.modal-overlay[hidden] {
    display: none !important;
}

.modal-card {
    width: min(760px, 100%);
    max-height: calc(100vh - 48px);
    overflow: auto;
    background: #fff;
    border: 1px solid rgba(120, 20, 40, 0.14);
    border-radius: 28px;
    box-shadow: 0 30px 80px rgba(48, 25, 32, 0.18);
}

.modal-card-wide {
    width: min(960px, 100%);
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 24px 0;
}

.modal-header h2 {
    margin: 4px 0 0;
    font-family: var(--heading-font);
    font-size: clamp(1.7rem, 3vw, 2.35rem);
    line-height: 1.1;
}

.modal-body {
    padding: 24px;
}

.modal-form {
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.modal-close {
    width: 42px;
    height: 42px;
    min-height: 42px;
    padding: 0;
    border-radius: 14px;
    background: var(--surface-soft);
    color: var(--primary);
    border: 1px solid var(--border);
    box-shadow: none;
}

.modal-close:hover {
    background: var(--primary-soft);
    color: var(--primary);
}

.modal-footer-hint {
    margin-top: 12px;
}

@media (max-width: 1180px) {
    .metrics-compact,
    .record-grid,
    .record-grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .page-heading-actions {
        width: 100%;
    }

    .list-toolbar,
    .record-card__head,
    .record-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .metrics-compact,
    .record-grid,
    .record-grid-3 {
        grid-template-columns: 1fr;
    }

    .record-inline-form {
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar-form {
        width: 100%;
    }

    .toolbar-form label,
    .record-inline-form input {
        min-width: 0;
        max-width: none;
        width: 100%;
    }

    .modal-overlay {
        padding: 14px;
    }

    .modal-header {
        padding: 20px 20px 0;
    }

    .modal-body {
        padding: 20px;
    }
}


.brand-sidebar .brand-logo { width: 46px; flex-basis: 46px; }
.brand-mobile .brand-logo { width: 34px; flex-basis: 34px; }
.topbar .brand-logo { width: 40px; flex-basis: 40px; }
.login-brand-lockup { margin-bottom: 18px; }
.login-brand-logo { display: block; width: 78px; height: auto; }

/* V11 employee page cleanup */
.employee-shell {
    display: grid;
    gap: 28px;
}

.employee-overview {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.9fr);
    gap: 24px;
    align-items: start;
}

.employee-panel {
    padding: 28px;
}

.employee-copy {
    margin: 0 0 18px;
    max-width: 58ch;
    color: var(--text-soft);
    line-height: 1.6;
}

.employee-assets-panel,
.employee-help-panel,
.employee-history-card {
    overflow: hidden;
}

.employee-asset-list,
.employee-incident-list {
    display: grid;
    gap: 16px;
}

.employee-asset-card,
.employee-incident-card {
    padding: 20px;
    border-radius: 18px;
    border: 1px solid rgba(120, 20, 40, 0.10);
    background: linear-gradient(180deg, #ffffff 0%, #fcf8f4 100%);
}

.employee-asset-head,
.employee-incident-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.employee-kicker {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.employee-asset-head h3,
.employee-incident-head h3 {
    margin: 0;
    font-size: 1.14rem;
    line-height: 1.4;
    color: var(--text);
}

.employee-asset-head code {
    flex: 0 0 auto;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.employee-asset-meta,
.employee-incident-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.employee-meta-box {
    padding: 14px;
    border-radius: 16px;
    background: var(--surface-soft);
    border: 1px solid rgba(120, 20, 40, 0.08);
    min-width: 0;
}

.employee-meta-label {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.employee-meta-box strong {
    display: block;
    color: var(--text);
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.employee-help-panel .signal-row {
    margin: 0 0 18px;
}

.employee-action-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.employee-incident-desc {
    margin: 16px 0 0;
    color: var(--text-soft);
    line-height: 1.65;
    white-space: pre-line;
}

@media (max-width: 1100px) {
    .employee-overview {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .employee-panel {
        padding: 22px;
    }

    .employee-asset-head,
    .employee-incident-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .employee-asset-meta,
    .employee-incident-meta {
        grid-template-columns: 1fr;
    }

    .employee-action-row button {
        width: 100%;
    }
}
