:root {
    --sidebar-width: 258px;
    --sidebar-collapsed-width: 82px;
    --topbar-height: 70px;
    --app-bg: #f3f7fa;
    --surface: #ffffff;
    --surface-muted: #f8fafc;
    --border: #e6edf2;
    --border-strong: #d8e3ea;
    --text: #243447;
    --text-muted: #7a8999;
    --heading: #172a3a;
    --primary: #18b8e6;
    --primary-dark: #0aa3d2;
    --primary-soft: #e9f9fe;
    --indigo: #6657e8;
    --green: #31c781;
    --yellow: #ffc928;
    --red: #f05b68;
    --cyan: #17b9e6;
    --shadow-sm: 0 4px 14px rgba(31, 61, 83, .055);
    --shadow-md: 0 12px 32px rgba(31, 61, 83, .10);
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
    min-height: 100vh;
    margin: 0;
    background: var(--app-bg);
    color: var(--text);
    font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: .94rem;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary-dark); text-decoration: none; }
a:hover { color: #087fa6; }
.min-width-0 { min-width: 0; }

/* Sidebar */
.app-sidebar {
    --bs-offcanvas-width: var(--sidebar-width);
    width: var(--sidebar-width) !important;
    background: var(--surface);
    border-right: 1px solid var(--border);
    color: var(--text);
    z-index: 1045;
    transition: width .24s ease, transform .3s ease;
}

.sidebar-brand {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: 0 1.15rem;
    border-bottom: 1px solid var(--border);
}

.brand-link {
    display: flex;
    align-items: center;
    gap: .72rem;
    min-width: 0;
    color: var(--heading);
}
.brand-link:hover { color: var(--heading); }
.brand-logo {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: linear-gradient(145deg, #2cc8ed, #0da9dc);
    color: #fff;
    font-size: 1.15rem;
    box-shadow: 0 7px 16px rgba(22, 184, 230, .25);
    overflow: hidden;
}
.brand-logo-image { background: #fff; border: 1px solid var(--border); box-shadow: none; }
.brand-logo img { width: 100%; height: 100%; object-fit: cover; }
.brand-copy { display: flex; flex-direction: column; min-width: 0; line-height: 1.12; }
.brand-copy strong { max-width: 165px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .95rem; }
.brand-copy small { color: var(--text-muted); font-size: .66rem; margin-top: .22rem; letter-spacing: .02em; }

.sidebar-profile {
    margin: 1.2rem 1rem .75rem;
    padding: 1rem .9rem;
    display: flex;
    align-items: center;
    gap: .78rem;
    background: linear-gradient(145deg, #f7fbfd, #eef8fb);
    border: 1px solid #e2f0f5;
    border-radius: 14px;
}
.user-avatar {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(145deg, #21c2eb, #109dce);
    color: #fff;
    font-size: .82rem;
    font-weight: 750;
    box-shadow: 0 5px 12px rgba(18, 170, 215, .22);
}
.user-avatar-lg { width: 47px; height: 47px; flex-basis: 47px; font-size: 1rem; }
.profile-copy { display: flex; flex-direction: column; min-width: 0; }
.profile-copy strong { max-width: 142px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--heading); font-size: .83rem; }
.profile-copy span { color: var(--text-muted); font-size: .7rem; margin-top: .14rem; }
.profile-copy small { color: var(--green); font-size: .64rem; margin-top: .22rem; }
.profile-copy small i { font-size: .38rem; vertical-align: middle; margin-right: .25rem; }

.sidebar-scroll {
    height: calc(100vh - var(--topbar-height) - 166px);
    overflow-y: auto;
    overflow-x: hidden;
    padding: .35rem .72rem 1rem;
    scrollbar-width: thin;
    scrollbar-color: #d8e7ed transparent;
}
.sidebar-caption {
    padding: .55rem .72rem .45rem;
    color: #a0acb7;
    font-size: .62rem;
    font-weight: 750;
    letter-spacing: .11em;
    text-transform: uppercase;
    white-space: nowrap;
}
.sidebar-caption-spaced { margin-top: .8rem; }
.sidebar-nav { display: flex; flex-direction: column; gap: .18rem; }
.sidebar-link {
    position: relative;
    min-height: 43px;
    display: flex;
    align-items: center;
    gap: .78rem;
    padding: .68rem .76rem;
    border-radius: 8px;
    color: #607181;
    font-size: .82rem;
    font-weight: 520;
    transition: color .18s ease, background .18s ease, transform .18s ease;
    white-space: nowrap;
}
.sidebar-link i {
    width: 22px;
    flex: 0 0 22px;
    text-align: center;
    color: #7b8d9b;
    font-size: 1rem;
    transition: color .18s ease;
}
.sidebar-link:hover {
    background: #f1f9fc;
    color: var(--primary-dark);
    transform: translateX(2px);
}
.sidebar-link:hover i { color: var(--primary); }
.sidebar-link.active {
    background: var(--primary-soft);
    color: #049bc8;
    font-weight: 650;
}
.sidebar-link.active::before {
    content: "";
    position: absolute;
    left: -.72rem;
    top: 9px;
    bottom: 9px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--primary);
}
.sidebar-link.active i { color: var(--primary); }

.sidebar-footer {
    height: 76px;
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .9rem 1.15rem;
    border-top: 1px solid var(--border);
    background: #fbfdfe;
    overflow: hidden;
}
.sidebar-footer-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: #eafaf3;
    color: var(--green);
}
.sidebar-footer div { display: flex; flex-direction: column; white-space: nowrap; }
.sidebar-footer strong { color: var(--heading); font-size: .7rem; }
.sidebar-footer small { color: var(--text-muted); font-size: .64rem; margin-top: .1rem; }

/* Top bar */
.app-topbar {
    left: var(--sidebar-width);
    right: 0;
    height: var(--topbar-height);
    background: linear-gradient(100deg, #24c3eb 0%, #12b6e5 55%, #08aee0 100%);
    border: 0;
    z-index: 1035;
    transition: left .24s ease;
    box-shadow: 0 3px 12px rgba(16, 151, 194, .16);
}
.topbar-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 1.4rem;
}
.topbar-icon-btn {
    width: 38px;
    height: 38px;
    place-items: center;
    border: 0;
    border-radius: 9px;
    background: rgba(255,255,255,.11);
    color: #fff;
    font-size: 1.16rem;
    transition: background .16s ease, transform .16s ease;
}
.topbar-icon-btn:hover { background: rgba(255,255,255,.22); color: #fff; transform: translateY(-1px); }
.global-search-wrap { position: relative; width: min(380px, 50vw); margin-left: .25rem; }
.global-search-wrap > i {
    position: absolute;
    left: .9rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    color: #7c8c98;
    font-size: .84rem;
}
.global-search {
    width: 100%;
    height: 38px;
    padding: 0 3.4rem 0 2.3rem;
    border: 1px solid rgba(255,255,255,.65);
    border-radius: 20px;
    outline: 0;
    background: rgba(255,255,255,.97);
    color: var(--text);
    font-size: .78rem;
    box-shadow: 0 3px 8px rgba(0,0,0,.05);
}
.global-search::placeholder { color: #a3aeb7; }
.global-search:focus { border-color: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.24); }
.search-hint {
    position: absolute;
    right: .75rem;
    top: 50%;
    transform: translateY(-50%);
    padding: .16rem .4rem;
    border: 1px solid #dbe5ea;
    border-radius: 5px;
    color: #95a1aa;
    background: #f7fafb;
    font-size: .58rem;
}
.global-search-results {
    position: absolute;
    top: calc(100% + .65rem);
    left: 0;
    right: 0;
    max-height: 310px;
    overflow-y: auto;
    padding: .45rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    z-index: 1080;
}
.search-result-item {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .7rem .75rem;
    border-radius: 8px;
    color: var(--text);
    font-size: .78rem;
}
.search-result-item:hover, .search-result-item.is-active { background: var(--primary-soft); color: var(--primary-dark); }
.search-result-item i { color: var(--primary); font-size: 1rem; }
.search-empty { padding: 1rem; text-align: center; color: var(--text-muted); font-size: .76rem; }
.topbar-actions { display: flex; align-items: center; gap: .42rem; }
.topbar-divider { width: 1px; height: 28px; margin: 0 .28rem; background: rgba(255,255,255,.34); }
.user-menu-button {
    display: flex;
    align-items: center;
    gap: .62rem;
    border: 0;
    padding: .18rem .28rem .18rem .2rem;
    border-radius: 22px;
    background: transparent;
    color: #fff;
}
.user-menu-button:hover { background: rgba(255,255,255,.10); }
.user-menu-button .user-avatar { background: #fff; color: var(--primary-dark); box-shadow: 0 3px 8px rgba(0,0,0,.09); }
.user-menu-copy { flex-direction: column; align-items: flex-start; line-height: 1.1; }
.user-menu-copy strong { max-width: 145px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .72rem; }
.user-menu-copy small { opacity: .82; font-size: .61rem; margin-top: .14rem; }
.user-menu-button > i { font-size: .62rem; opacity: .8; }
.quick-menu { width: 250px; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-md); }
.quick-menu-title { padding: .55rem .65rem; color: var(--heading); font-size: .72rem; font-weight: 750; }
.quick-action { display: flex; align-items: center; gap: .72rem; padding: .68rem .7rem; border-radius: 8px; color: var(--text); font-size: .76rem; }
.quick-action:hover { background: var(--primary-soft); color: var(--primary-dark); }
.quick-action i { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 8px; background: #edf9fd; color: var(--primary); }
.user-dropdown { min-width: 220px; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-md); }
.dropdown-item { font-size: .8rem; padding-top: .58rem; padding-bottom: .58rem; }

/* Layout */
.main-content {
    min-height: 100vh;
    margin-left: var(--sidebar-width);
    padding-top: var(--topbar-height);
    transition: margin-left .24s ease;
}
.page-container { min-height: calc(100vh - var(--topbar-height)); padding: 0 1.45rem 1.2rem; }
.page-context-bar {
    min-height: 43px;
    margin: 0 -1.45rem 1.25rem;
    padding: .72rem 1.45rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: #fff;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-size: .69rem;
}
.context-label { color: #91a0ac; }
.context-separator { margin: 0 .4rem; color: #c5ced5; }
.context-current { color: #647685; font-weight: 600; }
.context-date { white-space: nowrap; }
.context-date i { margin-right: .35rem; color: var(--primary); }
.app-footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.5rem;
    padding: 1rem .15rem .25rem;
    border-top: 1px solid var(--border);
    color: #8a98a5;
    font-size: .66rem;
}

/* Collapsed sidebar */
@media (min-width: 992px) {
    .app-sidebar { position: fixed; inset: 0 auto 0 0; visibility: visible !important; transform: none !important; }
    body.sidebar-collapsed .app-sidebar { width: var(--sidebar-collapsed-width) !important; }
    body.sidebar-collapsed .app-topbar { left: var(--sidebar-collapsed-width); }
    body.sidebar-collapsed .main-content { margin-left: var(--sidebar-collapsed-width); }
    body.sidebar-collapsed .brand-copy,
    body.sidebar-collapsed .profile-copy,
    body.sidebar-collapsed .sidebar-caption,
    body.sidebar-collapsed .sidebar-link span,
    body.sidebar-collapsed .sidebar-footer div { display: none; }
    body.sidebar-collapsed .sidebar-brand { justify-content: center; padding-inline: .55rem; }
    body.sidebar-collapsed .sidebar-profile { justify-content: center; margin-inline: .65rem; padding-inline: .4rem; }
    body.sidebar-collapsed .sidebar-scroll { padding-inline: .65rem; }
    body.sidebar-collapsed .sidebar-link { justify-content: center; padding-inline: .3rem; }
    body.sidebar-collapsed .sidebar-link i { width: auto; flex-basis: auto; }
    body.sidebar-collapsed .sidebar-link.active::before { left: -.65rem; }
    body.sidebar-collapsed .sidebar-footer { justify-content: center; padding-inline: .4rem; }
}

/* Typography and page headings */
h1, h2, h3, h4, h5, h6 { color: var(--heading); font-weight: 650; }
.h1, .h2, .h3, .h4, .h5, .h6 { color: var(--heading); }
.page-title-wrap h1, .page-title-wrap h2 { margin-bottom: .2rem; }
.text-muted { color: var(--text-muted) !important; }

/* Cards */
.card {
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}
.card-header {
    min-height: 55px;
    display: flex;
    align-items: center;
    background: transparent;
    border-bottom: 1px solid var(--border);
    padding: .9rem 1.05rem;
}
.card-header h4, .card-header h5, .card-header h6 { font-size: .9rem; font-weight: 650; }
.card-header.bg-primary {
    background: linear-gradient(100deg, #22c1e9, #10addc) !important;
    border-bottom: 0;
    color: #fff !important;
}
.card-header.bg-primary h1, .card-header.bg-primary h2, .card-header.bg-primary h3,
.card-header.bg-primary h4, .card-header.bg-primary h5, .card-header.bg-primary h6 { color: #fff; }
.card-body { padding: 1.05rem; }
.card.shadow-sm { box-shadow: var(--shadow-sm) !important; }

/* Dashboard */
.dashboard-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.1rem;
}
.dashboard-heading h1 { font-size: 1.45rem; margin: 0 0 .2rem; }
.dashboard-heading p { font-size: .75rem; }
.stat-card { position: relative; min-height: 112px; padding: 1rem; overflow: hidden; }
.stat-card::after {
    content: "";
    position: absolute;
    width: 74px;
    height: 74px;
    right: -27px;
    top: -27px;
    border-radius: 50%;
    background: currentColor;
    opacity: .045;
}
.stat-card-inner { display: flex; align-items: flex-start; gap: .9rem; }
.stat-card-icon {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: grid;
    place-items: center;
    border-radius: 4px;
    font-size: 1.45rem;
}
.stat-card-icon.red { color: var(--red); background: #fff0f2; }
.stat-card-icon.yellow { color: #eba900; background: #fff8df; }
.stat-card-icon.green { color: var(--green); background: #eafaf3; }
.stat-card-icon.cyan { color: var(--cyan); background: #eaf9fd; }
.stat-card-label { color: var(--text-muted); font-size: .67rem; margin-bottom: .05rem; }
.stat-card-value { color: var(--heading); font-size: 1.34rem; font-weight: 680; line-height: 1.2; }
.stat-card-meta { margin-top: .65rem; color: #93a0aa; font-size: .61rem; }
.stat-card-meta i { margin-right: .28rem; }
.dashboard-card-title { font-size: .88rem; margin: 0; }
.dashboard-card-subtitle { color: var(--text-muted); font-size: .64rem; margin: .18rem 0 0; }
.workflow-list { display: flex; flex-direction: column; gap: .96rem; }
.workflow-head { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .35rem; color: #60717f; font-size: .68rem; }
.workflow-head strong { color: var(--heading); font-weight: 650; }
.workflow-track { height: 3px; background: #e9eef2; border-radius: 2px; overflow: hidden; }
.workflow-track span { display: block; height: 100%; border-radius: inherit; }
.bg-cyan-app { background: var(--cyan); }
.bg-indigo-app { background: var(--indigo); }
.bg-green-app { background: var(--green); }
.bg-red-app { background: var(--red); }
.bg-yellow-app { background: var(--yellow); }
.donut-layout { display: flex; align-items: center; justify-content: center; min-height: 235px; }
.donut-chart {
    --donut-size: 148px;
    width: var(--donut-size);
    height: var(--donut-size);
    position: relative;
    border-radius: 50%;
    display: grid;
    place-items: center;
}
.donut-chart::before {
    content: "";
    position: absolute;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: #fff;
    box-shadow: inset 0 0 0 1px #f0f3f5;
}
.donut-center { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; }
.donut-center strong { color: var(--heading); font-size: 1.42rem; line-height: 1; }
.donut-center span { color: var(--text-muted); font-size: .62rem; margin-top: .3rem; }
.chart-legend { display: flex; justify-content: center; flex-wrap: wrap; gap: .65rem .95rem; padding: 0 .8rem 1rem; }
.chart-legend-item { display: flex; align-items: center; gap: .35rem; color: #687985; font-size: .61rem; }
.chart-legend-dot { width: 7px; height: 7px; border-radius: 2px; }
.area-list { display: flex; flex-direction: column; }
.area-row { display: grid; grid-template-columns: minmax(0, 1fr) 52px 48px; align-items: center; gap: .6rem; padding: .72rem 0; border-bottom: 1px solid #edf2f5; font-size: .67rem; }
.area-row:last-child { border-bottom: 0; }
.area-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #5f7180; }
.area-bar { height: 4px; border-radius: 3px; background: #eef2f5; overflow: hidden; }
.area-bar span { display: block; height: 100%; border-radius: inherit; }
.area-count { text-align: right; color: var(--heading); font-weight: 620; }
.empty-state-mini { min-height: 190px; display: grid; place-items: center; text-align: center; color: var(--text-muted); font-size: .72rem; }
.empty-state-mini i { display: block; color: #c4d1d9; font-size: 2rem; margin-bottom: .5rem; }

/* Tables */
.table-responsive { scrollbar-width: thin; scrollbar-color: #cad9e1 transparent; }
.table { --bs-table-bg: transparent; --bs-table-hover-bg: #f7fbfd; margin-bottom: 0; color: var(--text); }
.table > :not(caption) > * > * { padding: .73rem .72rem; vertical-align: middle; border-bottom-color: #eaf0f4; font-size: .73rem; }
.table thead th {
    color: #617382;
    background: #f8fbfc;
    border-bottom: 1px solid var(--border-strong);
    font-size: .64rem;
    font-weight: 750;
    letter-spacing: .035em;
    text-transform: uppercase;
    white-space: nowrap;
}
.table-bordered > :not(caption) > * { border-width: 0; }
.table-bordered > :not(caption) > * > * { border-width: 0 0 1px; }
.table-primary { --bs-table-bg: #eef9fd; --bs-table-color: #456270; --bs-table-border-color: #dcecf2; }
.table .btn-sm { min-width: 31px; min-height: 30px; display: inline-grid; place-items: center; padding: .25rem .5rem; }
.list-group-item { border-color: var(--border); color: var(--text); }
.list-group-item-action:hover { background: #f7fbfd; }

/* Forms */
.form-label { color: #526574; font-size: .72rem; font-weight: 620; margin-bottom: .42rem; }
.form-control, .form-select {
    min-height: 42px;
    border: 1px solid #dbe5eb;
    border-radius: 6px;
    color: var(--text);
    background-color: #fff;
    font-size: .78rem;
    box-shadow: none;
}
textarea.form-control { min-height: 104px; }
.form-control:focus, .form-select:focus {
    border-color: #6bd2ed;
    box-shadow: 0 0 0 .19rem rgba(24, 184, 230, .12);
}
.input-group-text { border-color: #dbe5eb; background: #f7fafb; color: #7a8a97; font-size: .78rem; }
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
.required::after { content: " *"; color: var(--red); }

/* Buttons and badges */
.btn {
    min-height: 38px;
    border-radius: 6px;
    font-size: .75rem;
    font-weight: 620;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { --bs-btn-bg: var(--primary); --bs-btn-border-color: var(--primary); --bs-btn-hover-bg: var(--primary-dark); --bs-btn-hover-border-color: var(--primary-dark); --bs-btn-active-bg: var(--primary-dark); --bs-btn-active-border-color: var(--primary-dark); }
.btn-outline-primary { --bs-btn-color: var(--primary-dark); --bs-btn-border-color: #8edcf0; --bs-btn-hover-bg: var(--primary); --bs-btn-hover-border-color: var(--primary); }
.btn-success { --bs-btn-bg: var(--green); --bs-btn-border-color: var(--green); }
.btn-danger { --bs-btn-bg: var(--red); --bs-btn-border-color: var(--red); }
.btn-warning { --bs-btn-bg: var(--yellow); --bs-btn-border-color: var(--yellow); --bs-btn-color: #5b4700; }
.btn-light { --bs-btn-bg: #f6f9fb; --bs-btn-border-color: #e1e9ee; --bs-btn-color: #536573; }
.badge { border-radius: 4px; padding: .38em .55em; font-size: .6rem; font-weight: 680; letter-spacing: .02em; }
.text-bg-primary { background-color: #e7f8fd !important; color: #079cca !important; }
.text-bg-warning { background-color: #fff6d8 !important; color: #ae7c00 !important; }
.text-bg-success { background-color: #e6f9f0 !important; color: #15945d !important; }
.text-bg-secondary { background-color: #edf1f4 !important; color: #687783 !important; }
.text-bg-dark { background-color: #e8edf1 !important; color: #445561 !important; }

/* Alerts and utilities */
.app-alert, .alert { border: 0; border-left: 3px solid currentColor; border-radius: 6px; font-size: .76rem; box-shadow: var(--shadow-sm); }
.alert-success { color: #16744f; background: #eaf8f2; }
.alert-danger { color: #a63d48; background: #fff0f2; }
.alert-warning { color: #8c6b04; background: #fff8df; }
.alert-info { color: #087c9f; background: #eaf9fd; }
.modal-content { border: 0; border-radius: 10px; box-shadow: var(--shadow-md); }
.modal-header, .modal-footer { border-color: var(--border); }
.pagination { --bs-pagination-color: var(--primary-dark); --bs-pagination-active-bg: var(--primary); --bs-pagination-active-border-color: var(--primary); font-size: .75rem; }
.print-header { display: none; }

/* Login */
.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem;
    background:
        radial-gradient(circle at 15% 20%, rgba(255,255,255,.18) 0, rgba(255,255,255,0) 25%),
        linear-gradient(120deg, #16b9e6 0%, #12afe0 47%, #eef7fa 47%, #f8fbfc 100%);
}
.login-shell {
    width: min(980px, 100%);
    min-height: 580px;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    overflow: hidden;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 25px 65px rgba(27, 86, 112, .20);
}
.login-brand-panel {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3.7rem;
    color: #fff;
    background: linear-gradient(145deg, #1cc0e9 0%, #10a9dc 100%);
}
.login-brand-panel::before, .login-brand-panel::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.09); }
.login-brand-panel::before { width: 330px; height: 330px; right: -150px; top: -120px; }
.login-brand-panel::after { width: 220px; height: 220px; left: -115px; bottom: -90px; }
.login-brand-content { position: relative; z-index: 1; }
.login-brand-mark { width: 64px; height: 64px; display: grid; place-items: center; margin-bottom: 1.8rem; border-radius: 16px; background: rgba(255,255,255,.96); color: var(--primary-dark); box-shadow: 0 12px 30px rgba(0,0,0,.10); overflow: hidden; font-size: 1.7rem; }
.login-brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.login-brand-panel h1 { max-width: 410px; margin: 0 0 1rem; color: #fff; font-size: 2.1rem; line-height: 1.15; font-weight: 720; }
.login-brand-panel p { max-width: 430px; margin: 0; color: rgba(255,255,255,.82); font-size: .85rem; line-height: 1.7; }
.login-feature-list { display: grid; gap: .8rem; margin-top: 2rem; }
.login-feature { display: flex; align-items: center; gap: .65rem; color: rgba(255,255,255,.9); font-size: .75rem; }
.login-feature i { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.17); }
.login-form-panel { display: flex; align-items: center; padding: 3.4rem; }
.login-form-box { width: 100%; }
.login-eyebrow { color: var(--primary-dark); font-size: .65rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.login-form-box h2 { margin: .4rem 0 .45rem; font-size: 1.65rem; }
.login-form-box > p { margin-bottom: 1.8rem; color: var(--text-muted); font-size: .78rem; }
.login-input { position: relative; margin-bottom: 1rem; }
.login-input > i { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: #8aa0ae; }
.login-input .form-control { height: 48px; padding-left: 2.55rem; border-radius: 8px; }
.password-toggle { position: absolute; right: .65rem; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border: 0; background: transparent; color: #8aa0ae; }
.login-submit { width: 100%; height: 48px; margin-top: .55rem; border-radius: 8px; box-shadow: 0 8px 18px rgba(17, 171, 219, .22); }
.login-footer-copy { margin-top: 1.5rem; text-align: center; color: #9aa7b1; font-size: .65rem; }

@media (max-width: 991.98px) {
    .app-topbar { left: 0; }
    .main-content { margin-left: 0; }
    .app-sidebar { box-shadow: 12px 0 30px rgba(20, 49, 68, .14); }
    .page-container { padding-inline: 1rem; }
    .page-context-bar { margin-inline: -1rem; padding-inline: 1rem; }
    .login-shell { grid-template-columns: 1fr; max-width: 540px; }
    .login-brand-panel { display: none; }
    .login-form-panel { min-height: 560px; }
}

@media (max-width: 767.98px) {
    .topbar-inner { padding-inline: .75rem; }
    .global-search-wrap { width: min(55vw, 270px); }
    .page-context-bar { margin-bottom: 1rem; }
    .context-date { display: none; }
    .dashboard-heading { align-items: flex-start; flex-direction: column; }
    .dashboard-heading .btn { width: 100%; }
    .app-footer { flex-direction: column; gap: .3rem; }
    .card-header { padding-inline: .85rem; }
    .card-body { padding: .9rem; }
    .area-row { grid-template-columns: minmax(0, 1fr) 45px 38px; }
}

@media (max-width: 575.98px) {
    .global-search-wrap { width: 48vw; }
    .search-hint { display: none !important; }
    .page-container { padding-inline: .75rem; }
    .page-context-bar { margin-inline: -.75rem; padding-inline: .75rem; }
    .login-page { padding: .75rem; background: #eef7fa; }
    .login-shell { min-height: calc(100vh - 1.5rem); border-radius: 10px; }
    .login-form-panel { min-height: auto; padding: 2rem 1.35rem; }
}

@media print {
    .app-topbar, .app-sidebar, .page-context-bar, .app-footer, .no-print, .btn, form { display: none !important; }
    .main-content { margin: 0 !important; padding: 0 !important; }
    .page-container { padding: 0 !important; }
    body { background: #fff; }
    .card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
    .print-header { display: block; }
}

/* Detail views and complementary badges */
.badge-soft-danger { background: #fff0f2 !important; color: #c34654 !important; }
.badge-soft-info { background: #eaf9fd !important; color: #078caf !important; }
.detail-list { margin: 0; }
.detail-list > div { display: grid; grid-template-columns: 42% 58%; gap: .75rem; padding: .75rem 0; border-bottom: 1px solid var(--border); }
.detail-list > div:first-child { padding-top: 0; }
.detail-list > div:last-child { padding-bottom: 0; border-bottom: 0; }
.detail-list dt { margin: 0; color: var(--text-muted); font-size: .68rem; font-weight: 600; }
.detail-list dd { margin: 0; color: var(--heading); font-size: .73rem; font-weight: 620; text-align: right; overflow-wrap: anywhere; }
.detail-text { min-height: 80px; color: #5d6f7d; font-size: .76rem; line-height: 1.7; white-space: normal; }
@media (max-width: 575.98px) {
    .detail-list > div { grid-template-columns: 1fr; gap: .25rem; }
    .detail-list dd { text-align: left; }
}
