html {
    font-size: 14px;
}

body {
    background: #f5f7fa;
    color: #1f2937;
    margin: 0;
}

/* =========================================================
   SIDEBAR
   ========================================================= */

.sidebar {
    background: #0f172a;
    bottom: 0;
    color: #f8fafc;
    left: 0;
    overflow-x: hidden;
    overflow-y: auto;
    position: fixed;
    top: 0;
    width: 260px;
    z-index: 1000;
}

.brand {
    align-items: center;
    border-bottom: 1px solid #1e293b;
    color: #fff;
    display: flex;
    font-size: 15px;
    font-weight: 700;
    gap: 11px;
    min-height: 70px;
    padding: 0 18px;
    text-decoration: none;
}

.brand:hover {
    color: #fff;
    text-decoration: none;
}

.brand-mark {
    align-items: center;
    background: #22c55e;
    border-radius: 8px;
    color: #052e16;
    display: inline-flex;
    flex: 0 0 36px;
    font-size: 13px;
    font-weight: 800;
    height: 36px;
    justify-content: center;
    width: 36px;
}

.nav-list {
    display: block;
    padding: 14px 10px 28px;
}

.nav-list > a {
    align-items: center;
    border-left: 3px solid transparent;
    border-radius: 7px;
    color: #e2e8f0;
    display: flex;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 4px;
    min-height: 38px;
    padding: 8px 11px;
    text-decoration: none;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
    width: 100%;
}

.nav-list > a:hover {
    background: #1e293b;
    color: #fff;
    text-decoration: none;
}

.nav-section {
    border-top: 1px solid #1e293b;
    display: block;
    margin-top: 14px;
    padding-top: 14px;
    width: 100%;
}

.nav-section-title {
    color: #64748b;
    display: block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.09em;
    margin-bottom: 6px;
    padding: 0 11px;
    text-transform: uppercase;
    width: 100%;
}

.nav-section > a {
    align-items: center;
    border-left: 3px solid transparent;
    border-radius: 6px;
    color: #cbd5e1;
    display: flex;
    font-size: 13px;
    margin-bottom: 2px;
    min-height: 36px;
    padding: 7px 11px;
    text-decoration: none;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
    width: 100%;
}

.nav-section > a:hover {
    background: #1e293b;
    border-left-color: #475569;
    color: #fff;
    text-decoration: none;
}

/* Active page */

.nav-list > a.nav-active,
.nav-section > a.nav-active {
    background: #1e293b;
    border-left-color: #22c55e;
    color: #fff;
    font-weight: 600;
}

.nav-list > a.nav-active:hover,
.nav-section > a.nav-active:hover {
    background: #1e293b;
    border-left-color: #22c55e;
    color: #fff;
}

/* =========================================================
   APPLICATION SHELL
   ========================================================= */

.app-shell {
    min-height: 100vh;
}

.app-shell.with-sidebar {
    margin-left: 260px;
    min-height: 100vh;
}

/* =========================================================
   TOP BAR
   ========================================================= */

.topbar {
    align-items: center;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    min-height: 70px;
    padding: 0 28px;
}

.topbar-page {
    align-items: baseline;
    display: flex;
    min-width: 0;
}

.topbar-page > strong {
    color: #0f172a;
    font-size: 15px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-page > span {
    color: #94a3b8;
    font-size: 12px;
    margin-left: 12px;
    white-space: nowrap;
}

.topbar-account {
    align-items: center;
    display: flex;
    flex-shrink: 0;
    gap: 18px;
    margin-left: 24px;
}

.topbar-account-info {
    align-items: flex-end;
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    min-width: 0;
    text-align: right;
}

.topbar-account-info > strong {
    color: #0f172a;
    font-size: 13px;
    font-weight: 700;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-account-context {
    align-items: center;
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
    min-width: 0;
}

.topbar-account-context > span {
    color: #64748b;
    font-size: 11px;
    margin: 0;
    white-space: nowrap;
}

.topbar-account-context > .topbar-context-separator {
    color: #cbd5e1;
    margin: 0 6px;
}

.topbar form {
    margin: 0;
}

.topbar .btn {
    border-color: #cbd5e1;
    color: #475569;
    font-size: 12px;
    font-weight: 500;
    min-width: 72px;
}

.topbar .btn:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}

/* =========================================================
   MAIN CONTENT
   ========================================================= */

.content {
    padding: 26px 28px;
}

.content-inner {
    margin: 0 auto;
    max-width: 1440px;
}

/* =========================================================
   LOGIN
   ========================================================= */

.login-shell {
    align-items: center;
    display: grid;
    min-height: 100vh;
    min-width: 0;
    width: 100%;
}

.login-panel {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
    margin: 0 auto;
    max-width: 380px;
    padding: 24px;
    width: min(100%, 380px);
}

@media (max-width: 520px) {
    .app-shell:not(.with-sidebar) .content {
        padding: 12px;
    }

    .login-panel {
        max-width: calc(100vw - 24px);
        padding: 20px;
    }
}

/* =========================================================
   METRICS
   ========================================================= */

.metric-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.metric {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
}

.metric strong {
    color: #0f172a;
    display: block;
    font-size: 24px;
    font-weight: 700;
}

.metric span {
    color: #64748b;
}

/* =========================================================
   TABLES
   ========================================================= */

.panel-table {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: auto;
}

.panel-table table {
    margin: 0;
    min-width: 760px;
}

.sessions-summary {
    min-width: 1220px;
}

.panel-table th {
    background: #f8fafc;
    border-bottom-color: #cbd5e1;
    color: #475569;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
}

.panel-table td {
    color: #334155;
    vertical-align: middle;
}

.integrity-files {
    background: #fbfdff;
    border-top: 1px solid #e5e7eb;
}

.integrity-files th {
    background: #eef2f7;
}

/* =========================================================
   RISK CENTER
   ========================================================= */

.risk-section {
    margin-bottom: 24px;
}

.risk-section h2 {
    color: #0f172a;
    font-size: 16px;
    margin: 0 0 8px;
}

.muted-line {
    color: #64748b;
    font-size: 12px;
    margin: -4px 0 8px;
}

/* =========================================================
   MANAGEMENT PAGES
   ========================================================= */

.back-link {
    color: #2563eb;
    font-size: 13px;
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}

.manage-titlebar {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 14px;
}

.manage-titlebar h1 {
    color: #0f172a;
    font-size: 18px;
    font-weight: 700;
    margin: 4px 0 0;
}

.summary-strip {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    margin-bottom: 16px;
}

.summary-strip div {
    background: #fff;
    border: 1px solid #d9dee7;
    border-radius: 6px;
    padding: 10px 12px;
}

.summary-strip span {
    color: #64748b;
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.summary-strip strong {
    color: #0f172a;
    display: block;
    font-size: 15px;
    margin-top: 2px;
    overflow-wrap: anywhere;
}

.manage-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(360px, 1fr) minmax(360px, 1fr);
    margin-bottom: 24px;
}

.manage-stack {
    align-content: start;
    display: grid;
    gap: 18px;
}

.manage-box {
    background: #fff;
    border: 1px solid #d9dee7;
    border-radius: 6px;
}

.manage-box header {
    background: #f8fafc;
    border-bottom: 1px solid #d9dee7;
    font-size: 14px;
    font-weight: 700;
    padding: 11px 16px;
}

.info-list {
    display: grid;
    gap: 6px 10px;
    grid-template-columns: 120px minmax(0, 1fr);
    margin: 0;
    padding: 16px;
}

.info-list dt {
    font-weight: 700;
}

.info-list dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.close-client-form {
    border-bottom: 1px solid #e5e7eb;
    display: grid;
    gap: 8px;
    padding: 16px;
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding: 12px 16px 16px;
}

/* =========================================================
   PROCESSES
   ========================================================= */

.process-cloud {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 12px;
}

.process-cloud span {
    background: #f1f5f9;
    border: 1px solid #dbe2ea;
    border-radius: 999px;
    color: #475569;
    font-size: 12px;
    padding: 3px 8px;
}

/* =========================================================
   SETTINGS
   ========================================================= */

.settings-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.settings-grid label {
    display: grid;
    gap: 6px;
}

.settings-grid strong {
    font-size: 12px;
    text-transform: uppercase;
}

.settings-actions {
    align-self: end;
}

.inline-form {
    align-items: center;
    display: flex;
    gap: 6px;
    min-width: 190px;
}

.inline-form .form-control {
    min-width: 120px;
}

/* =========================================================
   STATUS PILLS
   ========================================================= */

.status-pill {
    border-radius: 999px;
    display: inline-block;
    font-size: 12px;
    font-weight: 500;
    padding: 3px 9px;
    white-space: nowrap;
}

.status-ok {
    background: #dcfce7;
    color: #166534;
}

.status-warn {
    background: #fef3c7;
    color: #92400e;
}

.status-off {
    background: #fee2e2;
    color: #991b1b;
}

.mono {
    font-family: Consolas, "Courier New", monospace;
    font-size: 12px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 860px) {
    .sidebar {
        position: static;
        width: 100%;
    }

    .app-shell.with-sidebar {
        margin-left: 0;
    }

    .brand {
        min-height: 60px;
    }

    .topbar {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
        padding: 12px 16px;
    }

    .topbar-page {
        align-items: baseline;
        flex-direction: row;
    }

    .topbar-account {
        align-items: center;
        border-top: 1px solid #e2e8f0;
        justify-content: space-between;
        margin-left: 0;
        padding-top: 10px;
        width: 100%;
    }

    .topbar-account-info {
        align-items: flex-start;
        text-align: left;
    }

    .topbar-account-context {
        justify-content: flex-start;
    }

    .content {
        padding: 16px 12px;
    }

    .manage-titlebar {
        align-items: stretch;
        display: grid;
    }

    .manage-grid {
        grid-template-columns: 1fr;
    }

    .info-list {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   APPLICATION SHELL V2
   ========================================================= */

:root {
    --sidebar-width: 248px;
    --topbar-height: 66px;
    --border: #d8e0e9;
    --muted: #64748b;
    --surface: #ffffff;
    --surface-subtle: #f8fafc;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
}

body {
    overflow-x: hidden;
}

.skip-link {
    background: #fff;
    color: #111827;
    left: 12px;
    padding: 8px 12px;
    position: fixed;
    top: -60px;
    z-index: 3000;
}

.skip-link:focus {
    top: 12px;
}

.sidebar {
    width: var(--sidebar-width);
}

.app-shell.with-sidebar {
    margin-left: var(--sidebar-width);
}

.brand-row {
    align-items: center;
    border-bottom: 1px solid #1e293b;
    display: flex;
    min-height: 66px;
}

.brand-row .brand {
    border-bottom: 0;
    flex: 1;
    min-height: 65px;
}

.nav-list a {
    gap: 10px;
}

.nav-list a svg {
    flex: 0 0 17px;
    height: 17px;
    stroke-width: 1.8;
    width: 17px;
}

.nav-list a span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-list .nav-active {
    background: #1e293b;
    border-left-color: #22c55e;
    color: #fff;
    font-weight: 650;
}

.icon-button {
    align-items: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    color: inherit;
    display: inline-flex;
    flex: 0 0 36px;
    height: 36px;
    justify-content: center;
    padding: 0;
    width: 36px;
}

.icon-button:hover,
.icon-button:focus-visible {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.icon-button svg {
    height: 18px;
    width: 18px;
}

.sidebar-close,
.sidebar-toggle,
.sidebar-backdrop {
    display: none;
}

.sidebar-close {
    color: #cbd5e1;
    margin-right: 10px;
}

.sidebar-close:hover,
.sidebar-close:focus-visible {
    background: #1e293b;
    border-color: #334155;
}

.topbar {
    gap: 16px;
    min-height: var(--topbar-height);
    padding: 10px 24px;
}

.topbar-leading,
.topbar-actions {
    align-items: center;
    display: flex;
    gap: 12px;
}

.topbar-actions {
    justify-content: flex-end;
    margin-left: auto;
    min-width: 0;
}

.topbar-page time {
    color: #94a3b8;
    font-size: 11px;
}

.global-search {
    align-items: center;
    display: flex;
    max-width: 330px;
    min-width: 220px;
    position: relative;
    width: 28vw;
}

.global-search svg {
    color: #94a3b8;
    height: 16px;
    left: 10px;
    pointer-events: none;
    position: absolute;
    width: 16px;
}

.global-search input {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
    height: 38px;
    padding: 7px 10px 7px 34px;
    width: 100%;
}

.global-search input:focus {
    background: #fff;
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgb(37 99 235 / 12%);
    outline: 0;
}

.tenant-switcher {
    align-items: center;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    display: flex;
    gap: 7px;
    height: 38px;
    padding: 0 8px;
}

.tenant-switcher svg {
    color: var(--muted);
    height: 16px;
    width: 16px;
}

.tenant-switcher select {
    background: transparent;
    border: 0;
    color: #1f2937;
    font-size: 13px;
    max-width: 145px;
    min-width: 90px;
    outline: 0;
}

.topbar-account {
    border-left: 1px solid #e2e8f0;
    gap: 10px;
    margin-left: 0;
    padding-left: 12px;
}

.topbar-account-info span {
    color: var(--muted);
    font-size: 11px;
}

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

.page-heading h1 {
    font-size: 24px;
    margin: 0 0 3px;
}

.page-heading p {
    color: var(--muted);
    margin: 0;
}

.page-actions,
.filter-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.btn svg,
.input-group-text svg,
.section-heading svg {
    height: 15px;
    vertical-align: -2px;
    width: 15px;
}

.metric-link {
    color: inherit;
    min-height: 112px;
    position: relative;
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.metric-link:hover {
    border-color: #93c5fd;
    box-shadow: 0 3px 12px rgb(15 23 42 / 7%);
    color: inherit;
}

.metric-icon {
    align-items: center;
    background: #eff6ff;
    border-radius: 6px;
    color: #2563eb !important;
    display: inline-flex !important;
    height: 28px;
    justify-content: center;
    position: absolute;
    right: 12px;
    top: 12px;
    width: 28px;
}

.metric-icon svg {
    height: 16px;
    width: 16px;
}

.section-heading {
    align-items: end;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin: 0 0 9px;
}

.section-heading h2 {
    font-size: 16px;
    margin: 0 0 2px;
}

.section-heading p {
    color: var(--muted);
    font-size: 13px;
    margin: 0;
}

.section-heading > a {
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
}

/* =========================================================
   IDENTITY HISTORY
   ========================================================= */

.identity-link {
    color: #1d4ed8;
    overflow-wrap: anywhere;
    text-decoration: underline;
    text-decoration-color: #bfdbfe;
    text-underline-offset: 2px;
}

.identity-link:hover {
    color: #1e40af;
    text-decoration-color: currentColor;
}

.identity-subject {
    align-items: center;
    background: #fff;
    border: 1px solid var(--border);
    border-left: 4px solid #2563eb;
    display: grid;
    gap: 5px 16px;
    grid-template-columns: minmax(120px, auto) minmax(0, 1fr) auto;
    margin-bottom: 16px;
    padding: 14px 16px;
}

.identity-subject > span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.identity-subject > strong {
    font-size: 13px;
    overflow-wrap: anywhere;
}

.identity-subject > div {
    color: var(--muted);
    font-size: 13px;
    white-space: nowrap;
}

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

.identity-panel,
.identity-detail {
    background: #fff;
    border: 1px solid var(--border);
    min-width: 0;
}

.identity-panel > header,
.identity-detail > header {
    align-items: center;
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 12px;
    justify-content: space-between;
    min-height: 45px;
    padding: 10px 12px;
}

.identity-panel > header > div {
    align-items: center;
    display: flex;
    gap: 8px;
}

.identity-panel > header svg {
    color: #475569;
    height: 17px;
    width: 17px;
}

.identity-panel > header > span,
.identity-detail > header > div > span {
    color: var(--muted);
    font-size: 12px;
}

.identity-table-wrap {
    max-height: 360px;
    overflow: auto;
}

.identity-table-wrap table {
    margin: 0;
    min-width: 590px;
}

.identity-table-wrap th,
.identity-table-wrap td {
    font-size: 12px;
}

.identity-table-wrap th:first-child,
.identity-table-wrap td:first-child {
    max-width: 250px;
    width: 45%;
}

.identity-count {
    align-items: center;
    background: #eff6ff;
    border-radius: 999px;
    color: #1d4ed8;
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    justify-content: center;
    min-width: 28px;
    padding: 2px 8px;
    text-decoration: none;
}

.identity-count:hover {
    background: #dbeafe;
    color: #1e40af;
}

.identity-selected td {
    background: #eff6ff;
}

.identity-empty {
    color: var(--muted);
    font-size: 13px;
    padding: 22px 12px;
    text-align: center;
}

.identity-detail {
    margin-top: 18px;
    scroll-margin-top: 76px;
}

.identity-detail > header > div {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.identity-detail > header strong {
    overflow-wrap: anywhere;
}

.attestation-callout {
    align-items: flex-start;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-left: 4px solid #ea580c;
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    padding: 13px 14px;
}

.attestation-callout > svg {
    color: #c2410c;
    flex: 0 0 auto;
    height: 20px;
    margin-top: 2px;
    width: 20px;
}

.attestation-callout strong,
.attestation-callout span {
    display: block;
}

.attestation-callout p {
    color: #7c2d12;
    margin: 3px 0 5px;
}

.attestation-callout span {
    color: #9a3412;
    font-size: 12px;
}

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

.attestation-identity {
    background: #fff;
    border: 1px solid var(--border);
    display: grid;
    gap: 9px;
    min-width: 0;
    padding: 12px;
}

.attestation-identity header {
    align-items: center;
    color: #334155;
    display: flex;
    font-size: 12px;
    font-weight: 700;
    gap: 7px;
    text-transform: uppercase;
}

.attestation-identity header svg {
    height: 16px;
    width: 16px;
}

.attestation-identity code {
    color: #0f172a;
    font-size: 12px;
    overflow-wrap: anywhere;
    white-space: normal;
}

.attestation-identity > a,
.attestation-identity > span {
    font-size: 12px;
}

.attestation-table td {
    max-width: 330px;
    overflow-wrap: anywhere;
}

.attestation-table .mono {
    font-size: 11px;
}

@media (max-width: 1050px) {
    .identity-grid {
        grid-template-columns: 1fr;
    }

    .attestation-identity-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .identity-subject {
        grid-template-columns: 1fr;
    }

    .identity-subject > div {
        white-space: normal;
    }

}

.table-toolbar {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-bottom: 0;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    padding: 10px 12px;
}

.character-filter-panel {
    align-items: flex-end;
    background: var(--surface);
    border: 1px solid var(--border);
    border-bottom: 0;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding: 12px;
}

.character-filter-grid {
    align-items: end;
    display: grid;
    flex: 1;
    gap: 10px;
    grid-template-columns: minmax(150px, 1.3fr) minmax(110px, 0.7fr) minmax(150px, 1.3fr) minmax(100px, 0.7fr) auto;
}

.character-filter-grid .form-label {
    color: #475569;
    font-size: 12px;
    margin-bottom: 4px;
}

.character-filter-actions {
    min-height: 31px;
    white-space: nowrap;
}

.characters-summary td:first-child,
.characters-summary td:nth-child(9) {
    font-weight: 600;
}

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

    .character-filter-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 620px) {
    .character-filter-grid {
        grid-template-columns: 1fr;
    }

    .character-filter-actions {
        grid-column: auto;
    }
}

.result-count {
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}

.empty-state {
    align-items: center;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
    min-height: 180px;
    padding: 28px;
    text-align: center;
}

.empty-state svg {
    color: #94a3b8;
    height: 28px;
    width: 28px;
}

.empty-state strong {
    color: #334155;
}

.pager {
    align-items: center;
    background: #fff;
    border: 1px solid var(--border);
    border-top: 0;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 10px 12px;
}

.pager-summary {
    color: var(--muted);
    font-size: 12px;
}

.pager-links {
    display: flex;
    gap: 5px;
}

.pager-links .btn {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    min-width: 32px;
}

.pager-links svg {
    height: 15px;
    width: 15px;
}

.section-tabs {
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 18px;
    margin-bottom: 16px;
    overflow-x: auto;
}

.section-tabs a {
    border-bottom: 2px solid transparent;
    color: var(--muted);
    flex: 0 0 auto;
    font-size: 13px;
    font-weight: 600;
    padding: 9px 1px;
    text-decoration: none;
}

.section-tabs a:hover,
.section-tabs a.active {
    border-bottom-color: var(--primary);
    color: var(--primary-dark);
}

.modal-content {
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 18px 50px rgb(15 23 42 / 18%);
}

@media (max-width: 1100px) {
    .global-search {
        display: none;
    }
}

@media (max-width: 860px) {
    body.sidebar-open {
        overflow: hidden;
    }

    .sidebar {
        box-shadow: 16px 0 40px rgb(15 23 42 / 28%);
        max-width: calc(100vw - 44px);
        position: fixed;
        transform: translateX(-105%);
        transition: transform 0.2s ease;
        width: var(--sidebar-width);
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .sidebar-backdrop {
        background: rgb(15 23 42 / 45%);
        inset: 0;
        opacity: 0;
        position: fixed;
        transition: opacity 0.2s ease;
        visibility: hidden;
        z-index: 999;
    }

    body.sidebar-open .sidebar-backdrop {
        display: block;
        opacity: 1;
        visibility: visible;
    }

    .sidebar-close,
    .sidebar-toggle {
        display: inline-flex;
    }

    .app-shell.with-sidebar {
        margin-left: 0;
    }

    .topbar {
        align-items: center;
        flex-direction: row;
        min-height: 62px;
        padding: 10px 12px;
    }

    .topbar-leading {
        min-width: 0;
    }

    .topbar-page {
        align-items: flex-start;
        flex-direction: column;
        min-width: 0;
    }

    .topbar-page strong,
    .topbar-page time {
        max-width: 42vw;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .topbar-actions {
        gap: 6px;
    }

    .topbar-account {
        border-left: 0;
        border-top: 0;
        margin-left: 0;
        padding: 0;
        width: auto;
    }

    .topbar-account-info {
        display: none;
    }

    .tenant-switcher select {
        max-width: 110px;
    }

    .page-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .table-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .character-filter-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .pager {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (max-width: 520px) {
    .topbar-page time,
    .tenant-switcher svg {
        display: none;
    }

    .tenant-switcher {
        max-width: 124px;
    }

    .tenant-switcher select {
        max-width: 105px;
        min-width: 70px;
    }
}
