/* ==========================================================================
   Loan EMI Management - Panel UI (Admin + Customer)
   Theme: deep teal + fresh green + gold accent, Poppins
   ========================================================================== */

:root {
    --teal: #0b5961;
    --teal-700: #084a51;
    --teal-800: #063c42;
    --teal-900: #042e33;
    --teal-50: #e8f3f3;
    --green: #5aac44;
    --green-600: #4a9a36;
    --green-700: #3d832c;
    --green-50: #edf7ea;
    --gold: #e6b84f;
    --gold-600: #c99a2e;
    --gold-50: #fdf6e4;
    --blue: #2f6fde;
    --blue-50: #eaf1fd;
    --red: #e04848;
    --red-50: #fdeeee;
    --amber: #f2a20c;
    --amber-50: #fff5df;
    --violet: #7a5af8;
    --violet-50: #f1edff;

    --bg: #f1f6f5;
    --surface: #ffffff;
    --line: #e2ebe9;
    --line-2: #eef3f2;
    --text: #17302e;
    --muted: #6a7e7c;
    --muted-2: #95a6a4;

    --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(16, 48, 46, .05), 0 10px 30px -18px rgba(16, 48, 46, .25);
    --shadow-lg: 0 30px 80px -24px rgba(4, 46, 51, .55);
    --sidebar-w: 270px;
    --topbar-h: 74px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4, h5 { margin: 0; font-weight: 600; line-height: 1.25; }
p { margin: 0; }
button { font-family: inherit; }
code { font-family: var(--mono); font-size: .9em; background: var(--line-2); padding: 1px 6px; border-radius: 6px; }
::selection { background: var(--green); color: #fff; }

.mono { font-family: var(--mono); font-size: .92em; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.nowrap { white-space: nowrap; }
.w-100 { width: 100%; }
.fw-600 { font-weight: 600; } .fw-700 { font-weight: 700; }
.mt-1 { margin-top: 6px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 20px; } .mt-4 { margin-top: 28px; }
.mb-1 { margin-bottom: 6px; } .mb-2 { margin-bottom: 12px; } .mb-3 { margin-bottom: 20px; }
.hidden { display: none !important; }
.text-green { color: var(--green-700); } .text-red { color: var(--red); } .text-teal { color: var(--teal); } .text-gold { color: var(--gold-600); }

/* ==========================================================================
   Shell
   ========================================================================== */

.app { display: flex; min-height: 100vh; }

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-w);
    background: linear-gradient(180deg, var(--teal-700) 0%, var(--teal-900) 100%);
    color: #b9d3d1;
    display: flex;
    flex-direction: column;
    z-index: 60;
    transition: transform .28s cubic-bezier(.4, 0, .2, 1);
}
.sidebar::before {
    content: '';
    position: absolute;
    width: 260px; height: 260px;
    right: -120px; top: -90px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(90, 172, 68, .35), transparent 70%);
    pointer-events: none;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 22px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    position: relative;
}
.brand-mark {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: #fff;
    color: var(--teal);
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 20px;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.brand-name { color: #fff; font-weight: 600; font-size: 15px; line-height: 1.25; }
.brand-sub {
    display: inline-block;
    margin-top: 4px;
    font-size: 9.5px;
    text-transform: uppercase;
    letter-spacing: .14em;
    font-weight: 600;
    color: #fff;
    background: var(--green);
    padding: 2px 8px;
    border-radius: 4px;
}

.nav { padding: 14px 14px; flex: 1; overflow-y: auto; position: relative; }
.nav-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .18em;
    color: #6f9c99;
    padding: 14px 12px 6px;
    font-weight: 600;
}
.nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    margin-bottom: 3px;
    border-radius: 10px;
    font-weight: 500;
    font-size: 13.5px;
    color: #cfe2e0;
    transition: background .18s, color .18s;
}
.nav a i { font-size: 17px; width: 20px; text-align: center; color: #8fb9b5; }
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.nav a:hover i { color: #fff; }
.nav a.active {
    background: linear-gradient(90deg, var(--green) 0%, var(--green-600) 100%);
    color: #fff;
    box-shadow: 0 8px 18px -8px rgba(90, 172, 68, .8);
}
.nav a.active i { color: #fff; }
.nav a .count {
    margin-left: auto;
    background: var(--gold);
    color: var(--teal-900);
    font-size: 11px;
    font-weight: 700;
    padding: 0 7px;
    border-radius: 999px;
}

.sidebar-foot { padding: 14px; border-top: 1px solid rgba(255, 255, 255, .08); position: relative; }
.user-chip {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .07);
}
.avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--green), var(--teal));
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 600;
    font-size: 13px;
    flex-shrink: 0;
}
.avatar.lg { width: 64px; height: 64px; font-size: 22px; }
.avatar.gold { background: linear-gradient(135deg, var(--gold), var(--gold-600)); color: var(--teal-900); }
.user-chip .who { min-width: 0; flex: 1; }
.user-chip .who strong { color: #fff; display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip .who span { font-size: 11.5px; color: #8fb9b5; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn-dark {
    border: 0; background: rgba(255, 255, 255, .08); color: #cfe2e0;
    width: 34px; height: 34px; border-radius: 9px; cursor: pointer; font-size: 16px;
}
.icon-btn-dark:hover { background: var(--red); color: #fff; }

.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    min-height: var(--topbar-h);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 30px;
    background: rgba(255, 255, 255, .9);
    backdrop-filter: saturate(160%) blur(12px);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid var(--line);
}
.topbar .crumb { font-size: 12px; color: var(--muted); font-weight: 500; }
.topbar .crumb i { font-size: 11px; }
.topbar h1 { font-size: 21px; font-weight: 600; color: var(--teal-800); }
.topbar .spacer { flex: 1; }
.topbar .date-pill {
    font-size: 12.5px; font-weight: 500; color: var(--teal);
    background: var(--teal-50);
    padding: 7px 14px; border-radius: 999px; white-space: nowrap;
}
.topbar .site-link { font-size: 12.5px; font-weight: 500; color: var(--green-700); white-space: nowrap; }

.menu-toggle {
    display: none;
    border: 1px solid var(--line);
    background: #fff;
    width: 40px; height: 40px;
    border-radius: 10px;
    font-size: 20px;
    cursor: pointer;
    flex-shrink: 0;
    color: var(--teal);
}

.content { padding: 26px 30px 48px; flex: 1; }

.page-foot {
    padding: 16px 30px 22px;
    font-size: 12px;
    color: var(--muted);
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    background: #fff;
}

.backdrop {
    position: fixed; inset: 0;
    background: rgba(4, 46, 51, .55);
    z-index: 55;
    opacity: 0; pointer-events: none;
    transition: opacity .25s;
}

/* ==========================================================================
   Layout helpers
   ========================================================================== */

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.grid-side { grid-template-columns: 340px minmax(0, 1fr); }

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-width: 0;
}
.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 22px;
    border-bottom: 1px solid var(--line-2);
}
.card-title { font-size: 15px; font-weight: 600; color: var(--teal-800); display: flex; align-items: center; gap: 9px; }
.card-title .ico {
    width: 30px; height: 30px; border-radius: 9px;
    display: inline-grid; place-items: center; font-size: 15px;
    background: var(--teal-50); color: var(--teal);
}
.card-sub { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.card-body { padding: 22px; }
.card-body.flush { padding: 0; }

/* Stat tiles with colored icon */
.stat { padding: 20px 20px 18px; position: relative; overflow: hidden; }
.stat .top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stat .label { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.stat .icon {
    width: 46px; height: 46px; border-radius: 13px;
    display: grid; place-items: center; font-size: 21px; flex-shrink: 0;
}
.stat .value { font-size: 25px; font-weight: 700; margin-top: 10px; font-variant-numeric: tabular-nums; color: var(--teal-900); word-break: break-word; line-height: 1.2; }
.stat .hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.stat::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
    background: var(--accent, var(--teal));
}
.tone-teal   { --accent: var(--teal); }  .tone-teal .icon   { background: var(--teal-50);   color: var(--teal); }
.tone-green  { --accent: var(--green); } .tone-green .icon  { background: var(--green-50);  color: var(--green-700); }
.tone-gold   { --accent: var(--gold); }  .tone-gold .icon   { background: var(--gold-50);   color: var(--gold-600); }
.tone-red    { --accent: var(--red); }   .tone-red .icon    { background: var(--red-50);    color: var(--red); }
.tone-blue   { --accent: var(--blue); }  .tone-blue .icon   { background: var(--blue-50);   color: var(--blue); }
.tone-violet { --accent: var(--violet); } .tone-violet .icon { background: var(--violet-50); color: var(--violet); }

/* Hero banner card */
.hero-card {
    background: linear-gradient(120deg, var(--teal-800) 0%, var(--teal) 55%, #12817a 100%);
    color: #fff;
    border: 0;
    position: relative;
    overflow: hidden;
}
.hero-card::before {
    content: ''; position: absolute; width: 380px; height: 380px; right: -100px; top: -160px;
    border-radius: 50%; background: radial-gradient(circle, rgba(90, 172, 68, .55), transparent 65%);
}
.hero-card::after {
    content: ''; position: absolute; width: 240px; height: 240px; left: 40%; bottom: -170px;
    border-radius: 50%; border: 40px solid rgba(230, 184, 79, .14);
}
.hero-card > * { position: relative; z-index: 1; }
.hero {
    padding: 28px 30px;
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: 30px;
    align-items: center;
}
.hero .eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: #bfe0b4; font-weight: 600; }
.hero .big { font-size: 40px; font-weight: 700; line-height: 1.1; margin-top: 8px; font-variant-numeric: tabular-nums; }
.hero .meta { display: flex; gap: 26px; flex-wrap: wrap; margin-top: 18px; }
.hero .meta div span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: #9cc9c5; font-weight: 500; }
.hero .meta div strong { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.hero .glass {
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 14px;
    padding: 18px;
    backdrop-filter: blur(6px);
}

.kv { display: grid; grid-template-columns: 1fr; }
.kv-row {
    display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
    padding: 11px 0; border-bottom: 1px dashed var(--line);
}
.kv-row:last-child { border-bottom: 0; }
.kv-row span { color: var(--muted); font-size: 13px; }
.kv-row strong { font-weight: 600; text-align: right; word-break: break-word; }

/* ==========================================================================
   Progress / dots
   ========================================================================== */

.progress { height: 9px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--green), #8cc63f); border-radius: 999px; transition: width .6s ease; }
.hero-card .progress { background: rgba(255, 255, 255, .18); }
.hero-card .progress > span { background: linear-gradient(90deg, var(--gold), #f6d98a); }
.progress-meta { display: flex; justify-content: space-between; font-size: 12.5px; margin-top: 8px; font-weight: 500; }

.dots { display: flex; flex-wrap: wrap; gap: 5px; }
.dots i { width: 12px; height: 12px; border-radius: 4px; display: block; background: rgba(255,255,255,.18); }
.dots i.on { background: var(--gold); }
.dots i.late { background: var(--red); }

/* ==========================================================================
   Bar chart
   ========================================================================== */

.bars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; align-items: end; height: 210px; padding-top: 10px; }
.bar { display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.bar .col {
    width: 100%; max-width: 46px; min-height: 4px;
    background: linear-gradient(180deg, #7cc65f 0%, var(--green-600) 100%);
    border-radius: 9px 9px 4px 4px;
}
.bar:last-child .col:not(.empty) { background: linear-gradient(180deg, #13867e 0%, var(--teal-800) 100%); }
.bar .col.empty { background: var(--line-2); }
.bar .amt { font-size: 11px; font-weight: 600; color: var(--teal); white-space: nowrap; }
.bar .lbl { font-size: 11.5px; color: var(--muted); font-weight: 500; }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 42px; padding: 0 18px;
    border-radius: 10px;
    border: 1px solid var(--green);
    background: var(--green);
    color: #fff;
    font-weight: 500; font-size: 13.5px;
    cursor: pointer; white-space: nowrap;
    transition: transform .12s, background .18s, box-shadow .18s, color .18s, border-color .18s;
    font-family: var(--font);
}
.btn:hover { background: var(--green-600); border-color: var(--green-600); box-shadow: 0 8px 18px -8px rgba(90, 172, 68, .9); }
.btn:active { transform: translateY(1px); }
.btn i { font-size: 15px; }
.btn-teal { background: var(--teal); border-color: var(--teal); }
.btn-teal:hover { background: var(--teal-700); border-color: var(--teal-700); box-shadow: 0 8px 18px -8px rgba(11, 89, 97, .8); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--teal-900); }
.btn-gold:hover { background: var(--gold-600); border-color: var(--gold-600); color: #fff; box-shadow: 0 8px 18px -8px rgba(201, 154, 46, .8); }
.btn-outline { background: #fff; color: var(--teal); border-color: var(--line); }
.btn-outline:hover { background: var(--teal-50); border-color: var(--teal); box-shadow: none; }
.btn-ghost { background: transparent; color: var(--teal); border-color: transparent; }
.btn-ghost:hover { background: var(--teal-50); border-color: transparent; box-shadow: none; }
.btn-white { background: #fff; color: var(--teal-800); border-color: #fff; }
.btn-white:hover { background: var(--gold); border-color: var(--gold); color: var(--teal-900); }
.btn-danger { background: #fff; color: var(--red); border-color: #f3c4c4; }
.btn-danger:hover { background: var(--red); color: #fff; border-color: var(--red); box-shadow: 0 8px 18px -8px rgba(224, 72, 72, .7); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 12.5px; border-radius: 8px; }
.btn-xs { height: 29px; padding: 0 10px; font-size: 12px; border-radius: 7px; gap: 5px; }
.btn-block { width: 100%; }
.btn-icon { width: 34px; padding: 0; }
.btn-xs.btn-icon { width: 29px; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn-group { display: inline-flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.btn-group form { display: inline-flex; }

/* ==========================================================================
   Forms
   ========================================================================== */

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 18px; }
.form-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .label-sm { font-size: 12.5px; font-weight: 500; color: var(--teal-800); }
.field label .req { color: var(--red); }
.field .help { font-size: 11.5px; color: var(--muted); }

.input, .select, .textarea {
    width: 100%; height: 44px; padding: 0 14px;
    border: 1px solid #d6e2e0; border-radius: 10px;
    background: #fff;
    font-family: var(--font); font-size: 13.5px; color: var(--text);
    transition: border-color .15s, box-shadow .15s;
    outline: none;
}
.textarea { height: auto; min-height: 96px; padding: 11px 14px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--green); box-shadow: 0 0 0 4px rgba(90, 172, 68, .15); }
.input[readonly], .input:disabled, .select:disabled { background: var(--line-2); color: var(--muted); }
.input.is-invalid, .select.is-invalid, .textarea.is-invalid { border-color: var(--red); box-shadow: 0 0 0 3px rgba(224, 72, 72, .1); }
.input.auto-calc { background: var(--green-50); border-color: #bfe0b4; }
.select {
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16'%3E%3Cpath fill='%230b5961' d='M8 11.5 2.5 6h11z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px;
}

.input-group { position: relative; }
.input-group .prefix, .input-group .suffix {
    position: absolute; top: 50%; transform: translateY(-50%);
    font-weight: 600; color: var(--teal); pointer-events: none; font-size: 13.5px;
}
.input-group .prefix { left: 14px; }
.input-group .suffix { right: 14px; color: var(--muted); font-weight: 500; font-size: 12.5px; }
.input-group .input.has-prefix { padding-left: 32px; }
.input-group .input.has-suffix { padding-right: 64px; }
.input-group .toggle-pass {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    border: 0; background: transparent; width: 34px; height: 34px; border-radius: 8px;
    cursor: pointer; color: var(--muted); font-size: 16px;
}
.input-group .toggle-pass:hover { background: var(--teal-50); color: var(--teal); }

.error-text { font-size: 12px; font-weight: 500; color: var(--red); display: flex; gap: 5px; align-items: center; }

.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; font-size: 13px; user-select: none; }
.check input { width: 18px; height: 18px; accent-color: var(--green); margin: 0; }

.switch { position: relative; display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 500; font-size: 13px; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { width: 46px; height: 26px; border-radius: 999px; background: #cfdcda; position: relative; transition: background .2s; flex-shrink: 0; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.switch input:checked + .track { background: var(--green); }
.switch input:checked + .track::after { transform: translateX(20px); }

.search-box { position: relative; }
.search-box i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-box .input { padding-left: 38px; min-width: 280px; }

/* Choice cards (radio) */
.choice-grid { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; }
.choice .box {
    display: block; height: 100%;
    border: 1.5px solid var(--line); border-radius: 12px; padding: 14px 16px;
    transition: border-color .15s, background .15s, box-shadow .15s;
}
.choice .box strong { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--teal-800); font-weight: 600; }
.choice .box span { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.45; }
.choice input:checked + .box { border-color: var(--green); background: var(--green-50); box-shadow: 0 0 0 3px rgba(90, 172, 68, .14); }

/* Calculator summary strip */
.calc-strip {
    display: grid; grid-template-columns: repeat(4, 1fr);
    border-radius: 12px; overflow: hidden;
    background: linear-gradient(120deg, var(--teal-800), var(--teal));
    color: #fff;
}
.calc-strip div { padding: 12px 14px; border-right: 1px solid rgba(255, 255, 255, .12); }
.calc-strip div:last-child { border-right: 0; }
.calc-strip span { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: #9cc9c5; font-weight: 500; }
.calc-strip strong { font-size: 14.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.calc-note { font-size: 12px; margin-top: 8px; color: var(--muted); }
.calc-note.err { color: var(--red); font-weight: 500; }

.customer-found {
    display: flex; gap: 12px; align-items: center;
    padding: 12px 14px; border-radius: 12px;
    background: var(--gold-50); border: 1px solid #f1dca6; color: #6b5214; font-size: 13px;
}
.customer-found i { font-size: 20px; color: var(--gold-600); }

/* ==========================================================================
   Tables
   ========================================================================== */

.table-wrap { width: 100%; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
    text-align: left; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
    color: var(--teal); padding: 12px 18px; background: #f6faf9;
    border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 13px 18px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: #f8fbfa; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tr.row-paid td { color: #3c5856; }
.table tr.row-next { background: var(--gold-50); }
.table tr.row-next td:first-child { box-shadow: inset 4px 0 0 var(--gold); }
.table tfoot td { padding: 14px 18px; font-weight: 600; border-top: 1px solid var(--line); background: #f6faf9; }
.table .cell-person { display: flex; align-items: center; gap: 12px; min-width: 190px; }
.table .cell-person strong { display: block; font-weight: 600; color: var(--teal-900); }
.table .cell-person small { color: var(--muted); font-size: 12px; }
.table .amount { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--teal-900); }
.table .inst {
    display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px;
    background: var(--line-2); color: var(--teal); font-weight: 600; font-size: 12.5px;
}
.row-paid .inst { background: var(--green); color: #fff; }
.table .btn-group { flex-wrap: nowrap; justify-content: flex-end; }
.table td .badge + .badge { margin-left: 4px; }

.empty-state { padding: 54px 20px; text-align: center; color: var(--muted); }
.empty-state i { font-size: 40px; color: #b7cfcc; display: block; margin-bottom: 10px; }
.empty-state strong { display: block; color: var(--teal-800); font-size: 15px; margin-bottom: 4px; font-weight: 600; }

/* ==========================================================================
   Badges
   ========================================================================== */

.badge {
    display: inline-flex; align-items: center; gap: 6px;
    height: 25px; padding: 0 10px; border-radius: 999px;
    font-size: 11.5px; font-weight: 600; white-space: nowrap;
    background: var(--line-2); color: var(--teal);
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-plain::before { display: none; }
.badge-paid, .badge-completed, .badge-sent, .badge-closed { background: var(--green-50); color: var(--green-700); }
.badge-upcoming, .badge-pending, .badge-contacted { background: var(--blue-50); color: var(--blue); }
.badge-due-today, .badge-new { background: var(--amber-50); color: #b97700; }
.badge-overdue, .badge-failed, .badge-halted, .badge-cancelled { background: var(--red-50); color: var(--red); }
.badge-active, .badge-authenticated { background: var(--teal-50); color: var(--teal); }
.badge-skipped, .badge-created, .badge-expired { background: #f2f4f4; color: #6a7e7c; }
.badge-auto { background: var(--violet-50); color: var(--violet); }
.badge-online { background: var(--gold-50); color: var(--gold-600); }
.badge-manual { background: #f2f4f4; color: #55706d; }
.badge-auto::before, .badge-online::before, .badge-manual::before { display: none; }

/* ==========================================================================
   Alerts / tabs / pagination
   ========================================================================== */

.alert {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 14px 16px; border-radius: 12px;
    border: 1px solid var(--line); background: #fff;
    font-size: 13.5px; margin-bottom: 18px;
}
.alert i { font-size: 18px; margin-top: 1px; }
.alert-info { background: var(--blue-50); border-color: #cfe0fb; color: #1f4f9e; }
.alert-warn { background: var(--amber-50); border-color: #f6dfa8; color: #7a5300; }
.alert-danger { background: var(--red-50); border-color: #f5c9c9; color: #a12d2d; }
.alert-success { background: var(--green-50); border-color: #cfe8c6; color: #2f6b22; }
.alert-teal { background: linear-gradient(120deg, var(--teal-800), var(--teal)); color: #fff; border: 0; }
.alert-teal a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.alert ul { margin: 6px 0 0; padding-left: 18px; }

.tabs {
    display: flex; gap: 4px; padding: 5px;
    background: #fff; border: 1px solid var(--line); border-radius: 12px;
    margin-bottom: 20px; overflow-x: auto; width: fit-content; max-width: 100%;
}
.tabs a {
    padding: 8px 15px; border-radius: 9px; font-weight: 500; font-size: 13px;
    color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 7px;
}
.tabs a:hover { color: var(--teal); background: var(--teal-50); }
.tabs a.active { background: var(--teal); color: #fff; }

.pager {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 14px 18px; border-top: 1px solid var(--line-2); flex-wrap: wrap;
}
.pager .info { font-size: 12.5px; color: var(--muted); }
.pager ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.pager li a, .pager li span {
    display: grid; place-items: center; min-width: 34px; height: 34px; padding: 0 10px;
    border-radius: 8px; font-weight: 500; font-size: 13px; border: 1px solid var(--line); background: #fff;
}
.pager li a:hover { border-color: var(--green); color: var(--green-700); }
.pager li.active span { background: var(--green); color: #fff; border-color: var(--green); }
.pager li.disabled span { color: var(--muted-2); }

/* ==========================================================================
   Modal
   ========================================================================== */

.modal {
    position: fixed; inset: 0; z-index: 100;
    display: flex; align-items: flex-start; justify-content: center;
    padding: 4vh 16px;
    background: rgba(4, 46, 51, .55);
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    overflow-y: auto;
    opacity: 0; visibility: hidden;
    transition: opacity .22s, visibility .22s;
}
.modal.open { opacity: 1; visibility: visible; }
.modal-dialog {
    background: #fff; border-radius: 18px; width: 100%; max-width: 760px;
    box-shadow: var(--shadow-lg);
    transform: translateY(14px) scale(.985);
    transition: transform .25s cubic-bezier(.2, .9, .3, 1.2);
}
.modal.open .modal-dialog { transform: none; }
.modal-sm .modal-dialog { max-width: 470px; }
.modal-head {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
    padding: 20px 24px; border-radius: 18px 18px 0 0;
    background: linear-gradient(120deg, var(--teal-800), var(--teal));
    color: #fff;
}
.modal-head h3 { font-size: 19px; font-weight: 600; }
.modal-head p { font-size: 12.5px; color: #b9d8d5; margin-top: 3px; }
.modal-close {
    border: 0; background: rgba(255, 255, 255, .14); color: #fff;
    width: 36px; height: 36px; border-radius: 10px; cursor: pointer; font-size: 16px; flex-shrink: 0;
}
.modal-close:hover { background: var(--red); }
.modal-body { padding: 22px 24px; }
.modal-foot {
    display: flex; justify-content: flex-end; gap: 10px;
    padding: 14px 24px 18px; border-top: 1px solid var(--line-2);
    background: #f8fbfa; border-radius: 0 0 18px 18px;
}
.section-label {
    font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em;
    color: var(--green-700); display: flex; align-items: center; gap: 10px; margin: 0 0 14px;
}
.section-label::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.section-label.spaced { margin-top: 24px; }
body.modal-open { overflow: hidden; }

/* ==========================================================================
   Auth (single login)
   ========================================================================== */

.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: #fff; }
.auth-art {
    background: linear-gradient(140deg, var(--teal-900) 0%, var(--teal) 60%, #13867e 100%);
    color: #fff; position: relative; overflow: hidden;
    padding: 44px 56px; display: flex; flex-direction: column; justify-content: space-between;
}
.auth-art::before {
    content: ''; position: absolute; width: 520px; height: 520px; right: -170px; top: -160px;
    border-radius: 50%; background: radial-gradient(circle, rgba(90, 172, 68, .5), transparent 65%);
}
.auth-art::after {
    content: ''; position: absolute; width: 420px; height: 420px; left: -150px; bottom: -220px;
    border-radius: 50%; border: 60px solid rgba(230, 184, 79, .14);
}
.auth-art > * { position: relative; z-index: 1; }
.auth-art .brand { padding: 0; border: 0; }
.auth-art h2 { font-size: clamp(32px, 3.6vw, 48px); font-weight: 700; line-height: 1.15; max-width: 540px; }
.auth-art h2 span { color: var(--gold); }
.auth-art .lede { color: #c7e1de; max-width: 440px; margin-top: 16px; font-size: 14.5px; }
.auth-points { margin-top: 28px; display: grid; gap: 12px; max-width: 440px; }
.auth-points div { display: flex; align-items: center; gap: 12px; font-size: 13.5px; color: #e2f0ee; }
.auth-points i { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, .12); color: var(--gold); font-size: 16px; }
.auth-copy { font-size: 12px; color: #8fb9b5; }

.auth-form-wrap { display: flex; align-items: center; justify-content: center; padding: 44px 28px; background: radial-gradient(circle at top right, var(--green-50), #fff 45%); }
.auth-form { width: 100%; max-width: 410px; }
.auth-form .eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--green-700); background: var(--green-50); padding: 5px 12px; border-radius: 999px; }
.auth-form h1 { font-size: 30px; font-weight: 700; color: var(--teal-900); margin-top: 14px; }
.auth-form .sub { color: var(--muted); margin-top: 6px; margin-bottom: 26px; }
.auth-form .field { margin-bottom: 16px; }
.auth-form .input { height: 50px; font-size: 14.5px; }
.auth-form .btn { height: 50px; font-size: 14.5px; margin-top: 10px; }
.auth-switch { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.auth-switch a { color: var(--teal); font-weight: 600; }

/* ==========================================================================
   Misc
   ========================================================================== */

.id-chip {
    display: inline-flex; align-items: center; gap: 6px;
    font-family: var(--mono); font-size: 12px; font-weight: 600;
    padding: 3px 9px; border-radius: 7px;
    background: var(--teal-50); color: var(--teal);
    white-space: nowrap;
}
.hero-card .id-chip { background: rgba(255, 255, 255, .14); color: #fff; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 14px; padding: 13px 22px; border-bottom: 1px solid var(--line-2); }
.list li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .grow strong { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--teal-900); }
.list .grow small { color: var(--muted); font-size: 12px; }
.date-tile { width: 48px; flex-shrink: 0; text-align: center; border-radius: 11px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.date-tile b { display: block; font-size: 17px; line-height: 1; padding: 7px 0 5px; color: var(--teal-900); font-weight: 700; }
.date-tile span { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; font-weight: 600; background: var(--teal); color: #fff; padding: 3px 0; }
.date-tile.late span { background: var(--red); }
.date-tile.today span { background: var(--amber); }

.next-emi {
    display: flex; align-items: center; justify-content: space-between; gap: 18px;
    padding: 18px 20px; border-radius: 14px;
    background: var(--gold-50); border: 1px solid #f1dca6;
}
.next-emi .amt { font-size: 28px; font-weight: 700; color: var(--teal-900); line-height: 1.1; }

.code-box {
    display: flex; align-items: center; gap: 10px;
    background: var(--teal-900); color: #d6ecea;
    border-radius: 10px; padding: 11px 11px 11px 15px;
    font-family: var(--mono); font-size: 12px;
}
.code-box code { flex: 1; overflow-x: auto; white-space: nowrap; background: transparent; padding: 0; color: inherit; }
.code-box button { flex-shrink: 0; }

.divider { height: 1px; background: var(--line); margin: 22px 0; }
.receipt-link { display: inline-flex; align-items: center; gap: 5px; font-weight: 500; font-size: 12.5px; color: var(--green-700); }
.receipt-link:hover { text-decoration: underline; }

.loan-card { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; transition: transform .15s, box-shadow .15s; }
.loan-card:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -20px rgba(4, 46, 51, .35); }
.loan-card .row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.loan-card .figs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.loan-card .figs span { display: block; font-size: 11px; color: var(--muted); }
.loan-card .figs strong { font-size: 14px; font-weight: 600; color: var(--teal-900); }

.steps { display: grid; gap: 12px; counter-reset: step; }
.steps li { list-style: none; display: flex; gap: 12px; align-items: flex-start; font-size: 13px; }
.steps li::before {
    counter-increment: step; content: counter(step);
    width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
    display: grid; place-items: center; background: var(--green); color: #fff; font-size: 12px; font-weight: 600;
}
.steps { padding: 0; margin: 0; }

/* ==========================================================================
   SweetAlert2
   ========================================================================== */
.swal2-popup { font-family: var(--font) !important; border-radius: 18px !important; }
.swal2-title { font-weight: 600 !important; font-size: 22px !important; color: var(--teal-900) !important; }
.swal2-html-container { color: var(--muted) !important; font-size: 14px !important; }
.swal2-styled { border-radius: 10px !important; font-weight: 500 !important; padding: 10px 22px !important; box-shadow: none !important; }
.swal2-styled.swal-cancel { color: var(--teal) !important; border: 1px solid var(--line) !important; }
.swal2-timer-progress-bar { background: var(--green) !important; }
.swal2-toast { border: 1px solid var(--line) !important; box-shadow: var(--shadow) !important; }
.swal2-toast .swal2-title { font-size: 13.5px !important; font-weight: 500 !important; }

@keyframes spin { to { transform: rotate(360deg); } }
.spin { display: inline-block; animation: spin .9s linear infinite; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1200px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-main, .grid-side { grid-template-columns: 1fr; }
    .hero { grid-template-columns: 1fr; }
}

@media (max-width: 992px) {
    .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
    body.nav-open .sidebar { transform: none; }
    body.nav-open .backdrop { opacity: 1; pointer-events: auto; }
    .main { margin-left: 0; }
    .menu-toggle { display: grid; place-items: center; }
    .topbar { padding: 10px 16px; }
    .content { padding: 20px 16px 40px; }
    .page-foot { padding: 14px 16px 20px; }
    .grid-3, .choice-grid { grid-template-columns: 1fr; }
    .auth { grid-template-columns: 1fr; }
    .auth-art { padding: 30px 24px 34px; }
    .auth-art h2 { font-size: 30px; margin-top: 28px; }
    .auth-points, .auth-copy { display: none; }
    .calc-strip { grid-template-columns: repeat(2, 1fr); }
    .calc-strip div:nth-child(2) { border-right: 0; }
}

@media (max-width: 720px) {
    .grid-2, .grid-4, .form-grid, .form-grid.cols-3 { grid-template-columns: 1fr; }
    .topbar h1 { font-size: 18px; }
    .topbar .date-pill, .topbar .site-link { display: none; }
    .stat .value { font-size: 22px; }
    .hero { padding: 22px 18px; }
    .hero .big { font-size: 30px; }
    .search-box .input { min-width: 0; width: 100%; }
    .toolbar-left, .toolbar-right, .search-box, .toolbar form { width: 100%; }
    .modal { padding: 0; align-items: flex-end; }
    .modal-dialog { border-radius: 20px 20px 0 0; max-height: 94vh; overflow-y: auto; }
    .modal-head { border-radius: 20px 20px 0 0; }
    .modal-foot { border-radius: 0; position: sticky; bottom: 0; }
    .next-emi { flex-direction: column; align-items: flex-start; }
    .loan-card .figs { grid-template-columns: 1fr 1fr; }

    .table-stack thead, .table-stack tfoot { display: none; }
    .table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: 100%; }
    .table-stack tr { padding: 12px 16px; border-bottom: 1px solid var(--line); }
    .table-stack tbody tr:last-child { border-bottom: 0; }
    .table-stack td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 5px 0; border: 0; text-align: right; }
    .table-stack td::before { content: attr(data-label); font-size: 11.5px; font-weight: 500; color: var(--muted); text-align: left; flex-shrink: 0; }
    .table-stack td[data-label=""]::before { display: none; }
    .table-stack td.td-actions { justify-content: flex-end; padding-top: 10px; }
    .table-stack .cell-person { min-width: 0; }
    .table-stack tr.row-next td:first-child { box-shadow: none; }
    .table-stack tr.row-next { box-shadow: inset 4px 0 0 var(--gold); }
}

@media print {
    .sidebar, .topbar, .page-foot, .btn, .toolbar { display: none !important; }
    .main { margin: 0; }
    .card { box-shadow: none; }
}

/* Customer notification bell */
.bell {
    position: relative; width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
    display: grid; place-items: center; font-size: 19px;
    background: var(--teal-50); color: var(--teal); transition: background .15s;
}
.bell:hover { background: var(--green-50); color: var(--green-700); }
.bell span {
    position: absolute; top: -5px; right: -5px; min-width: 20px; height: 20px; padding: 0 5px;
    border-radius: 999px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700;
    display: grid; place-items: center; border: 2px solid #fff;
}
.debit-alert { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 14px; margin-bottom: 12px;
    background: linear-gradient(100deg, var(--green-50), #fff); border: 1px solid #cfe8c6; }
.debit-alert .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--green); color: #fff; display: grid; place-items: center; font-size: 20px; flex-shrink: 0; }
.debit-alert .txt { flex: 1; min-width: 0; font-size: 13.5px; color: var(--teal-900); }
.debit-alert .txt strong { font-weight: 600; }
.debit-alert .txt small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.table tr.row-new td { background: var(--green-50); }
.table tr.row-new td:first-child { box-shadow: inset 4px 0 0 var(--green); }
.new-tag { display: inline-block; margin-left: 6px; font-size: 10px; font-weight: 700; color: #fff; background: var(--red); padding: 1px 7px; border-radius: 999px; vertical-align: middle; }
@media (max-width: 720px) { .debit-alert { flex-wrap: wrap; } }

/* ==========================================================================
   Confirmation dialog
   ========================================================================== */
.cfm {
    position: fixed; inset: 0; z-index: 200;
    display: flex; align-items: center; justify-content: center; padding: 20px;
    background: rgba(4, 46, 51, .55);
    backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
    opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s;
}
.cfm.open { opacity: 1; visibility: visible; }
body.cfm-lock { overflow: hidden; }
.cfm-box {
    position: relative; width: 100%; max-width: 420px; overflow: hidden;
    background: #fff; border-radius: 22px; text-align: center;
    padding: 38px 30px 26px;
    box-shadow: 0 40px 90px -30px rgba(4, 46, 51, .65);
    transform: translateY(18px) scale(.94); transition: transform .28s cubic-bezier(.2, .9, .3, 1.25);
}
.cfm.open .cfm-box { transform: none; }
.cfm-band { position: absolute; left: 0; right: 0; top: 0; height: 6px; background: linear-gradient(90deg, var(--teal), var(--green)); }
.cfm-icon {
    width: 78px; height: 78px; margin: 0 auto 18px; border-radius: 50%;
    display: grid; place-items: center; font-size: 34px; position: relative;
    background: var(--teal-50); color: var(--teal);
}
.cfm-icon::after {
    content: ''; position: absolute; inset: -8px; border-radius: 50%;
    border: 2px solid currentColor; opacity: .18;
    animation: cfmPulse 1.6s ease-out infinite;
}
@keyframes cfmPulse { 0% { transform: scale(.9); opacity: .35; } 100% { transform: scale(1.18); opacity: 0; } }
.cfm-title { font-size: 21px; font-weight: 700; color: var(--teal-900); margin: 0; }
.cfm-text { font-size: 14px; color: var(--muted); margin: 10px auto 0; line-height: 1.6; max-width: 330px; }
.cfm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 26px; }
.cfm-btn {
    height: 48px; border-radius: 12px; font-family: var(--font); font-size: 14.5px; font-weight: 600;
    cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    transition: transform .12s, box-shadow .18s, background .18s, border-color .18s;
}
.cfm-btn:active { transform: translateY(1px); }
.cfm-cancel { background: #fff; color: var(--teal-800); border: 1.5px solid var(--line); }
.cfm-cancel:hover { background: var(--teal-50); border-color: var(--teal); }
.cfm-ok { border: 0; color: #fff; background: linear-gradient(135deg, var(--green), var(--green-700)); box-shadow: 0 12px 24px -12px rgba(90, 172, 68, .9); }
.cfm-ok:hover { box-shadow: 0 16px 28px -12px rgba(90, 172, 68, 1); }
.cfm-ok:focus-visible, .cfm-cancel:focus-visible { outline: 3px solid rgba(90, 172, 68, .35); outline-offset: 2px; }

/* Tones */
.cfm-danger .cfm-band { background: linear-gradient(90deg, #f07a7a, var(--red)); }
.cfm-danger .cfm-icon { background: var(--red-50); color: var(--red); }
.cfm-danger .cfm-ok { background: linear-gradient(135deg, #f06565, #d13a3a); box-shadow: 0 12px 24px -12px rgba(224, 72, 72, .9); }
.cfm-danger .cfm-ok:hover { box-shadow: 0 16px 28px -12px rgba(224, 72, 72, 1); }
.cfm-warning .cfm-band { background: linear-gradient(90deg, var(--gold), var(--amber)); }
.cfm-warning .cfm-icon { background: var(--amber-50); color: #c78300; }
.cfm-success .cfm-icon { background: var(--green-50); color: var(--green-700); }

@media (max-width: 480px) {
    .cfm { align-items: flex-end; padding: 0; }
    .cfm-box { max-width: none; border-radius: 22px 22px 0 0; padding: 32px 22px 22px; }
}

/* ---------- Bulk select & delete ---------- */
.d-inline { display: inline-block; margin: 0; }
.td-actions .d-inline { margin-left: 6px; vertical-align: middle; }
.th-check, .td-check { width: 44px; padding-right: 0 !important; }
.chk { width: 18px; height: 18px; accent-color: var(--red, #e04848); cursor: pointer; vertical-align: middle; }
.table tr.row-selected td { background: #fff5f5; }
.bulk-bar { display: none; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 18px; background: linear-gradient(90deg, #fff1f1, #fff8f8); border-bottom: 1px solid #f6d3d3; }
.bulk-bar.show { display: flex; animation: bulkIn .18s ease-out; }
.bulk-bar .bulk-count { display: inline-flex; align-items: center; gap: 6px; color: #b42323; font-size: 14px; margin-right: auto; }
.bulk-bar .bulk-count strong { font-size: 15px; }
@keyframes bulkIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (max-width: 768px) {
    .table-stack td.td-check { width: 100%; padding: 0 0 8px !important; }
    .table-stack thead .th-check { display: none; }
    .bulk-bar { position: sticky; top: 0; z-index: 5; }
}
.td-actions { white-space: nowrap; }
@media (min-width: 769px) {
    .table-bulk th, .table-bulk td { padding-left: 12px; padding-right: 12px; }
    .table-bulk th:first-child, .table-bulk td:first-child { padding-left: 20px; }
    .table-bulk th:last-child, .table-bulk td:last-child { padding-right: 20px; }
    .table-bulk .cell-person { min-width: 170px; }
}