/*
 * Design tokens. Every portal page, sign-in page and shared web part takes its
 * colours, fonts and sizes from here; change a value once to change it everywhere.
 */
:root {
    /* Brand: a darker step of the logo's cloud blue, readable behind white text. */
    --vox-primary: #12718f;
    --vox-primary-rgb: 18, 113, 143;
    --vox-primary-hover: #0e5a73;
    --vox-primary-soft: rgba(var(--vox-primary-rgb), .1);
    --vox-brand-light: #4baacb;

    --vox-success: #15803d;
    --vox-danger: #c02b2b;
    --vox-warning: #d97706;
    --vox-info: #1d6fb8;

    --vox-surface: #ffffff;
    --vox-surface-muted: #f6f8fa;
    --vox-border: #e2e8f0;
    --vox-text: #111827;
    --vox-body: #334155;
    --vox-muted: #5b6b80;

    --vox-font: 'Inter', 'Segoe UI', Tahoma, Arial, sans-serif;
    --vox-text-xs: .75rem;      /* labels, table headings, badges */
    --vox-text-sm: .8125rem;    /* help text, secondary lines */
    --vox-text-base: .875rem;   /* body, inputs, buttons, tables */
    --vox-text-md: 1rem;        /* card and section titles */
    --vox-text-lg: 1.25rem;     /* sub-headings */
    --vox-text-xl: 1.5rem;      /* page titles and key figures */

    --vox-radius: 8px;
    --vox-shadow: 0 .125rem .25rem rgba(15, 23, 42, .06);

    /* Kept names used across the stylesheet. */
    --primary-gradient: linear-gradient(135deg, var(--vox-primary) 0%, var(--vox-primary-hover) 100%);
    --sidebar-bg: #111827;
    --sidebar-width: 280px;
    --main-bg: var(--vox-surface-muted);
    --accent-color: var(--vox-brand-light);
}

/* Point Bootstrap at the same tokens. */
:root,
[data-bs-theme="light"] {
    --bs-heading-color: var(--vox-text);
    --bs-primary: var(--vox-primary);
    --bs-primary-rgb: var(--vox-primary-rgb);
    --bs-success: var(--vox-success);
    --bs-success-rgb: 21, 128, 61;
    --bs-danger: var(--vox-danger);
    --bs-danger-rgb: 192, 43, 43;
    --bs-link-color: var(--vox-primary);
    --bs-link-color-rgb: var(--vox-primary-rgb);
    --bs-link-hover-color: var(--vox-primary-hover);
    --bs-link-hover-color-rgb: 14, 90, 115;
    --bs-body-font-family: var(--vox-font);
    --bs-body-font-size: var(--vox-text-base);
    --bs-body-color: var(--vox-body);
    --bs-emphasis-color: var(--vox-text);
    --bs-secondary-color: var(--vox-muted);
    --bs-border-color: var(--vox-border);
    --bs-border-radius: var(--vox-radius);
    --bs-border-radius-lg: var(--vox-radius);
    --bs-border-radius-xl: var(--vox-radius);
}

body {
    background-color: var(--main-bg);
    color: var(--vox-body);
    font-family: var(--vox-font);
    font-size: var(--vox-text-base);
    overflow-x: hidden;
}

.text-muted {
    color: var(--vox-muted) !important;
}

/* ---- Type scale ---------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    color: var(--bs-heading-color, inherit);
    font-family: var(--vox-font);
    font-weight: 700;
    line-height: 1.3;
}

h1, .h1, h2, .h2 { font-size: var(--vox-text-xl); }
h3, .h3, h4, .h4 { font-size: var(--vox-text-lg); }
h5, .h5, h6, .h6 { font-size: var(--vox-text-md); }

.small, small { font-size: var(--vox-text-sm); }
.x-small { font-size: var(--vox-text-xs); }

/* Headings on a dark or coloured background keep that background's text colour. */
.sidebar,
.bg-dark,
.bg-primary,
.bg-success,
.bg-danger,
.text-white {
    --bs-heading-color: initial;
}

/* Faint watermark icons on figure cards. */
.opacity-10 {
    opacity: .1 !important;
}

/* ---- Web part: page header ----------------------------------------------- */
/* The title takes the free width; actions wrap below only when space runs out. */
.vox-page-header > div:first-child:not(.vox-action-row) {
    flex: 1 1 22rem;
}

.vox-page-title {
    color: var(--bs-heading-color, inherit);
    font-size: var(--vox-text-xl);
    font-weight: 700;
    margin-bottom: .25rem;
}

.vox-page-title > i {
    color: var(--vox-primary);
}

.vox-page-subtitle {
    color: var(--vox-muted);
    font-size: var(--vox-text-base);
    margin-bottom: 0;
}

.vox-page-heading {
    margin-bottom: 1.5rem;
}

/* ---- Web part: card ------------------------------------------------------ */
.card {
    --bs-card-border-width: 0;
    --bs-card-spacer-y: 1.25rem;
    --bs-card-spacer-x: 1.25rem;
    border: 0;
    border-radius: var(--vox-radius);
    box-shadow: var(--vox-shadow), 0 0 0 1px var(--vox-border);
    overflow: hidden;
}

.vox-section-header {
    background: var(--vox-surface);
    border-bottom: 1px solid var(--vox-border);
    color: var(--vox-text);
    font-size: var(--vox-text-md);
    font-weight: 700;
}

.card-header.vox-section-header {
    background: var(--vox-surface);
    border-bottom: 1px solid var(--vox-border);
    padding: .875rem 1.25rem;
}

.card-header.vox-section-header > :is(h1, h2, h3, h4, h5, h6),
.card-header.vox-section-header > div > :is(h1, h2, h3, h4, h5, h6) {
    font-size: var(--vox-text-md);
    margin-bottom: 0;
}

.card-header.vox-section-header :is(h1, h2, h3, h4, h5, h6) > i {
    color: var(--vox-primary) !important;
}

/* ---- Web part: buttons --------------------------------------------------- */
.btn {
    --bs-btn-font-size: var(--vox-text-base);
    --bs-btn-font-weight: 600;
    --bs-btn-border-radius: var(--vox-radius);
    --bs-btn-padding-y: .5rem;
    --bs-btn-padding-x: 1rem;
}

.btn-sm {
    --bs-btn-font-size: var(--vox-text-sm);
    --bs-btn-padding-y: .3rem;
    --bs-btn-padding-x: .75rem;
    --bs-btn-border-radius: var(--vox-radius);
}

.btn-lg {
    --bs-btn-font-size: var(--vox-text-md);
    --bs-btn-border-radius: var(--vox-radius);
}

.btn-primary {
    --bs-btn-bg: var(--vox-primary);
    --bs-btn-border-color: var(--vox-primary);
    --bs-btn-hover-bg: var(--vox-primary-hover);
    --bs-btn-hover-border-color: var(--vox-primary-hover);
    --bs-btn-active-bg: var(--vox-primary-hover);
    --bs-btn-active-border-color: var(--vox-primary-hover);
    --bs-btn-disabled-bg: var(--vox-primary);
    --bs-btn-disabled-border-color: var(--vox-primary);
}

.btn-outline-primary {
    --bs-btn-color: var(--vox-primary);
    --bs-btn-border-color: var(--vox-primary);
    --bs-btn-hover-bg: var(--vox-primary);
    --bs-btn-hover-border-color: var(--vox-primary);
    --bs-btn-active-bg: var(--vox-primary);
    --bs-btn-active-border-color: var(--vox-primary);
    --bs-btn-disabled-color: var(--vox-primary);
    --bs-btn-disabled-border-color: var(--vox-primary);
}

.btn-success {
    --bs-btn-bg: var(--vox-success);
    --bs-btn-border-color: var(--vox-success);
    --bs-btn-hover-bg: #12672f;
    --bs-btn-hover-border-color: #12672f;
}

.btn-danger {
    --bs-btn-bg: var(--vox-danger);
    --bs-btn-border-color: var(--vox-danger);
    --bs-btn-hover-bg: #a32424;
    --bs-btn-hover-border-color: #a32424;
}

/* Secondary action. */
.btn-light {
    --bs-btn-color: var(--vox-body);
    --bs-btn-bg: var(--vox-surface);
    --bs-btn-border-color: #cbd5e1;
    --bs-btn-hover-color: var(--vox-text);
    --bs-btn-hover-bg: var(--vox-surface-muted);
    --bs-btn-hover-border-color: #7c8aa0;
    --bs-btn-disabled-bg: var(--vox-surface-muted);
}

/* ---- Web part: forms ----------------------------------------------------- */
.form-control,
.form-select,
.input-group-text {
    border-color: #cbd5e1;
    font-size: var(--vox-text-base);
}

.input-group-text {
    background: var(--vox-surface-muted);
    color: var(--vox-muted);
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: var(--vox-primary);
}

.form-check-input {
    border-color: #94a3b8;
}

.form-check-input:checked {
    background-color: var(--vox-primary);
    border-color: var(--vox-primary);
}

.form-label,
.col-form-label,
.vox-label {
    color: var(--vox-muted);
    font-size: var(--vox-text-xs);
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.form-floating > label {
    color: var(--vox-muted);
    font-size: var(--vox-text-base);
    font-weight: 400;
    text-transform: none;
}

.form-check-label {
    font-size: var(--vox-text-base);
}

/* ---- Web part: tables ---------------------------------------------------- */
.table {
    --bs-table-hover-bg: var(--vox-surface-muted);
    font-size: var(--vox-text-base);
}

.table > thead > tr > th {
    background: var(--vox-surface-muted);
    border-bottom: 1px solid var(--vox-border);
    color: var(--vox-muted);
    font-size: var(--vox-text-xs);
    font-weight: 700;
    letter-spacing: 0;
    padding-bottom: .75rem;
    padding-top: .75rem;
    text-transform: uppercase;
    white-space: nowrap;
}

/* ---- Web part: badges, tabs, dialogs ------------------------------------- */
.badge {
    --bs-badge-font-size: var(--vox-text-xs);
    --bs-badge-font-weight: 600;
    --bs-badge-padding-x: .625rem;
    --bs-badge-padding-y: .35rem;
    --bs-badge-border-radius: 999px;
}

/* Light and yellow badges need dark text, wherever they sit. */
.badge.bg-light,
.badge.bg-white,
.badge.bg-warning {
    color: var(--vox-text) !important;
}

.text-bg-primary { background-color: var(--vox-primary) !important; }
.text-bg-success { background-color: var(--vox-success) !important; }
.text-bg-danger { background-color: var(--vox-danger) !important; }

.nav {
    --bs-nav-link-font-size: var(--vox-text-base);
    --bs-nav-link-font-weight: 600;
}

.nav-tabs .nav-link {
    color: var(--vox-muted);
}

.nav-tabs .nav-link.active {
    border-bottom: 2px solid var(--vox-primary);
    color: var(--vox-primary);
}

.nav-pills {
    --bs-nav-pills-border-radius: var(--vox-radius);
    --bs-nav-pills-link-active-bg: var(--vox-primary);
}

.pagination {
    --bs-pagination-active-bg: var(--vox-primary);
    --bs-pagination-active-border-color: var(--vox-primary);
}

.modal {
    --bs-modal-border-radius: var(--vox-radius);
}

.modal-title {
    font-size: var(--vox-text-md);
    font-weight: 700;
}

.dropdown-menu {
    --bs-dropdown-font-size: var(--vox-text-base);
    --bs-dropdown-link-active-bg: var(--vox-primary);
}

/* ---- Web part: metric tiles and plain surfaces --------------------------- */
.surface,
.metric,
.metric-panel,
.metric-box,
.status-tile {
    background: var(--vox-surface);
    border: 1px solid var(--vox-border);
    border-radius: var(--vox-radius);
    box-shadow: var(--vox-shadow);
}

.surface { overflow: hidden; }

.surface-header {
    border-bottom: 1px solid var(--vox-border);
    color: var(--vox-text);
    font-size: var(--vox-text-md);
    font-weight: 700;
    padding: .875rem 1.25rem;
}

.metric,
.metric-panel,
.metric-box,
.status-tile {
    padding: 1rem;
}

.metric > span,
.metric-panel > span,
.metric-box > span,
.metric-label {
    color: var(--vox-muted);
    display: block;
    font-size: var(--vox-text-xs);
    font-weight: 700;
    text-transform: uppercase;
}

.metric > strong,
.metric-panel > strong,
.metric-box > strong,
.status-tile > strong,
.metric-value {
    color: var(--vox-text);
    display: block;
    font-size: var(--vox-text-xl);
    font-weight: 700;
    line-height: 1.2;
    margin-top: .35rem;
}

.metric > small {
    color: var(--vox-muted);
    display: block;
    margin-top: .25rem;
}

.metric > small.text-success { color: var(--vox-success); }
.metric > small.text-danger { color: var(--vox-danger); }

.metric-panel.compact small {
    color: var(--vox-muted);
    font-weight: 600;
}

.bg-primary-soft { background-color: var(--vox-primary-soft); }
.bg-info-soft { background-color: var(--vox-primary-soft); }

[dir="rtl"] body {
    text-align: right;
}

.sidebar {
    background: var(--sidebar-bg);
    box-shadow: 4px 0 24px rgba(0, 0, 0, .1);
    color: #fff;
    height: 100vh;
    left: 0;
    overflow-y: auto;
    position: fixed;
    scrollbar-color: rgba(255, 255, 255, .16) transparent;
    scrollbar-width: thin;
    top: 0;
    transition: transform .25s ease;
    width: var(--sidebar-width);
    z-index: 1040;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .16);
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-header {
    background: rgba(255, 255, 255, .03);
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    padding: 1.5rem;
}

.sidebar-menu {
    list-style: none;
    padding: 1rem .75rem 1.5rem;
}

.nav-category {
    color: rgba(255, 255, 255, .72) !important;
    font-size: var(--vox-text-sm);
    font-weight: 700;
    letter-spacing: .04em;
    margin: 1.35rem .75rem .55rem;
    text-transform: uppercase;
}

.nav-section-toggle {
    align-items: center;
    background: transparent;
    border: 0;
    display: flex;
    justify-content: space-between;
    padding: 0;
    text-align: inherit;
    width: calc(100% - 1.5rem);
}

.nav-section-toggle:hover,
.nav-section-toggle:focus-visible {
    color: #fff !important;
}

.nav-section-toggle i {
    color: rgba(255, 255, 255, .58);
    font-size: var(--vox-text-xs);
    transition: transform .18s ease;
}

.nav-section-toggle:not(.collapsed) i {
    transform: rotate(180deg);
}

.nav-section-body {
    padding-bottom: .15rem;
}

.sidebar .nav-link {
    align-items: center;
    border-radius: 8px;
    color: #cbd5e1;
    display: flex;
    font-weight: 600;
    gap: .75rem;
    line-height: 1.2;
    margin-bottom: .25rem;
    min-height: 42px;
    padding: .65rem .85rem;
    text-decoration: none;
    transition: background-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.sidebar .nav-link i {
    flex: 0 0 22px;
    font-size: var(--vox-text-md);
    margin: 0;
    text-align: center;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background: var(--primary-gradient);
    box-shadow: 0 4px 12px rgba(var(--vox-primary-rgb), .28);
    color: #fff;
}

.sidebar .nav-link.active {
    position: relative;
}

.sidebar .nav-link.active::before {
    background: rgba(255, 255, 255, .9);
    border-radius: 999px;
    content: "";
    height: 22px;
    inset-inline-start: -4px;
    position: absolute;
    width: 4px;
}

.sidebar .text-muted {
    color: rgba(255, 255, 255, .72) !important;
}

.border-white-10 {
    border-color: rgba(255, 255, 255, .08) !important;
}

.main-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    padding: 1.5rem;
    transition: margin .25s ease;
}

.top-bar {
    align-items: center;
    background: #fff;
    border: 1px solid rgba(226, 232, 240, .8);
    border-radius: 8px;
    box-shadow: var(--vox-shadow);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding: .85rem 1rem;
}

.sidebar-toggle {
    align-items: center;
    display: inline-flex;
    height: 40px;
    justify-content: center;
    width: 40px;
}

.user-profile {
    align-items: center;
    display: flex;
    gap: 12px;
    margin-inline-start: auto;
}

.user-avatar {
    align-items: center;
    background: var(--primary-gradient);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    font-weight: 700;
    height: 40px;
    justify-content: center;
    width: 40px;
}

.sidebar-backdrop {
    background: rgba(15, 23, 42, .48);
    inset: 0;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    transition: opacity .2s ease;
    z-index: 1030;
}

body.sidebar-open {
    overflow: hidden;
}

body.sidebar-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
}

.alert {
    border: none;
    border-radius: 8px;
    padding: 1rem 1.5rem;
}

.htmx-indicator {
    background: var(--accent-color);
    height: 3px;
    inset-inline: 0;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    top: 0;
    transition: opacity 200ms ease-in;
    z-index: 9999;
}

.htmx-request .htmx-indicator {
    animation: htmx-progress 2s linear infinite;
    opacity: 1;
}

@keyframes htmx-progress {
    0% {
        left: 0;
        right: 100%;
        width: 0%;
    }

    50% {
        left: 25%;
        right: 25%;
        width: 50%;
    }

    100% {
        left: 100%;
        right: 0;
        width: 100%;
    }
}

[dir="rtl"] .sidebar {
    left: auto;
    right: 0;
}

[dir="rtl"] .main-wrapper {
    margin-left: 0;
    margin-right: var(--sidebar-width);
}

[dir="rtl"] .dropdown-menu-end {
    left: 0;
    right: auto;
}

[dir="rtl"] .text-end {
    text-align: left !important;
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-wrapper {
        margin-left: 0;
        padding: 1rem;
    }

    .top-bar {
        margin-bottom: 1rem;
    }

    [dir="rtl"] .sidebar {
        transform: translateX(100%);
    }

    [dir="rtl"] .sidebar.show {
        transform: translateX(0);
    }

    [dir="rtl"] .main-wrapper {
        margin-right: 0;
    }
}

@media (max-width: 576px) {
    .main-wrapper {
        padding: .75rem;
    }

    .top-bar {
        border-radius: 8px;
        padding: .75rem;
    }
}

.fw-800 {
    font-weight: 700;
}

.fw-600 {
    font-weight: 600;
}

.tracking-wider {
    letter-spacing: 0;
}

.bg-light-soft {
    background-color: var(--vox-surface-muted);
}

.bg-success-soft {
    background-color: rgba(25, 135, 84, .1);
}

.bg-danger-soft {
    background-color: rgba(220, 53, 69, .1);
}

.bg-warning-soft {
    background-color: rgba(245, 159, 0, .12);
}

.vox-page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.vox-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.vox-card {
    background: var(--vox-surface);
    border: 0;
    border-radius: var(--vox-radius);
    box-shadow: var(--vox-shadow);
}

.vox-hover-card {
    transition: transform .2s ease, box-shadow .2s ease;
}

.vox-hover-card:hover {
    box-shadow: 0 .5rem 1rem rgba(15, 23, 42, .1);
    transform: translateY(-4px);
}

.vox-filter-card {
    margin-bottom: 1.5rem;
}

.vox-filter-card .btn {
    white-space: nowrap;
}

.vox-form-card {
    margin-bottom: 1.5rem;
}

.vox-kpi-card {
    background: var(--vox-surface);
    border: 1px solid var(--vox-border);
    border-radius: var(--vox-radius);
    box-shadow: var(--vox-shadow);
    height: 100%;
    padding: 1rem;
}

.vox-kpi-label {
    color: var(--vox-muted);
    display: block;
    font-size: var(--vox-text-xs);
    font-weight: 700;
    text-transform: uppercase;
}

.vox-kpi-value {
    color: var(--vox-text);
    display: block;
    font-size: var(--vox-text-xl);
    font-weight: 700;
    line-height: 1.15;
    margin-top: .5rem;
}

.vox-kpi-note {
    color: var(--vox-muted);
    display: block;
    font-size: var(--vox-text-sm);
    margin-top: .35rem;
}

.vox-dashboard-panel,
.panel {
    background: var(--vox-surface);
    border: 1px solid var(--vox-border);
    border-radius: var(--vox-radius);
    box-shadow: var(--vox-shadow);
    overflow: hidden;
}

.vox-dashboard-panel-head,
.panel-head {
    align-items: center;
    border-bottom: 1px solid var(--vox-border);
    display: flex;
    gap: .75rem;
    justify-content: space-between;
    padding: 1rem 1.25rem;
}

.vox-dashboard-panel-head h5,
.panel-head h5 {
    color: var(--vox-text);
    font-weight: 700;
    margin: 0;
}

.vox-dashboard-panel-head span,
.panel-head span {
    color: var(--vox-muted);
    display: block;
    font-size: var(--vox-text-sm);
    margin-top: .15rem;
}

.vox-dashboard-panel-head a,
.panel-head a {
    font-size: var(--vox-text-sm);
    font-weight: 700;
    text-decoration: none;
}

.kpi {
    background: var(--vox-surface);
    border: 1px solid var(--vox-border);
    border-radius: var(--vox-radius);
    box-shadow: var(--vox-shadow);
    color: var(--vox-text);
    display: block;
    min-height: 132px;
    padding: 1.125rem;
    text-decoration: none;
}

.kpi:hover {
    color: var(--vox-text);
    transform: translateY(-1px);
}

.kpi span {
    color: var(--vox-muted);
    display: block;
    font-size: var(--vox-text-xs);
    font-weight: 700;
    text-transform: uppercase;
}

.kpi strong {
    display: block;
    font-size: var(--vox-text-xl);
    line-height: 1.05;
    margin-top: .625rem;
}

.kpi small {
    color: var(--vox-muted);
    display: block;
    margin-top: .75rem;
}

.kpi-green {
    border-inline-start: 5px solid var(--vox-success);
}

.kpi-blue {
    border-inline-start: 5px solid var(--vox-primary);
}

.kpi-amber {
    border-inline-start: 5px solid var(--vox-warning);
}

.kpi-red {
    border-inline-start: 5px solid var(--vox-danger);
}

.status-pill {
    border-radius: 999px;
    display: inline-block;
    font-size: var(--vox-text-xs);
    font-weight: 700;
    padding: .25rem .625rem;
}

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

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

.capacity-row {
    display: grid;
    gap: .625rem;
    grid-template-columns: repeat(3, 1fr);
    padding: 1.125rem 1.25rem;
}

.capacity-row div {
    background: var(--vox-surface-muted);
    border-radius: var(--vox-radius);
    padding: .875rem;
    text-align: center;
}

.capacity-row strong {
    display: block;
    font-size: var(--vox-text-lg);
}

.capacity-row span {
    color: var(--vox-muted);
    font-size: var(--vox-text-xs);
    font-weight: 700;
    text-transform: uppercase;
}

.meter-block {
    padding: 0 1.25rem 1rem;
}

.meter,
.mini-meter {
    background: #eef2f7;
    border-radius: 999px;
    height: 7px;
    overflow: hidden;
}

.meter i,
.mini-meter i {
    background: var(--vox-primary);
    border-radius: 999px;
    display: block;
    height: 100%;
}

.quick-grid {
    display: grid;
    gap: .625rem;
    grid-template-columns: repeat(2, 1fr);
    padding: .25rem 1.25rem 1.25rem;
}

.quick-grid a {
    align-items: center;
    background: var(--vox-surface-muted);
    border-radius: var(--vox-radius);
    color: var(--vox-text);
    display: flex;
    font-weight: 700;
    gap: .625rem;
    padding: .75rem;
    text-decoration: none;
}

.event-list,
.compact-list {
    padding: .625rem 1.25rem 1.125rem;
}

.event-row {
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    gap: .75rem;
    padding: .75rem 0;
}

.event-row:last-child,
.compact-row:last-child {
    border-bottom: 0;
}

.event-dot {
    border-radius: 50%;
    flex: 0 0 auto;
    height: 10px;
    margin-top: .4rem;
    width: 10px;
}

.event-dot.danger {
    background: var(--vox-danger);
}

.event-row strong,
.compact-row strong {
    color: var(--vox-text);
    display: block;
    font-size: var(--vox-text-base);
}

.event-row span,
.compact-row span {
    color: var(--vox-muted);
    display: block;
    font-size: var(--vox-text-sm);
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.event-row small,
.compact-row small {
    color: #7c8aa0;
    display: block;
    font-size: var(--vox-text-xs);
    margin-top: .15rem;
}

.compact-row {
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    gap: .75rem;
    justify-content: space-between;
    padding: .75rem 0;
}

.mini-meter {
    height: 4px;
    margin-bottom: .3rem;
    margin-top: -.25rem;
}

.avatar {
    align-items: center;
    display: flex;
    height: 60px;
    justify-content: center;
    width: 60px;
}

.company-logo {
    max-height: 64px;
    max-width: 190px;
    object-fit: contain;
}

.metric-card {
    align-items: center;
    background: var(--vox-surface);
    border-radius: var(--vox-radius);
    box-shadow: var(--vox-shadow);
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
}

.metric-card i {
    align-items: center;
    background: var(--vox-surface-muted);
    border-radius: 50%;
    display: flex;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.task-link {
    align-items: center;
    border: 1px solid var(--vox-border);
    border-radius: var(--vox-radius);
    display: flex;
    gap: 1rem;
    height: 100%;
    padding: 1rem;
    text-decoration: none;
}

.task-link:hover {
    background: var(--vox-surface-muted);
    border-color: var(--vox-primary);
}

.task-link i {
    color: var(--vox-primary);
    font-size: var(--vox-text-lg);
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
        transform: scale(.95);
    }

    50% {
        opacity: .8;
        transform: scale(1.05);
    }

    100% {
        opacity: 1;
        transform: scale(.95);
    }
}

.vox-table-card {
    overflow: hidden;
}

.vox-table td,
.vox-table th {
    vertical-align: middle;
}

.vox-icon-btn {
    align-items: center;
    display: inline-flex;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.vox-empty-state {
    padding: 3rem 1rem;
    text-align: center;
}

.vox-empty-state-icon {
    color: #7c8aa0;
    margin-bottom: 1rem;
}

.vox-empty-state-title {
    color: var(--vox-text);
    font-weight: 700;
    margin-bottom: .25rem;
}

.vox-empty-state-text {
    color: var(--vox-muted);
    font-size: var(--vox-text-base);
    margin-bottom: 0;
}

.vox-status-inline {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.extension-secret {
    max-width: 220px;
}

.vox-choice-box,
.codec-box {
    align-items: center;
    border: 1px solid var(--vox-border);
    border-radius: var(--vox-radius);
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    min-height: 38px;
    padding: .45rem .75rem;
}

.vox-help-panel {
    border-inline-start: 4px solid var(--vox-primary);
    border-radius: var(--vox-radius);
    padding: 1rem;
}

.vox-help-panel.danger {
    border-inline-start-color: var(--vox-danger);
}

.vox-scroll-list {
    max-height: 450px;
    overflow-y: auto;
}

.cursor-pointer {
    cursor: pointer;
}

.cursor-pointer:hover {
    background-color: var(--vox-surface-muted);
}

.vox-small-control {
    max-width: 70px;
}

.vox-sr-only {
    border: 0;
    clip: rect(0, 0, 0, 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

.table-responsive {
    scrollbar-color: #cbd5e1 transparent;
    scrollbar-width: thin;
}

.table-responsive:focus-within {
    box-shadow: inset 0 0 0 2px rgba(var(--vox-primary-rgb), .16);
}

.vox-icon-btn,
.sidebar-toggle,
.user-avatar,
.dropdown-toggle,
.btn,
.page-link {
    min-height: 34px;
}

.vox-focus-ring:focus,
.vox-focus-ring:focus-visible,
.btn:focus-visible,
.page-link:focus-visible,
.dropdown-item:focus-visible,
.nav-link:focus-visible,
.sidebar-toggle:focus-visible,
.user-avatar:focus-visible,
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 .2rem rgba(var(--vox-primary-rgb), .22);
    outline: 0;
}

[dir="rtl"] .vox-page-header,
[dir="rtl"] .vox-action-row,
[dir="rtl"] .vox-status-inline {
    direction: rtl;
}

[dir="rtl"] .dropdown-menu {
    text-align: right;
}

[dir="rtl"] .table th,
[dir="rtl"] .table td {
    text-align: right;
}

@media (max-width: 576px) {
    .vox-action-row,
    .vox-action-row .btn {
        width: 100%;
    }

    .vox-page-header {
        align-items: stretch;
    }

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

    .user-profile {
        margin-inline-start: 0;
    }
}

@media (max-width: 768px) {
    .capacity-row,
    .quick-grid {
        grid-template-columns: 1fr;
    }

    .kpi strong {
        font-size: var(--vox-text-xl);
    }

    .table-responsive .table {
        min-width: 720px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}

@media print {
    .sidebar,
    .top-bar,
    .bg-light-soft,
    .vox-filter-card,
    .vox-action-row {
        display: none !important;
    }

    .main-wrapper {
        margin-left: 0 !important;
        padding: 0 !important;
    }

    .card,
    .vox-card {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
    }

    .bg-dark {
        background-color: #000 !important;
        color: #fff !important;
    }
}

/* One icon colour in the sidebar, whichever section the link belongs to. */
.sidebar .nav-link i,
.sidebar-header i,
.sidebar-header .brand-accent {
    color: var(--vox-brand-light);
}

.sidebar .nav-link:hover i,
.sidebar .nav-link.active i {
    color: #fff;
}

/* ---- Web part: pre-sign-in shell (layouts/auth) -------------------------- */
body.vox-auth {
    align-items: center;
    background:
        radial-gradient(circle at 15% 10%, rgba(var(--vox-primary-rgb), .14), transparent 40%),
        radial-gradient(circle at 85% 90%, rgba(var(--vox-primary-rgb), .14), transparent 40%),
        var(--main-bg);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem 1rem;
}

.vox-auth-card {
    background: var(--vox-surface);
    border: 1px solid var(--vox-border);
    border-radius: var(--vox-radius);
    box-shadow: 0 20px 45px rgba(15, 23, 42, .1);
    max-width: 440px;
    padding: 2.5rem 2rem;
    width: 100%;
}

.vox-auth-card-wide {
    max-width: 1040px;
}

.vox-auth-brand {
    margin-bottom: 1.5rem;
    text-align: center;
}

.vox-auth-footer {
    color: var(--vox-muted);
    font-size: var(--vox-text-xs);
    margin: 1.5rem 0 0;
    text-align: center;
}

/* Icon spacing follows the reading direction (Bootstrap's me-* is left-to-right). */
[dir="rtl"] i.me-1 { margin-left: .25rem !important; margin-right: 0 !important; }
[dir="rtl"] i.me-2 { margin-left: .5rem !important; margin-right: 0 !important; }
[dir="rtl"] i.me-3 { margin-left: 1rem !important; margin-right: 0 !important; }
