/* ==========================================================================
   Easy Investology MIS - design system
   Hand written so the app always renders correctly even with no network.
   Tailwind (local build) is still loaded for utility classes in templates.
   ========================================================================== */

:root {
    --ei-red: #B11226;
    --ei-red-dark: #8C0E1E;
    --ei-red-light: #D8384A;
    --ei-red-soft: #FDF2F3;
    --ei-gold: #C9A227;
    --ei-gold-soft: #FBF6E7;
    --ei-ink: #111827;
    --ei-text: #374151;
    --ei-muted: #6B7280;
    --ei-line: #E8EAEF;
    --ei-line-soft: #F1F3F7;
    --ei-bg: #F6F7FB;
    --ei-white: #FFFFFF;
    --ei-green: #15803D;
    --ei-blue: #1D4ED8;
    --ei-amber: #B45309;
    --ei-violet: #6D28D9;
    --ei-radius: 14px;
    --ei-radius-sm: 9px;
    --ei-shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
    --ei-shadow: 0 6px 18px -6px rgba(16, 24, 40, .12), 0 2px 6px -2px rgba(16, 24, 40, .06);
    --ei-shadow-lg: 0 18px 40px -16px rgba(16, 24, 40, .22);
    --ei-sidebar-w: 264px;
    --ei-topbar-h: 76px;
    --ei-ease: cubic-bezier(.4, 0, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
    margin: 0;
    font-family: 'Poppins', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.55;
    color: var(--ei-text);
    background: var(--ei-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5 { color: var(--ei-ink); font-weight: 600; margin: 0; line-height: 1.3; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
canvas { display: block; }

/* ---------- Scrollbars ---------- */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #C7CDD8; border-radius: 20px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #9AA3B2; background-clip: content-box; }
* { scrollbar-width: thin; scrollbar-color: #C7CDD8 transparent; }

/* ==========================================================================
   Forms
   Checkboxes/radios/color/file inputs are excluded from the full-width rule so
   they render at their natural size (this was clipping the filter checkboxes).
   ========================================================================== */
label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--ei-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: .06em;
    white-space: nowrap;
}

body input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="color"]),
body select,
body textarea {
    width: 100%;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--ei-ink);
    background: var(--ei-white);
    border: 1px solid var(--ei-line);
    border-radius: var(--ei-radius-sm);
    padding: 9px 12px;
    transition: border-color .18s var(--ei-ease), box-shadow .18s var(--ei-ease), background .18s var(--ei-ease);
}

body select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 34px;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 11px center;
    cursor: pointer;
}

body input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):hover,
body select:hover,
body textarea:hover { border-color: #D3D8E2; }

body input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus,
body select:focus,
body textarea:focus {
    outline: none;
    border-color: var(--ei-red);
    background: var(--ei-white);
    box-shadow: 0 0 0 3.5px rgba(177, 18, 38, .12);
}

input::placeholder, textarea::placeholder { color: #A5ADBB; font-weight: 400; }

input[type="checkbox"], input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: var(--ei-red);
    cursor: pointer;
    flex: none;
    vertical-align: middle;
}

input[readonly], input[disabled], select[disabled] {
    background: var(--ei-line-soft);
    color: var(--ei-muted);
    cursor: not-allowed;
}

/* All data entry and edit text inputs must display in capital letters */
.uppercase-form input[type="text"],
.uppercase-form input[type="search"],
.uppercase-form textarea,
.search-existing-input,
input.uppercase-input {
    text-transform: uppercase;
}

/* Breadcrumb */
.crumb { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; font-size: 11.5px; color: var(--ei-muted); }
.crumb a { color: var(--ei-muted); transition: color .16s var(--ei-ease); }
.crumb a:hover { color: var(--ei-red); }
.crumb .sep { opacity: .5; }
.crumb .cur { color: var(--ei-ink); font-weight: 600; }

.form-group { margin-bottom: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px 20px; }
.form-hint { font-size: 11.5px; color: var(--ei-muted); margin-top: 5px; }

.form-section { margin-bottom: 26px; }
.form-section:last-of-type { margin-bottom: 6px; }
.form-section-title {
    display: flex; align-items: center; gap: 9px;
    font-size: 13.5px; font-weight: 600; color: var(--ei-ink);
    padding-bottom: 10px; margin: 0 0 16px;
    border-bottom: 1px solid var(--ei-line-soft);
}
.form-section-title .bar { width: 3px; height: 14px; border-radius: 3px; background: var(--ei-red); flex: none; }

.info-banner {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 12px 14px; border-radius: 10px;
    background: var(--ei-gold-soft); border: 1px solid #EFE0B5;
    color: #7A5E0F; font-size: 12.5px; font-weight: 500;
}
.info-banner svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1;
    padding: 11px 18px;
    border: 1px solid transparent;
    border-radius: var(--ei-radius-sm);
    cursor: pointer;
    white-space: nowrap;
    transition: transform .12s var(--ei-ease), box-shadow .18s var(--ei-ease),
                background .18s var(--ei-ease), color .18s var(--ei-ease), border-color .18s var(--ei-ease);
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; flex: none; }

/* NOTE: Tailwind's preflight contains
   `button, [type='button'], [type='reset'], [type='submit'] { background-color:
   transparent; background-image: none }` which has the SAME specificity as a
   single class. Because Tailwind injects its stylesheet after this file, every
   button fill rule below is prefixed with `body` so the brand colours win. */
body .btn-primary { background: linear-gradient(180deg, var(--ei-red-light), var(--ei-red)); color: #fff; box-shadow: 0 6px 16px -8px rgba(177, 18, 38, .75); }
body .btn-primary:hover { background: linear-gradient(180deg, var(--ei-red), var(--ei-red-dark)); color: #fff; }

body .btn-dark { background: #1F2937; color: #fff; }
body .btn-dark:hover { background: #111827; color: #fff; }

body .btn-success { background: linear-gradient(180deg, #1B9E52, #15803D); color: #fff; box-shadow: 0 6px 16px -8px rgba(21, 128, 61, .7); }
body .btn-success:hover { background: linear-gradient(180deg, #15803D, #126434); color: #fff; }

body .btn-ghost { background: var(--ei-white); color: var(--ei-text); border-color: var(--ei-line); }
body .btn-ghost:hover { background: #FBFBFD; border-color: #D3D8E2; color: var(--ei-ink); }

body .btn-soft { background: var(--ei-red-soft); color: var(--ei-red); }
body .btn-soft:hover { background: #FBE4E7; }

body .menu-btn { background: #fff; }
body .menu-btn:hover { background: var(--ei-line-soft); }

body .nav-toggle { background: transparent; }
body .nav-toggle:hover { background: rgba(255, 255, 255, .1); }
body .nav-group.is-open > .nav-toggle { background: rgba(255, 255, 255, .13); }

.btn-sm { padding: 7px 12px; font-size: 12.5px; border-radius: 8px; }
.btn-block { width: 100%; }

.btn-group { display: flex; gap: 10px; flex-wrap: wrap; }

/* ==========================================================================
   App shell / sidebar
   ========================================================================== */
.app-shell { display: flex; min-height: 100vh; width: 100%; }

.sidebar {
    width: var(--ei-sidebar-w);
    flex: none;
    position: fixed;
    top: 0; bottom: 0; left: 0;
    z-index: 60;
    display: flex;
    flex-direction: column;
    color: #fff;
    background:
        radial-gradient(120% 60% at 100% 0%, rgba(201, 162, 39, .18) 0%, rgba(201, 162, 39, 0) 60%),
        linear-gradient(177deg, #A6101F 0%, #8C0E1E 48%, #6E0A17 100%);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .12), 12px 0 34px -22px rgba(17, 24, 39, .55);
    transition: transform .26s var(--ei-ease);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, .14);
}

.brand-mark {
    width: 44px; height: 44px;
    flex: none;
    border-radius: 13px;
    background: rgba(255, 255, 255, .1);
    display: grid;
    place-items: center;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22), 0 8px 18px -12px rgba(0, 0, 0, .8);
}
.brand-mark img { width: 34px; height: 34px; display: block; }

.brand-text { min-width: 0; display: flex; flex-direction: column; }
.brand-name { display: block; font-size: 15.5px; font-weight: 700; letter-spacing: .01em; color: #fff; white-space: nowrap; }
.brand-sub {
    display: block;
    font-size: 9.5px; font-weight: 600; letter-spacing: .2em;
    text-transform: uppercase; color: rgba(255, 255, 255, .66); margin-top: 2px;
}

.sidebar-nav { flex: 1 1 auto; overflow-y: auto; padding: 16px 12px 20px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .25); background-clip: content-box; }

.nav-label {
    font-size: 9.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
    color: rgba(255, 255, 255, .5); padding: 6px 10px 10px;
}

.nav-toggle {
    width: 100%;
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 11px 12px;
    background: transparent; border: 0; border-radius: 10px;
    color: #fff; font: inherit; font-size: 14px; font-weight: 500;
    cursor: pointer; text-align: left;
    transition: background .18s var(--ei-ease), color .18s var(--ei-ease);
}
.nav-toggle:hover { background: rgba(255, 255, 255, .1); }
.nav-toggle .nav-left { display: flex; align-items: center; gap: 11px; min-width: 0; }
.nav-toggle .nav-icon { width: 18px; height: 18px; flex: none; opacity: .95; }
.nav-toggle .nav-caret { width: 15px; height: 15px; flex: none; opacity: .75; transition: transform .22s var(--ei-ease); }
.nav-group.is-open > .nav-toggle { background: rgba(255, 255, 255, .13); font-weight: 600; }
.nav-group.is-open > .nav-toggle .nav-caret { transform: rotate(180deg); }

.nav-sub { padding: 6px 0 8px 13px; margin: 2px 0 2px 21px; border-left: 1.5px solid rgba(255, 255, 255, .22); }

.nav-link {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px; margin-bottom: 3px;
    border-radius: 9px;
    font-size: 13px; font-weight: 500;
    color: rgba(255, 255, 255, .82);
    transition: background .16s var(--ei-ease), color .16s var(--ei-ease), transform .16s var(--ei-ease);
}
.nav-link .nav-icon {
    width: 17px;
    height: 17px;
    flex: none;
    opacity: .92;
}
.nav-link:hover { background: rgba(255, 255, 255, .12); color: #fff; transform: translateX(2px); }
.nav-link.is-active {
    background: #fff; color: var(--ei-red); font-weight: 600;
    box-shadow: 0 8px 18px -12px rgba(0, 0, 0, .75);
}
.nav-link .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .55; flex: none; }
.nav-link.is-active .dot { opacity: 1; }

.nav-link.soon { color: rgba(255, 255, 255, .58); font-size: 12.8px; }
.nav-link.soon .nav-icon { width: 16px; height: 16px; opacity: .8; }
.nav-link .soon-tag {
    margin-left: auto; font-size: 8.5px; font-weight: 700; letter-spacing: .08em;
    text-transform: uppercase; padding: 2.5px 6px; border-radius: 999px;
    background: rgba(255, 255, 255, .16); color: rgba(255, 255, 255, .85);
}

.sidebar-foot {
    padding: 13px 18px;
    border-top: 1px solid rgba(255, 255, 255, .14);
    font-size: 11px; color: rgba(255, 255, 255, .6);
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
}

.sidebar-backdrop {
    position: fixed; inset: 0; z-index: 55;
    background: rgba(17, 24, 39, .5);
    backdrop-filter: blur(2px);
}

/* ==========================================================================
   Main column / topbar / page
   ========================================================================== */
.app-main {
    flex: 1 1 auto;
    min-width: 0;
    margin-left: var(--ei-sidebar-w);
    display: flex;
    flex-direction: column;
}

.topbar {
    position: sticky; top: 0; z-index: 40;
    min-height: var(--ei-topbar-h);
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 12px 26px;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--ei-line);
    box-shadow: 0 10px 24px -26px rgba(16, 24, 40, .6);
}

.topbar-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.topbar-right { display: flex; align-items: center; gap: 12px; flex: none; }

.page-title { font-size: 20px; font-weight: 700; letter-spacing: -.012em; }
.page-subtitle { font-size: 12.2px; color: var(--ei-muted); margin-top: 1px; }

.menu-btn {
    display: none;
    width: 40px; height: 40px; flex: none;
    align-items: center; justify-content: center;
    border: 1px solid var(--ei-line); border-radius: 10px;
    background: #fff; color: var(--ei-ink); cursor: pointer;
    transition: background .16s var(--ei-ease), border-color .16s var(--ei-ease);
}
.menu-btn:hover { background: var(--ei-line-soft); }

.user-chip {
    display: flex; align-items: center; gap: 10px;
    padding: 5px 12px 5px 5px;
    border: 1px solid var(--ei-line); border-radius: 999px;
    background: #fff;
}
.user-avatar {
    width: 32px; height: 32px; flex: none; border-radius: 50%;
    display: grid; place-items: center;
    font-size: 12px; font-weight: 700; color: #fff;
    background: linear-gradient(150deg, var(--ei-red-light), var(--ei-red-dark));
    box-shadow: 0 4px 10px -6px rgba(177, 18, 38, .9);
}
.user-meta { display: flex; flex-direction: column; line-height: 1.15; }
.user-meta .u-name { display: block; font-size: 12.5px; font-weight: 600; color: var(--ei-ink); }
.user-meta .u-role { display: block; font-size: 10.5px; color: var(--ei-muted); }

.page { flex: 1 1 auto; padding: 22px 26px 46px; }
.page-inner { max-width: 1460px; margin: 0 auto; width: 100%; }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.section-title { font-size: 14.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.section-title .bar { width: 3px; height: 15px; border-radius: 3px; background: var(--ei-red); flex: none; }
.section-desc { font-size: 12px; color: var(--ei-muted); margin-top: 2px; }

/* ==========================================================================
   Cards
   ========================================================================== */
.premium-card {
    background: var(--ei-white);
    border: 1px solid var(--ei-line);
    border-radius: var(--ei-radius);
    box-shadow: var(--ei-shadow);
}

.card-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 15px 18px;
    border-bottom: 1px solid var(--ei-line-soft);
}
.card-head h3 { font-size: 13.8px; font-weight: 600; }
.card-body { padding: 18px; }
.card-body.tight { padding: 14px; }
.card-foot { padding: 13px 18px; border-top: 1px solid var(--ei-line-soft); background: #FCFCFE; }

/* KPI tiles */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.kpi-tile {
    position: relative;
    background: var(--ei-white);
    border: 1px solid var(--ei-line);
    border-radius: var(--ei-radius);
    padding: 16px 18px;
    box-shadow: var(--ei-shadow-sm);
    overflow: hidden;
    transition: transform .18s var(--ei-ease), box-shadow .18s var(--ei-ease);
}
.kpi-tile::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3.5px; background: var(--kpi-accent, var(--ei-red)); }
.kpi-tile:hover { transform: translateY(-2px); box-shadow: var(--ei-shadow); }
.kpi-label {
    font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
    color: var(--ei-muted); display: flex; align-items: center; gap: 6px;
}
.kpi-value { font-size: 25px; font-weight: 700; color: var(--ei-ink); margin-top: 7px; letter-spacing: -.02em; }
.kpi-value.sm { font-size: 21px; }
.kpi-foot { font-size: 11.2px; color: var(--ei-muted); margin-top: 4px; }
.kpi-icon {
    position: absolute; right: 14px; top: 13px;
    width: 32px; height: 32px; border-radius: 10px;
    display: grid; place-items: center;
    color: var(--kpi-accent, var(--ei-red));
    background: #F6F7FB;
    border: 1px solid var(--ei-line-soft);
}
.kpi-icon svg { width: 16px; height: 16px; }

.accent-red { --kpi-accent: #B11226; }
.accent-blue { --kpi-accent: #1D4ED8; }
.accent-green { --kpi-accent: #15803D; }
.accent-amber { --kpi-accent: #B45309; }
.accent-violet { --kpi-accent: #6D28D9; }
.accent-slate { --kpi-accent: #475569; }

/* ==========================================================================
   Badges / pills
   ========================================================================== */
.badge {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 11px; font-weight: 600; line-height: 1;
    padding: 5px 9px; border-radius: 999px;
    border: 1px solid transparent; white-space: nowrap;
}
.badge-red { background: var(--ei-red-soft); color: #9C1220; border-color: #F7D2D7; }
.badge-green { background: #ECFDF3; color: #067647; border-color: #C7EEDA; }
.badge-blue { background: #EFF4FF; color: #1D4ED8; border-color: #D3E0FF; }
.badge-amber { background: #FFF7E8; color: #9A5B08; border-color: #FBE3BA; }
.badge-violet { background: #F4F0FF; color: #6D28D9; border-color: #E1D7FF; }
.badge-slate { background: #F4F5F7; color: #475569; border-color: #E3E6EB; }
.badge-gold { background: var(--ei-gold-soft); color: #8A6D12; border-color: #EFE0B5; }

.tag {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 11.5px; font-weight: 500; color: var(--ei-muted);
    background: #F7F8FB; border: 1px solid var(--ei-line);
    padding: 5px 10px; border-radius: 8px;
}

/* ==========================================================================
   Filter bar
   ========================================================================== */
.filter-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; }
.filter-field { min-width: 0; }
.filter-field.w-xs { width: 138px; }
.filter-field.w-sm { width: 168px; }
.filter-field.w-md { width: 200px; }
.filter-actions { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.switch {
    display: flex; align-items: center; gap: 8px;
    font-size: 12.5px; font-weight: 500; color: var(--ei-text);
    text-transform: none; letter-spacing: normal;
    background: #F7F8FB; border: 1px solid var(--ei-line);
    padding: 9px 12px; border-radius: 9px; cursor: pointer; margin: 0;
    transition: background .16s var(--ei-ease), border-color .16s var(--ei-ease);
}
.switch:hover { background: #F1F3F8; border-color: #D3D8E2; }
.switch input { margin: 0; }

/* ==========================================================================
   Data table
   ========================================================================== */
.table-wrap {
    overflow: auto;
    max-height: 620px;
    border-radius: var(--ei-radius);
    background: #fff;
    border: 1px solid var(--ei-line);
    box-shadow: var(--ei-shadow);
}

table.data-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.8px; }
table.data-table thead th {
    position: sticky; top: 0; z-index: 2;
    background: #F7F8FB;
    color: #4B5563;
    font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
    text-align: left; white-space: nowrap;
    padding: 12px 14px;
    border-bottom: 1px solid var(--ei-line);
}
table.data-table tbody td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--ei-line-soft);
    color: var(--ei-text);
    white-space: nowrap;
    vertical-align: middle;
}
table.data-table tbody tr:nth-child(even) { background: #FCFCFE; }
table.data-table tbody tr:hover { background: var(--ei-red-soft); }
table.data-table tbody tr:last-child td { border-bottom: 0; }
table.data-table td.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ei-ink); }
table.data-table td.name { font-weight: 600; color: var(--ei-ink); }
table.data-table .row-flag { color: var(--ei-amber); font-weight: 700; }
table.data-table .cell-muted { color: var(--ei-muted); }
table.data-table .row-action {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 11.5px; font-weight: 600; color: var(--ei-red);
    padding: 5px 10px; border-radius: 8px; border: 1px solid #F3D3D7; background: #FFF7F8;
    transition: background .16s var(--ei-ease), border-color .16s var(--ei-ease);
}
table.data-table .row-action:hover { background: #FCE9EB; border-color: #E9BABF; }

/* ==========================================================================
   Charts / empty states / toasts / misc
   ========================================================================== */
.chart-box { position: relative; height: 280px; width: 100%; }
.chart-box.tall { height: 330px; }

.legend-list { display: flex; flex-direction: column; gap: 9px; }
.legend-row { display: flex; align-items: center; gap: 10px; font-size: 12.5px; }
.legend-swatch { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.legend-row .l-name { color: var(--ei-text); }
.legend-row .l-val { margin-left: auto; font-weight: 700; color: var(--ei-ink); font-variant-numeric: tabular-nums; }

.empty-state { padding: 46px 20px; text-align: center; }
.empty-state .es-icon {
    width: 54px; height: 54px; margin: 0 auto 14px;
    border-radius: 16px; display: grid; place-items: center;
    background: var(--ei-red-soft); color: var(--ei-red);
}
.empty-state .es-icon svg { width: 24px; height: 24px; }
.empty-state h4 { font-size: 14.5px; margin-bottom: 4px; }
.empty-state p { font-size: 12.5px; color: var(--ei-muted); max-width: 380px; margin: 0 auto; }

.toast {
    display: flex; align-items: center; gap: 11px;
    padding: 13px 15px; margin-bottom: 16px;
    border-radius: 11px; border: 1px solid var(--ei-line);
    background: #fff; box-shadow: var(--ei-shadow-sm);
    font-size: 13px; font-weight: 500;
}
.toast-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.toast-icon svg { width: 16px; height: 16px; }
.toast-success { border-color: #C7EEDA; background: #F6FEF9; color: #05603A; }
.toast-success .toast-icon { background: #D1FADF; color: #067647; }
.toast-error { border-color: #F7D2D7; background: #FFF8F9; color: #9C1220; }
.toast-error .toast-icon { background: #FCE1E4; color: #B11226; }

.divider { height: 1px; background: var(--ei-line-soft); margin: 18px 0; }
.num-cell { font-variant-numeric: tabular-nums; }

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes eiFadeUp {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-in { animation: eiFadeUp .32s var(--ei-ease) both; }
[x-cloak] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1180px) {
    .filter-field.w-md { width: 180px; }
}

@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.is-open { transform: translateX(0); }
    .app-main { margin-left: 0; }
    .menu-btn { display: inline-flex; }
    .page { padding: 18px 16px 40px; }
    .topbar { padding: 10px 16px; }
    .filter-actions { margin-left: 0; width: 100%; justify-content: space-between; }
}

@media (max-width: 640px) {
    .page-title { font-size: 17px; }
    .filter-field, .filter-field.w-xs, .filter-field.w-sm, .filter-field.w-md { width: 100%; }
    .kpi-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
    .user-meta { display: none; }
    .section-head { flex-direction: column; align-items: flex-start; }
}

/* ==========================================================================
   Print
   ========================================================================== */
@media print {
    .sidebar, .topbar, .filter-bar, .menu-btn, .row-action, .sidebar-backdrop { display: none !important; }
    .app-main { margin-left: 0; }
    .page { padding: 0; }
    .premium-card, .table-wrap, .kpi-tile { box-shadow: none; border-color: #ddd; }
    .table-wrap { max-height: none; overflow: visible; }
}





