/* ==========================================================================
   flis.css
   FLIS Design Tokens + Bootstrap Overrides
   ──────────────────────────────────────────────────────────────────────────
   Single source of truth for all colors, spacing, typography, and radii.
   Load AFTER Bootstrap runtime CSS, BEFORE any page-specific CSS.
   ========================================================================== */


/* ── 1. TOKENS ────────────────────────────────────────────────────────────── */

:root {
    /* ── Neutrals (cool slate, derived from navy) ── */
    --navy: #0f1b2a;
    --navy-2: #16263a;
    --ink: #1f2937;
    --ink-2: #5b6573;
    --ink-3: #9aa3af;
    --muted: var(--ink-3);
    --neutral: #5b6573;
    --line: #e2e8f0;
    --line-2: #cbd5e1;
    --line-alpha: rgba(15, 27, 42, 0.10);
    --line-alpha-2: rgba(15, 27, 42, 0.16);
    --bg: #ffffff;
    --bg-2: #f7f8fa;
    --bg-3: #eef0f3;
    --bg-4: #f5f5f5;
    --bg-table-group: #EDF2F7;
    --bg-dark: #121b30;
    --bg-selected: #f0f4ff;
    /* ── Primary ── */
    --blue: #337ab7;
    --blue-hover: #286090;
    --blue-soft: #e6f0fb;
    --blue-tint-10: rgba(51, 122, 183, 0.10);
    /* ── Semantic ── */
    --green: #15803d;
    --green-hover: #116b33;
    --green-soft: #e8f5ec;
    --amber: #f0ad4e;
    --amber-hover: #ec971f;
    --amber-soft: #fdf3e3;
    --amber-tint-10: rgba(240, 173, 78, 0.10);
    --ink-3-tint-8: rgba(154, 163, 175, 0.08);
    --yellow: #eab308;
    --red: #d9534f;
    --red-hover: #c9302c;
    --red-soft: #fbe9e9;
    /* ── Typography ── */
    --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "Cascadia Code", monospace;
    --font-size-1: 32px;
    --font-size-2: 26px;
    --font-size-3: 22px;
    --font-size-4: 18px;
    --font-size-5: 15px;
    --font-size-6: 13px;
    --font-weight-bold: 700;
    --line-height-control: 1.42857143;
    /* ── Radii ── */
    --radius: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    /* ── Shadows ── */
    --shadow-sm: 0 1px 2px rgba(15, 27, 42, 0.06);
    --shadow-md: 0 4px 12px rgba(15, 27, 42, 0.10);
    --shadow-lg: 0 8px 24px rgba(15, 27, 42, 0.14);
    /* -- Control widths -- */
    --control-width-tiny: 70px;
    --control-width-xs: 85px;
    --control-width-sm: 100px;
    --control-width-sm-md: 120px;
    --control-width-md: 150px;
    --control-width-lg: 300px;
    --navbar-height: 50px;
    --navbar-menu-padding-x: 15px;
    --navbar-menu-padding-y: 8px;
    --navbar-dropdown-indent: 34px;
    --navbar-dropdown-padding-bottom: 6px;
    --navbar-mobile-icon-gap: 10px;
    --navbar-mobile-font-size: 17px;
    --navbar-mobile-icon-size: 18px;
    --navbar-scrollbar-width: 8px;
    --navbar-logo-height: 35px;
    --navbar-logo-offset-y: -7px;
}


/* ── 2. BASE RESETS ───────────────────────────────────────────────────────── */
html {
    position: relative;
    min-height: 100%;
}

body {
    font-family: var(--sans);
    color: var(--ink);
    background-color: var(--bg-2);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-top: var(--navbar-height);
    height: 100vh;
}

a {
    color: var(--blue);
}

    a:hover,
    a:focus {
        color: var(--blue-hover);
    }

    a, a:active, a:focus {
        outline: none;
    }

::selection {
    background: var(--blue-soft);
    color: var(--ink);
}

hr {
    border-color: var(--line);
}

.body-content {
    background-color: var(--bg-2);
    padding-left: 15px;
    padding-right: 15px;
    min-height: calc(100vh - 90px);
    height: auto;
}

.footer {
    bottom: 0;
    width: 100%;
    background-image: linear-gradient(to right, #131724, #1f274e);
    height: 40px;
    padding-top: 10px;
}
/* ── AVBAR ────────────────────────────────────────────────────────────── */
/* Breakpoints: phone <= 767px, tablet portrait 768-991px, tablet landscape 992-1199px, desktop >= 1200px */
.navbar-inverse {
    background-color: var(--navy);
    border-color: var(--navy);
    border-radius: 0;
}

    .navbar-inverse .navbar-brand {
        color: #fff;
        font-weight: 600;
        font-size: 14px;
        letter-spacing: -0.01em;
    }

    .navbar-inverse .navbar-brand--logo {
        display: block !important;
    }

        .navbar-inverse .navbar-brand--logo img {
            height: var(--navbar-logo-height);
            margin-top: var(--navbar-logo-offset-y);
        }

    .navbar-inverse .navbar-nav > li > a {
        color: var(--ink-3);
        font-size: 13px;
    }

        .navbar-inverse .navbar-nav > li > a:hover,
        .navbar-inverse .navbar-nav > li > a:focus {
            color: #fff;
            background: transparent;
        }

    .navbar-inverse .navbar-nav > .active > a,
    .navbar-inverse .navbar-nav > .active > a:hover,
    .navbar-inverse .navbar-nav > .active > a:focus {
        color: #fff;
        background: transparent;
        box-shadow: inset 0 -2px 0 var(--blue);
    }

    .navbar-inverse .navbar-nav > .open > a,
    .navbar-inverse .navbar-nav > .open > a:hover,
    .navbar-inverse .navbar-nav > .open > a:focus {
        color: #fff;
        background: var(--navy-2);
    }

    .navbar-inverse .navbar-toggle {
        border-color: rgba(255,255,255,0.15);
    }

        .navbar-inverse .navbar-toggle .icon-bar {
            background-color: rgba(255,255,255,0.7);
        }

    .navbar-inverse .navbar-collapse {
        border-color: rgba(255,255,255,0.08);
    }

.app-menu > li > a > i {
    display: none;
    margin-right: 6px;
}

.app-menu .dropdown-menu > li > a {
    align-items: center;
    display: flex;
    gap: 9px;
}

.app-menu .dropdown-header {
    color: var(--ink-3);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.app-menu .dropdown-menu > li > a > i,
.app-menu .dropdown-menu > li > a > .app-menu__icon {
    flex: 0 0 16px;
    color: var(--ink-3);
    text-align: center;
    width: 16px;
}

.app-menu__icon {
    height: 16px;
    object-fit: contain;
}

/* Module bar */
.module-bar {
    display: flex;
    align-items: stretch;
    height: 52px;
    background: var(--bg-dark);
    border-top: 1px solid var(--navy-2);
    margin: 0 -15px 16px;
    overflow: hidden;
    flex-wrap: wrap;
}

.module-bar__identity {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 20px;
    min-width: 220px;
    flex-shrink: 0;
}

.module-bar__title {
    font-weight: 400;
    color: var(--bg);
    font-size: var(--font-size-6);
}

.module-bar__meta {
    font-size: 11px;
    font-weight: 400;
    color: var(--ink-3);
    margin-top: 3px;
}

.module-bar__nav {
    display: flex;
    align-items: stretch;
    gap: 2px;
    padding: 0 8px;
    overflow-x: auto;
}

.module-bar__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 0 14px;
    min-width: 76px;
    color: var(--ink-3);
    text-decoration: none;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: var(--radius);
    transition: color 0.15s, background 0.15s;
}

    .module-bar__link i {
        font-size: var(--font-size-4);
    }

    .module-bar__link:hover,
    .module-bar__link:focus {
        color: var(--bg);
        background: var(--navy-2);
        text-decoration: none;
    }

.module-bar__link--active {
    color: var(--bg);
    cursor: default;
}

    .module-bar__link--active:hover {
        background: none;
    }

.module-bar__link--disabled {
    cursor: default;
    color: var(--ink-3);
}

    .module-bar__link--disabled:hover {
        color: var(--ink-3);
        background: none;
    }

.module-bar__actions {
    display: flex;
    align-items: stretch;
    flex-shrink: 0;
    padding: 0 8px;
    margin-left: auto;
}

.module-bar__action {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 0 14px;
    min-width: 76px;
    color: var(--ink-3);
    text-decoration: none;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: var(--radius);
    transition: color 0.15s, background 0.15s;
}

    .module-bar__action i {
        font-size: var(--font-size-4);
    }

    .module-bar__action:hover,
    .module-bar__action:focus {
        color: var(--bg);
        background: var(--navy-2);
        text-decoration: none;
    }

.module-bar__action--active {
    color: var(--bg);
    cursor: default;
    background: var(--navy-2);
}

    .module-bar__action--active:hover {
        background: var(--navy-2);
    }

/* ── 4. BUTTONS ───────────────────────────────────────────────────────────── */

.visible-on-collapse {
    display: none;
}

/* Side navigation */
#sidebar-wrapper {
    margin-left: -70px;
    left: 70px;
    width: 50px;
    background-image: linear-gradient(to right, var(--navy), var(--navy-2));
    position: fixed;
    height: 100%;
    z-index: 10000;
    transition: all .4s ease 0s;
}

.sidebar-nav {
    display: block;
    float: left;
    width: 50px;
    list-style: none;
    margin: 0;
    padding: 0;
}

#page-content-wrapper {
    padding-left: 50px;
    margin-left: 0;
    width: 100%;
    min-height: 100%;
    height: auto;
    padding-bottom: 20px;
}

.sidebar-nav li {
    line-height: 35px;
}

    .sidebar-nav li a {
        color: var(--ink-3);
        display: block;
        float: left;
        width: 50px;
        text-align: center;
        text-decoration: none;
    }

        .sidebar-nav li a:hover {
            color: #fff;
            background: rgba(255,255,255,0.2);
            text-decoration: none;
        }

        .sidebar-nav li a:focus {
            text-decoration: none;
        }

.sidebar-devider a {
    height: 0;
    border-bottom: 1px dotted var(--ink-3);
}

.btn {
    font-size: 13px;
    font-weight: 400;
    min-height: 34px;
    border-radius: var(--radius);
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}

    .btn:focus,
    .btn:active:focus,
    .btn.active:focus {
        outline: none;
        box-shadow: none;
    }

    .btn i.ti {
        font-size:14px;
    }

.btn-sm {
    font-size: 12px;
    padding: 4px 10px;
    min-height: auto;
}

.btn-default {
    color: var(--ink);
    background-color: var(--bg);
    border-color: var(--line-2);
}

    .btn-default:hover,
    .btn-default:focus {
        color: var(--ink);
        background-color: var(--bg-2);
        border-color: var(--ink-3);
    }

    .btn-default:active,
    .btn-default.active {
        background-color: var(--bg-3);
        border-color: var(--ink-3);
    }

.btn-primary {
    color: #fff;
    background-color: var(--blue);
    border-color: var(--blue);
}

    .btn-primary:hover,
    .btn-primary:focus {
        color: #fff;
        background-color: var(--blue-hover);
        border-color: var(--blue-hover);
    }

.btn-success {
    color: #fff;
    background-color: var(--green);
    border-color: var(--green);
}

    .btn-success:hover,
    .btn-success:focus {
        color: #fff;
        background-color: var(--green-hover);
        border-color: var(--green-hover);
    }

.btn-warning {
    color: #fff;
    background-color: var(--amber);
    border-color: var(--amber);
}

    .btn-warning:hover,
    .btn-warning:focus {
        color: #fff;
        background-color: var(--amber-hover);
        border-color: var(--amber-hover);
    }

.btn-danger {
    color: #fff;
    background-color: var(--red);
    border-color: var(--red);
}

    .btn-danger:hover,
    .btn-danger:focus {
        color: #fff;
        background-color: var(--red-hover);
        border-color: var(--red-hover);
    }

.btn-outline {
    color: var(--blue);
    background-color: var(--bg);
    border-color: var(--line-2);
    box-shadow: none;
}

.btn-outline-primary {
    color: var(--blue);
    background-color: var(--bg);
    border-color: var(--blue);
    box-shadow: none;
}

    .btn-outline:hover,
    .btn-outline:focus,
    .btn-outline-primary:hover,
    .btn-outline-primary:focus {
        color: var(--blue-hover);
        background-color: var(--blue-soft);
        border-color: var(--blue);
        text-decoration: none;
    }

.btn-danger.btn-outline {
    color: var(--red);
    background-color: var(--bg);
    border-color: var(--red);
    box-shadow: none;
}

    .btn-danger.btn-outline:hover,
    .btn-danger.btn-outline:focus {
        color: var(--red-hover);
        background-color: var(--bg);
        border-color: var(--red);
        text-decoration: none;
    }

.btn-success.btn-outline {
    color: var(--green);
    background-color: var(--bg);
    border-color: var(--green);
    box-shadow: none;
}

    .btn-success.btn-outline:hover,
    .btn-success.btn-outline:focus {
        color: var(--green-hover);
        background-color: var(--green-soft);
        border-color: var(--green);
        text-decoration: none;
    }


.btn-info {
    color: #fff;
    background-color: var(--blue);
    border-color: var(--blue);
}

    .btn-info:hover,
    .btn-info:focus {
        color: #fff;
        background-color: var(--blue-hover);
        border-color: var(--blue-hover);
    }

    .btn-info.btn-outline {
        color: var(--blue);
        background-color: var(--bg);
        border-color: var(--line-2);
        box-shadow: none;
    }

        .btn-info.btn-outline:hover,
        .btn-info.btn-outline:focus {
            color: var(--blue-hover);
            background-color: var(--blue-soft);
            border-color: var(--blue);
            text-decoration: none;
        }

.btn-link {
    color: var(--blue);
}

    .btn-link:hover,
    .btn-link:focus {
        color: var(--blue-hover);
    }

.btn-add {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 32px;
    padding: 0 16px;
    border: 0;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    font-family: var(--sans);
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--navy) 0%, #1e4f7a 55%, var(--blue) 100%);
    background-size: 180% 180%;
    background-position: 0% 50%;
    transition: background-position 0.5s ease, box-shadow 0.25s, transform 0.1s;
}

    .btn-add i {
        font-size: 14px;
        transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .btn-add:hover,
    .btn-add:focus {
        color: #fff;
        text-decoration: none;
        background-position: 100% 50%;
        box-shadow: 0 2px 9px rgba(51, 122, 183, 0.21);
    }

        .btn-add:hover i {
            transform: rotate(90deg);
        }

    .btn-add:active {
        transform: scale(0.97);
    }

.btn-icon {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: var(--ink-3);
    border-radius: var(--radius);
    cursor: pointer;
    padding: 0;
}

    .btn-icon:hover {
        color: var(--ink);
        background: var(--bg-2);
    }

/* ── 5. FORMS ─────────────────────────────────────────────────────────────── */

.form-group {
    margin-bottom: 16px;
    position: relative;
}

    .form-group > .form-row,
    .form-group > .checkbox-inline,
    .form-group > .radio-inline {
        margin-bottom: 0;
    }

.form-group-no-margin-bottom,
.form-horizontal.nomargin .form-group {
    margin-bottom: 0;
}

/* Multiple fields in one row */
.form-row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 16px;
}

    .form-row > .form-group,
    .form-row > .form-control,
    .form-row > .select2.select2-container,
    .form-row > .checkbox-inline,
    .form-row > .radio-inline {
        flex: 1 1 0;
        min-width: 0;
        margin: 0;
    }

.form-row--auto > .form-group,
.form-row--auto > .checkbox-inline,
.form-row--auto > .radio-inline,
.form-group--auto {
    flex: 0 1 auto;
}

.form-group--grow {
    flex: 1 1 0;
    min-width: 0;
}

.form-row:has(> .form-group--nowrap) {
    flex-wrap: wrap;
}

.form-group--nowrap {
    flex: 0 0 auto !important;
    white-space: nowrap;
}

.control-width-sm,
.control-width-sm .form-control,
.control-width-sm .select2.select2-container,
.page-toolbar__right .form-inline .control-width-sm .form-control,
.page-toolbar__right .form-inline .control-width-sm .select2.select2-container {
    width: var(--control-width-sm) !important;
    max-width: var(--control-width-sm);
}

.control-width-sm-md,
.control-width-sm-md .form-control,
.control-width-sm-md .select2.select2-container,
.page-toolbar__right .form-inline .control-width-sm-md .form-control,
.page-toolbar__right .form-inline .control-width-sm-md .select2.select2-container {
    width: var(--control-width-sm-md) !important;
    max-width: var(--control-width-sm-md);
}

.control-width-md,
.control-width-md .form-control,
.control-width-md .select2.select2-container,
.page-toolbar__right .form-inline .control-width-md .form-control,
.page-toolbar__right .form-inline .control-width-md .select2.select2-container {
    width: var(--control-width-md) !important;
    max-width: var(--control-width-md);
}


.typeaheadicon {
    position: absolute;
    text-align: right;
    width: 16px;
    height: 34px;
    padding-top: 9px;
    cursor: pointer;
    color: var(--ink-2);
    z-index: 2;
}

    .typeaheadicon.green {
        color: var(--green);
    }

.form-group .typeaheadicon {
    right: 8px !important;
}

.form-group .select2-container--default .select2-selection--multiple,
.form-group .select2-container--default.select2-container--focus .select2-selection--multiple {
    padding: 0 1px;
}

.input-toggle-wrapper {
    display: flex;
    align-items: flex-start;
    min-width: 0;
    max-width: 100%;
}

    .input-toggle-wrapper .input-toggle-field {
        flex: 1 1 0;
        min-width: 0;
        max-width: 100%;
        position: relative;
    }
        .input-toggle-wrapper .input-toggle-field > div {
            min-width: 0;
            max-width: 100%;
        }

        .input-toggle-wrapper .input-toggle-field .form-control {
            width: 100%;
            border-radius: var(--radius) 0 0 var(--radius);
        }

        .input-toggle-wrapper .input-toggle-field .typeaheadicon {
            top: 0;
        }

    .input-toggle-wrapper .select2-container--default .select2-selection--single {
        border-radius: var(--radius) 0 0 var(--radius);
    }

    .input-toggle-wrapper .toggle-buttons {
        display: flex;
        height: 35px;
        border-top: 1px solid var(--line-2);
        border-right: 1px solid var(--line-2);
        border-bottom: 1px solid var(--line-2);
        border-radius: 0 var(--radius) var(--radius) 0;
        overflow: hidden;
    }

    .input-toggle-wrapper .btn-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 8px;
        color: var(--ink);
        background-color: var(--bg);
        border: 0;
        border-bottom: 4px solid transparent;
        cursor: pointer;
    }

        .input-toggle-wrapper .btn-toggle i {
            font-size: 18px;
            line-height: 1;
        }

        .input-toggle-wrapper .btn-toggle.active {
            border-bottom-color: var(--blue);
        }

body .select2.select2-container {
    width: 100% !important;
}

body .select2-container .select2-selection--single {
    height: 34px;
}

body .select2-container--default .select2-selection--single {
    background-color: var(--bg);
    border: 1px solid var(--line-2);
    border-radius: var(--radius);
    position: relative;
}

    body .select2-container--default .select2-selection--single .select2-selection__rendered {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body .select2-container--default .select2-selection--single .select2-selection__arrow {
        display: none;
        height: 34px;
    }

.select2-selection > span {
    padding-right: 26px !important;
    padding-top: 2px !important;
}

.form-group:has(.typeaheadicon) .select2-selection__clear:not(.typeaheadicon) {
    display: none;
}

.select2-container--default .select2-selection--single .select2-selection__clear {
    position: absolute !important;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    float: none;
    width: 16px;
    height: 16px;
    margin: 0;
    font-size: 0;
    color: var(--green);
    line-height: 1;
}

    .select2-container--default .select2-selection--single .select2-selection__clear::before {
        content: "\f05b";
        display: inline-block;
        font-family: "Font Awesome 6 Free";
        font-size: 13px;
        font-weight: 900;
        line-height: 1;
    }

.form-row > .form-group:has(select) + .form-group:has(.btn) {
    align-self: flex-start;
}
/* Labels */
.form-label,
.control-label {
    display: block;
    margin-bottom: 5px;
    padding-top: 0;
    font-size: 12px;
    font-weight: 500;
    color: var(--ink-2);
    text-align: left;
}

.form-value {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
    line-height: 1.1;
}

/* Preserve Bootstrap 3 horizontal-form positioning. */
.form-horizontal .control-label {
    padding-top: 7px;
    margin-bottom: 0;
    text-align: right;
}

/* Inputs, selects and textareas */
.form-control {
    width: 100%;
    height: 34px;
    padding: 6px 12px;
    font-family: var(--sans);
    font-size: 13px;
    color: var(--ink);
    background-color: var(--bg);
    border: 1px solid var(--line-2);
    border-radius: var(--radius);
    box-shadow: none;
    transition: border-color 0.12s;
}

    .form-control:focus {
        border-color: var(--blue);
        outline: none;
        box-shadow: none;
    }

    .form-control[disabled],
    .form-control[readonly],
    fieldset[disabled] .form-control {
        color: var(--ink);
        background-color: var(--bg-2);
        cursor: not-allowed;
    }

    .form-control::placeholder {
        color: var(--ink-3);
    }

select.form-control:not([multiple]):not([size]) {
    padding: 6px 12px 6px 8px;
    line-height: 1.42857143;
}

/*input[type="file"]*/
input[type="file"].form-control {
    min-height: 34px;
    height: auto;
    padding: 0 12px 0 0;
    overflow: hidden;
    cursor: pointer;
}

    input[type="file"].form-control:focus,
    input[type="file"].form-control:focus-visible {
        border-color: var(--blue);
        outline: none;
        box-shadow: 0 0 0 2px var(--blue-soft);
    }

    input[type="file"].form-control::file-selector-button {
        min-height: 34px;
        margin-right: 12px;
        padding: 6px 12px;
        font-family: var(--sans);
        font-size: 13px;
        color: var(--ink);
        background-color: var(--bg-2);
        border: 0;
        border-right: 1px solid var(--line-2);
        outline: none;
        cursor: pointer;
        transition: background-color 0.12s;
    }

    input[type="file"].form-control:hover::file-selector-button {
        background-color: var(--bg-3);
    }

    input[type="file"].form-control::-webkit-file-upload-button {
        min-height: 34px;
        margin-right: 12px;
        padding: 6px 12px;
        font-family: var(--sans);
        font-size: 13px;
        color: var(--ink);
        background-color: var(--bg-2);
        border: 0;
        border-right: 1px solid var(--line-2);
        outline: none;
        cursor: pointer;
    }

    input[type="file"].form-control:hover::-webkit-file-upload-button {
        background-color: var(--bg-3);
    }
/*COLORED LABELS WITH PREDEFINED COLORS*/

.label-color-square {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 1px solid #ccc;
    vertical-align: middle;
    margin-right: 4px;
}

.label-transparent {
    background: transparent;
}

.label-green {
    background: #4caf50;
}

.label-yellow {
    background: #ffeb3b;
}

.label-orange {
    background: #ff9800;
}

.label-lightblue {
    background: #03a9f4;
}

.label-gray {
    background: #9e9e9e;
}

.label-pink {
    background: #e91e63;
}
/* OTHER CONTROLS*/

textarea.form-control,
select.form-control[multiple],
select.form-control[size],
input[type="file"].form-control {
    height: auto;
}

/* Help and validation text */
.form-text,
.help-block {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: var(--ink-3);
}

.field-validation-error {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: var(--red);
}

.field-validation-valid {
    display: none;
}

/* Checkboxes and radios */
.checkbox-inline,
.radio-inline {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    min-height: 22px;
    margin: 0;
    padding: 0;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--ink-2);
    cursor: pointer;
}

h1 .checkbox-inline,
h2 .checkbox-inline,
h3 .checkbox-inline,
h4 .checkbox-inline,
h5 .checkbox-inline,
h6 .checkbox-inline,
h1 .radio-inline,
h2 .radio-inline,
h3 .radio-inline,
h4 .radio-inline,
h5 .radio-inline,
h6 .radio-inline {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

.checkbox-inline input[type="checkbox"],
.checkbox-inline input[type="radio"],
.radio-inline input[type="checkbox"],
.radio-inline input[type="radio"] {
    position: static;
    flex: 0 0 auto;
    margin: 0;
}

.checkbox-inline > i,
.radio-inline > i {
    font-size: 18px;
    line-height: 1;
    color: var(--ink);
}

.checkbox-inline > img,
.radio-inline > img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    flex: 0 0 auto;
}

.checkbox-inline + .checkbox-inline,
.radio-inline + .radio-inline {
    margin-left: 16px;
}

.form-row > .checkbox-inline + .checkbox-inline,
.form-row > .radio-inline + .radio-inline {
    margin-left: 0;
}

.checkbox-inline label,
.radio-inline label {
    display: inline-block;
    margin: 0;
    padding: 0;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    color: var(--ink);
    cursor: pointer;
}

.checkbox-inline input:disabled,
.radio-inline input:disabled {
    cursor: not-allowed;
}

    .checkbox-inline input:disabled ~ label,
    .radio-inline input:disabled ~ label {
        color: var(--ink-3);
        cursor: not-allowed;
    }

/* ESMO */
.esmo-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.esmo-left-group {
    display: flex;
    gap: 20px;
}

.esmo-column {
    min-width: 150px;
}

.esmo-center-column {
    flex: 1;
    max-width: 400px;
}

.esmo-right-column {
    min-width: 200px;
    text-align: right;
}

.esmo-logo {
    width: auto;
    height: 40px;
}

.esmo-stockitem-filter {
    display: flex;
}

    .esmo-stockitem-filter .search-bar {
        display: inline-block;
        vertical-align: top;
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
    }

    .esmo-stockitem-filter .search-button {
        border-top-left-radius: 0;
        border-bottom-left-radius: 0;
    }

.esmo-stockitem-card .card-image {
    margin: 15px auto;
    height: 150px !important;
}

.esmo-stockitem-card .card-header {
    padding-top: 15px;
    padding-bottom: 15px;
    font-size: 12px;
    border-bottom: 1px solid #dee2e6;
    width: 50%;
}

.esmo-stockitem-card .item-count {
    text-align: center;
    border: 1px solid #dee2e6;
}

.esmo-stockitem-card .caption {
    display: flex;
    flex-flow: wrap;
    margin-left: 0;
    margin-right: 0;
    padding: 0;
}

.esmo-stockitem-card .item-description {
    border-bottom: 1px solid #dee2e6;
    width: 100%;
    padding-left: 15px;
    padding-right: 15px;
}

.esmo-stockitem-card .item-warehouse-available {
    display: inline-block;
    margin-right: 15px;
    vertical-align: top;
}

/* Legacy Bootstrap 3 horizontal forms */
.form-horizontal .form-group {
    margin-left: -15px;
    margin-right: -15px;
}

    .form-horizontal .form-group::before,
    .form-horizontal .form-group::after {
        display: table;
        content: " ";
    }

    .form-horizontal .form-group::after {
        clear: both;
    }

.form-horizontal .radio,
.form-horizontal .checkbox,
.form-horizontal .radio-inline,
.form-horizontal .checkbox-inline {
    padding-top: 7px;
    margin-top: 0;
    margin-bottom: 0;
}

/* Required fields */
.form-label--req::after {
    content: " *";
    color: var(--red);
}

.form-control-required {
    border-left: 4px solid var(--blue) !important;
    border-top-left-radius: var(--radius);
    border-bottom-left-radius: var(--radius);
}

.select2-container.form-control-required {
    border-left: 0 !important;
}

body .select2-container.form-control-required .select2-selection {
    border-left: 5px solid var(--blue) !important;
    border-top-left-radius: var(--radius) !important;
    border-bottom-left-radius: var(--radius) !important;
}

select.form-control-required + .select2-container:not(.form-control-required) .select2-selection,
select.form-control-required ~ .select2-container:not(.form-control-required) .select2-selection {
    border-left: 5px solid var(--blue) !important;
    border-top-left-radius: var(--radius) !important;
    border-bottom-left-radius: var(--radius) !important;
}

input.form-control-required {
    padding-left: 7px;
}

select.form-control-required:not([multiple]):not([size]) {
    padding-left: 3px;
}

input[type=number].integer::-webkit-inner-spin-button,
input[type=number].integer::-webkit-outer-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

/* Validation states */
.input-validation-error,
.has-error .form-control,
select.input-validation-error + .select2-container .select2-selection,
select.input-validation-error ~ .select2-container .select2-selection {
    border-color: var(--red) !important;
}

    .input-validation-error.form-control-required,
    .has-error .form-control-required,
    select.input-validation-error.form-control-required + .select2-container .select2-selection,
    select.input-validation-error.form-control-required ~ .select2-container .select2-selection,
    .has-error select.form-control-required + .select2-container:not(.form-control-required) .select2-selection,
    .has-error select.form-control-required ~ .select2-container:not(.form-control-required) .select2-selection {
        border-left: 5px solid var(--red) !important;
        border-top-left-radius: var(--radius) !important;
        border-bottom-left-radius: var(--radius) !important;
    }

.input-group-addon {
    color: var(--ink-2);
    background-color: var(--bg-2);
    border-color: var(--line-2);
    border-radius: var(--radius);
    font-size: 13px;
}

.input-group {
    display: flex;
    align-items: stretch;
    width: 100%;
}

    .input-group .form-control {
        border-radius: var(--radius) 0 0 var(--radius);
        flex: 1 1 auto;
        width: 1%;
    }

    .input-group .input-group-addon {
        display: flex;
        align-items: center;
        flex: 0 0 auto;
        width: auto;
        min-width: 0 !important;
        border-left: 0;
        border-radius: 0 var(--radius) var(--radius) 0;
        padding: 6px 10px;
        white-space: nowrap;
    }

    .input-group .input-group-btn {
        display: flex;
        width: auto;
        white-space: nowrap;
    }

        .input-group .input-group-btn > .btn {
            display: flex;
            align-items: center;
            border-left: 0;
            border-color: var(--line-2);
            border-radius: 0 var(--radius) var(--radius) 0;
            background: var(--bg);
            color: var(--ink);
            box-shadow: none;
            padding: 3px 8px;
        }

            .input-group .input-group-btn > .btn:hover,
            .input-group .input-group-btn > .btn:focus {
                background: var(--bg-2);
                border-color: var(--line-2);
                color: var(--ink);
                outline: none;
            }

.bootstrap-switch {
    border: 0;
    border-radius: var(--radius);
    background: transparent;
    box-shadow: none;
    width: 100% !important;
    min-height: 34px;
}

    .bootstrap-switch.bootstrap-switch-focused {
        border: 0;
        outline: none;
        box-shadow: none;
    }

    .bootstrap-switch .bootstrap-switch-container {
        display: flex;
        position: static;
        width: 100% !important;
        margin-left: 0 !important;
    }

    .bootstrap-switch .bootstrap-switch-handle-on,
    .bootstrap-switch .bootstrap-switch-handle-off,
    .bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-primary,
    .bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-info,
    .bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-success,
    .bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-warning,
    .bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-danger,
    .bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-default,
    .bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-primary,
    .bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-info,
    .bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-success,
    .bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-warning,
    .bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-danger,
    .bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-default {
        display: flex !important;
        align-items: center;
        justify-content: center;
        flex: 0 0 50%;
        width: auto !important;
        min-width: 0;
        min-height: 34px;
        padding: 6px 12px;
        color: var(--ink-3);
        background: var(--bg-2);
        box-shadow: inset 0 0 0 1px var(--line-2);
        font-family: var(--sans);
        font-size: 13px;
    }

    .bootstrap-switch .bootstrap-switch-label {
        position: absolute;
        inset: 0;
        z-index: 2;
        display: block !important;
        width: 100% !important;
        height: 100% !important;
        opacity: 0;
        margin: 0 !important;
        padding: 0 !important;
        cursor: pointer;
    }

    .bootstrap-switch.bootstrap-switch-on .bootstrap-switch-handle-on,
    .bootstrap-switch.bootstrap-switch-on .bootstrap-switch-handle-on.bootstrap-switch-primary,
    .bootstrap-switch.bootstrap-switch-on .bootstrap-switch-handle-on.bootstrap-switch-info,
    .bootstrap-switch.bootstrap-switch-on .bootstrap-switch-handle-on.bootstrap-switch-success,
    .bootstrap-switch.bootstrap-switch-on .bootstrap-switch-handle-on.bootstrap-switch-warning,
    .bootstrap-switch.bootstrap-switch-on .bootstrap-switch-handle-on.bootstrap-switch-danger,
    .bootstrap-switch.bootstrap-switch-on .bootstrap-switch-handle-on.bootstrap-switch-default {
        color: var(--ink);
        background: var(--bg);
        box-shadow: inset 0 0 0 1px var(--blue);
    }

.toggleswitch-input-sm {
    display: inline;
    height: 36px;
}

    .toggleswitch-input-sm .bootstrap-switch .bootstrap-switch-handle-on,
    .toggleswitch-input-sm .bootstrap-switch .bootstrap-switch-handle-off,
    .toggleswitch-input-sm .bootstrap-switch .bootstrap-switch-label {
        font-size: 12px !important;
    }

.bootstrap-switch.bootstrap-switch-off .bootstrap-switch-handle-off,
.bootstrap-switch.bootstrap-switch-off .bootstrap-switch-handle-off.bootstrap-switch-primary,
.bootstrap-switch.bootstrap-switch-off .bootstrap-switch-handle-off.bootstrap-switch-info,
.bootstrap-switch.bootstrap-switch-off .bootstrap-switch-handle-off.bootstrap-switch-success,
.bootstrap-switch.bootstrap-switch-off .bootstrap-switch-handle-off.bootstrap-switch-warning,
.bootstrap-switch.bootstrap-switch-off .bootstrap-switch-handle-off.bootstrap-switch-danger,
.bootstrap-switch.bootstrap-switch-off .bootstrap-switch-handle-off.bootstrap-switch-default {
    color: var(--ink);
    background: var(--bg);
    box-shadow: inset 0 0 0 1px var(--blue);
}

.has-error .form-control {
    border-color: var(--red);
}

    .has-error .form-control:focus {
        box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.10);
    }

.has-error .control-label,
.has-error .help-block {
    color: var(--red);
}

.has-success .form-control {
    border-color: var(--green);
}

    .has-success .form-control:focus {
        box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.10);
    }

.has-success .control-label,
.has-success .help-block {
    color: var(--green);
}

.has-warning .form-control {
    border-color: var(--amber);
}

    .has-warning .form-control:focus {
        box-shadow: 0 0 0 3px rgba(180, 83, 9, 0.10);
    }

.has-warning .control-label,
.has-warning .help-block {
    color: var(--amber);
}

.validation-summary-errors {
    margin: 10px 0;
    padding: 12px 14px;
    font-size: 13px;
    color: var(--red);
    border-left: 5px solid var(--red);
}

    .validation-summary-errors ul {
        margin: 0;
        padding-left: 18px;
    }

    .validation-summary-errors li {
        margin: 0;
    }

.help-block {
    font-size: 12px;
    color: var(--ink-3);
}

.no-number-spinner::-webkit-inner-spin-button,
.no-number-spinner::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.no-number-spinner {
    -moz-appearance: textfield;
    appearance: textfield;
}
/* ── 6. TABLES ────────────────────────────────────────────────────────────── */

.table {
    font-size: 13px;
    border: 1px solid var(--line);
}

.table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius) var(--radius) 0 0;
    background: var(--bg);
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
}

.table-header__left,
.table-header__right {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.table-header__left {
    flex: 1 1 auto;
}

.table-header__right {
    flex: 0 1 auto;
}

.table-header .form-control {
    width: var(--control-width-lg);
    max-width: 100%;
    font-weight: 400;
}

.table-header .btn-add {
    height: 30px;
    padding: 0 12px;
    font-size: 12px;
}

.table-header + .table {
    margin-top: 0;
}

.table > thead > tr > th {
    font-size: 11px;
    font-weight: 500;
    color: var(--ink-2);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--line);
    border-top: 0;
    padding: 8px 12px;
    background: var(--bg-3);
}

.table > tbody > tr > td {
    color: var(--ink);
    border-top: 0px solid var(--line);
    padding: 10px 12px;
    vertical-align: middle;
    background-color: var(--bg);
}

.table > tbody > tr:hover > td {
    background-color: var(--bg-4);
}

.table-striped tr:nth-child(odd) td {
    background-color: var(--bg);
}

.table-striped tr:nth-child(even) td {
    background-color: var(--bg-2);
}

.table-noborder,
.table-noborder tr,
.table-noborder tr th,
.table-noborder tr td {
    border: none !important;
}

.table-checkable > tbody > tr:has(input[type="checkbox"]:checked) > td {
    background-color: var(--blue-soft);
}

.tr-highlight,
.tr-highlight > td {
    background-color: var(--blue-soft) !important;
}

table tr th.sortable {
    cursor: pointer;
    text-decoration: none;
}

.table-condensed > thead > tr > th,
.table-small > thead > tr > th {
    padding: 6px 5px;
}

.table-condensed > tbody > tr > td,
.table-small > tbody > tr > td {
    padding: 5px;
    font-size: 12px;
}

table.table-condensed .btn:not(.btn-sm), table.table-condensed .btn:not(.btn-xs),
table.table-small .btn:not(.btn-sm), table.table-small .btn:not(.btn-xs) {
    padding: 5px 10px;
}

.table .th-btn {
    width: 30px;
    text-wrap: nowrap
}

.th-fit,
.td-fit {
    width: 1%;
    white-space: nowrap;
}

.border-start {
    border-left: 1px solid var(--line) !important;
}

.border-end {
    border-right: 1px solid var(--line) !important;
}

.table-group-row > th, .table-group-row > td {
    padding: 6px 12px;
    color: var(--ink);
    background: var(--bg-table-group);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    text-transform: none;
    letter-spacing: 0;
}

.table-group-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ink);
    font: inherit;
    cursor: pointer;
}

    .table-group-toggle .ti {
        font-size: 20px;
        line-height: 1;
    }

.cell-row {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 2px;
    min-height: 26px;
}

    .cell-row:last-child {
        margin-bottom: 0;
    }

.text-right .cell-row {
    justify-content: flex-end;
}

.cell-row.bg-neutral-soft,
.cell-row.bg-green-soft,
.cell-row.bg-amber-soft,
.cell-row.bg-red-soft {
    padding: 0 6px;
    border-radius: var(--radius);
}

.bg-neutral-soft {
    background: var(--bg-3);
}

.bg-green-soft {
    background: var(--green-soft);
}

.bg-amber-soft {
    background: var(--amber-soft);
}

.bg-red-soft {
    background: var(--red-soft);
}

.table td img {
    width: 15px;
}

.icon-filter-invert {
    filter: invert(100%);
}

.table td > i {
    font-size: 15px;
}

.table td .form-control {
    padding: 3px 8px;
    width: 100%;
}

.table td .btn {
    padding: 4px 8px;
    font-size: 12px;
    line-height: 1.5;
    border-radius: var(--radius);
}

table.table-condensed td .btn-sm,
table.table-small td .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 30px;
    padding: 0;
}

    table.table-condensed td .btn-sm i,
    table.table-small td .btn i {
        line-height: 1;
    }

        table.table-condensed td .btn-sm i.ti,
        table.table-small td .btn i.ti {
            font-size: 15px;
        }

.table td .btn-warning {
    color: var(--amber);
    background-color: var(--bg);
    border-color: var(--amber);
}

.table td .btn-primary {
    color: var(--blue);
    background-color: var(--bg);
    border-color: var(--blue);
}

.table td .btn-success {
    color: var(--green);
    background-color: var(--bg);
    border-color: var(--green);
}

.table td .btn-default {
    color: var(--neutral);
    background-color: var(--bg);
    border-color: var(--neutral);
}

.table td .btn-danger {
    color: var(--red);
    background-color: var(--bg);
    border-color: var(--red);
}

.table td .btn-primary.btn-solid {
    color: var(--bg) !important;
    background-color: var(--blue) !important;
    border-color: var(--blue) !important;
}

    .table td .btn-primary.btn-solid:hover,
    .table td .btn-primary.btn-solid:focus {
        color: var(--bg) !important;
        background-color: var(--blue-hover) !important;
        border-color: var(--blue-hover) !important;
    }

.table td .btn-success.btn-solid {
    color: var(--bg) !important;
    background-color: var(--green) !important;
    border-color: var(--green) !important;
}

    .table td .btn-success.btn-solid:hover,
    .table td .btn-success.btn-solid:focus {
        color: var(--bg) !important;
        background-color: var(--green-hover) !important;
        border-color: var(--green-hover) !important;
    }

.table td .btn-warning.btn-solid {
    color: var(--bg) !important;
    background-color: var(--amber) !important;
    border-color: var(--amber) !important;
}

    .table td .btn-warning.btn-solid:hover,
    .table td .btn-warning.btn-solid:focus {
        color: var(--bg) !important;
        background-color: var(--amber-hover) !important;
        border-color: var(--amber-hover) !important;
    }

.table td .btn-danger.btn-solid {
    color: var(--bg) !important;
    background-color: var(--red) !important;
    border-color: var(--red) !important;
}

    .table td .btn-danger.btn-solid:hover,
    .table td .btn-danger.btn-solid:focus {
        color: var(--bg) !important;
        background-color: var(--red-hover) !important;
        border-color: var(--red-hover) !important;
    }

.table td .btnPrePayment {
    vertical-align: bottom;
}

.toggle-list {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin: 0;
    white-space: nowrap;
    cursor: pointer;
}

    .toggle-list:hover {
        text-decoration: underline;
    }

.toggle-invoice-text,
.toggle-warehouseitem-text {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}
/* ── 7. PANELS ────────────────────────────────────────────────────────────── */
.panel {
    border-color: var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    background: var(--bg);
}

.panel-heading {
    border-color: var(--line);
    border-radius: var(--radius) var(--radius) 0 0;
    font-size: 13px;
    font-weight: 600;
    padding: 12px 16px;
}

.panel-body {
    padding: 16px;
}

.panel-footer {
    border-color: var(--line);
    background: var(--bg-2);
}

.panel-default > .panel-heading {
    color: var(--ink);
    background: var(--bg-2);
    border-color: var(--line);
}

.panel-primary > .panel-heading {
    background: var(--blue);
    border-color: var(--blue);
}

.panel-success > .panel-heading {
    color: var(--green);
    background: var(--green-soft);
    border-color: var(--green);
}

.panel-warning > .panel-heading {
    color: var(--amber);
    background: var(--amber-soft);
    border-color: var(--amber);
}

.panel-danger > .panel-heading {
    color: var(--red);
    background: var(--red-soft);
    border-color: var(--red);
}
/* ── 8. LABELS & BADGES ───────────────────────────────────────────────────── */

.label {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: var(--radius);
    letter-spacing: 0.02em;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 400;
    padding: 7px 8px;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    vertical-align: middle;
    white-space: nowrap;
    font-weight: 500
}

.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.label-default {
    color: #fff;
    background-color: var(--ink-2);
}

.badge-default {
    color: var(--ink);
    /*   background-color: var(--bg-3);*/
    background-color: var(--bg);
    border-color: var(--line-2);
}

    .badge-default i {
        color: var(--ink-2);
    }

.label-primary, .badge-primary {
    color: var(--blue);
    /*background-color: var(--blue-soft);*/
    background-color: var(--bg);
    border-color: var(--blue);
}

    .badge-primary i {
        color: var(--blue);
    }

.label-primary {
    color: #fff;
    background-color: var(--blue);
}

.label-success, .badge-success {
    color: var(--green);
    background-color: var(--green-soft);
    border-color: var(--green);
}

    .badge-success i {
        color: var(--green);
    }

.label-success {
    color: #fff;
    background-color: var(--green);
}

.label-warning, .badge-warning {
    color: var(--amber);
    background-color: var(--amber-soft);
    border-color: var(--amber);
}

    .badge-warning i {
        color: var(--amber);
    }

.label-warning {
    color: #fff;
    background-color: var(--amber);
}

.label-danger, .badge-danger {
    color: var(--red);
    background-color: var(--bg);
    border-color: var(--red);
}

    .badge-danger i {
        color: var(--red);
    }

.label-danger {
    color: #fff;
    background-color: var(--red);
}

.label-info, .badge-info {
    color: var(--ink);
    background-color: var(--blue-soft);
    border-color: var(--line-2);
}

    .badge-info i {
        color: var(--blue);
    }

.label-info {
    color: #fff;
    background-color: var(--blue);
}
/* ── 9. ALERTS ────────────────────────────────────────────────────────────── */

.alert {
    border-radius: var(--radius);
    font-size: 13px;
    border-width: 1px;
}

.alert-success {
    color: var(--green);
    background: var(--green-soft);
    border-color: var(--green);
}

.alert-info {
    color: var(--ink);
    background: var(--blue-soft);
    border-color: var(--line-2);
}

.alert-warning {
    color: var(--amber);
    background: var(--amber-soft);
    border-color: var(--amber);
}

.alert-danger {
    color: var(--red);
    background: var(--red-soft);
    border-color: var(--red);
}

.notibar .notification {
    top: auto !important;
    border-bottom: 0 !important;
    z-index: 1000 !important;
    margin: 50px;
    width: calc(100% - 50px);
}

.custom-notification {
    position: fixed;
    right: 0;
    bottom: 0;
    padding: 25px 40px;
    border: 1px solid var(--line-2);
    border-radius: var(--radius);
    color: var(--bg);
    box-shadow: var(--shadow-md);
}

    .custom-notification.info {
        background-color: var(--blue);
    }

    .custom-notification.warning {
        background-color: var(--amber);
    }

    .custom-notification.error {
        background-color: var(--red);
    }

    .custom-notification.success {
        background-color: var(--green);
    }
/* ── 10. TABS (nav-tabs, nav-pills) ──────────────────────────────────────── */

.nav-tabs {
    border-bottom: 1px solid var(--line);
    margin-bottom: 0;
}

    .nav-tabs > li {
        float: none;
        display: inline-block;
    }

        .nav-tabs > li > a {
            border: 0;
            border-bottom: 2px solid transparent;
            border-radius: 0;
            padding: 10px 16px;
            font-size: 13px;
            color: var(--ink-2);
            background: transparent;
            margin-right: 0;
        }

            .nav-tabs > li > a:hover,
            .nav-tabs > li > a:focus {
                border: 0;
                border-bottom: 2px solid var(--line-2);
                background: transparent;
                color: var(--ink);
            }

        .nav-tabs > li.active > a,
        .nav-tabs > li.active > a:hover,
        .nav-tabs > li.active > a:focus {
            border: 0;
            border-bottom: 2px solid var(--blue);
            background: transparent;
            color: var(--ink);
            font-weight: 600;
        }

        .nav-tabs > li.pull-right > a {
            color: var(--ink-3);
        }

.tab-content {
    padding: 16px 0 12px;
}

    .tab-content > .tab-pane {
        padding-top: 4px;
    }

.nav-pills > li > a {
    font-size: 13px;
    color: var(--ink-2);
    border-radius: var(--radius);
}

    .nav-pills > li > a:hover {
        background: var(--bg-2);
        color: var(--ink);
    }

.nav-pills > li.active > a,
.nav-pills > li.active > a:hover,
.nav-pills > li.active > a:focus {
    background: var(--blue);
    color: #fff;
}

.nav .btn-add {
    display: inline-flex;
    margin-top: 6px;
}
/* ── 11. MODALS ───────────────────────────────────────────────────────────── */

.modal-content {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

.modal-xlg {
    width: min(calc(100vw - 40px), 1125px);
}

.modal-theme-dark {
    --bg: var(--bg-dark);
    --bg-2: var(--bg-dark);
    --bg-3: var(--bg-dark);
    --ink: #fff;
    --ink-2: var(--ink-3);
    --line: rgba(255,255,255,0.10);
    --line-2: rgba(255,255,255,0.14);
    background: var(--bg);
    color: var(--ink);
}

    .modal-theme-dark .modal-header {
        background: var(--bg);
        border-color: var(--line);
    }

        .modal-theme-dark .modal-header .close {
            color: var(--ink);
        }

.modal-header {
    border-color: var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
}

    .modal-header .modal-title {
        flex: 1 1 auto;
        font-size: 15px;
        font-weight: 600;
        line-height: 1.4;
        color: var(--ink);
    }

    .modal-header .close {
        color: var(--ink-3);
        display: flex;
        align-items: center;
        justify-content: center;
        width: 24px;
        height: 24px;
        padding: 0;
        border: 0;
        background: transparent;
        float: none;
        margin: 0;
        line-height: 1;
        opacity: 1;
        font-size: 20px;
    }

        .modal-header .close:hover {
            color: var(--ink);
        }

.modal-body {
    padding: 16px;
    font-size: 13px;
}

.modal-scroll-area {
    max-height: 350px;
    overflow-x: hidden;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-color: var(--line);
    padding: 16px;
    text-align: left;
}

    .modal-footer:before,
    .modal-footer:after {
        display: none;
        content: none;
    }

.modal-backdrop.in {
    opacity: 0.3;
    background: var(--navy);
}

.datepicker {
    z-index: 1151 !important;
}

/* ── 12. DROPDOWNS ────────────────────────────────────────────────────────── */

.dropdown-menu {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 4px 0;
    font-size: 13px;
}

    .dropdown-menu > li > a {
        padding: 8px 16px;
        color: var(--ink);
    }

        .dropdown-menu > li > a:hover,
        .dropdown-menu > li > a:focus {
            background: var(--bg-2);
            color: var(--ink);
        }

    .dropdown-menu > .active > a,
    .dropdown-menu > .active > a:hover {
        background: var(--blue);
        color: #fff;
    }

    .dropdown-menu .divider {
        background-color: var(--line);
    }

.dropdown-header {
    font-size: 11px;
    font-weight: 600;
    color: var(--ink-3);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 6px 16px;
}
/* ── 13. PAGINATION ───────────────────────────────────────────────────────── */

ul.pagination {
    margin-top: 0px;
}

.pagination > li > a,
.pagination > li > span {
    color: var(--ink-2);
    border-color: var(--line);
    font-size: 13px;
    padding: 6px 12px;
}

    .pagination > li > a:hover {
        background: var(--bg-2);
        color: var(--ink);
        border-color: var(--line-2);
    }

.pagination > .active > a,
.pagination > .active > a:hover,
.pagination > .active > span {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}

.pagination > .disabled > a,
.pagination > .disabled > span {
    color: var(--ink-3);
    background: var(--bg-2);
    border-color: var(--line);
}
/* ── 14. BREADCRUMBS ──────────────────────────────────────────────────────── */

.breadcrumb {
    background: transparent;
    padding: 8px 0;
    margin-bottom: 16px;
    font-size: 13px;
}

    .breadcrumb > li + li::before {
        color: var(--ink-3);
    }

    .breadcrumb > .active {
        color: var(--ink-2);
    }
/* ── 15. PROGRESS BARS ────────────────────────────────────────────────────── */

.progress {
    background-color: var(--bg-3);
    border-radius: var(--radius);
    box-shadow: none;
    height: 6px;
    margin-bottom: 0px;
}

.progress-bar {
    background-color: var(--blue);
}

.progress-bar-success {
    background-color: var(--green);
}

.progress-bar-warning {
    background-color: var(--amber);
}

.progress-bar-danger {
    background-color: var(--red);
}

.progress-bar-info {
    background-color: var(--blue);
}
/* ── 16. LIST GROUPS ──────────────────────────────────────────────────────── */

.list-group-item {
    border-color: var(--line);
    font-size: 13px;
    padding: 10px 16px;
}

    .list-group-item:first-child {
        border-radius: var(--radius) var(--radius) 0 0;
    }

    .list-group-item:last-child {
        border-radius: 0 0 var(--radius) var(--radius);
    }

a.list-group-item:hover,
a.list-group-item:focus {
    background: var(--bg-2);
    color: var(--ink);
}

.list-group-item.active,
.list-group-item.active:hover {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}

.list-group-item-success {
    color: var(--green);
    background: var(--green-soft);
}

.list-group-item-warning {
    color: var(--amber);
    background: var(--amber-soft);
}

.list-group-item-danger {
    color: var(--red);
    background: var(--red-soft);
}

.list-group-item-info {
    color: var(--blue);
    background: var(--blue-soft);
}
/* ── 17. WELLS ────────────────────────────────────────────────────────────── */

.well {
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: none;
}
/* ── 18. TOOLTIPS & POPOVERS ──────────────────────────────────────────────── */

.tooltip-inner {
    background: var(--navy);
    border-radius: var(--radius);
    font-size: 12px;
    padding: 6px 10px;
}

.tooltip.top .tooltip-arrow {
    border-top-color: var(--navy);
}

.tooltip.bottom .tooltip-arrow {
    border-bottom-color: var(--navy);
}

.tooltip.left .tooltip-arrow {
    border-left-color: var(--navy);
}

.tooltip.right .tooltip-arrow {
    border-right-color: var(--navy);
}

.popover {
    border-color: var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.popover-title {
    background: var(--bg-2);
    border-color: var(--line);
    font-size: 13px;
    font-weight: 600;
}
/* ── 19. CLOSE BUTTON ─────────────────────────────────────────────────────── */

.close {
    font-weight: 400;
    opacity: 0.5;
    color: var(--ink);
    text-shadow: none;
}

    .close:hover,
    .close:focus {
        opacity: 1;
    }
/* ── 20. UTILITIES ────────────────────────────────────────────────────────── */

.cursor-pointer {
    cursor: pointer;
}
.text-primary {
    color: var(--blue) !important;
}

.text-success {
    color: var(--green) !important;
}

.text-warning {
    color: var(--amber) !important;
}

.text-danger {
    color: var(--red) !important;
}

.text-info {
    color: var(--blue) !important;
}

.text-muted {
    color: var(--ink-3) !important;
}

.fw-semibold {
    font-weight: 600 !important;
}

.fw-bold {
    font-weight: 700 !important;
}

.loader {
    display: block;
    height: 20px;
    vertical-align: middle;
}

    .loader span {
        margin-left: 5px;
        font-size: 85%;
        font-style: italic;
    }

.bg-primary {
    background-color: var(--blue-soft) !important;
}

.bg-success {
    background-color: var(--green-soft) !important;
}

.bg-warning {
    background-color: var(--amber-soft) !important;
}

.bg-danger {
    background-color: var(--red-soft) !important;
}

.bg-info {
    background-color: var(--blue-soft) !important;
}

.section-header {
    margin: 0 0 12px;
    padding: 6px 8px;
    background: var(--bg-3);
    color: var(--ink);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
}

.file-upload-picker {
    margin-bottom: 10px;
}

.file-drop-area {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    padding: 30px;
    margin-bottom: 8px;
    position: relative;
    text-align: center;
    border: 2px dotted var(--line-2);
    border-radius: var(--radius-md);
    background: var(--bg);
}

    .file-drop-area.dragging {
        border-color: var(--blue);
        background: var(--blue-soft);
    }

.file-drop-area__lead {
    margin-bottom: 8px;
    font-size: 18px;
    font-weight: 600;
}

.file-drop-area__placeholder {
    text-align: center;
    color: var(--ink-2);
}

    .file-drop-area__placeholder > :last-child {
        margin-bottom: 0;
    }

.file-drop-area__preview {
    text-align: center;
}

    .file-drop-area__preview[hidden] {
        display: none !important;
    }

    .file-drop-area__preview img {
        display: block;
        max-width: 100%;
        max-height: 350px;
        margin: 0 auto;
    }

.file-upload-progress[hidden],
.file-upload-queue[hidden] {
    display: none !important;
}

.file-upload-message {
    margin-top: 8px;
    color: var(--red);
}

.file-upload-queue-name {
    width: 100%;
}

.file-upload-queue-status {
    width: 35px;
    white-space: nowrap;
    text-align: right;
}

/* ---- cards ---- */
.card {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: visible;
    margin-bottom: 20px;
}

.card-max-width {
    max-width: 1150px;
}

.card-max-width-s {
    max-width: 565px;
}

.hero-bg {
    min-height: calc(100vh - 46px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: url('/Content/images/MAIN-HERO-HEADER-IMG.jpg') center right / cover no-repeat;
    background-color: var(--bg-dark);
    margin-left: -15px;
    margin-right: -15px;
}

.login-subtitle {
    text-align: center;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--muted);
}

.theme-dark {
    --bg: var(--bg-dark);
    --bg-2: var(--bg-dark);
    --bg-3: var(--bg-dark);
    --ink: #fff;
    --ink-2: var(--ink-3);
    --line: rgba(255,255,255,0.10);
    --line-2: rgba(255,255,255,0.14);
}

    .theme-dark h1, .theme-dark h2, .theme-dark h3, .theme-dark h4, .theme-dark .form-label, .theme-dark .control-label {
        color: var(--ink);
    }

    .theme-dark .body-content {
        background-color: var(--bg-dark);
    }

.card__head {
    padding: 12px 20px;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: visible;
}

    .card__head .form-row {
        margin-bottom: 0;
    }

.card__body {
    padding: 20px;
}

    .card__body > :last-child {
        margin-bottom: 0;
    }

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-width: 1150px;
}

/* STAT and KPIs*/
.stat-wrap {
    position: relative;
    margin-top: 20px;
    min-height: 10px;
}

.stat-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

    .stat-row > .stat {
        flex: 1 1 150px;
        min-width: 0;
    }

.stat-row--two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

    .stat-row--two > .stat {
        min-width: 0;
    }


.stat-toggle {
    position: absolute;
    top: -14px;
    right: 0;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--blue-soft);
    border: 1px solid var(--blue);
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
    font-size: 12px;
    font-weight: 500;
    color: var(--blue);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    cursor: pointer;
}

    .stat-toggle:hover {
        color: var(--ink);
        background: var(--bg);
    }

.stat {
    position: relative;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px 46px 14px 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.stat__content {
    flex: 1;
    min-width: 0;
}

.stat__icon {
    position: absolute;
    top: 12px;
    right: 14px;
    font-size: 16px;
    color: var(--ink-3);
}

.stat__title {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 500;
    color: var(--ink-2);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stat__actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 2px;
}

.stat__values {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.stat__value {
    font-size: 17px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.stat__metric {
    font-size: 12px;
    font-weight: 400;
    color: var(--ink-2);
}

.stat__sub {
    font-size: 12px;
    color: var(--ink-3);
    margin-top: 4px;
}

.stat-default {
    border-left: 3px solid var(--line-2);
}

.stat-primary {
    border-left: 3px solid var(--blue);
}

.stat-success {
    border-left: 3px solid var(--green);
}

.stat-warning {
    border-left: 3px solid var(--amber);
}

.stat-danger {
    border-left: 3px solid var(--red);
}

.sigPadReadOnly {
    border: 2px dashed var(--line-2);
    border-radius: var(--radius);
}

.avatar {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 600;
    color: var(--bg);
    background: var(--ink-2);
}

.avatar--unassigned {
    color: var(--ink-3);
    background: var(--bg);
    border: 1px solid var(--line-2);
}

/* -- entity list -- */
.entity-list__empty {
    padding: 16px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    border-bottom: 1px solid var(--line)
}

.entity-list-item {
    padding: 10px 16px;
    border-bottom: 1px solid var(--line);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

    .entity-list-item:hover {
        background: var(--bg-2);
    }

    .entity-list-item.is-selected {
        background: var(--bg-selected);
    }

    .entity-list-item.dragging {
        opacity: 0.4;
    }

.entity-list-item__row1,
.entity-list-item__row2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.entity-list-item__subject {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 13px;
    font-weight: 500;
    color: var(--ink);
}

.entity-list-item__count {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--blue);
}

.entity-list-item__row2_left {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    color: var(--ink-3);
}

.entity-list-item__row2_right {
    flex-shrink: 0;
    font-size: 11px;
    color: var(--ink-3);
}

.entity-list-item--touch-ghost {
    position: fixed;
    z-index: 2000;
    pointer-events: none;
    opacity: 0.9;
    box-shadow: 0 4px 12px rgba(15,27,42,0.18);
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.entity-list-item--unread .entity-list-item__subject {
    font-weight: 700;
}


/*PAGE TOOLBAR*/
.page-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    padding-bottom: 0;
}

.page-toolbar__left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.page-toolbar__right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}

    .page-toolbar__right .form-inline .form-control,
    .page-toolbar__right .form-inline .select2.select2-container {
        width: var(--control-width-md) !important;
        max-width: var(--control-width-md);
    }

.page-toolbar .form-control-static {
    width: auto;
    min-width: 150px;
    max-width: 220px;
    font-weight: 600;
    text-align: center;
    color: var(--ink);
    font-size: large;
}

.page-toolbar img {
    width: 20px;
    height: 20px;
}

.page-header,
h1.page-header,
h2.page-header {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--navy);
    white-space: nowrap;
}

/* PAGE FOOTER */
.page-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.page-footer__left,
.page-footer__right,
.page-footer__legend {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
}

.page-footer__right {
    justify-content: flex-end;
    margin-left: auto;
}

.page-footer__legend {
    font-size: 12px;
    color: var(--ink-2);
}

/*BOOSTRAP 5 READY - remove later*/
.d-none {
    display: none !important;
}

.d-inline-block {
    display: inline-block !important;
}

.d-flex {
    display: flex !important;
}

.content-no-padding {
    margin-left: -15px;
    margin-right: -15px;
    margin-top: -15px;
}

.align-items-center {
    align-items: center !important;
}

.align-self-end {
    align-self: flex-end !important;
}

.gap-1 {
    gap: 4px !important;
}

.gap-2 {
    gap: 8px !important;
}

.gap-3 {
    gap: 16px !important;
}

.mt-2 {
    margin-top: .5rem !important;
}

.m-0 {
    margin: 0 !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mb-10 {
    margin-bottom: 10px !important;
}

.mb-15 {
    margin-bottom: 15px !important;
}

.mb-30 {
    margin-bottom: 30px !important;
}

.mr-10 {
    margin-right: 10px !important;
}

.mr-15 {
    margin-right: 15px !important;
}

.mt-20 {
    margin-top: 20px !important;
}

.mt-30 {
    margin-top: 30px !important;
}

.p-0 {
    padding: 0 !important;
}

.pb-15 {
    padding-bottom: 15px !important;
}

.w-30 {
    width: 30px !important;
    max-width: 30px !important;
    min-width: 30px !important;
}

.w-50 {
    width: 50px !important;
    max-width: 50px !important;
    min-width: 50px !important;
}

.w-70 {
    width: 70px !important;
    max-width: 70px !important;
    min-width: 70px !important;
}

.w-85 {
    width: 85px !important;
    max-width: 85px !important;
    min-width: 85px !important;
}

.w-100px {
    width: 100px !important;
    max-width: 100px !important;
    min-width: 100px !important;
}

.w-120 {
    width: 120px !important;
    max-width: 120px !important;
    min-width: 120px !important;
}

.w-150 {
    width: 150px !important;
    max-width: 150px !important;
    min-width: 150px !important;
}

.w-300 {
    width: 300px !important;
    max-width: 300px !important;
    min-width: 300px !important;
}

.w-100 {
    width: 100%;
}

.h-100 {
    height: 100%;
}

.fs-1 {
    font-size: var(--font-size-1) !important;
}

.fs-2 {
    font-size: var(--font-size-2) !important;
}

.fs-3 {
    font-size: var(--font-size-3) !important;
}

.fs-4 {
    font-size: var(--font-size-4) !important;
}

.fs-5 {
    font-size: var(--font-size-5) !important;
}

.fs-6 {
    font-size: var(--font-size-6) !important;
}

.fst-italic {
    font-style: italic !important;
}

.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hide_edit {
    width: 100%;
}

.table thead th.text-right {
    text-align: right !important;
}

/* ---- document rows / dropzone (Documents tab) ---- */
.doc-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
}

    .doc-row:last-child {
        border-bottom: 0;
    }

.dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 24px;
    border: 1px dashed var(--line-2);
    border-radius: var(--radius);
    color: var(--ink-3);
}

/* ==== Exhibition Email module (Views/ExhibitionEmail) ==== */

#emailPage {
    flex: 1;
    min-height: 0;
}

.email-page__tree {
    width: 260px;
    flex-shrink: 0;
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
}

.email-page__main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-2);
    border-bottom: 1px solid var(--line);
}

.email-page__header {
    flex-shrink: 0;
    background: var(--bg-2);
}

.email-page__split {
    flex: 1;
    min-height: 0;
    display: flex;
    overflow: hidden;
}

.email-page__content {
    width: 320px;
    flex-shrink: 0;
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background: var(--bg-2);
}

    .email-page__content .entity-list {
        background: var(--bg);
    }

.email-page__viewer {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg);
}

.email-empty-state {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 13px;
}

/* -- folder tree -- */
.folder-tree {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.folder-tree__search {
    padding: 10px 12px;
    flex-shrink: 0;
}

.folder-tree__list {
    flex: 1;
    overflow-y: auto;
    padding: 6px 0;
}

.folder-tree__add {
    margin: 8px 12px;
    width: calc(100% - 24px);
}

.folder-node__children {
    padding-left: 14px;
}

.folder-row {
    height: 30px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    cursor: pointer;
}

    .folder-row:hover {
        background: var(--bg-2);
    }

    .folder-row.is-selected {
        background: var(--bg-selected);
    }

    .folder-row.drag-over {
        background: var(--blue-soft);
        outline: 2px dashed var(--blue);
        outline-offset: -2px;
    }

.folder-row__chevron {
    width: auto;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 5px;
}

    .folder-row__chevron i {
        font-size: 14px;
    }

.folder-row__name {
    flex: 1;
    min-width: 44px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 13px;
}

.folder-row--inbox .folder-row__name {
    font-weight: 600;
}

.folder-row__badges {
    display: flex;
    align-items: center;
    gap: 1px;
    flex-shrink: 0;
    overflow-x: auto;
    max-width: 108px;
}

    .folder-row__badges::-webkit-scrollbar {
        display: none;
    }

.folder-badge {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
}

.folder-badge--grey {
    color: var(--ink-3);
}

.folder-badge--yellow {
    color: var(--yellow);
}

.folder-badge--red {
    color: var(--red);
}
.folder-badge--blue {
    color: var(--blue);
}

.folder-badge--green {
    color: var(--green);
}

.folder-badge--hidden {
    visibility: hidden;
}

.folder-row__count {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--blue);
    margin-left: 4px;
}

.folder-row__count--hidden {
    visibility: hidden;
}

/* -- folder header + task bar -- */
.folder-header {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    border-bottom: 1px solid var(--line);
}

.folder-header__path {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    min-width: 0;
}

.folder-header__parent {
    color: var(--ink-2);
}

.folder-header__sep {
    color: var(--ink-3);
}

.folder-header__name {
    font-weight: 600;
}

.folder-header__badges {
    max-width: none;
    overflow-x: visible;
    gap: 3px;
}

.folder-header__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.folder-header__menu {
    position: relative;
}

.folder-header__menu-list {
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 4px 12px rgba(15,27,42,0.12);
    z-index: 20;
    min-width: 170px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

    .folder-header__menu-list[hidden] {
        display: none;
    }

    .folder-header__menu-list button {
        border: 0;
        background: transparent;
        text-align: left;
        padding: 9px 14px;
        font-size: 13px;
        color: var(--ink);
        cursor: pointer;
    }

        .folder-header__menu-list button:hover {
            background: var(--bg-2);
        }

.task-bar {
    height: 40px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    background: var(--bg-2);
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
}

.task-bar__item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    white-space: nowrap;
    cursor: pointer;
    color: var(--ink-2);
}

.task-bar__item--done {
    color: var(--green);
}

.task-bar__item--overdue {
    color: var(--red);
}
.task-bar__item--inprogress {
    color: var(--blue);
}
.task-bar__item--duesoon {
    color: var(--ink);
}

    .task-bar__item--duesoon .task-bar__date {
        color: var(--yellow);
    }

.task-bar__date {
    font-size: 11px;
}

.task-bar__sep {
    color: var(--line-2);
    font-size: 13px;
    flex-shrink: 0;
}

/* -- email thread (right column) -- */
.email-thread {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.email-thread__header {
    height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    background: var(--bg-2);
    border-bottom: 1px solid var(--line);
}

.email-thread__subject {
    font-size: 13px;
    font-weight: 500;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.email-thread__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.email-thread__list {
    flex: 1;
    overflow-y: auto;
}

.email-row {
    border-bottom: 1px solid var(--line);
}

.email-row__header {
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 10px 16px;
}

.email-row__from {
    display: flex;
    align-items: baseline;
    min-width: 0;
    line-height: 20px;
}

.email-row__sender {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 8px
}

.email-row__address {
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.email-row__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.email-row__attach {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    color: var(--ink-3);
}

.email-row__processed {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    background: var(--green-soft);
    border: 1px solid rgba(22,163,74,0.2);
    border-radius: var(--radius);
    font-size: 11px;
    color: var(--green);
    white-space: nowrap;
}

.email-row__processed-initials {
    font-weight: 600;
    font-size: 11px;
    color: var(--green);
}

.email-row__processed-date {
    font-weight: 400;
    color: var(--green);
}

.email-row__queued {
    font-size: 11px;
    color: var(--ink-3);
    white-space: nowrap;
}

.email-row__send-error {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--red);
    white-space: nowrap;
}

.email-row__date {
    font-size: 11px;
    color: var(--muted);
    white-space: nowrap;
}

.email-row__delete {
    opacity: 0;
    transition: opacity 0.15s;
}

.email-row:hover .email-row__delete {
    opacity: 1;
}

.email-row__chevron {
    font-size: 14px;
    color: var(--ink-3);
    transition: transform 0.15s;
}

.email-row.is-open .email-row__chevron {
    transform: rotate(180deg);
}

.email-row__preview {
    padding: 0px 16px 10px;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.email-row.is-open .email-row__preview {
    display: none;
}

.email-row.is-open .email-row__header {
    background-color: var(--bg-2)
}

.email-row__body {
}

.email-row__addresses {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    margin-bottom: 10px;
    padding: 0px 16px 10px;
    background-color: var(--bg-2);
    border-bottom: 1px solid var(--line);
}

.email-row__content {
    font-size: 13px;
    color: var(--ink);
    line-height: 1.55;
    padding: 10px 16px;
}

.email-row__attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.attachment-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--line-2);
    border-radius: var(--radius);
    padding: 6px 12px;
    font-size: 12px;
    color: var(--ink);
    text-decoration: none;
    background: var(--bg);
}

    .attachment-pill:hover {
        background: var(--bg-2);
        color: var(--ink);
        text-decoration: none;
    }

/* -- composer (reply + new email) -- */
.email-composer {
    flex-shrink: 0;
    border-top: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--bg);
}

.email-thread.is-composer-expanded .email-thread__list {
    display: none;
}

.email-thread.is-composer-expanded .email-composer {
    flex: 1;
}

.email-thread.is-composer-expanded .composer__editable {
    flex: 1;
    min-height: 0;
}

.email-composer__expanded-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

    .email-composer__expanded-header[hidden] {
        display: none;
    }

.email-composer__expanded-header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.email-composer__subject {
    font-size: 15px;
    font-weight: 600;
}

.email-composer__expanded-fields {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: var(--ink-2);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
}

    .email-composer__expanded-fields[hidden] {
        display: none;
    }

.compose-field__static-label {
    font-weight: 600;
    color: var(--ink-3);
    margin-right: 4px;
}

.compose-field {
    height: 36px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--line);
    padding: 0 16px;
}

.compose-field__input {
    border: 0;
    outline: none;
    width: 100%;
    font-size: 13px;
    background: transparent;
    padding: 0 2px;
    color: var(--ink);
}

.composer__textarea {
    border: 0;
    outline: none;
    resize: none;
    width: 100%;
    min-height: 60px;
    font-size: 13px;
    font-family: var(--sans);
    background: transparent;
    color: var(--ink);
    padding: 16px;
}

.composer__textarea--tall {
    min-height: 220px;
}

.composer__editable {
    overflow-y: auto;
    line-height: 1.5;
    padding: 10px 16px;
}

    .composer__editable:empty:before {
        content: attr(data-placeholder);
        color: var(--ink-3);
        pointer-events: none;
    }

    .composer__editable a {
        color: var(--blue);
    }

    .composer__editable ul {
        margin: 4px 0 4px 20px;
        padding: 0;
    }

.composer__attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.composer__signature-note {
    font-size: 11px;
    color: var(--ink-3);
    padding: 0 16px 8px;
}

.composer-attachment-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--line-2);
    border-radius: var(--radius);
    padding: 4px 10px;
    font-size: 11px;
    background: var(--bg-2);
    color: var(--ink);
}

.composer-attachment-pill__remove {
    cursor: pointer;
    color: var(--ink-3);
}

    .composer-attachment-pill__remove:hover {
        color: var(--red);
    }

.composer__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--line);
    padding: 0 16px;
    background: var(--bg-2)
}

.composer__toolbar-format {
    display: flex;
    align-items: center;
    gap: 8px;
}

.composer__toolbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.composer__toolbar-divider {
    width: 1px;
    height: 18px;
    background: var(--line);
    margin: 0 6px;
}

.btn-icon.is-active {
    color: var(--blue);
    background: var(--bg-3);
}

.btn-icon input[type="file"][hidden] {
    display: none !important;
}

.email-composer.is-drag-over {
    outline: 2px dashed var(--blue);
    outline-offset: -4px;
    background: var(--blue-soft);
}

/* -- folder settings modal (Add folder / Edit folder) -- */
.folder-task-row td {
    vertical-align: top;
    padding-top: 12px;
}

.folder-task-field {
    min-width: 130px;
}

    .folder-task-field:disabled {
        background: var(--bg-2);
        color: var(--ink-3);
        cursor: not-allowed;
    }

/* -- tablet: collapsible folder tree -- */
.email-page__folders-toggle {
    display: none;
}

.email-page__backdrop {
    display: none;
}



/* RESPONSIVE: tablet portrait */
@media (max-width: 991px) {
    .module-bar {
        height: auto;
    }

    .module-bar__identity {
        flex-direction: row;
        align-items: center;
        gap: 6px;
    }

    .module-bar__title {
        font-size: 12px;
    }

    .module-bar__meta {
        display: inline;
        margin-top: 0;
        font-size: 11px;
    }

        .module-bar__meta::before {
            content: "\00b7";
            margin-right: 6px;
        }

    .module-bar__title,
    .module-bar__meta {
        white-space: nowrap;
    }

    .module-bar__link {
        gap: 2px;
        padding: 5px;
        min-width: 65px;
        font-size: 9px;
    }

    .page-header,
    h1.page-header,
    h2.page-header {
        font-size: 17px;
        font-weight: 500;
    }

    .email-page__tree {
        position: fixed;
        left: -280px;
        top: 0;
        bottom: 0;
        z-index: 1050;
        transition: left 0.2s ease;
        box-shadow: 2px 0 8px rgba(15,27,42,0.18);
    }

        .email-page__tree.is-open {
            left: 0;
        }

    .email-page__backdrop.is-open {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15,27,42,0.3);
        z-index: 1040;
    }

    .email-page__folders-toggle {
        display: inline-flex;
    }

    .card__head {
        padding: 10px;
        font-weight: 500;
    }

    .card__body {
        padding: 10px;
    }

    .nav-tabs > li {
        margin-right: 10px;
    }

        .nav-tabs > li > a {
            padding: 5px 10px;
            margin-bottom: 6px;
            border-right: 1px solid var(--line-2) !important;
            border-bottom: 1px solid var(--line-2) !important;
        }

        .nav-tabs > li.active > a,
        .nav-tabs > li.active > a:hover,
        .nav-tabs > li.active > a:focus {
            border-bottom: 2px solid var(--blue) !important;
        }

    .navbar {
        min-height: 45px;
        margin-bottom: 0;
    }

    .navbar-brand {
        padding: 15px 30px 5px 15px;
    }

    .navbar-inverse .navbar-brand--logo img {
        width: 28px;
        height: 28px;
        margin-top: -4px;
    }

    .navbar-brand:last-of-type {
        display: none;
    }

    #sidebar-wrapper {
        display: none;
    }

    #page-content-wrapper {
        padding-left: 0;
    }

    .body-content {
        padding-left: 10px;
        padding-right: 10px;
    }

    .navbar-header {
        float: left;
    }

    .navbar-toggle {
        display: none;
    }

    .navbar-collapse.collapse {
        display: block !important;
        height: auto !important;
        padding-bottom: 0;
        overflow: visible !important;
    }

    .navbar-collapse {
        width: auto;
        padding-left: 0;
        padding-right: 0;
        border-top: 0;
        box-shadow: none;
    }

    .navbar-nav {
        float: left;
        margin: 0;
    }

    .navbar-inverse .navbar-nav > li > a {
        font-size: 17px;
    }

    .navbar-nav > li {
        float: left;
    }

        .navbar-nav > li > a {
            padding-top: 15px;
            padding-bottom: 15px;
        }

    .app-menu > li > a,
    .navbar-right > li > a {
        width: 55px;
        padding-left: 0;
        padding-right: 0;
        text-align: center;
    }

    .navbar-right {
        float: right !important;
        margin-right: 0;
    }

        .navbar-right .dropdown-menu {
            right: 0;
            left: auto;
        }

    .navbar-nav .open .dropdown-menu {
        position: absolute;
        float: left;
        width: auto;
        margin-top: 0;
        padding: 4px 0;
        background-color: var(--bg);
        border: 1px solid var(--line-2);
        box-shadow: 0 6px 12px rgba(0,0,0,.175);
    }

        .navbar-inverse .navbar-nav .open .dropdown-menu > li > a,
        .navbar-nav .open .dropdown-menu > li > a {
            min-height: 40px;
            padding: 9px 14px;
            color: var(--ink);
        }

            .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover,
            .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus,
            .navbar-nav .open .dropdown-menu > li > a:hover,
            .navbar-nav .open .dropdown-menu > li > a:focus {
                color: var(--ink);
                background-color: var(--bg-2);
            }

        .navbar-nav .open .dropdown-menu .dropdown-header {
            padding: 6px 14px 4px;
        }

    .app-menu > li > a {
        text-align: center;
    }

        .app-menu > li > a > i {
            display: inline-block;
            margin-right: 0;
        }

    .app-menu .nav-label {
        display: none;
    }

    .form-row {
        flex-wrap: wrap;
        /* align-items: center;*/
    }

        .form-row > .form-group,
        .form-row > .form-control,
        .form-row > .select2.select2-container,
        .form-row > .checkbox-inline,
        .form-row > .radio-inline {
            width: auto;
        }

    .form-row--auto {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }

        .form-row--auto > .form-group,
        .form-row--auto > .checkbox-inline,
        .form-row--auto > .radio-inline {
            width: auto;
        }

    .table-responsive {
        border: 0;
    }

    .table-header {
        padding: 6px 5px;
        font-size: 12px;
    }

    .table-header__left,
    .table-header__right {
        gap: 8px;
    }

    .table > thead > tr > th,
    .table-condensed > thead > tr > th,
    .table-small > thead > tr > th {
        padding: 6px 5px;
        font-size: 11px;
    }

    .table td > i,
    .table td .btn i {
        font-size: 13px;
    }

    .two-col {
        grid-template-columns: 1fr;
    }

    .stat-row {
        gap: 8px;
    }

        .stat-row > .stat {
            flex-basis: 120px;
        }

    .stat {
        padding: 10px 32px 10px 12px;
    }

    .stat__icon {
        top: 10px;
        right: 10px;
        font-size: 12px;
    }

    .page-toolbar {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .page-toolbar__left,
    .page-toolbar__right {
        width: 100%;
    }

    .page-toolbar__right {
        justify-content: flex-start;
    }

        .page-toolbar__right .form-inline {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 8px;
            float: none !important;
            width: 100%;
        }

            .page-toolbar__right .form-inline .form-group {
                margin-bottom: 0;
            }

    .page-footer {
        align-items: stretch;
    }

    .page-footer__left,
    .page-footer__right,
    .page-footer__legend {
        width: auto;
        justify-content: flex-start;
    }

    .page-footer__right {
        margin-left: 0;
    }
}

/* RESPONSIVE: phone */
@media (max-width: 480px) {
    .app-menu > li > a {
        text-align: left;
    }

    .navbar-header {
        float: none;
    }

    .navbar-toggle {
        display: block;
    }

    .navbar-inverse .navbar-brand--logo img {
        width: auto;
        height: var(--navbar-logo-height);
        margin-top: var(--navbar-logo-offset-y);
    }

    .navbar-collapse.collapse {
        display: none !important;
        height: 0 !important;
        overflow: hidden !important;
    }

        .navbar-collapse.collapse.in {
            display: block !important;
            height: auto !important;
            max-height: calc(100vh - var(--navbar-height));
            overflow-y: auto !important;
        }

    .navbar-collapse {
        position: absolute;
        top: var(--navbar-height);
        right: 0;
        left: 0;
        width: 100%;
        margin-right: 0;
        margin-left: 0;
        padding: var(--navbar-menu-padding-y) var(--navbar-menu-padding-x);
        background-color: var(--navy);
        border-top: 1px solid rgba(255,255,255,0.08);
        box-shadow: var(--shadow-lg);
        scrollbar-color: var(--navy-2) var(--navy);
        scrollbar-width: thin;
    }

    .navbar .container-fluid > .navbar-collapse {
        margin-right: 0;
        margin-left: 0;
    }

        .navbar-collapse::-webkit-scrollbar {
            width: var(--navbar-scrollbar-width);
        }

        .navbar-collapse::-webkit-scrollbar-track {
            background-color: var(--navy);
        }

        .navbar-collapse::-webkit-scrollbar-thumb {
            background-color: var(--navy-2);
        }

    .navbar-nav {
        float: none;
        margin: 0;
    }

        .navbar-nav > li {
            float: none;
        }

    .navbar-right {
        float: none !important;
        margin-right: 0;
    }

    .app-menu > li > a,
    .navbar-right > li > a {
        width: auto;
        padding-right: var(--navbar-menu-padding-x);
        padding-left: var(--navbar-menu-padding-x);
        text-align: left;
    }

    .navbar-inverse .navbar-nav > li > a {
        font-size: var(--navbar-mobile-font-size);
    }

    .navbar-nav .open .dropdown-menu {
        position: static;
        float: none;
        width: auto;
        margin-top: 0;
        padding: 0 0 var(--navbar-dropdown-padding-bottom);
        background-color: transparent;
        border: 0;
        box-shadow: none;
    }

        .navbar-inverse .navbar-nav .open .dropdown-menu > li > a,
        .navbar-nav .open .dropdown-menu > li > a {
            padding-left: var(--navbar-dropdown-indent);
            color: var(--ink-3);
            font-size: var(--navbar-mobile-font-size);
        }

        .app-menu .dropdown-menu > li > a > i,
        .app-menu .dropdown-menu > li > a > .app-menu__icon {
            flex-basis: var(--navbar-mobile-icon-size);
            width: var(--navbar-mobile-icon-size);
            font-size: var(--navbar-mobile-icon-size);
        }

        .navbar-nav .open .dropdown-menu .dropdown-header {
            display: none;
        }

    .app-menu > li > a > i {
        display: inline-block;
        margin-right: var(--navbar-mobile-icon-gap);
        width: var(--navbar-mobile-icon-size);
        font-size: var(--navbar-mobile-icon-size);
        text-align: center;
    }

    .app-menu .nav-label {
        display: inline;
    }

    .visible-on-collapse {
        display: block;
    }

    .form-horizontal .control-label {
        padding-top: 0;
        margin-bottom: 5px;
        text-align: left;
    }

    .table > thead > tr > th,
    .table-condensed > thead > tr > th,
    .table-small > thead > tr > th {
        font-size: 10px;
    }

    .stat-row {
        gap: 6px;
    }

        .stat-row > .stat {
            flex-basis: 105px;
        }

    .stat-row--two {
        grid-template-columns: 1fr;
    }

    .stat {
        padding: 8px 26px 8px 10px;
    }

    .stat__title {
        font-size: 11px;
    }

    .stat__value {
        font-size: 15px;
    }
}

/* ── CALENDAR (generic, reusable card - Views/Shared/_Calendar.cshtml) ──────── */
.cal-type-toggle { font-size: 12px; font-weight: 400; color: var(--ink-2); margin: 0; }
.cal-type-toggle--disabled { color: var(--ink-3); }
.cal-type-toggle input { margin-right: 4px; }

.cal-view-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cal-view-toggle button { border: 0; border-left: 1px solid var(--line); background: var(--bg); color: var(--ink-2); font-size: 12px; font-weight: 600; padding: 5px 12px; cursor: not-allowed; }
.cal-view-toggle button:first-child { border-left: 0; }
.cal-view-toggle button.is-active { background: var(--blue); color: var(--bg); cursor: default; }

.cal-nav { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-top: 0; }
.cal-nav__label { font-size: 13px; font-weight: 600; color: var(--ink); min-width: 160px; text-align: center; }
.cal-nav__btn { width: 26px; height: 26px; }

.cal-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); border: 1px solid var(--line); border-top: 0; border-bottom: 0; background: var(--bg-2); }
.cal-weekdays span { padding: 6px; text-align: center; font-size: 11px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; border-right: 1px solid var(--line); }
.cal-weekdays span:last-child { border-right: 0; }

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); border: 1px solid var(--line); border-top: 0; }
.cal-day { min-height: 110px; padding: 6px; border-right: 1px solid var(--line); border-top: 1px solid var(--line); background: var(--bg); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day:nth-last-child(7) { border-bottom-left-radius: var(--radius); }
.cal-day:last-child { border-bottom-right-radius: var(--radius); }

.cal-day__date { font-size: 12px; color: var(--ink-2); }
.cal-day--today .cal-day__date { font-weight: 700; color: var(--ink); }

.cal-day--buildup { background: var(--amber-tint-10); }
.cal-day--exhibition { background: var(--blue-tint-10); }
.cal-day--dismantling { background: var(--ink-3-tint-8); }

.cal-item { display: flex; align-items: center; gap: 5px; padding: 4px 7px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); font-size: 11px; font-weight: 500; color: var(--ink-2); overflow: hidden; min-width: 0; box-sizing: border-box; }
.cal-item i { flex-shrink: 0; color: var(--ink-2); font-size: 10px; }
.cal-item span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 991px) {
    .cal-day { min-height: 80px; }
}
