/* ============================================================
   Authority Records — Design System
   ============================================================ */
:root {
    --ar-navy:          #1e2d45;
    --ar-navy-dark:     #161f30;
    --ar-navy-hover:    #2a3f60;
    --ar-gold:          #c9a227;
    --ar-gold-light:    #f0c84a;
    --ar-bg:            #f0f2f5;
    --ar-surface:       #ffffff;
    --ar-surface-alt:   #f7f8fb;
    --ar-border:        #dee2e6;
    --ar-card-shadow:   0 1px 3px rgba(0,0,0,.10), 0 1px 2px rgba(0,0,0,.06);
    --ar-card-shadow-hover: 0 4px 12px rgba(0,0,0,.12), 0 2px 4px rgba(0,0,0,.08);
    --ar-shell-shadow:  0 18px 40px rgba(15, 23, 42, 0.08);
    --ar-sidebar-width: 240px;
    --ar-header-height: 52px;
    --ar-radius:        0.375rem;
    --ar-radius-lg:     1rem;
}

/* ── Base ───────────────────────────────────────────────────── */
html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--ar-bg);
    color: #212529;
}

.ar-auth-body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(201,162,39,.18), transparent 32%),
        linear-gradient(160deg, #162236 0%, #1c2e49 46%, #111a29 100%);
    color: #e8edf5;
}

.ar-auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.ar-auth-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.ar-auth-brand-icon-wrap {
    width: 3rem;
    height: 3rem;
    border-radius: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(201,162,39,.2), rgba(255,255,255,.08));
    border: 1px solid rgba(255,255,255,.12);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

.ar-auth-brand-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ar-navy);
}

.ar-auth-brand-sub {
    color: #748295;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.ar-auth-eyebrow {
    display: inline-block;
    color: #6f7c8d;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.ar-auth-card-panel {
    display: flex;
    width: 100%;
    justify-content: center;
}

.ar-auth-card {
    width: 100%;
    max-width: 30rem;
    margin: 0 auto;
    padding: 1.9rem;
    border-radius: 1.3rem;
    background: rgba(255,255,255,.96);
    color: #1f3047;
    border: 1px solid rgba(255,255,255,.35);
    box-shadow: 0 24px 60px rgba(10, 17, 29, 0.22);
    position: relative;
}

.ar-auth-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 1.25rem;
    right: 1.25rem;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(201,162,39,.95), rgba(201,162,39,.18));
}

.ar-auth-brand-card {
    margin-bottom: 1.35rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(30,45,69,.08);
}

.ar-auth-card-header {
    margin-bottom: 1.25rem;
}

.ar-auth-card-title {
    margin: 0.55rem 0 0.4rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--ar-navy);
}

.ar-auth-card-text {
    margin: 0;
    color: #5d6b7b;
    font-size: 0.92rem;
    line-height: 1.55;
}

.ar-auth-card-notice {
    margin-bottom: 1rem;
    color: #b42318;
    font-size: 0.83rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ar-auth-form .form-label {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #4b5a6a;
}

.ar-auth-form .form-control {
    border-radius: 0.85rem;
    border-color: rgba(30,45,69,.12);
    box-shadow: none;
}

.ar-auth-form .form-control::placeholder {
    color: #8a97a8;
}

.ar-auth-validation:empty {
    display: none;
}

.ar-auth-validation {
    margin-bottom: 1rem;
    padding: 0.8rem 0.95rem;
    border-radius: 0.9rem;
    border: 1px solid rgba(185,28,28,.14);
    background: rgba(185,28,28,.05);
    color: #9d1b1b;
    font-size: 0.88rem;
}

.ar-auth-validation ul {
    margin: 0;
    padding-left: 1.15rem;
}

.mugshot-thumb {
    width: 8rem;
    aspect-ratio: 1 / 1.15;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid rgba(30,45,69,.12);
    background: linear-gradient(180deg, rgba(247,248,251,.95), rgba(255,255,255,.98));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
}

.mugshot-thumb-compact {
    width: 3rem;
    aspect-ratio: 1 / 1;
    border-radius: 0.85rem;
}

.mugshot-thumb-image,
.mugshot-thumb-placeholder {
    width: 100%;
    height: 100%;
}

.mugshot-thumb-image {
    object-fit: cover;
    display: block;
}

.mugshot-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5e6b7c;
    background:
        radial-gradient(circle at top left, rgba(201,162,39,.18), transparent 35%),
        linear-gradient(180deg, rgba(241,244,248,.95), rgba(229,234,241,.95));
    font-size: 1.4rem;
}

.mugshot-thumb-compact .mugshot-thumb-placeholder {
    font-size: 1rem;
}

.mugshot-gallery-section .record-related-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.mugshot-section-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 700;
}

.mugshot-section-toggle i {
    color: #5f6f84;
}

.mugshot-header-chips {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.mugshot-upload-panel {
    padding: 1rem;
    border-radius: 1rem;
    border: 1px dashed rgba(30,45,69,.18);
    background: linear-gradient(180deg, rgba(247,248,251,.9), rgba(255,255,255,.98));
}

.mugshot-upload-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.mugshot-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.mugshot-card {
    border: 1px solid rgba(30,45,69,.1);
    border-radius: 1rem;
    background: #fff;
    overflow: hidden;
    box-shadow: var(--ar-card-shadow);
}

.mugshot-card-media {
    padding: 1rem 1rem 0;
}

.mugshot-card-media .mugshot-thumb {
    width: 100%;
}

.mugshot-card-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mugshot-card-top {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: flex-start;
}

.mugshot-card-title {
    display: block;
    font-size: 0.95rem;
    word-break: break-word;
}

.mugshot-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    color: #637286;
    font-size: 0.8rem;
}

.mugshot-card-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.mugshot-table-cell {
    width: 5rem;
}

a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.btn-close:focus-visible,
.nav-link:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible,
.form-check-input:focus-visible,
.page-link:focus-visible {
    outline: none;
    box-shadow: 0 0 0 0.16rem rgba(30,45,69,.18), 0 0 0 0.32rem rgba(201,162,39,.32);
}

/* ── Layout ─────────────────────────────────────────────────── */
.app-shell {
    display: flex;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

.sidebar {
    background: linear-gradient(180deg, #1b2940 0%, #142033 100%);
    width: var(--ar-sidebar-width);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    box-shadow: inset -1px 0 0 rgba(255,255,255,.04);
}

.sidebar-nav {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    flex-wrap: nowrap;
    align-content: flex-start;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
}

.sidebar-section {
    width: 100%;
}

.sidebar-section-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0.35rem 0.75rem 0.2rem;
    padding: 0.7rem 0.85rem;
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 0.85rem;
    background: rgba(255,255,255,.03);
    color: rgba(255,255,255,.68);
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-align: left;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}

.sidebar-section-toggle:hover {
    background: rgba(255,255,255,.05);
    color: rgba(255,255,255,.88);
    border-color: rgba(255,255,255,.1);
}

.sidebar-section-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 0.16rem rgba(30,45,69,.18), 0 0 0 0.32rem rgba(201,162,39,.28);
}

.sidebar-section-toggle[aria-expanded="true"] {
    background: rgba(201,162,39,.10);
    color: #fff;
    border-color: rgba(201,162,39,.22);
}

.sidebar-section-chevron {
    font-size: 0.8rem;
    transition: transform .15s ease;
}

.sidebar-section-toggle[aria-expanded="true"] .sidebar-section-chevron {
    transform: rotate(0deg);
}

.sidebar-section-toggle[aria-expanded="false"] .sidebar-section-chevron {
    transform: rotate(-90deg);
}

.sidebar-section-content {
    width: 100%;
    padding-bottom: 0.15rem;
}

.sidebar-section-content.collapsed {
    display: none;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 1rem 1rem 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,.1);
    margin-bottom: 0.5rem;
    text-decoration: none;
}

.sidebar-brand-icon-wrap {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(201,162,39,.22), rgba(255,255,255,.06));
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

.sidebar-brand-text {
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.2;
    letter-spacing: 0.01em;
}

.sidebar-brand-sub {
    display: block;
    color: rgba(255,255,255,.45);
    font-size: 0.68rem;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* Nav links */
.sidebar .nav-link {
    color: rgba(255,255,255,.65);
    padding: 0.45rem 1rem;
    border-radius: 0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.875rem;
    transition: background-color .15s ease, color .15s ease;
    border-left: 3px solid transparent;
    text-decoration: none;
}

.nav-link-label {
    flex: 1 1 auto;
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-label-short {
    display: none;
}

.sidebar .nav-link:hover {
    background-color: var(--ar-navy-hover);
    color: #fff;
}

.sidebar .nav-link.active {
    background-color: rgba(201,162,39,.12);
    color: #fff;
    border-left-color: var(--ar-gold);
    font-weight: 600;
}

.sidebar .nav-link i {
    font-size: 0.95rem;
    width: 1.1rem;
    text-align: center;
    flex-shrink: 0;
}

/* Section dividers */
.sidebar-section-label {
    padding: 1rem 1rem 0.25rem;
    color: rgba(255,255,255,.35);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.sidebar-footer {
    flex-shrink: 0;
    padding: 0.75rem 0;
    border-top: 1px solid rgba(255,255,255,.1);
    background: rgba(0,0,0,.08);
}

.sidebar-footer-label {
    padding: 0 1rem 0.35rem;
    color: rgba(255,255,255,.35);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ── Top Header ─────────────────────────────────────────────── */
.top-header {
    min-height: 68px;
    background-color: rgba(255,255,255,.92);
    border-bottom: 1px solid var(--ar-border);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    gap: 1rem;
    flex-shrink: 0;
    backdrop-filter: blur(12px);
}

/* Hamburger — visible on mobile only */
.hamburger-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    color: var(--ar-navy);
    font-size: 1.2rem;
    cursor: pointer;
    flex-shrink: 0;
    border-radius: var(--ar-radius);
    padding: 0;
}
.hamburger-btn:hover { background-color: #f0f2f5; }

.top-header-context {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    gap: 0.15rem;
    min-width: 0;
}

.top-header-context-label {
    color: #738194;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.top-header-context-name {
    font-weight: 700;
    font-size: 0.98rem;
    color: var(--ar-navy);
}

.top-header-user {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: #495057;
}

.top-header-agency {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 15rem;
}

.top-header-agency-label {
    color: #738194;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.top-header-agency-select {
    min-width: 15rem;
    border-color: var(--ar-border);
    box-shadow: none;
}

.top-header-agency-select:disabled {
    background-color: #eef1f5;
    color: #5f6b7a;
}

.top-header-agency-note {
    color: #6c757d;
    font-size: 0.7rem;
    text-align: right;
}

.top-header-user-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.1;
}

.top-header-user-name {
    font-weight: 600;
    color: #243447;
}

.top-header-user-role {
    font-size: 0.72rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.top-header-avatar {
    width: 38px;
    height: 38px;
    border-radius: 0.85rem;
    background: linear-gradient(180deg, var(--ar-navy), #243854);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 10px 18px rgba(30,45,69,.16);
}

.top-header-role-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    background: rgba(30,45,69,.08);
    color: var(--ar-navy);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.top-header-pwd-link {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1;
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.15s;
}
.top-header-pwd-link:hover {
    opacity: 1;
    color: var(--ar-navy);
}

.top-header-agency-banner {
    margin: 0;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
}

/* ── Content Area ───────────────────────────────────────────── */
.content-shell {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

.main-content {
    flex: 1;
    padding: 1.75rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* ── Cards ──────────────────────────────────────────────────── */
.card {
    box-shadow: var(--ar-card-shadow);
    border: 1px solid var(--ar-border);
    border-radius: 0.9rem;
}

.card-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

/* ── Page Headers ───────────────────────────────────────────── */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(30,45,69,.08);
}

.page-header-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--ar-navy);
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.page-header-sub {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.15rem;
    line-height: 1.35;
}

.record-breadcrumb {
    margin-bottom: 0.65rem !important;
}

.record-breadcrumb .breadcrumb {
    margin-bottom: 0;
    font-size: 0.8rem;
}

.dashboard-page-header {
    margin-bottom: 1.75rem;
}

.dashboard-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.45rem;
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    background: rgba(30,45,69,.08);
    color: var(--ar-navy);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-header-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 0.95rem;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(245,247,251,.95));
    border: 1px solid rgba(30,45,69,.08);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    color: var(--ar-navy);
    font-size: 0.8rem;
    font-weight: 700;
}

.dashboard-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
    gap: 1rem;
    padding: 1.4rem 1.5rem;
    background:
        radial-gradient(circle at top right, rgba(201,162,39,.16), transparent 28%),
        linear-gradient(180deg, rgba(255,255,255,.96), rgba(247,248,251,.98));
    border: 1px solid rgba(30,45,69,.08);
    border-radius: 1.25rem;
    box-shadow: var(--ar-shell-shadow);
}

.dashboard-hero-kicker {
    display: inline-block;
    margin-bottom: 0.6rem;
    color: var(--ar-gold);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.dashboard-hero h3 {
    margin: 0 0 0.6rem;
    color: #172235;
    font-size: 1.55rem;
    line-height: 1.25;
}

.dashboard-hero p {
    margin: 0;
    color: #58677a;
    max-width: 56rem;
}

.dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
}

.dashboard-metric-card {
    padding: 1rem;
    border-radius: 1rem;
    background: rgba(255,255,255,.85);
    border: 1px solid rgba(30,45,69,.08);
}

.dashboard-metric-card strong {
    display: block;
    margin: 0.25rem 0;
    color: var(--ar-navy);
    font-size: 1.5rem;
    line-height: 1;
}

.dashboard-metric-label,
.dashboard-metric-detail {
    display: block;
}

.dashboard-metric-label {
    color: #617184;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-metric-detail {
    color: #6c757d;
    font-size: 0.78rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.dashboard-grid-card,
.dashboard-section {
    background: var(--ar-surface);
    border: 1px solid rgba(30,45,69,.08);
    border-radius: 1rem;
    box-shadow: var(--ar-card-shadow);
}

.dashboard-grid-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease;
}

.dashboard-grid-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--ar-card-shadow-hover);
}

.dashboard-grid-card-body {
    display: flex;
    gap: 0.9rem;
    padding: 1.15rem;
    align-items: flex-start;
    flex: 1;
}

.dashboard-grid-card-body h5 {
    margin: 0 0 0.35rem;
    color: #1f3047;
    font-size: 1rem;
}

.dashboard-grid-card-body p {
    margin: 0;
    color: #607083;
    font-size: 0.86rem;
    line-height: 1.45;
}

.dashboard-grid-card-icon {
    width: 2.85rem;
    height: 2.85rem;
    border-radius: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.dashboard-grid-card-footer {
    display: flex;
    gap: 0.65rem;
    padding: 0 1.15rem 1.15rem;
}

.dashboard-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid rgba(30,45,69,.08);
}

.dashboard-section-kicker {
    margin-bottom: 0.25rem;
    color: #7b8794;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.dashboard-section-title {
    color: #1f3047;
}

.dashboard-section-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    border: none;
    background: transparent;
    padding: 0;
    color: inherit;
    font-size: inherit;
    font-weight: 700;
}

.dashboard-section-toggle i {
    color: #5a6b80;
}

.dashboard-section-meta {
    color: #7b8794;
    font-size: 0.8rem;
}

.dashboard-section-body {
    padding: 1.15rem 1.25rem 1.25rem;
}

.dashboard-table tbody tr:hover {
    background-color: rgba(30,45,69,.025);
}

.dashboard-map-toolbar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.dashboard-map-toolbar .form-select {
    width: auto;
    min-width: 10rem;
}

.dashboard-map-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.25rem;
    margin-bottom: 1rem;
}

.dashboard-map-places {
    margin-left: auto;
}

.dashboard-map-canvas {
    padding: 0.25rem;
    border-radius: 1rem;
    background: linear-gradient(180deg, rgba(30,45,69,.03), rgba(30,45,69,.06));
}

#home-activity-map {
    height: 420px;
    border-radius: 0.85rem;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.35);
}

.list-filter-card {
    border: 1px solid rgba(30,45,69,.08);
    overflow: hidden;
}

.list-filter-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1rem;
    cursor: pointer;
    background: linear-gradient(180deg, rgba(247,248,251,.95), rgba(255,255,255,.98));
    border-bottom: 1px solid rgba(30,45,69,.06);
}

.list-filter-card-title {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--ar-navy);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.list-filter-card-chevron {
    color: #6b7785;
    font-size: 0.8rem;
}

.list-filter-actions {
    margin-top: 0.9rem;
    display: flex;
    gap: 0.65rem;
}

.list-results-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid rgba(30,45,69,.08);
    border-radius: 0.9rem;
    background: linear-gradient(180deg, rgba(247,248,251,.95), rgba(255,255,255,.98));
    box-shadow: var(--ar-card-shadow);
}

.list-results-count {
    color: #1f3047;
    font-size: 0.88rem;
    font-weight: 600;
}

.list-results-flags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.list-summary-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    border: 1px solid rgba(24, 69, 123, .14);
    background: #edf4ff;
    color: #18457b;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.list-table-shell {
    background: var(--ar-surface);
    border: 1px solid rgba(30,45,69,.08);
    border-radius: 1rem;
    box-shadow: var(--ar-card-shadow);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
    scrollbar-width: thin;
}

.list-page-table {
    margin-bottom: 0;
    width: max-content;
    min-width: 100%;
}

.list-page-table tbody tr:hover {
    background-color: rgba(30,45,69,.025);
}

.table-responsive {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
}

.sortable-column-header-short {
    display: none;
}

.row-delete-button {
    width: 2rem;
    height: 2rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.65rem;
    border: 1px solid rgba(185, 28, 28, .14);
    background: rgba(185, 28, 28, .05);
    color: #b42318;
    transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.row-delete-button:hover {
    background: rgba(185, 28, 28, .1);
    border-color: rgba(185, 28, 28, .28);
    color: #912018;
    transform: translateY(-1px);
}

.row-delete-button:focus-visible {
    box-shadow: 0 0 0 0.2rem rgba(185, 28, 28, .16);
}

.admin-picklist-groups {
    display: grid;
    gap: 1rem;
}

.admin-picklist-group {
    background: var(--ar-surface);
    border: 1px solid rgba(30,45,69,.08);
    border-radius: 1rem;
    box-shadow: var(--ar-card-shadow);
    overflow: hidden;
}

.admin-picklist-group-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid rgba(30,45,69,.06);
    background: linear-gradient(180deg, rgba(247,248,251,.95), rgba(255,255,255,.98));
}

.admin-picklist-group-title-wrap {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
}

.admin-picklist-group-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(24, 69, 123, .08);
    color: #18457b;
    font-size: 1rem;
    flex-shrink: 0;
}

.admin-picklist-group-title {
    color: var(--ar-navy);
    font-size: 0.94rem;
    font-weight: 700;
}

.admin-picklist-group-sub {
    margin-top: 0.2rem;
    color: #667384;
    font-size: 0.82rem;
    max-width: 52rem;
}

.admin-picklist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.9rem;
    padding: 1rem 1.15rem 1.15rem;
}

.admin-picklist-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 100%;
    padding: 1rem;
    border-radius: 0.95rem;
    border: 1px solid rgba(30,45,69,.08);
    background: linear-gradient(180deg, rgba(247,248,251,.92), rgba(255,255,255,.98));
    color: inherit;
    text-decoration: none;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background-color .16s ease;
}

.admin-picklist-card:hover {
    transform: translateY(-1px);
    border-color: rgba(24, 69, 123, .16);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.admin-picklist-card-top,
.admin-picklist-card-meta {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.admin-picklist-card-title {
    color: var(--ar-navy);
    font-size: 0.92rem;
    font-weight: 700;
}

.admin-picklist-card-sub {
    color: #5f6c7b;
    font-size: 0.82rem;
    line-height: 1.45;
}

.admin-picklist-card-meta {
    margin-top: auto;
    flex-wrap: wrap;
}

.admin-picklist-card-meta code {
    padding: 0.15rem 0.4rem;
    border-radius: 0.45rem;
    background: rgba(30,45,69,.05);
    color: #20314a;
    font-size: 0.74rem;
}

.admin-picklist-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #18457b;
    font-size: 0.78rem;
    font-weight: 700;
}

.record-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    line-height: 1;
    white-space: nowrap;
}

.record-pill i {
    font-size: 0.78rem;
}

.record-pill-compact {
    padding-inline: 0.45rem;
    gap: 0.25rem;
    font-size: 0.66rem;
}

.record-pill-neutral {
    color: #465569;
    background: #eef2f7;
    border-color: rgba(70, 85, 105, .16);
}

.record-pill-primary {
    color: #18457b;
    background: #e8f1ff;
    border-color: rgba(24, 69, 123, .16);
}

.record-pill-success {
    color: #17603a;
    background: #e9f7ef;
    border-color: rgba(23, 96, 58, .16);
}

.record-pill-warning {
    color: #8a5300;
    background: #fff5df;
    border-color: rgba(138, 83, 0, .16);
}

.record-pill-danger {
    color: #9f1239;
    background: #fdf0f4;
    border-color: rgba(159, 18, 57, .16);
}

.record-page-header {
    margin-bottom: 0.9rem;
}

.record-header-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.record-header-thumb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.25rem;
}

.record-header-thumb .mugshot-thumb {
    width: 4.5rem;
    aspect-ratio: 1 / 1.08;
    border-radius: 1rem;
}

.record-toolbar {
    margin-bottom: 0.75rem;
}

.record-mode-banner {
    border: 1px solid rgba(217, 119, 6, .16);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
    flex-wrap: wrap;
    justify-content: flex-start;
}

.record-mode-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.record-action-bar {
    padding: 0.75rem 0.9rem;
    border: 1px solid rgba(30,45,69,.08);
    border-radius: 0.9rem;
    background: linear-gradient(180deg, rgba(247,248,251,.95), rgba(255,255,255,.98));
    box-shadow: var(--ar-card-shadow);
}

.record-action-bar .btn-outline-danger {
    background: rgba(185, 28, 28, .05);
    border-color: rgba(185, 28, 28, .16);
    color: #b42318;
}

.record-action-bar .btn-outline-danger:hover {
    background: rgba(185, 28, 28, .1);
    border-color: rgba(185, 28, 28, .28);
    color: #912018;
}

.record-content-card,
.record-form-card {
    border: 1px solid rgba(30,45,69,.08);
    box-shadow: var(--ar-card-shadow);
}

.record-content-card .card-body,
.record-form-card .card-body {
    padding: 1rem 1.05rem;
}

.record-section-title {
    margin: 0;
    color: #1f3047;
    font-size: 1.05rem;
    font-weight: 700;
}

.record-form-shell {
    max-width: 76rem;
}

.record-form-card + .record-form-card {
    margin-top: 0.25rem;
}

.record-form-header {
    margin-bottom: 0.8rem;
}

.record-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-top: 1rem;
    padding-top: 0.35rem;
}

.record-validation-summary {
    margin-bottom: 1rem;
    padding: 0.8rem 0.95rem;
    border: 1px solid rgba(185, 28, 28, .14);
    border-radius: 0.9rem;
    background: #fff5f5;
    color: #b42318;
}

.record-validation-summary ul {
    margin: 0;
    padding-left: 1.1rem;
}

.record-form-note {
    margin: -0.15rem 0 0.9rem;
    color: #6a7b90;
    font-size: 0.8rem;
    line-height: 1.45;
}

.record-grid-2,
.record-grid-3 {
    display: grid;
    gap: 0.9rem;
}

.record-field-span-2 {
    grid-column: span 2;
}

.record-field-span-full {
    grid-column: 1 / -1;
}

.record-content-card .card-title,
.record-form-card .card-title {
    margin-bottom: 0.8rem;
    color: #1f3047;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.record-content-card .form-label {
    margin-bottom: 0.35rem;
    color: #5f6f84;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.record-form-card .form-text,
.record-content-card .form-text {
    margin-top: 0.4rem;
    color: #6a7b90;
    font-size: 0.76rem;
    line-height: 1.4;
}

.validation-message {
    display: block;
    margin-top: 0.45rem;
    padding: 0.42rem 0.6rem;
    border: 1px solid rgba(185, 28, 28, .14);
    border-radius: 0.75rem;
    background: #fff5f5;
    color: #b42318;
    font-size: 0.76rem;
    font-weight: 600;
    line-height: 1.35;
}

.record-content-card .form-control-plaintext {
    min-height: 2.35rem;
    margin-bottom: 0;
    padding: 0.4rem 0.7rem;
    border: 1px solid rgba(30,45,69,.08);
    border-radius: 0.8rem;
    background: linear-gradient(180deg, rgba(247,248,251,.94), rgba(255,255,255,.98));
    color: #203047;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}

.record-content-card .form-control-plaintext.text-muted,
.record-content-card .text-muted.form-control-plaintext {
    color: #6a7b90 !important;
}

.record-reference-display {
    display: inline-flex;
    align-items: center;
    min-height: 2.35rem;
    padding: 0.4rem 0.7rem;
    border: 1px solid rgba(30,45,69,.08);
    border-radius: 0.8rem;
    background: linear-gradient(180deg, rgba(247,248,251,.94), rgba(255,255,255,.98));
    color: #203047;
    font-weight: 600;
}

.record-reference-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 600;
    color: #1a5fb4;
    text-decoration: none;
}

.record-reference-link:hover {
    color: #0e3a7a;
    text-decoration: underline;
}

.record-save-row {
    margin-top: 0.85rem;
    padding-top: 0.65rem;
    border-top: 1px solid rgba(30,45,69,.08);
    display: flex;
    justify-content: flex-start;
    gap: 0.5rem;
}

.record-link-picker {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.record-link-picker .form-select {
    max-width: 300px;
}

.record-summary-strip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid rgba(30,45,69,.08);
    border-radius: 0.9rem;
    background: linear-gradient(180deg, rgba(247,248,251,.95), rgba(255,255,255,.98));
    box-shadow: var(--ar-card-shadow);
}

.record-related-section {
    margin-bottom: 0.85rem;
    border: 1px solid rgba(30,45,69,.08);
    border-radius: 1rem;
    background: #fff;
    box-shadow: var(--ar-card-shadow);
    overflow: hidden;
}

.record-related-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(30,45,69,.08);
    background: linear-gradient(180deg, rgba(247,248,251,.92), rgba(255,255,255,.98));
}

.record-related-title {
    margin: 0;
    color: #1f3047;
    font-size: 1rem;
    font-weight: 700;
}

.record-related-body {
    padding: 0.85rem 1rem;
}

.record-related-body > .table:last-child {
    margin-bottom: 0;
}

.record-related-empty {
    margin: 0;
    color: #6a7b90;
}

.record-related-empty-state .empty-state {
    padding: 1.75rem 0.5rem;
}

.ar-modal-backdrop {
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(4px);
}

.ar-modal-content {
    border: 1px solid rgba(30,45,69,.08);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}

.ar-modal-content-danger {
    border-top: 4px solid #dc3545;
}

.ar-modal-content-warning {
    border-top: 4px solid #d97706;
}

.ar-modal-header {
    padding: 1rem 1rem 0.85rem;
    border-bottom: 1px solid rgba(30,45,69,.08);
    background: linear-gradient(180deg, rgba(247,248,251,.96), rgba(255,255,255,.99));
}

.ar-modal-title-wrap {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.ar-modal-icon {
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 0.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ar-modal-icon-danger {
    background: #fdecef;
    color: #b42318;
}

.ar-modal-icon-warning {
    background: #fff3df;
    color: #9a6700;
}

.ar-modal-subtitle {
    margin-top: 0.15rem;
    color: #6a7b90;
    font-size: 0.8rem;
}

.ar-modal-body {
    padding: 1rem;
    color: #314155;
}

.ar-modal-footer {
    padding: 0.85rem 1rem 1rem;
    border-top: 1px solid rgba(30,45,69,.08);
    background: rgba(247,248,251,.7);
}

@media (min-width: 768px) {
    .record-grid-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (min-width: 992px) {
    .record-grid-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* ── Tables ─────────────────────────────────────────────────── */
.table > :not(caption) > * > * {
    vertical-align: middle;
    font-size: 0.875rem;
}

.table thead th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6c757d;
    background-color: #f8f9fa;
    border-bottom-width: 1px;
    white-space: nowrap;
}

/* ── Buttons ────────────────────────────────────────────────── */
.action-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

/* ── Loading Spinner ────────────────────────────────────────── */
.loading-state {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 3rem 0;
    color: #6c757d;
    justify-content: center;
}

/* ── Empty State ────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.75rem;
    opacity: .4;
}

/* ── Scrollbar (sidebar) ────────────────────────────────────── */
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 2px; }

/* ── Shortcut Hints ─────────────────────────────────────────── */
kbd.shortcut-hint {
    display: inline-block;
    padding: 1px 5px;
    font-size: 0.65rem;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    background: rgba(0,0,0,.06);
    border: 1px solid rgba(0,0,0,.20);
    border-bottom-width: 2px;
    border-radius: 3px;
    color: #495057;
    margin-left: 4px;
    vertical-align: middle;
    line-height: 1.6;
    white-space: nowrap;
    user-select: none;
}

/* ── Shortcut Bar (floating bottom-right overlay) ───────────── */
.shortcut-bar {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.4rem;
}

.shortcut-bar-toggle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: var(--ar-navy);
    color: rgba(255,255,255,.75);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    box-shadow: 0 2px 8px rgba(0,0,0,.25);
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}

.shortcut-bar-toggle:hover {
    background-color: var(--ar-navy-hover);
    color: #fff;
}

.shortcut-bar--expanded .shortcut-bar-toggle {
    background-color: var(--ar-gold);
    color: #fff;
}

.shortcut-bar-panel {
    background-color: var(--ar-navy);
    border-radius: var(--ar-radius);
    box-shadow: 0 4px 16px rgba(0,0,0,.3);
    min-width: 220px;
    overflow: hidden;
}

.shortcut-bar-header {
    padding: 0.6rem 0.9rem;
    background-color: var(--ar-navy-dark);
    color: rgba(255,255,255,.85);
    font-size: 0.78rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.shortcut-bar-body {
    padding: 0.5rem 0;
}

.shortcut-bar-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.3rem 0.9rem;
    font-size: 0.8rem;
    color: rgba(255,255,255,.7);
}

.shortcut-bar-row kbd.shortcut-hint {
    background: rgba(255,255,255,.12);
    border-color: rgba(255,255,255,.25);
    border-bottom-color: rgba(255,255,255,.4);
    color: rgba(255,255,255,.9);
}

/* ── Mobile Responsive ──────────────────────────────────────── */
@media (max-width: 767.98px) {

    /* Hamburger visible on mobile */
    .hamburger-btn { display: flex; }

    /* Sidebar becomes a fixed off-canvas drawer */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        height: 100dvh;
        max-height: 100dvh;
        z-index: 1045;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        width: min(92vw, 20rem);
    }
    .sidebar.sidebar-open {
        transform: translateX(0);
    }
    /* Nav content scrolls inside the fixed drawer */
    .sidebar-nav {
        padding-bottom: 0.5rem;
    }

    .sidebar-footer {
        padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
    }

    /* Dark backdrop when sidebar is open */
    .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,.5);
        z-index: 1040;
    }

    /* Content fills full width since sidebar is no longer in flow */
    .content-shell {
        width: 100%;
    }

    /* Reduce header padding on mobile */
    .top-header {
        padding: 0 0.75rem;
        gap: 0.65rem;
    }

    .top-header-brand-copy,
    .top-header-user-copy,
    .top-header-role-pill {
        display: none;
    }

    .top-header-context-label {
        display: none;
    }

    .top-header-context-name {
        font-size: 0.86rem;
        line-height: 1.15;
    }

    .sidebar-brand {
        padding-right: 0.85rem;
    }

    .sidebar-brand-sub {
        display: none;
    }

    .sidebar-section-toggle {
        margin: 0.25rem 0.75rem 0.35rem;
        padding: 0.8rem 0.9rem;
        border: 1px solid rgba(255,255,255,.08);
        border-radius: 0.9rem;
        background: rgba(255,255,255,.04);
        color: rgba(255,255,255,.84);
        box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
    }

    .sidebar-section-toggle[aria-expanded="true"] {
        background: rgba(201,162,39,.14);
        border-color: rgba(201,162,39,.28);
        color: #fff;
    }

    .sidebar-section-content {
        padding-bottom: 0.2rem;
    }

    .sidebar .nav-link {
        padding: 0.65rem 1rem;
    }

    .nav-label-full {
        display: none;
    }

    .nav-label-short {
        display: inline;
    }

    .sidebar-section + .sidebar-section {
        margin-top: 0.1rem;
    }

    /* Page headers: stack title and action button on small screens */
    .page-header {
        flex-wrap: wrap;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .page-header > :last-child {
        width: 100%;
    }

    .page-header .btn,
    .page-header a.btn {
        width: 100%;
        justify-content: center;
    }

    /* Reduce page content padding */
    .main-content {
        padding: 1rem 0.75rem;
    }

    .page-header-sub {
        font-size: 0.74rem;
        line-height: 1.3;
    }

    .dashboard-hero {
        grid-template-columns: 1fr;
        padding: 1.1rem;
    }

    .dashboard-metrics,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-section-header,
    .dashboard-map-toolbar {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .dashboard-map-places {
        margin-left: 0;
    }

    .list-filter-card-header {
        padding: 0.8rem 0.9rem;
    }

    .list-table-shell {
        border-radius: 0.9rem;
    }

    .list-page-table {
        min-width: max(100%, 42rem);
    }

    .sortable-column-header-full {
        display: none;
    }

    .sortable-column-header-short {
        display: inline;
    }

    .list-filter-actions {
        flex-wrap: wrap;
    }

    .list-results-summary,
    .record-summary-strip,
    .record-related-header,
    .record-link-picker,
    .ar-modal-footer,
    .admin-picklist-group-header,
    .admin-picklist-card-top,
    .admin-picklist-card-meta {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .list-results-flags {
        width: 100%;
    }

    .record-header-meta,
    .record-form-actions {
        width: 100%;
    }

    .record-form-actions .btn,
    .record-form-actions a,
    .ar-modal-footer .btn,
    .record-link-picker .form-select,
    .record-link-picker .btn {
        width: 100%;
    }

    /* Ensure touch targets are at least 44px tall */
    .btn { min-height: 44px; }
    .nav-link { min-height: 44px; }

    /* Hide keyboard shortcut bar on mobile (hotkeys don't apply to touch) */
    .shortcut-bar { display: none; }

    /* Hide shortcut hint badges next to buttons */
    kbd.shortcut-hint { display: none; }
}

@media (min-width: 768px) {
    .sidebar-nav {
        padding-top: 0.35rem;
    }

    .sidebar-section-toggle {
        margin: 0.35rem 0.75rem 0.15rem;
        padding: 0.62rem 0.8rem;
        background: rgba(255,255,255,.025);
    }

    .sidebar-section + .sidebar-section {
        margin-top: 0.25rem;
    }

    .sidebar-section-content {
        padding-bottom: 0.35rem;
    }
}

@media (min-width: 768px) {
    /* Backdrop never shown on desktop */
    .sidebar-backdrop { display: none !important; }
}

@media (max-width: 991.98px) {
    .ar-auth-shell {
        padding: 1rem;
    }

    .ar-auth-card {
        padding: 1.45rem;
    }
}

@media (max-width: 1199.98px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

