:root {
    --sidebar-width: 292px;
    --sidebar-mini: 86px;
    --app-bg: #eef3fb;
    --panel: #ffffff;
    --panel-strong: #ffffff;
    --ink: #1f2937;
    --muted: #6b7280;
    --danger: #dc143c;
    --line: #e5e7eb;
    --navy: #102a4c;
    --soft-blue: #f8fbff;
    --field: #ffffff;
    --field-muted: #f8fbff;
    --hover: #fbfdff;
    --table-head: #f8fafc;
    --brand-bg: #75d5f3;
    --brand-ink: #102a4c;
    --shadow: 0 18px 46px rgba(31, 41, 55, .1);
}

:root[data-theme="dark"] {
    --app-bg: #0f172a;
    --panel: #172033;
    --panel-strong: #111827;
    --ink: #e5edf7;
    --muted: #9aa8bc;
    --danger: #f43f5e;
    --line: #263247;
    --navy: #f8fafc;
    --soft-blue: #101827;
    --field: #0f172a;
    --field-muted: #111a2b;
    --hover: #1b263a;
    --table-head: #111827;
    --brand-bg: #38bdf8;
    --brand-ink: #082f49;
    --shadow: 0 20px 56px rgba(0, 0, 0, .28);
    color-scheme: dark;
}

* {
    box-sizing: border-box;
    letter-spacing: 0;
}

body {
    margin: 0;
    background: var(--app-bg);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    min-height: 100vh;
}

a {
    color: var(--danger);
}

.app-body {
    background:
        linear-gradient(135deg, rgba(16, 42, 76, .05), transparent 32%),
        var(--app-bg);
}

:root[data-theme="dark"] .app-body {
    background:
        linear-gradient(135deg, rgba(244, 63, 94, .1), transparent 30%),
        linear-gradient(315deg, rgba(56, 189, 248, .08), transparent 36%),
        var(--app-bg);
}

.small,
small {
    font-size: .82rem;
}

.d-block { display: block; }
.d-inline { display: inline; }
.d-flex { display: flex; }
.justify-content-between { justify-content: space-between; }
.align-items-center { align-items: center; }
.text-end { text-align: right; }
.text-center { text-align: center; }
.text-muted,
.text-muted-soft { color: var(--muted); }
.bg-transparent { background: transparent; }
.border-0 { border: 0; }
.mb-0 { margin-bottom: 0; }
.mb-3 { margin-bottom: 1rem; }
.me-1 { margin-right: .25rem; }
.py-2 { padding-top: .5rem; padding-bottom: .5rem; }
.py-4 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.h5 { font-size: 1.05rem; font-weight: 800; }
.h-100 { height: 100%; }

.login-body {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    background:
        radial-gradient(circle at 22% 92%, rgba(74, 222, 222, .9) 0 9%, rgba(22, 163, 168, .88) 10% 25%, transparent 26%),
        radial-gradient(circle at 81% 59%, rgba(103, 232, 161, .9) 0 11%, rgba(52, 211, 153, .72) 12% 18%, transparent 19%),
        radial-gradient(circle at 96% 90%, rgba(45, 212, 191, .85) 0 6%, transparent 7%),
        radial-gradient(circle at 86% -11%, rgba(45, 212, 191, .92) 0 22%, transparent 23%),
        #11161d;
}

.login-body::before,
.login-body::after {
    content: "";
    position: fixed;
    z-index: 0;
    pointer-events: none;
    border-radius: 50%;
}

.login-body::before {
    width: min(63vw, 560px);
    aspect-ratio: 1;
    left: 50%;
    top: 48%;
    transform: translate(-50%, -50%);
    background:
        radial-gradient(circle at 26% 18%, rgba(255, 255, 255, .5), transparent 0 10%),
        linear-gradient(145deg, rgba(156, 243, 221, .54), rgba(26, 38, 49, .74) 58%, rgba(14, 20, 28, .64));
    border: 1px solid rgba(255, 255, 255, .18);
    box-shadow:
        inset 30px 24px 80px rgba(255, 255, 255, .18),
        inset -44px -44px 90px rgba(0, 0, 0, .32),
        0 30px 80px rgba(0, 0, 0, .32);
    backdrop-filter: blur(8px);
}

.login-body::after {
    width: min(17vw, 150px);
    aspect-ratio: 1;
    right: 20%;
    top: 57%;
    background:
        radial-gradient(circle at 36% 28%, rgba(255, 255, 255, .38), transparent 0 15%),
        radial-gradient(circle at 65% 70%, rgba(20, 184, 166, .9), rgba(8, 54, 56, .95) 68%);
    box-shadow: 0 24px 35px rgba(0, 0, 0, .3);
}

.login-shell {
    position: relative;
    z-index: 1;
    width: min(100%, 480px);
    display: block;
    overflow: visible;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.login-intro {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 520px;
    padding: 48px;
    color: #102a4c;
    background:
        linear-gradient(rgba(255, 255, 255, .55), rgba(255, 255, 255, .55)),
        repeating-linear-gradient(135deg, rgba(16, 42, 76, .06) 0 1px, transparent 1px 16px);
}

.login-kicker {
    width: fit-content;
    margin-bottom: 14px;
    padding: 7px 10px;
    border: 1px solid rgba(220, 20, 60, .18);
    border-radius: 999px;
    color: var(--danger);
    background: rgba(255, 255, 255, .72);
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.login-intro h1 {
    max-width: 480px;
    margin: 0;
    font-size: clamp(2rem, 5vw, 3.35rem);
    font-weight: 900;
    line-height: 1.04;
}

.login-intro p {
    max-width: 390px;
    margin: 18px 0 0;
    color: #4b5563;
    font-size: 1.05rem;
    line-height: 1.7;
}

.login-card {
    position: relative;
    display: flex;
    min-height: 480px;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(150deg, rgba(124, 255, 231, .24), rgba(15, 23, 42, .42) 42%, rgba(3, 10, 18, .32));
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 50%;
    padding: 92px 82px 70px;
    box-shadow:
        inset 28px 20px 78px rgba(255, 255, 255, .11),
        inset -34px -42px 92px rgba(0, 0, 0, .34),
        0 28px 90px rgba(0, 0, 0, .36);
    backdrop-filter: blur(18px);
}

.login-card-heading {
    display: block;
    margin-bottom: 28px;
    text-align: center;
}

.brand-mark {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--brand-bg);
    color: var(--brand-ink);
    font-weight: 800;
    flex: 0 0 auto;
}

.brand-mark-lg {
    width: 62px;
    height: 62px;
    margin-bottom: 26px;
    background: #102a4c;
    color: #fff;
}

.login-card h2 {
    margin: 0;
    color: #102a4c;
    font-size: 1.45rem;
    font-weight: 800;
}

.login-card h1 {
    margin: 0;
    color: rgba(255, 255, 255, .94);
    font-size: 1.92rem;
    font-weight: 900;
    letter-spacing: 1px;
}

.login-card h1 strong {
    color: #45f6f4;
}

.login-card-heading span {
    display: inline-block;
    margin-bottom: 6px;
    color: rgba(255, 255, 255, .82);
    font-size: .82rem;
    font-weight: 800;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.login-card-heading p,
.demo-account,
.text-muted-soft {
    color: var(--muted);
}

.login-card-heading p {
    margin: 5px 0 0;
    color: rgba(255, 255, 255, .78);
    font-size: 1rem;
    letter-spacing: 8px;
}

.login-card .form-label {
    display: none;
    margin-bottom: 8px;
    color: #45f6f4;
    font-size: .88rem;
    font-weight: 800;
}

.login-card form {
    display: grid;
    gap: 10px;
}

.login-card .form-control {
    display: block;
    width: 100%;
    min-height: 42px;
    padding: 10px 18px;
    border-color: rgba(255, 255, 255, .16);
    border-style: solid;
    border-width: 1px;
    border-radius: 0;
    background: rgba(236, 248, 246, .78);
    color: #113136;
    font-size: .96rem;
    box-shadow: inset 0 1px 12px rgba(255, 255, 255, .18);
}

.login-card .form-control:focus {
    outline: 0;
    border-color: rgba(69, 246, 244, .62);
    box-shadow: 0 0 0 .2rem rgba(69, 246, 244, .14);
}

.login-card .form-control::placeholder {
    color: rgba(17, 49, 54, .48);
}

.login-card .alert {
    margin-bottom: 18px;
    border-radius: 8px;
}

.login-card .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border: 1px solid transparent;
    border-radius: 0;
    padding: 10px 28px;
    cursor: pointer;
    text-decoration: none;
}

.login-card .btn-danger {
    background: rgba(236, 248, 246, .82);
    border-color: rgba(255, 255, 255, .2);
    color: #07525c;
}

.login-card .btn-danger:hover {
    background: #45f6f4;
    border-color: #45f6f4;
    color: #052a30;
}

.login-card .w-100 {
    width: 100%;
}

.login-submit {
    width: min(100%, 140px);
    margin: 2px auto 0;
    font-size: 1.05rem;
    font-weight: 700;
}

.demo-account {
    width: min(100%, 300px);
    margin: 18px auto 0;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 8px;
    background: rgba(2, 6, 23, .2);
    color: rgba(255, 255, 255, .72);
    font-size: .78rem;
    line-height: 1.65;
    text-align: center;
}

.demo-account strong {
    color: #45f6f4;
}

.login-help {
    justify-self: end;
    margin: -2px 0 8px;
    color: #45f6f4;
    font-size: .78rem;
    text-decoration: none;
}

.login-help:hover {
    color: #bffffb;
}

.app-shell {
    display: flex;
    min-height: 100vh;
    background: transparent;
}

.sidebar {
    width: var(--sidebar-width);
    background: color-mix(in srgb, var(--panel-strong) 96%, transparent);
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    transition: width .2s ease;
    z-index: 20;
    box-shadow: 12px 0 34px rgba(31, 41, 55, .05);
}

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

.sidebar.collapsed .sidebar-toggle i {
    transform: rotate(180deg);
}

.sidebar-header {
    padding: 24px 18px 18px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.sidebar-title {
    min-width: 0;
}

.sidebar-title strong {
    display: block;
    color: var(--navy);
    line-height: 1.15;
}

.sidebar-title strong,
.sidebar-title span,
.nav-label,
.sidebar-search,
.user-role {
    transition: opacity .15s ease;
}

.sidebar.collapsed .sidebar-title strong,
.sidebar.collapsed .sidebar-title span,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .sidebar-search,
.sidebar.collapsed .user-role {
    opacity: 0;
    width: 0;
    overflow: hidden;
    white-space: nowrap;
}

.sidebar-toggle {
    border: 0;
    color: #fff;
    background: var(--danger);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    margin-left: auto;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(220, 20, 60, .2);
}

.sidebar-search {
    padding: 0 18px 16px;
}

.input-group {
    display: flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--field-muted);
}

.input-group-text {
    padding: 0 0 0 12px;
    color: var(--muted);
}

.sidebar-search .form-control {
    min-width: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.sidebar-nav {
    padding: 0 14px;
    flex: 1;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--muted);
    text-decoration: none;
    padding: 12px 14px;
    border-radius: 8px;
    font-weight: 700;
    margin-bottom: 8px;
    transition: background .15s ease, color .15s ease, transform .15s ease;
}

.sidebar-link:hover,
.sidebar-link.active {
    color: #fff;
    background: var(--danger);
    transform: translateX(2px);
}

.sidebar-link i {
    font-size: 1.18rem;
    min-width: 22px;
    text-align: center;
}

.sidebar-footer {
    border-top: 1px solid var(--line);
    padding: 18px 14px 22px;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 10px;
    padding: 12px 14px;
    border-radius: 8px;
    background: var(--field-muted);
    color: var(--navy);
    font-weight: 800;
}

.sidebar-user i {
    color: var(--danger);
    font-size: 1.25rem;
    min-width: 22px;
    text-align: center;
}

.sidebar-user small {
    margin-top: 2px;
    color: var(--muted);
    font-weight: 700;
    text-transform: capitalize;
}

.sidebar.collapsed .sidebar-user {
    justify-content: center;
    padding-left: 10px;
    padding-right: 10px;
}

.main-panel {
    flex: 1;
    min-width: 0;
}

.topbar {
    padding: 28px 32px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.theme-toggle {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 9px 13px;
    background: var(--panel);
    color: var(--ink);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(31, 41, 55, .06);
}

.theme-toggle:hover {
    border-color: rgba(220, 20, 60, .3);
}

.theme-icon-dark {
    display: none;
}

:root[data-theme="dark"] .theme-icon-light {
    display: none;
}

:root[data-theme="dark"] .theme-icon-dark {
    display: inline-block;
}

.content {
    padding: 14px 32px 38px;
}

.page-title {
    color: var(--navy);
    font-size: 1.72rem;
    font-weight: 800;
    margin: 0;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow);
}

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

.panel-subtitle {
    margin-top: 4px;
    color: var(--muted);
    font-size: .84rem;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 16px;
}

.stat-card {
    position: relative;
    overflow: hidden;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.stat-card span {
    color: var(--muted);
    font-size: .9rem;
    font-weight: 700;
}

.stat-card strong {
    display: block;
    color: var(--navy);
    font-size: 2rem;
    margin-top: 8px;
    line-height: 1;
}

.stat-icon {
    position: absolute;
    right: 16px;
    top: 16px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--field-muted);
    color: var(--navy);
    font-size: 1.15rem;
}

.status-badge {
    border-radius: 999px;
    padding: 6px 10px;
    background: var(--field-muted);
    color: var(--navy);
    font-weight: 700;
    font-size: .78rem;
}

.status-proses { background: #dbeafe; color: #1d4ed8; }
.status-belum-selesai { background: #fef3c7; color: #92400e; }
.status-menunggu { background: #e5e7eb; color: #374151; }
.status-acc-bos { background: #dcfce7; color: #166534; }
.status-selesai { background: #dcfce7; color: #166534; }
.status-dalam-proses { background: #dbeafe; color: #1d4ed8; }
.status-gagal { background: #fee2e2; color: #991b1b; }
.status-revisi { background: #fef3c7; color: #92400e; }

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

.table-responsive {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
}

.table th {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
    background: var(--table-head);
}

.table thead th:first-child {
    border-top-left-radius: 8px;
}

.table thead th:last-child {
    border-top-right-radius: 8px;
}

.table td,
.table th {
    border-bottom: 1px solid var(--line);
    padding: 13px 12px;
}

.table td strong {
    color: var(--navy);
}

.table tbody tr:hover {
    background: var(--hover);
}

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

.employee-report-table-wrap {
    overflow-x: auto;
}

.employee-report-table {
    min-width: 1420px;
}

.employee-report-table th {
    text-align: center;
    line-height: 1.35;
    white-space: normal;
}

.employee-report-table td {
    vertical-align: top;
}

.employee-report-table td:nth-child(1),
.employee-report-table td:nth-child(2),
.employee-report-table td:nth-child(7),
.employee-report-table td:nth-child(8),
.employee-report-table td:nth-child(10),
.employee-report-table td:nth-child(11) {
    text-align: center;
}

.employee-report-table th:nth-child(1) { width: 54px; }
.employee-report-table th:nth-child(2) { width: 118px; }
.employee-report-table th:nth-child(3) { width: 170px; }
.employee-report-table th:nth-child(4) { width: 180px; }
.employee-report-table th:nth-child(5) { width: 150px; }
.employee-report-table th:nth-child(6) { width: 132px; }
.employee-report-table th:nth-child(7) { width: 132px; }
.employee-report-table th:nth-child(8) { width: 144px; }
.employee-report-table th:nth-child(9) { width: 230px; }
.employee-report-table th:nth-child(10) { width: 126px; }
.employee-report-table th:nth-child(11) { width: 110px; }

.report-title {
    display: block;
    line-height: 1.35;
}

.table-note {
    max-width: 210px;
    color: var(--ink);
    font-size: .9rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.table-file-link,
.date-pill {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 8px;
    padding: 6px 9px;
    background: var(--field-muted);
    color: var(--navy);
    font-size: .84rem;
    font-weight: 800;
    text-decoration: none;
}

.table-file-link:hover {
    color: var(--danger);
}

.date-pill {
    white-space: nowrap;
}

.date-pill.muted {
    color: var(--muted);
    font-weight: 700;
}

.employee-update-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
}

.mt-1 {
    margin-top: .25rem;
}

.empty-state {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 28px 18px;
    color: var(--muted);
    text-align: center;
}

.empty-state i {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--field-muted);
    color: var(--danger);
    font-size: 1.25rem;
}

.empty-state strong {
    color: var(--navy);
    font-size: 1rem;
}

.empty-state span {
    max-width: 340px;
}

.form-control,
.form-select {
    display: block;
    width: 100%;
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--field);
    color: var(--ink);
    font: inherit;
}

.form-control[type="file"] {
    padding: 8px;
}

.form-control[type="file"]::file-selector-button {
    margin-right: 10px;
    border: 0;
    border-radius: 6px;
    padding: 7px 10px;
    background: var(--field-muted);
    color: var(--ink);
    font-weight: 800;
    cursor: pointer;
}

textarea.form-control {
    min-height: 96px;
    resize: vertical;
}

.form-control:focus,
.form-select:focus {
    outline: 0;
    border-color: rgba(220, 20, 60, .42);
    box-shadow: 0 0 0 .2rem rgba(220, 20, 60, .1);
}

.form-label {
    display: block;
    margin-bottom: 7px;
    color: var(--muted);
    font-size: .88rem;
    font-weight: 800;
}

.form-text {
    margin-top: 6px;
    color: var(--muted);
    font-size: .82rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 9px 14px;
    color: var(--ink);
    background: var(--panel);
    font: inherit;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
}

.btn-sm {
    min-height: 34px;
    padding: 7px 11px;
    font-size: .88rem;
}

.btn-lg {
    min-height: 50px;
    padding: 12px 16px;
}

.btn-danger {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    background: #b91031;
    border-color: #b91031;
    color: #fff;
}

.btn-light {
    background: var(--field-muted);
    border-color: var(--line);
}

.btn-outline-danger {
    color: var(--danger);
    border-color: rgba(220, 20, 60, .34);
    background: var(--panel);
}

.btn-outline-danger:hover {
    color: #fff;
    background: var(--danger);
    border-color: var(--danger);
}

.btn-outline-secondary {
    color: var(--muted);
    border-color: var(--line);
    background: var(--panel);
}

.btn-outline-secondary:hover {
    color: var(--navy);
    background: var(--field-muted);
    border-color: var(--line);
}

.btn-icon {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    padding: 0;
}

.action-group {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    white-space: nowrap;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 999px;
    padding: 5px 10px;
    background: var(--field-muted);
    color: var(--navy);
    font-size: .78rem;
    font-weight: 800;
    text-transform: capitalize;
}

.master-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 54px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 9px 10px 9px 14px;
    background: var(--panel);
    color: var(--ink);
    font-weight: 800;
}

.master-list-row + .master-list-row {
    margin-top: 10px;
}

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

.col-12 {
    grid-column: span 12;
}

.col-md-6,
.col-xl-3,
.col-xl-4,
.col-xl-6 {
    grid-column: span 12;
}

.border-bottom {
    border-bottom: 1px solid var(--line);
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 1055;
    display: none;
    overflow: hidden;
    padding: 22px;
    background: rgba(2, 6, 23, .62);
    backdrop-filter: blur(5px);
}

.modal.fade {
    opacity: 0;
    transition: opacity .16s ease;
}

.modal.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-dialog {
    width: min(100%, 620px);
    max-height: calc(100vh - 44px);
    margin: 0;
    display: flex;
}

.modal-lg {
    width: min(100%, 980px);
}

.modal-dialog-scrollable .modal-content {
    max-height: calc(100vh - 44px);
}

.modal-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    color: var(--ink);
    box-shadow: 0 26px 80px rgba(15, 23, 42, .24);
}

.modal-header,
.modal-footer {
    display: flex;
    align-items: center;
    border-color: var(--line);
    padding: 16px 20px;
    background: var(--panel-strong);
    flex: 0 0 auto;
}

.modal-header {
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
}

.modal-footer {
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid var(--line);
}

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

.modal-title {
    color: var(--navy);
    font-weight: 800;
}

.btn-close {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--field-muted);
    color: var(--ink);
    cursor: pointer;
}

.btn-close::before {
    content: "x";
    font-size: 1.15rem;
    line-height: 1;
}

.modal-backdrop {
    background: rgba(2, 6, 23, .68);
}

body.modal-open {
    overflow: hidden;
}

.vstack {
    display: grid;
}

.gap-3 {
    gap: 1rem;
}

@media (min-width: 768px) {
    .col-md-6 {
        grid-column: span 6;
    }
}

@media (min-width: 1200px) {
    .col-xl-3 {
        grid-column: span 3;
    }

    .col-xl-4 {
        grid-column: span 4;
    }

    .col-xl-6 {
        grid-column: span 6;
    }
}

@media (max-width: 992px) {
    .login-body {
        align-items: flex-start;
        padding: 18px;
    }

    .login-shell {
        width: min(100%, 460px);
    }

    .login-intro {
        min-height: auto;
        padding: 30px;
    }

    .login-card {
        min-height: auto;
        border-radius: 8px;
        padding: 58px 38px 42px;
    }

    .app-shell {
        display: block;
    }

    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
    }

    .sidebar.collapsed {
        width: 100%;
    }

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

    .sidebar-link {
        margin-bottom: 0;
    }

    .topbar,
    .content {
        padding-left: 16px;
        padding-right: 16px;
    }

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

@media (max-width: 576px) {
    .login-body {
        padding: 12px;
    }

    .login-body::before {
        width: 640px;
        top: 45%;
    }

    .login-body::after {
        width: 116px;
        right: -16px;
        top: 62%;
    }

    .login-intro,
    .login-card {
        padding: 42px 22px 30px;
    }

    .login-card-heading {
        align-items: flex-start;
    }

    .login-card h1 {
        font-size: 1.58rem;
    }

    .login-card-heading p {
        letter-spacing: 5px;
    }

    .sidebar-nav,
    .stat-grid {
        grid-template-columns: 1fr;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar-actions,
    .topbar-actions .btn,
    .theme-toggle {
        width: 100%;
    }

    .modal {
        align-items: stretch;
        padding: 10px;
    }

    .modal.show {
        align-items: stretch;
    }

    .modal-dialog,
    .modal-lg {
        width: 100%;
        max-height: calc(100vh - 20px);
    }

    .modal-dialog-scrollable .modal-content {
        max-height: calc(100vh - 20px);
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding-left: 14px;
        padding-right: 14px;
    }

    .modal-footer .btn {
        flex: 1;
    }

    .panel-heading,
    .master-list-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .master-list-row .action-group {
        width: 100%;
        justify-content: flex-start;
    }
}
