:root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --text: #152033;
    --muted: #697386;
    --line: #dde4ef;
    --primary: #176b87;
    --primary-dark: #0f4d61;
    --accent: #d08b27;
    --success: #198754;
    --danger: #c2410c;
    --radius: 8px;
    --sidebar-width: 316px;
    --sidebar-collapsed: 96px;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(23, 107, 135, .08), transparent 30%),
        linear-gradient(180deg, #f8fbfd 0%, var(--bg) 42%);
    color: var(--text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
}

.app-shell { min-height: 100vh; display: flex; position: relative; }

/* ====== Sidebar Toggle Button ====== */
.sidebar-toggle {
    position: fixed;
    top: 14px;
    left: calc(var(--sidebar-width) - 18px);
    z-index: 1000;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.25);
    background: linear-gradient(135deg, #1f4068, #176b87);
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    font-size: .95rem;
    box-shadow: 0 3px 10px rgba(0,0,0,.3);
    transition: left .25s ease, transform .22s ease, box-shadow .2s ease;
}
.app-shell .sidebar-toggle { display: inline-flex; }
.sidebar-toggle:hover { box-shadow: 0 4px 14px rgba(0,0,0,.4); transform: scale(1.06); }

/* ====== Sidebar ====== */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #0b1622 0%, #0f1e2e 50%, #122436 100%);
    color: #dce7f5;
    padding: 84px 14px 20px;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    transition: width .25s cubic-bezier(.4,0,.2,1), padding .25s ease;
    border-right: 1px solid rgba(255,255,255,.06);
    flex-shrink: 0;
    box-shadow: inset -1px 0 0 rgba(255,255,255,.03);
}
.sidebar::-webkit-scrollbar { width: 7px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 10px; }
.sidebar::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.22); }

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
    padding: 84px 8px 20px;
}
.sidebar.collapsed .brand-text,
.sidebar.collapsed .nav-group-label,
.sidebar.collapsed .nav-menu a .nav-label,
.sidebar.collapsed .logout-link .nav-label,
.sidebar.collapsed .nav-group-chevron,
.sidebar.collapsed .brand span:not(.brand-mark):not(.brand-logo-sidebar) { display: none !important; }
.sidebar.collapsed .nav-menu a.nav-top-link,
.sidebar.collapsed .logout-link { justify-content: center; padding: 9px 0; text-align: center; }
.sidebar.collapsed .nav-group { margin-top: 3px; }
.sidebar.collapsed .nav-group-title { justify-content: center; padding: 5px 0 !important; }
.sidebar.collapsed .nav-group-sub { max-height: 0 !important; opacity: 0 !important; pointer-events: none !important; }
.sidebar.collapsed .nav-sub { margin-left: 0 !important; padding-left: 0 !important; }

.nav-menu { display: grid; gap: 2px; }
.nav-menu a.nav-top-link {
    color: #cfdcea;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    font-weight: 650;
    font-size: .86rem;
    transition: background .15s ease, color .15s ease, transform .1s ease;
    white-space: nowrap;
}
.nav-menu a.nav-top-link i {
    font-size: 1.05rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
    color: #d4e2f1;
}
.nav-menu a.nav-top-link:hover {
    color: white;
    background: rgba(255,255,255,.08);
    transform: translateX(2px);
}
.nav-menu a.nav-top-link.active {
    color: white;
    background: linear-gradient(90deg, rgba(23, 107, 135, .55), rgba(23, 107, 135, .22));
    box-shadow: inset 2px 0 0 var(--accent);
}

.nav-menu-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.12), transparent);
    margin: 10px 6px;
}

.nav-group { display: grid; gap: 0; margin-top: 2px; }

.nav-group-title {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    color: #9fb2c8;
    font-size: .7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 10px 10px 6px;
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: 8px;
    transition: background .15s ease, color .15s ease;
    white-space: nowrap;
    line-height: 1;
}
.nav-group-title:hover { color: #fff; background: rgba(255,255,255,.04); }
.nav-group-icon-wrap {
    width: 20px;
    text-align: center;
    flex-shrink: 0;
    display: inline-grid;
    place-items: center;
}
.nav-group-icon-wrap i {
    font-size: 1rem;
    color: #c6d6e8;
    letter-spacing: 0;
}
.nav-group-title .nav-group-label {
    flex: 1;
    line-height: 1.3;
}
.nav-group-chevron {
    margin-left: auto;
    font-size: .78rem;
    transition: transform .22s ease, color .2s ease;
    color: #9fb2c8;
    flex-shrink: 0;
}
.nav-group:not(.collapsed) > .nav-group-title .nav-group-chevron {
    transform: rotate(0deg);
    color: #e0ecfa;
}
.nav-group.collapsed > .nav-group-title .nav-group-chevron {
    transform: rotate(-90deg);
    color: #9fb2c8;
}

.nav-group-sub {
    display: grid;
    gap: 2px;
    margin-top: 1px;
    max-height: 600px;
    opacity: 1;
    overflow: hidden;
    transition: max-height .25s cubic-bezier(.4,0,.2,1), opacity .2s ease, margin .2s ease;
}
.nav-group.collapsed > .nav-group-sub {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
    margin-top: 0;
}

.nav-sub {
    margin-left: 18px;
    padding: 7px 10px 7px 14px !important;
    font-size: .83rem !important;
    opacity: .96;
    color: #b8c8dc !important;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 7px;
    text-decoration: none;
    font-weight: 600;
    transition: background .15s ease, color .15s ease, transform .1s ease;
    white-space: nowrap;
}
.nav-sub i {
    font-size: .95rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
    opacity: .9;
}
.nav-sub:hover {
    color: #fff !important;
    background: rgba(255,255,255,.06);
    transform: translateX(2px);
}
.nav-sub.active {
    color: #fff !important;
    background: linear-gradient(90deg, rgba(208, 139, 39, .18), rgba(208, 139, 39, .05));
    box-shadow: inset 2px 0 0 #d08b27;
    font-weight: 700;
}

.logout-link {
    margin-top: auto;
    padding-top: 12px;
    margin-top: 14px;
    border-top: 1px solid rgba(255,255,255,.07);
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffb8a0;
    text-decoration: none;
    font-weight: 700;
    padding: 10px;
    border-radius: 8px;
    font-size: .86rem;
    transition: background .15s ease, color .15s ease;
    white-space: nowrap;
}
.logout-link:hover { background: rgba(220, 38, 38, .15); color: #fff; }
.logout-link i { width: 20px; text-align: center; flex-shrink: 0; }

/* ====== App Main / Topbar (Compact, NO LOGO) ====== */
.app-main { flex: 1; min-width: 0; }
.topbar.compact-topbar {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 9px 24px;
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 10;
}
.topbar h1 { margin: 0; font-size: 1.08rem; font-weight: 800; letter-spacing: -.01em; }
.eyebrow { color: var(--muted); font-size: .72rem; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.branch-selector { min-width: 160px; font-size: .84rem; padding: 5px 10px; }
.user-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text);
    text-decoration: none;
    border-radius: 999px;
    padding: 4px 10px 4px 4px;
    font-size: .83rem;
    font-weight: 700;
}
.user-chip span {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #e8f3f7;
    color: var(--primary-dark);
    font-weight: 850;
    font-size: .75rem;
}

/* ====== Auth Pages ====== */
.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 18px;
    background: linear-gradient(135deg, #f5f7fb 0%, #e8f3f7 100%);
}
.auth-card {
    width: min(440px, 100%);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: 0 14px 38px rgba(18, 32, 53, .1);
}
.auth-card h1 { font-size: 1.4rem; font-weight: 850; margin: 14px 0 4px; }
.auth-card p { color: var(--muted); margin-bottom: 18px; font-size: .88rem; }
.default-login-box {
    margin-top: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f7fafc;
    padding: 10px 12px;
    display: grid;
    gap: 3px;
}
.default-login-box span,
.developer-credit {
    color: var(--muted);
    font-size: .8rem;
    font-weight: 750;
}
.default-login-box strong { color: var(--text); font-size: .9rem; }
.developer-credit { margin-top: 12px; text-align: center; }
.developer-credit a { color: var(--primary-dark); font-weight: 850; text-decoration: none; }
.developer-credit a:hover { text-decoration: underline; }

/* ====== Settings Preview (Compact) ====== */
.settings-preview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}
.settings-preview.compact-preview div {
    background: #f7fafc;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 10px 12px;
}
.settings-preview div {
    background: #f7fafc;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px;
}
.settings-preview span { color: var(--muted); font-size: .76rem; font-weight: 750; }
.settings-preview strong { display: block; margin-top: 3px; font-size: .92rem; }

/* ====== Content / Panels (Compact spacing) ====== */
.content-wrap { padding: 22px 26px; }
.icon-btn {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    padding: 0;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.metric-card, .panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 10px 24px rgba(18, 32, 53, .06);
}
.metric-card {
    padding: 14px;
    min-height: 96px;
    display: grid;
    align-content: space-between;
    position: relative;
    overflow: hidden;
}
.metric-card::after {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: var(--accent);
}
.metric-card span { color: var(--muted); font-size: .82rem; font-weight: 700; }
.metric-card strong { font-size: 1.3rem; font-weight: 850; }
.panel { padding: 16px; }
.compact-panel { padding: 14px; }
.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.panel-head h2 { margin: 0; font-size: 1rem; font-weight: 850; }
.panel-head p { margin: 2px 0 0; color: var(--muted); font-size: .83rem; }
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    font-weight: 750;
    box-shadow: 0 6px 14px rgba(23, 107, 135, .16);
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }

/* ====== Tables ====== */
.data-table { min-width: 860px; font-size: .86rem; }
.data-table th {
    color: var(--muted);
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 10px 12px !important;
}
.data-table td { padding: 8px 12px !important; vertical-align: middle; }
.empty-state { text-align: center; color: var(--muted); padding: 22px !important; }

/* ====== Forms (Compact) ====== */
.form-layout { max-width: 1060px; }
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
label { color: var(--muted); font-weight: 750; font-size: .82rem; }
label .form-control, label .form-select { margin-top: 5px; color: var(--text); font-weight: 500; padding: 7px 10px; font-size: .88rem; }
.wide { grid-column: 1 / -1; }

.balance-strip {
    margin-top: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f7fafc;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 10px 14px;
    flex-wrap: wrap;
    gap: 10px;
}
.balance-strip span { color: var(--muted); font-weight: 750; font-size: .83rem; }
.balance-strip strong { font-size: 1.02rem; }

.transfer-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.transfer-grid > div {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    display: grid;
    gap: 10px;
    background: linear-gradient(180deg, #ffffff, #f8fbfd);
}
.transfer-grid h3 { margin: 0; font-size: .95rem; font-weight: 850; display: flex; align-items: center; gap: 8px; }
.transfer-balance {
    display: grid;
    gap: 2px;
    border-radius: var(--radius);
    padding: 10px 12px;
    background: #eef7fa;
    border: 1px solid #d3e9f0;
}
.transfer-balance span, .transfer-balance small { color: var(--muted); font-weight: 750; font-size: .8rem; }
.transfer-balance strong { color: var(--primary-dark); font-size: 1.08rem; }

.quick-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    background: #f7fafc;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 8px;
}
.quick-actions .btn { border: 1px solid var(--line); font-weight: 750; }

.table-actions { white-space: nowrap; }
.table-actions .btn {
    width: 32px;
    height: 32px;
    display: inline-grid;
    place-items: center;
    margin-left: 4px;
    padding: 0;
}
.status-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: .72rem;
    font-weight: 850;
}
.status-pill.active { color: #0f5132; background: #dff3e8; }
.status-pill.inactive { color: #7c2d12; background: #ffedd5; }

/* ====== Denomination Panel (Compact) ====== */
.denomination-panel {
    margin-top: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fbfdff;
    padding: 14px;
}
.denomination-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.denomination-head h3 { margin: 0; font-size: .96rem; font-weight: 850; }
.denomination-head p { margin: 2px 0 0; color: var(--muted); font-size: .82rem; }
.denomination-grand-total {
    background: #e8f3f7;
    color: var(--primary-dark);
    border-radius: var(--radius);
    padding: 8px 12px;
    white-space: nowrap;
    font-weight: 850;
}
.denomination-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
.denomination-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 92px 110px;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    padding: 8px 10px;
}
.denomination-row small { display: block; margin-top: 2px; color: var(--muted); font-weight: 650; font-size: .74rem; }
.denom-available {
    font-style: normal;
    display: inline-block;
    margin-top: 2px;
    padding: 2px 6px;
    background: #fff3cd;
    color: #7a4b00;
    border-radius: 6px;
    font-size: .7rem;
    font-weight: 800;
}
.denomination-row em { color: var(--text); font-style: normal; text-align: right; font-weight: 850; font-size: .86rem; }

/* Denomination list */
.denomination-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 14px;
}
.denomination-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    align-items: center;
    gap: 10px !important;
    padding: 10px !important;
    border-radius: 10px !important;
    border: 1px solid var(--line);
    background: #fff;
    transition: box-shadow .15s ease, border-color .15s ease, transform .1s ease;
}
.denomination-item:hover {
    box-shadow: 0 4px 10px rgba(15, 23, 42, .05);
    border-color: #d8dee6;
    transform: translateY(-1px);
}
.denom-item-details { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.denom-item-details strong { font-size: .92rem; font-weight: 850; line-height: 1.2; }
.denom-item-details small { color: var(--muted); font-weight: 700; font-size: .76rem; }
.denom-item-details .denomination-type { font-size: .62rem; padding: 2px 7px; display: inline-block; margin-left: 2px; }
.denom-item-actions { display: inline-flex; gap: 5px; align-items: center; }

.denomination-type {
    text-transform: uppercase;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: .66rem;
    font-weight: 850;
}
.denomination-type.note { background: #e8f3f7; color: var(--primary-dark); }
.denomination-type.coin { background: #fff3cd; color: #7a4b00; }

.denomination-form-grid {
    grid-template-columns: auto 1.2fr 1fr .85fr 1.2fr auto;
    align-items: end;
    gap: 10px;
}
#denominationImagePreviewWrap {
    min-height: 58px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 4px;
}

/* ====== Denomination thumbnails ====== */
.denom-thumb {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .06);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    vertical-align: middle;
    background: #fff;
}
.denom-thumb-placeholder {
    color: #fff;
    font-weight: 950;
    font-size: .95rem;
    letter-spacing: .3px;
    text-shadow: 0 1px 2px rgba(15, 23, 42, .18);
    border: none !important;
    overflow: hidden;
}
.denom-thumb-placeholder.note {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border-radius: 10px;
}
.denom-thumb-placeholder.coin {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(217, 119, 6, .2), inset 0 -2px 0 rgba(0,0,0,.1);
}
.denom-form-thumb { width: 48px; height: 48px; border-radius: 9px; }
.denom-item-thumb { width: 46px; height: 46px; border-radius: 10px; }
.data-table .denom-thumb { width: 38px; height: 38px; margin-right: 8px; border-radius: 8px; }

/* ====== Form rows with images ====== */
.denom-row-with-image {
    grid-template-columns: auto minmax(0, 1fr) 108px 110px !important;
    gap: 8px !important;
}
.denom-row-with-image .denom-meta { display: block; }
.denom-row-with-image .denom-meta strong { display: block; font-size: .92rem; font-weight: 850; line-height: 1.15; }
.denom-row-with-image .denom-meta small { line-height: 1.35; margin-top: 3px; font-size: .72rem; }
.denom-subtotal { font-style: normal; font-weight: 800; color: var(--text); }

/* ====== Search / Filters ====== */
.search-box { max-width: 300px; }
.filter-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(4, minmax(130px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f8fbfd;
}
.export-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.export-actions .btn { border: 1px solid var(--line); font-weight: 750; padding: 5px 10px; font-size: .82rem; }

.report-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}
.report-summary article {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px;
    background: #fff;
}
.report-summary span { color: var(--muted); font-size: .78rem; font-weight: 750; }
.report-summary strong { display: block; margin-top: 4px; font-size: 1.1rem; font-weight: 850; }

/* ====== Mobile Sidebar ====== */
.mobile-menu { background: #0e1b2a; color: white; }
.mobile-menu .offcanvas-header { padding: 16px 18px; border-bottom: 1px solid rgba(255,255,255,.06); }
.mobile-menu .offcanvas-header .brand { margin-bottom: 0; }
.mobile-menu .btn-close { filter: invert(1); }

.badge-soft {
    background: #e8f3f7;
    color: var(--primary-dark);
    border-radius: 999px;
    padding: 4px 9px;
    font-weight: 800;
    font-size: .74rem;
}

/* ====== Toast ====== */
.toast-container { z-index: 9999; }
.btn-sm { padding: 4px 10px; font-size: .8rem; }

/* ============================================================
   PROFESSIONAL CASH TRANSACTION UI (Cash In / Cash Out)
   ============================================================ */
.form-layout-pro { max-width: 1360px; }
.form-layout-pro .pro-panel {
    background: #ffffff;
    border: 1px solid #eef2f7;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(30, 41, 59, .06);
    padding: 0;
    overflow: hidden;
    position: relative;
}
.form-layout-pro .pro-panel::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 6px;
    background: linear-gradient(90deg, #5b4df5, #7c3aed 45%, #ea580c 80%, #f59e0b);
    z-index: 1;
}

/* ---------- Header Bar ---------- */
.pro-header {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 20px;
    padding: 22px 28px 18px;
    border-bottom: 1px solid #f1f5f9;
    position: relative;
    z-index: 2;
    background: #fff;
}
.pro-header-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.pro-header-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #5b4df5, #7c3aed);
    color: #fff;
    font-size: 1.25rem;
    box-shadow: 0 6px 18px rgba(91, 77, 245, .25);
    flex-shrink: 0;
}
.pro-header h1 { margin: 0; font-size: 1.35rem; font-weight: 850; letter-spacing: -.02em; color: #111827; }
.pro-header p { margin: 3px 0 0; color: #6b7280; font-size: .85rem; }
.pro-header-total {
    display: grid;
    grid-template-columns: auto;
    align-items: center;
    gap: 4px;
    padding: 10px 20px;
    background: #f4f2ff;
    border: 1px solid #e4dfff;
    border-radius: 14px;
    min-width: 210px;
    text-align: right;
}
.pro-header-total span {
    color: #7c71b2;
    font-weight: 750;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.pro-header-total strong {
    color: #5b4df5;
    font-size: 1.55rem;
    font-weight: 900;
    letter-spacing: -.02em;
    line-height: 1.1;
}
.pro-reset-btn {
    background: #fff;
    border: 1px solid #e5e7eb;
    color: #4b5563;
    border-radius: 12px;
    padding: 9px 16px;
    font-weight: 700;
    font-size: .84rem;
    transition: all .15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.pro-reset-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #111827;
    transform: translateY(-1px);
}
.pro-primary-btn {
    background: linear-gradient(135deg, #1e5bd8 0%, #2563eb 60%, #3b82f6 100%);
    border: 0;
    color: #fff;
    border-radius: 12px;
    padding: 10px 18px;
    font-weight: 800;
    font-size: .86rem;
    letter-spacing: -.01em;
    transition: all .15s ease;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    box-shadow: 0 6px 18px rgba(37, 99, 235, .28);
    cursor: pointer;
}
.pro-primary-btn:hover { filter: brightness(1.06); transform: translateY(-1px); color: #fff; }
.pro-primary-btn:active { transform: translateY(0); }
.flex-1 { flex: 1 1 0; min-width: 0; }
.pro-header-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pro-badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 10px; border-radius: 999px;
    font-size: .7rem; font-weight: 800;
    letter-spacing: .02em;
}
.pro-badge-purple { background: #ede9fe; color: #6d28d9; border: 1px solid #ddd6fe; }
.pro-badge-blue { background: #dbeafe; color: #1d4ed8; border: 1px solid #bfdbfe; }
.pro-badge-green { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.pro-badge-orange { background: #ffedd5; color: #c2410c; border: 1px solid #fed7aa; }
.pro-badge-teal { background: #ccfbf1; color: #0f766e; border: 1px solid #99f6e4; }
.pro-badge-red { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.pro-form-title {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: .86rem; font-weight: 850; color: #1f2937;
    margin: 16px 0 10px; letter-spacing: -.01em;
}
.pro-form-title i { color: #7c3aed; }
.pro-form-grid {
    background: #fff;
    border: 1px solid #eef2f7;
    border-radius: 16px;
    padding: 18px 20px 24px;
    box-shadow: 0 6px 24px rgba(15, 23, 42, .04);
    display: grid;
    gap: 2px;
    align-content: start;
}

/* ====== Dashboard Pro Styles ====== */
.dashboard-pro { max-width: 1440px; }
.dash-welcome {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; padding: 8px 6px 16px; flex-wrap: wrap;
}
.dash-welcome h1 {
    margin: 0; font-size: 1.5rem; font-weight: 900;
    color: #0f172a; letter-spacing: -.025em;
}
.dash-welcome p { margin: 4px 0 0; color: #64748b; font-size: .88rem; }
.dash-pro-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}
.dash-pro-kpi-grid.row-2 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pro-kpi-card {
    background: #fff;
    border: 1px solid #eef2f7;
    border-radius: 16px;
    padding: 20px 22px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(15, 23, 42, .05);
    transition: transform .18s ease, box-shadow .18s ease;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
    align-items: center;
}
.pro-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(15, 23, 42, .09);
}
.pro-kpi-icon {
    width: 56px; height: 56px;
    border-radius: 14px;
    display: grid; place-items: center;
    color: #fff;
    font-size: 1.35rem;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(0,0,0,.08);
}
.pro-kpi-icon.kpi-cash { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.pro-kpi-icon.kpi-bank { background: linear-gradient(135deg, #06b6d4, #10b981); }
.pro-kpi-icon.kpi-total { background: linear-gradient(135deg, #8b5cf6, #a855f7); }
.pro-kpi-icon.kpi-cin { background: linear-gradient(135deg, #f59e0b, #fb923c); }
.pro-kpi-icon.kpi-cout { background: linear-gradient(135deg, #ef4444, #f87171); }
.pro-kpi-icon.kpi-bin { background: linear-gradient(135deg, #0ea5e9, #06b6d4); }
.pro-kpi-icon.kpi-bout { background: linear-gradient(135deg, #f97316, #fb923c); }
.pro-kpi-meta { display: grid; gap: 4px; min-width: 0; }
.pro-kpi-meta span { color: #64748b; font-size: .78rem; font-weight: 700; letter-spacing: .02em; }
.pro-kpi-meta strong {
    color: #0f172a; font-size: 1.45rem;
    font-weight: 900; letter-spacing: -.02em; line-height: 1.1;
}
.pro-kpi-meta small { color: #94a3b8; font-size: .72rem; font-weight: 700; }
.pro-kpi-card::after {
    content: "";
    position: absolute;
    right: -40px; top: -40px;
    width: 160px; height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, .08), transparent 60%);
    pointer-events: none;
}

.dash-main-grid {
    display: grid;
    grid-template-columns: 1.7fr 1fr;
    gap: 18px;
    align-items: start;
}
.pro-card-panel {
    background: #fff;
    border: 1px solid #eef2f7;
    border-radius: 16px;
    padding: 22px 22px 18px;
    box-shadow: 0 6px 24px rgba(15, 23, 42, .05);
}
.pro-card-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; margin-bottom: 14px; flex-wrap: wrap;
}
.pro-card-head-left { display: flex; align-items: center; gap: 12px; }
.pro-card-title-icon {
    width: 34px; height: 34px;
    border-radius: 10px;
    background: #eef2ff; color: #4f46e5;
    display: grid; place-items: center;
    font-size: .95rem;
}
.pro-card-head h3 { margin: 0; font-size: 1rem; font-weight: 850; color: #0f172a; letter-spacing: -.01em; }
.pro-card-head p { margin: 2px 0 0; color: #64748b; font-size: .78rem; }

.dash-pro-empty {
    display: grid; place-items: center;
    text-align: center; padding: 52px 18px 44px;
    color: #64748b;
    background:
      radial-gradient(circle at 50% 0%, rgba(99,102,241,.05), transparent 55%);
    border-top: 1px dashed #e2e8f0;
    margin: 0 -4px;
}
.dash-pro-empty-illus {
    width: 140px; height: 140px;
    margin-bottom: 14px;
    position: relative;
}
.dash-pro-empty-illus svg { width: 100%; height: 100%; overflow: visible; }
.dash-pro-empty h4 { margin: 0; color: #0f172a; font-size: 1.1rem; font-weight: 850; }
.dash-pro-empty p { margin: 6px 0 0; color: #64748b; font-size: .86rem; }

/* Quick Actions Grid */
.quick-tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.quick-tile {
    background: #fff;
    border: 1px solid #eef2f7;
    border-radius: 14px;
    padding: 18px 10px 16px;
    display: grid;
    place-items: center;
    gap: 8px;
    text-align: center;
    cursor: pointer;
    transition: all .16s ease;
    color: #0f172a;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .03);
}
.quick-tile:hover {
    transform: translateY(-2px);
    border-color: #c7d2fe;
    box-shadow: 0 10px 22px rgba(79, 70, 229, .12);
    color: #4f46e5;
    text-decoration: none;
}
.quick-tile-icon {
    width: 40px; height: 40px;
    border-radius: 12px;
    display: grid; place-items: center;
    color: #fff;
    font-size: 1.05rem;
}
.qt-cin { background: linear-gradient(135deg, #10b981, #059669); }
.qt-cout { background: linear-gradient(135deg, #ef4444, #dc2626); }
.qt-ct { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.qt-bt { background: linear-gradient(135deg, #0ea5e9, #0284c7); }
.qt-dwr { background: linear-gradient(135deg, #f59e0b, #d97706); }
.qt-cbr { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.quick-tile small { font-weight: 750; font-size: .75rem; letter-spacing: -.01em; }

/* Balance Donut Card */
.balance-overview-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}
.balance-donut-wrap {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 18px;
    align-items: center;
}
.balance-donut {
    width: 130px; height: 130px; position: relative; flex-shrink: 0;
}
.balance-donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.balance-donut-center {
    position: absolute; inset: 0;
    display: grid; place-items: center; text-align: center;
    padding-top: 6px;
}
.balance-donut-center span { color: #64748b; font-size: .72rem; font-weight: 700; }
.balance-donut-center strong { color: #0f172a; font-size: 1.25rem; font-weight: 900; letter-spacing: -.02em; }
.balance-legend { display: grid; gap: 12px; }
.legend-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
}
.legend-dot {
    width: 10px; height: 10px; border-radius: 999px;
}
.legend-dot.cash { background: #8b5cf6; }
.legend-dot.bank { background: #10b981; }
.legend-label { color: #475569; font-size: .82rem; font-weight: 700; }
.legend-value { color: #0f172a; font-weight: 850; font-size: .86rem; }
.legend-percent { color: #64748b; font-size: .72rem; font-weight: 700; }
.legend-right { display: grid; justify-items: end; gap: 1px; }

/* Dashboard Responsive */
@media (max-width: 1200px) {
    .dash-pro-kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .dash-pro-kpi-grid.row-2 { grid-template-columns: repeat(2, 1fr); }
    .dash-main-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .dash-pro-kpi-grid, .dash-pro-kpi-grid.row-2 { grid-template-columns: 1fr; }
    .quick-tiles { grid-template-columns: repeat(2, 1fr); }
    .pro-kpi-card { padding: 16px; }
    .pro-kpi-meta strong { font-size: 1.2rem; }
    .dash-welcome h1 { font-size: 1.2rem; }
    .balance-donut-wrap { grid-template-columns: 1fr; justify-items: center; }
}

/* ---------- Meta Toggler (Transaction Details) ---------- */
.pro-meta-toggler {
    width: calc(100% - 48px);
    margin: 14px 24px 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    color: #475569;
    font-weight: 750;
    font-size: .84rem;
    cursor: pointer;
    transition: all .15s ease;
}
.pro-meta-toggler:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}
.pro-meta-toggler > i:first-child {
    color: #6366f1;
    opacity: .85;
}
.pro-meta-toggler small {
    color: #94a3b8;
    font-weight: 600;
    font-size: .76rem;
}
.pro-meta-chevron {
    margin-left: auto;
    transition: transform .25s ease;
}
.pro-meta-panel {
    margin: 12px 24px 0;
    padding: 16px 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    animation: fadeInSlide .25s ease;
}
.pro-meta-panel[hidden] { display: none; }
@keyframes fadeInSlide { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- New Meta Section (ALWAYS OPEN - 6-COLUMN) ---------- */
.pro-meta-section {
    margin: 16px 24px 0;
    padding: 16px 20px 18px;
    background: linear-gradient(180deg, #f8fafc 0%, #f8fafc 60%, #ffffff 100%);
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    position: relative;
}
.pro-meta-section::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    border-radius: 14px 0 0 14px;
    background: linear-gradient(180deg, #5b4df5 0%, #7c3aed 50%, #ea580c 100%);
}
.pro-meta-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 850;
    font-size: .92rem;
    letter-spacing: -.005em;
    color: #0f172a;
    padding: 0 0 12px;
}
.pro-meta-title i {
    color: #5b4df5;
    font-size: 1.05rem;
}
.pro-meta-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px 12px;
    align-items: end;
}
.pro-meta-grid label {
    font-size: .82rem;
    font-weight: 750;
    color: #334155;
    margin: 0;
    display: grid;
    gap: 5px;
    grid-column: span 2;
}
.pro-meta-grid label.wide {
    grid-column: span 6;
}
.pro-meta-grid label:nth-last-child(2):not(.wide) { grid-column: span 2; }
.pro-meta-grid input.form-control,
.pro-meta-grid select.form-select,
.pro-meta-grid textarea.form-control {
    font-size: .86rem;
    padding: 9px 12px;
    min-height: 40px;
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    color: #0f172a;
    transition: all .15s ease;
}
.pro-meta-grid input.form-control:focus,
.pro-meta-grid select.form-select:focus,
.pro-meta-grid textarea.form-control:focus {
    border-color: #5b4df5;
    box-shadow: 0 0 0 3px rgba(91, 77, 245, .14);
    outline: none;
}

/* ---------- Full-width content (no right panel) for Cash In ---------- */
.pro-full-width-content {
    padding: 20px 24px 96px;
    display: grid;
    gap: 18px;
}
.pro-cards-single {
    display: grid;
    gap: 20px;
}

/* ---------- Pro Report Summary Cards ---------- */
.pro-report-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 14px;
    padding: 20px 24px 0;
}
.pro-summary-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px 18px;
    display: grid;
    gap: 8px;
    position: relative;
    overflow: hidden;
}
.pro-summary-item::before {
    content:""; position:absolute; inset:auto 0 0 0; height:4px;
}
.pro-summary-item.s-notes::before { background: linear-gradient(90deg,#5b4df5,#7c3aed); }
.pro-summary-item.s-coins::before { background: linear-gradient(90deg,#f59e0b,#ef4444); }
.pro-summary-item.s-total::before { background: linear-gradient(90deg,#059669,#10b981); }
.pro-summary-item.s-in::before { background: linear-gradient(90deg,#10b981,#059669); }
.pro-summary-item.s-out::before { background: linear-gradient(90deg,#ef4444,#be123c); }
.pro-summary-item.s-net::before { background: linear-gradient(90deg,#2563eb,#7c3aed); }
.pro-summary-item span {
    font-size: 13px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 7px;
}
.pro-summary-item span i { color: #475569; }
.pro-summary-item strong {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
}
@media (max-width: 768px) {
    .pro-report-summary { grid-template-columns: 1fr; }
}

/* ---------- Cash Box Group ---------- */
.pro-cashbox-content {
    padding: 20px 24px 40px;
    display: grid;
    gap: 22px;
}
.pro-cashbox-group {
    background: linear-gradient(180deg,#fff 0%,#fafbfd 100%);
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 18px 20px 20px;
    box-shadow: 0 1px 2px rgba(15,23,42,.04);
    position: relative;
    overflow: hidden;
}
.pro-cashbox-group::before {
    content:""; position:absolute; inset:0 auto 0 0; width:5px;
    background: linear-gradient(180deg,#7c3aed 0%,#5b4df5 40%,#0ea5e9 100%);
}
.pro-cashbox-group-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding-bottom: 14px;
    margin-bottom: 4px;
    border-bottom: 1px dashed #e2e8f0;
    flex-wrap: wrap;
}
.pcg-head-left {
    display: flex; gap: 12px; align-items: center;
}
.pcg-icon {
    width: 46px; height: 46px; border-radius: 12px;
    background: linear-gradient(135deg,#7c3aed,#5b4df5);
    color: #fff; font-size: 20px;
    display: grid; place-items: center;
    box-shadow: 0 10px 24px rgba(124,58,237,.28);
}
.pcg-head-left h2 { margin: 0; font-size: 18px; font-weight: 700; color:#0f172a; }
.pcg-head-left p { margin: 2px 0 0; font-size: 13px; color:#64748b; }
.pcg-head-left p i { margin-right:4px; color:#5b4df5; }
.pcg-total-badge {
    background: linear-gradient(135deg,#0f172a,#334155);
    color: #fff;
    padding: 10px 18px;
    border-radius: 12px;
    display: grid;
    gap: 3px;
    box-shadow: 0 10px 26px rgba(15,23,42,.28);
}
.pcg-total-badge span { font-size: 11px; opacity:.8; letter-spacing:.3px; text-transform: uppercase; }
.pcg-total-badge strong { font-size: 18px; font-weight: 800; }

/* ---------- Generic Report Pro Layout (for report-view.php) ---------- */
.report-pro-layout {
    padding: 20px 24px 40px;
    display: grid;
    gap: 18px;
}
.rp-card-row {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px 16px;
    display: grid;
    grid-template-columns: 60px 1fr auto auto auto;
    gap: 16px;
    align-items: center;
    transition: all .2s ease;
}
.rp-card-row:hover {
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(15,23,42,.06);
}
.rp-type-chip {
    width: 52px; height: 52px;
    border-radius: 12px;
    display: grid; place-items: center;
    color: #fff; font-size: 20px;
    box-shadow: 0 6px 14px rgba(0,0,0,.12);
    flex: 0 0 52px;
}
.rp-type-chip.t-cash_in { background: linear-gradient(135deg,#10b981,#059669); }
.rp-type-chip.t-cash_out { background: linear-gradient(135deg,#ef4444,#be123c); }
.rp-type-chip.t-bank_deposit { background: linear-gradient(135deg,#f59e0b,#dc2626); }
.rp-type-chip.t-bank_withdrawal { background: linear-gradient(135deg,#0ea5e9,#6366f1); }
.rp-type-chip.t-transfer { background: linear-gradient(135deg,#7c3aed,#a855f7); }
.rp-main-col { display:grid; gap: 4px; min-width: 0; }
.rp-row-top {
    display: flex; flex-wrap: wrap; gap: 8px 14px;
    align-items: center;
}
.rp-voucher {
    font-weight: 700; color: #0f172a; font-size: 14.5px;
    background: #f1f5f9;
    padding: 3px 10px; border-radius: 8px;
    border: 1px solid #e2e8f0;
}
.rp-type-label {
    font-weight: 600;
    font-size: 12.5px;
    padding: 3px 9px;
    border-radius: 999px;
    color: #fff;
}
.rp-type-label.t-cash_in { background: #059669; }
.rp-type-label.t-cash_out { background: #be123c; }
.rp-type-label.t-bank_deposit { background: #dc2626; }
.rp-type-label.t-bank_withdrawal { background: #2563eb; }
.rp-type-label.t-transfer { background: #7c3aed; }
.rp-date { color: #64748b; font-size: 12.5px; }
.rp-row-meta {
    display: flex; flex-wrap: wrap;
    gap: 6px 14px;
    color: #475569;
    font-size: 12.5px;
}
.rp-row-meta b { color:#0f172a; font-weight:600; }
.rp-amount-col {
    display: grid; gap: 3px; text-align: right; justify-items: end;
}
.rp-amount-col .in { color:#059669; font-weight:800; font-size:16px; }
.rp-amount-col .out { color:#be123c; font-weight:800; font-size:16px; }
.rp-amount-col small { font-size: 11.5px; color: #64748b; }
.rp-acc-badge {
    font-size: 11.5px; padding: 5px 10px; border-radius: 999px;
    background: #f1f5f9; color:#334155; border:1px solid #e2e8f0;
    font-weight: 600;
}
.rp-acc-badge.t-bank { background: #eff6ff; color:#1d4ed8; border-color:#dbeafe; }
.rp-acc-badge.t-cash { background: #ecfdf5; color:#047857; border-color:#d1fae5; }
.rp-empty { padding: 40px; text-align: center; color:#64748b; }

/* ---------- Masters Pro Layout ---------- */
.master-acc-bar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    padding: 20px 24px 0;
    position: relative;
}
.master-acc-bar::before {
    content: "";
    position: absolute;
    inset: 20px 24px auto 24px;
    height: 4px;
    border-radius: 999px 999px 0 0;
    background: var(--acc-bar, linear-gradient(90deg,#5b4df5,#7c3aed));
    pointer-events: none;
    opacity: .9;
}
.master-acc-bar article {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px 20px 16px;
    display: grid;
    gap: 6px;
    margin-top: 4px;
}
.master-acc-bar article span {
    font-size: 13px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
}
.master-acc-bar article strong {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
}
.master-search {
    padding: 18px 24px 0;
}
.master-search label {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 8px 14px;
    transition: all .2s ease;
}
.master-search label:focus-within {
    border-color: #5b4df5;
    box-shadow: 0 0 0 3px rgba(91,77,245,.12);
}
.master-search label i {
    color: #64748b;
    font-size: 16px;
}
.master-search label input {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    background: transparent !important;
    outline: none !important;
    min-height: 32px;
    font-size: 14px;
}
.master-table-wrap {
    margin: 18px 24px 28px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 4px;
    overflow: hidden;
}
.master-table-wrap .master-table {
    border: none;
    margin: 0;
}
.master-table-wrap .master-table thead th {
    background: linear-gradient(180deg,#f8fafc 0%,#f1f5f9 100%);
    color: #334155;
    border-bottom: 1px solid #e2e8f0;
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: .3px;
    padding: 14px 16px;
    font-weight: 700;
}
.master-table-wrap .master-table tbody td {
    padding: 13px 16px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13.5px;
    color: #334155;
    vertical-align: middle;
}
.master-table-wrap .master-table tbody tr:last-child td { border-bottom: none; }
.master-table-wrap .master-table tbody tr:hover {
    background: #fafbff;
}
.master-table-wrap .table-actions {
    display: flex; gap: 6px; justify-content: flex-end;
}
.master-table-wrap .table-actions .btn {
    border-radius: 8px;
    padding: 5px 10px;
}

/* Modal Gradient Header */
.master-modal-header {
    background: linear-gradient(135deg,#5b4df5,#7c3aed);
    color: #fff;
    border-bottom: none;
    position: relative;
    overflow: hidden;
}
.master-modal-header::after {
    content: "";
    position: absolute;
    top: -50px; right: -30px;
    width: 180px; height: 180px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
}
.master-modal-header .modal-title {
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}
.master-modal-header .modal-title i {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: rgba(255,255,255,.18);
    display: grid; place-items: center;
    font-size: 18px;
}
.master-form-grid .wide { grid-column: 1 / -1; }
.master-form-grid input.form-control, .master-form-grid select.form-select, .master-form-grid textarea.form-control {
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    min-height: 40px;
    padding: 8px 12px;
    font-size: 14px;
    background: #fafbff;
    transition: all .18s ease;
}
.master-form-grid input.form-control:focus, .master-form-grid select.form-select:focus, .master-form-grid textarea.form-control:focus {
    background: #fff;
    border-color: #5b4df5;
    box-shadow: 0 0 0 3px rgba(91,77,245,.12);
}
.master-form-grid label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: #475569;
    letter-spacing: .2px;
    margin-bottom: 2px;
}
.master-modal-footer {
    border-top: 1px solid #e2e8f0;
    background: #fafbfd;
    padding: 14px 20px;
}
@media (max-width: 768px) {
    .master-acc-bar { grid-template-columns: 1fr; }
}

/* ---------- Cash Transfer (Centre-to-Centre) ---------- */
.ct-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 16px 24px 0;
    padding: 6px;
    background: #f1f5f9;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
}
.ct-tabs .ct-tab {
    flex: 1 1 auto;
    min-width: 120px;
    padding: 10px 16px;
    border: none;
    background: transparent;
    border-radius: 10px;
    font-weight: 700;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all .2s ease;
    font-size: 13.5px;
}
.ct-tabs .ct-tab:hover { color: #0f172a; background: rgba(255,255,255,.5); }
.ct-tabs .ct-tab.active {
    background: #fff;
    color: #5b4df5;
    box-shadow: 0 4px 12px rgba(15,23,42,.08);
}
.ct-tabs .ct-tab.ct-pending.active { color: #f59e0b; }
.ct-tabs .ct-tab.ct-approve.active { color: #059669; }
.ct-tabs .ct-tab.ct-history.active { color: #2563eb; }

.ct-pending-list, .ct-history-list {
    padding: 20px 24px 40px;
    display: grid;
    gap: 14px;
}
.ct-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px 18px;
    display: grid;
    grid-template-columns: 58px 1fr auto;
    gap: 16px;
    align-items: center;
    box-shadow: 0 1px 2px rgba(15,23,42,.04);
    position: relative;
    overflow: hidden;
}
.ct-card::before {
    content:""; position:absolute; inset:0 auto 0 0; width:4px;
}
.ct-card.ct-state-pending::before { background: linear-gradient(180deg,#f59e0b,#ef4444); }
.ct-card.ct-state-approved::before { background: linear-gradient(180deg,#059669,#10b981); }
.ct-card.ct-state-rejected::before { background: linear-gradient(180deg,#dc2626,#b91c1c); }
.ct-chip {
    width: 58px; height: 58px;
    border-radius: 14px;
    display: grid; place-items: center;
    color: #fff; font-size: 22px;
    flex: 0 0 58px;
    box-shadow: 0 8px 16px rgba(0,0,0,.12);
}
.ct-chip.ct-pending { background: linear-gradient(135deg,#f59e0b,#dc2626); }
.ct-chip.ct-approved { background: linear-gradient(135deg,#059669,#10b981); }
.ct-chip.ct-rejected { background: linear-gradient(135deg,#dc2626,#7f1d1d); }
.ct-info h4 {
    margin: 0 0 5px;
    font-size: 15.5px;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.ct-info p {
    margin: 0;
    font-size: 13px;
    color: #475569;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
}
.ct-info p i { color: #64748b; margin-right: 3px; }
.ct-amount-badge {
    text-align: right;
    display: grid;
    gap: 6px;
    justify-items: end;
}
.ct-amount-badge strong {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
}
.ct-status-pill {
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .3px;
}
.ct-status-pill.pending { background: #fef3c7; color: #92400e; }
.ct-status-pill.approved { background: #d1fae5; color: #065f46; }
.ct-status-pill.rejected { background: #fee2e2; color: #991b1b; }
.ct-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
    margin-top: 4px;
}
.ct-actions .btn {
    border-radius: 10px;
    padding: 6px 14px;
    font-weight: 600;
    font-size: 13px;
}


/* ---------- Transfer Page Pro Layout ---------- */
.transfer-main-grid {
    display: grid;
    grid-template-columns: 1fr 90px 1fr;
    align-items: stretch;
    gap: 18px;
    padding: 20px 24px 10px;
}
.transfer-card-box {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 18px 20px;
    box-shadow: 0 1px 2px rgba(15,23,42,.04);
    position: relative;
    overflow: hidden;
}
.transfer-card-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}
.from-box-pro::before { background: linear-gradient(180deg,#dc2626,#f59e0b); }
.to-box-pro::before { background: linear-gradient(180deg,#059669,#10b981); }
.tx-box-head {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
}
.tx-box-head h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
}
.tx-box-head p {
    margin: 2px 0 0;
    font-size: 12.5px;
    color: #64748b;
}
.tx-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: grid; place-items: center;
    color: #fff; font-size: 19px;
    flex: 0 0 44px;
    box-shadow: 0 8px 18px rgba(0,0,0,.12);
}
.tx-from-icon { background: linear-gradient(135deg,#ef4444,#f59e0b); }
.tx-to-icon { background: linear-gradient(135deg,#059669,#14b8a6); }
.tx-box-body {
    display: grid;
    gap: 12px;
}
.transfer-balance-pro {
    margin-top: 4px;
    padding: 14px 16px;
    border-radius: 12px;
    display: grid;
    gap: 8px;
    background: linear-gradient(135deg,#f1f5f9,#f8fafc);
    border: 1px solid #e2e8f0;
}
.tx-bal-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13.5px;
    color: #334155;
}
.tx-bal-row i { color:#64748b; margin-right:5px; }
.tx-bal-row strong { color:#0f172a; font-weight:700; font-size: 15px; }
.tx-bal-row.tx-after {
    padding-top: 8px;
    border-top: 1px dashed #cbd5e1;
    color:#475569;
}
.tx-bal-row.tx-after b {
    background: linear-gradient(135deg,#0ea5e9,#2563eb);
    color:#fff; padding: 4px 10px; border-radius: 999px;
    font-size: 13px; font-weight:700;
}

.transfer-vs-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px 0;
}
.tx-vs-circle {
    width: 68px; height: 68px;
    border-radius: 50%;
    background: linear-gradient(135deg,#0ea5e9 0%,#2563eb 60%,#7c3aed 100%);
    color:#fff; font-size: 24px;
    display: grid; place-items: center;
    box-shadow: 0 14px 30px rgba(37,99,235,.35), 0 0 0 6px rgba(37,99,235,.08);
    position: relative;
    animation: txPulse 2.4s ease-in-out infinite;
}
@keyframes txPulse {
    0%,100% { transform: scale(1); }
    50% { transform: scale(1.04); }
}
.transfer-vs-col small {
    color: #64748b;
    font-size: 11.5px;
    background: #f1f5f9;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
}
.transfer-desc-row {
    padding: 0 24px 96px;
}
.transfer-desc-row .wide {
    display: block;
}
@media (max-width: 880px) {
    .transfer-main-grid { grid-template-columns: 1fr; }
    .transfer-vs-col { padding: 0; flex-direction: row; }
    .transfer-vs-col .tx-vs-circle { width: 52px; height: 52px; font-size:18px; }
}

/* ---------- Cash Transfer Pro Rewrite ---------- */
.ct-pro-wrapper {
    display: grid;
    gap: 22px;
    padding: 22px 24px 96px;
}
.ct-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}
@media (max-width: 1100px) {
    .ct-main-grid { grid-template-columns: 1fr; }
}
.ct-side-stack {
    display: grid;
    gap: 18px;
    align-content: start;
    position: sticky;
    top: 20px;
}
.ct-panel-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}
.ct-panel-head h3 {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 850;
    color: #0f172a;
    letter-spacing: -.01em;
}
.ct-panel-head p {
    margin: 3px 0 0;
    font-size: .78rem;
    color: #64748b;
    font-weight: 500;
}
.ct-icon {
    width: 44px; height: 44px;
    border-radius: 14px;
    display: grid; place-items: center;
    color: #fff; font-size: 18px;
    flex: 0 0 44px;
    box-shadow: 0 10px 24px rgba(15,23,42,.15);
}
.ct-from-icon { background: linear-gradient(135deg,#ef4444,#f59e0b); }
.ct-to-icon   { background: linear-gradient(135deg,#059669,#14b8a6); }
.ct-summary-icon { background: linear-gradient(135deg,#7c3aed,#2563eb); }

.ct-meta-card {
    background: linear-gradient(180deg,#f8fafc 0%,#fff 100%);
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px 16px;
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
}
.ct-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.ct-meta-grid label {
    display: grid;
    gap: 6px;
    font-size: .8rem;
    color: #334155;
    font-weight: 700;
    margin: 0;
}
.ct-meta-grid .form-select,
.ct-meta-grid .form-control {
    height: 40px !important;
    border-radius: 10px !important;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    font-size: .86rem;
    font-weight: 600;
    color: #0f172a;
}
.ct-meta-grid .form-select:focus,
.ct-meta-grid .form-control:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124,58,237,.12);
}
@media (max-width: 560px) {
    .ct-meta-grid { grid-template-columns: 1fr; }
}

.ct-section-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 900;
    font-size: .78rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    padding: 0 2px;
    margin: 0 0 12px;
}
.ct-section-title.ct-notes { color: #7c3aed; }
.ct-section-title.ct-notes i { color: #7c3aed; }
.ct-section-title.ct-coins { color: #0891b2; }
.ct-section-title.ct-coins i { color: #0891b2; }

.ct-from-denom-card {
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 14px;
    padding: 12px 11px 10px;
    display: grid;
    gap: 8px;
    transition: all .18s ease;
}
.ct-from-denom-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(15,23,42,.08);
    border-color: #c4b5fd;
}
.ct-from-denom-card header {
    display: grid;
    gap: 6px;
    text-align: center;
}
.ct-from-denom-card header .denom-thumb,
.ct-from-denom-card header .denom-thumb-placeholder {
    margin: 0 auto;
    max-height: 70px;
    display: block;
}
.ct-from-denom-card header .pro-denom-label {
    font-size: .84rem;
    font-weight: 800;
    color: #1f2937;
}
.ct-from-denom-card header small {
    font-size: .7rem;
    color: #92400e;
    background: #fef3c7;
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 750;
    justify-self: center;
}
.ct-denom-qty {
    display: grid;
    grid-template-columns: 32px 1fr 32px;
    gap: 6px;
    align-items: center;
}
.ct-denom-minus,
.ct-denom-plus {
    width: 32px; height: 32px;
    border-radius: 10px;
    border: 1.5px solid #e5e7eb;
    background: #fff;
    cursor: pointer;
    display: inline-grid; place-items: center;
    padding: 0; font-size: 1rem; font-weight: 800;
    color: #374151;
    transition: all .12s ease;
}
.ct-denom-minus:hover { color:#dc2626; border-color:#fecaca; background:#fef2f2; }
.ct-denom-plus {
    background: linear-gradient(135deg,#7c3aed,#2563eb);
    color: #fff;
    border: 0;
    box-shadow: 0 4px 10px rgba(124,58,237,.28);
}
.ct-denom-plus:hover { opacity: .92; }
.ct-from-qty {
    height: 32px !important;
    border-radius: 10px !important;
    border: 1.5px solid #e5e7eb !important;
    background: #f9fafb;
    text-align: center;
    font-weight: 850 !important;
    color: #111827;
    font-size: .94rem !important;
    padding: 0 !important;
}
.ct-from-qty:focus {
    outline: none !important;
    border-color: #7c3aed !important;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(124,58,237,.12) !important;
}
.ct-from-qty::-webkit-outer-spin-button,
.ct-from-qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ct-from-qty[type=number] { -moz-appearance: textfield; }

.ct-from-denom-card footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 3px 4px 0;
    border-top: 2px dotted #e5e7eb;
    margin-top: 1px;
}
.ct-from-denom-card footer small {
    font-size: .72rem;
    font-weight: 750;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.ct-denom-subtotal {
    font-weight: 900;
    font-size: .98rem;
    color: #0f172a;
    letter-spacing: -.01em;
}

/* Summary card */
.ct-summary-card {
    background: linear-gradient(180deg,#fafbff 0%,#fff 100%);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
}
.ct-summary-head {
    padding: 16px 18px 14px;
    border-bottom: 1px solid #edf2f7;
    background: radial-gradient(ellipse at top left, rgba(124,58,237,.08), transparent 55%);
}
.ct-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 18px;
    font-size: .85rem;
    color: #475569;
}
.ct-summary-row span { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.ct-summary-row b { color: #0f172a; font-weight: 850; }
.ct-summary-row.tot {
    background: linear-gradient(135deg,#7c3aed 0%,#2563eb 100%);
    color: #fff;
    padding: 14px 18px;
    margin: 10px 12px 12px;
    border-radius: 12px;
    box-shadow: 0 10px 22px rgba(124,58,237,.28);
}
.ct-summary-row.tot span { color: rgba(255,255,255,.88); font-weight: 650; }
.ct-summary-row.tot b { color:#fff; font-size: 1.08rem; font-weight: 900; }

.ct-actions-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 0 2px;
}
@media (max-width: 560px) {
    .ct-actions-row { grid-template-columns: 1fr; }
}


/* ---------- Main split grid ---------- */
.pro-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 20px;
    padding: 22px 24px 96px;
}

/* ---------- Section Heading (NOTES / COINS) ---------- */
.pro-section-head {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 900;
    font-size: .82rem;
    letter-spacing: .14em;
    padding: 0 2px;
    margin: 0 0 12px;
}
.pro-section-head i { font-size: 1.05rem; }
.notes-head { color: #6d5cf6; }
.notes-head i { color: #7c3aed; }
.coins-head { color: #0891b2; }
.coins-head i { color: #0891b2; }

/* ---------- Denomination Card Grid ---------- */
.pro-card-grid-notes,
.pro-denom-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
    gap: 12px;
}
.pro-card-grid-coins {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

/* ---------- Single Denomination Card ---------- */
.pro-denom-card {
    background: #fff;
    border: 1.5px solid var(--pc-border, #e5e7eb);
    border-radius: 14px;
    padding: 12px 12px 10px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
    position: relative;
    transition: all .18s ease;
    overflow: visible;
}
.pro-denom-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
    border-color: color-mix(in srgb, var(--pc-border, #5b4df5) 55%, transparent);
}
.pro-denom-pill {
    position: absolute;
    top: -9px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 14px;
    border-radius: 999px;
    color: #fff;
    font-weight: 900;
    font-size: .8rem;
    letter-spacing: .02em;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .15);
    white-space: nowrap;
    z-index: 2;
}
.pro-denom-pill.coin-pill { padding: 4px 12px; }

.pro-denom-imgwrap {
    margin-top: 10px;
    background: #fafbff;
    border-radius: 10px;
    padding: 8px 12px;
    display: grid;
    place-items: center;
    min-height: 70px;
    border: 1px solid #f0f1f5;
}
.pro-denom-img {
    width: auto !important;
    max-width: 100% !important;
    max-height: 76px !important;
    height: auto !important;
    border: none !important;
    box-shadow: 0 6px 18px rgba(15, 23, 42, .1) !important;
    border-radius: 8px;
}
.pro-denom-img.pro-denom-img-coin {
    max-height: 68px !important;
    border-radius: 50% !important;
}
.coins-imgwrap {
    background: radial-gradient(circle at 50% 40%, #fffbeb 0%, #fafbff 80%);
}

.pro-denom-label {
    text-align: center;
    display: grid;
    gap: 2px;
}
.pro-denom-label strong {
    font-size: .88rem;
    font-weight: 800;
    color: #1f2937;
    letter-spacing: -.01em;
}
.pro-denom-available {
    display: none;
    font-size: .7rem;
    color: #b45309;
    font-weight: 750;
    font-style: normal;
}
.pro-denom-available em {
    background: #fef3c7;
    color: #92400e;
    padding: 1px 8px;
    border-radius: 999px;
    font-weight: 800;
    margin-left: 2px;
    font-style: normal;
}

.pro-qty-label {
    text-align: center;
    font-size: .7rem;
    font-weight: 750;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-top: 2px;
}

.pro-qty-controls {
    display: grid;
    grid-template-columns: 34px 1fr 34px;
    gap: 6px;
    align-items: center;
    justify-content: center;
}
.pro-qty-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1.5px solid #e5e7eb;
    background: #fff;
    color: #374151;
    font-size: 1rem;
    cursor: pointer;
    display: inline-grid;
    place-items: center;
    padding: 0;
    transition: all .12s ease;
    font-weight: 700;
    flex-shrink: 0;
}
.pro-qty-btn:hover { background: #f3f4f6; transform: scale(1.06); }
.pro-qty-btn:active { transform: scale(.96); }
.pro-qty-btn.pro-qty-minus:hover { color: #dc2626; border-color: #fecaca; }
.pro-qty-btn.pro-qty-plus {
    color: #fff;
    border: none;
    box-shadow: 0 4px 10px rgba(15, 23, 42, .15);
}
.pro-qty-btn.pro-qty-plus:hover { opacity: .92; }

.pro-qty-input {
    height: 34px !important;
    padding: 0 !important;
    text-align: center;
    font-weight: 850 !important;
    font-size: .96rem !important;
    color: #111827;
    background: #f9fafb;
    border: 1.5px solid #e5e7eb !important;
    border-radius: 10px !important;
    width: 100%;
}
.pro-qty-input:focus {
    outline: none !important;
    border-color: var(--pc-plus, #5b4df5) !important;
    background: #fff;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--pc-plus, #5b4df5) 18%, transparent);
}
.pro-qty-input::-webkit-outer-spin-button,
.pro-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pro-qty-input[type=number] { -moz-appearance: textfield; }

.pro-denom-divider {
    height: 2px;
    margin: 4px 0 0;
    background-image: radial-gradient(circle, #d1d5db 1px, transparent 1px);
    background-size: 6px 2px;
    background-repeat: repeat-x;
    background-position: center;
}

.pro-denom-amount-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 4px 0;
}
.pro-denom-amount-row span {
    font-size: .72rem;
    font-weight: 750;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.pro-denom-amount-row em {
    font-style: normal;
    font-weight: 900;
    font-size: 1rem;
    letter-spacing: -.01em;
}

/* ---------- Right Balance Panel ---------- */
.pro-balance-panel {
    display: grid;
    gap: 14px;
    align-content: start;
    position: sticky;
    top: 78px;
}

.pro-balance-banner {
    background: linear-gradient(135deg, #6d5cf6 0%, #4f46e5 55%, #7c3aed 100%);
    border-radius: 16px;
    padding: 20px 20px 22px;
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(99, 102, 241, .32);
}
.pro-balance-banner::before {
    content: "";
    position: absolute;
    right: -40px;
    top: -40px;
    width: 170px;
    height: 170px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .09);
}
.pro-balance-banner::after {
    content: "";
    position: absolute;
    left: -30px;
    bottom: -50px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .06);
}
.pro-balance-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #fff;
    color: #6366f1;
    display: grid;
    place-items: center;
    font-size: 1.4rem;
    margin-bottom: 12px;
    position: relative;
    z-index: 2;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
}
.pro-balance-title {
    font-size: .84rem;
    color: rgba(255, 255, 255, .85);
    font-weight: 700;
    letter-spacing: .04em;
    margin-bottom: 4px;
    position: relative;
    z-index: 2;
}
.pro-balance-amount {
    color: #fff !important;
    font-size: 1.8rem;
    font-weight: 900 !important;
    letter-spacing: -.02em;
    line-height: 1.1;
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
    position: relative;
    z-index: 2;
}

.pro-summary-card {
    background: #fff;
    border: 1px solid #eef2f7;
    border-radius: 14px;
    padding: 4px 6px;
    display: grid;
    gap: 2px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .04);
}
.pro-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-radius: 10px;
    transition: background .12s ease;
}
.pro-summary-row:hover { background: #f8fafc; }
.pro-summary-row + .pro-summary-row { border-top: 1px dashed #eef2f7; }
.pro-summary-row span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #475569;
    font-weight: 700;
    font-size: .86rem;
}
.pro-summary-row strong {
    color: #0f172a;
    font-weight: 850;
    font-size: .94rem;
    letter-spacing: -.01em;
}
.pro-sum-icon {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    display: inline-grid;
    place-items: center;
    font-size: .85rem;
}
.pro-sum-cash {
    background: #ede9fe;
    color: #6d28d9;
}
.pro-sum-diff {
    background: #dbeafe;
    color: #1d4ed8;
}

.pro-info-box {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: start;
    padding: 14px 16px;
    background: #f5f3ff;
    border: 1px solid #ddd6fe;
    border-radius: 14px;
    color: #4c1d95;
}
.pro-info-icon {
    color: #6366f1;
    font-size: 1.1rem;
    line-height: 1.4;
}
.pro-info-box div {
    font-size: .82rem;
    font-weight: 650;
    line-height: 1.45;
    color: #5b21b6;
}

/* ---------- Bottom Action Bar ---------- */
.pro-actionbar {
    position: absolute;
    inset: auto 0 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 26px;
    background: linear-gradient(180deg, rgba(255,255,255,.9), #fff 60%);
    border-top: 1px solid #eef2f7;
    backdrop-filter: blur(10px);
    z-index: 3;
}
.pro-action-right { display: inline-flex; gap: 10px; align-items: center; }
.pro-action-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px;
    padding: 10px 22px !important;
    border-radius: 12px !important;
    font-weight: 800 !important;
    font-size: .88rem !important;
    transition: all .15s ease !important;
    letter-spacing: -.005em;
}
.pro-back-btn {
    background: #f9fafb !important;
    border: 1px solid #e5e7eb !important;
    color: #475569 !important;
}
.pro-back-btn:hover {
    background: #fff !important;
    border-color: #d1d5db !important;
    transform: translateX(-2px);
}
.pro-cancel-btn {
    color: #dc2626 !important;
    border-color: #fecaca !important;
    background: #fff !important;
}
.pro-cancel-btn:hover {
    background: #fef2f2 !important;
    border-color: #dc2626 !important;
    transform: translateY(-1px);
}
.pro-save-btn {
    background: linear-gradient(135deg, #6d5cf6 0%, #4f46e5 60%, #7c3aed 100%) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 8px 22px rgba(99, 102, 241, .35);
}
.pro-save-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(99, 102, 241, .42);
    filter: brightness(1.04);
}

/* ---------- Responsive for Pro Layout ---------- */
@media (max-width: 1180px) {
    .pro-main-grid { grid-template-columns: minmax(0, 1fr) 300px; }
    .pro-header { padding: 20px 22px 16px; gap: 14px; }
    .pro-card-grid-notes { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}
@media (max-width: 991px) {
    .pro-main-grid { grid-template-columns: 1fr; padding-bottom: 110px; }
    .pro-balance-panel { position: static; grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
    .pro-header {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 18px 16px 14px;
    }
    .pro-header-left { min-width: 0; }
    .pro-header-total {
        width: 100%;
        grid-template-columns: auto auto;
        justify-content: space-between;
        padding: 12px 16px;
    }
    .pro-header h1 { font-size: 1.15rem; }
    .pro-main-grid { padding: 16px 14px 120px; gap: 14px; }
    .pro-meta-toggler { width: calc(100% - 28px); margin: 12px 14px 0; padding: 9px 12px; }
    .pro-meta-panel { margin: 10px 14px 0; padding: 12px 14px; }
    .pro-card-grid-notes, .pro-card-grid-coins {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    .pro-denom-card { padding: 11px 10px 9px; }
    .pro-denom-imgwrap { padding: 6px; min-height: 58px; }
    .pro-denom-img { max-height: 60px !important; }
    .pro-qty-controls { grid-template-columns: 32px 1fr 32px; gap: 4px; }
    .pro-qty-btn { width: 32px; height: 32px; }
    .pro-actionbar { padding: 10px 14px; gap: 8px; flex-wrap: wrap; }
    .pro-action-right { width: 100%; justify-content: flex-end; }
    .pro-action-btn { padding: 9px 14px !important; font-size: .82rem !important; }
    .pro-back-btn { flex: 1; justify-content: center; }
}
@media (max-width: 480px) {
    .pro-card-grid-notes, .pro-card-grid-coins {
        grid-template-columns: 1fr 1fr;
    }
    .pro-denom-pill { font-size: .72rem; padding: 3px 12px; }
    .pro-summary-card { padding: 2px; }
    .pro-summary-row { padding: 10px 12px; }
    .pro-summary-row span { font-size: .8rem; }
}

/* ====== Responsive ====== */
@media (max-width: 1100px) {
    .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 991px) {
    .sidebar-toggle { display: none !important; }
}
@media (max-width: 767px) {
    .topbar.compact-topbar { padding: 12px 14px; flex-wrap: wrap; min-height: auto; }
    .topbar h1 { font-size: 1rem; }
    .topbar-actions { width: 100%; margin-left: 0; display: grid; grid-template-columns: 1fr; }
    .branch-selector { width: 100%; min-width: 0; }
    .content-wrap { padding: 14px; }
    .summary-grid, .form-grid, .transfer-grid { grid-template-columns: 1fr; }
    .panel { padding: 12px; }
    .panel-head { align-items: flex-start; flex-direction: column; gap: 8px; }
    .panel-head .btn, .search-box { width: 100%; }
    .metric-card { min-height: 88px; }
    .settings-preview { grid-template-columns: 1fr; gap: 8px; }
    .denomination-grid, .denomination-list, .denomination-form-grid { grid-template-columns: 1fr; }
    .filter-grid, .report-summary { grid-template-columns: 1fr; }
    .export-actions { width: 100%; }
    .export-actions .btn { flex: 1; }
    .denomination-head { display: grid; }
    .denomination-row { grid-template-columns: 1fr; align-items: stretch; }
    .denomination-row em { text-align: left; }
}
@media (max-width: 768px) {
    .denomination-form-grid { grid-template-columns: 1fr !important; align-items: stretch; }
    #denominationImagePreviewWrap { padding-bottom: 0; min-height: 50px; justify-content: flex-start; }
    .denom-row-with-image { grid-template-columns: auto minmax(0, 1fr) !important; gap: 10px !important; }
    .denom-row-with-image .denom-form-thumb { grid-row: span 2; }
    .denom-row-with-image .denom-meta { grid-column: 2; grid-row: 1; }
    .denom-row-with-image .denomination-qty { grid-column: 1 / -1; margin-top: 2px; }
    .denom-row-with-image .denom-subtotal { grid-column: 1 / -1; text-align: right; }
    .denomination-item { grid-template-columns: auto minmax(0, 1fr) !important; gap: 10px !important; }
    .denom-item-actions { grid-column: 1 / -1; justify-content: flex-end; }
}

/* ========= Profile Pro Design ========= */
.profile-hero-banner { position:relative; border-radius:20px; overflow:hidden; margin-bottom:22px; box-shadow:0 16px 40px rgba(15,23,42,.08); }
.profile-hero-bg {
    background: linear-gradient(135deg,#7c3aed 0%,#5b4df5 42%,#1e5bd8 78%,#0ea5e9 100%);
    position:absolute; inset:0;
}
.profile-hero-bg::after {
    content:"";
    position:absolute; inset:-30% -10% auto -10%;
    height:160%;
    background:
        radial-gradient(1200px 420px at 10% -10%, rgba(255,255,255,.18), transparent 60%),
        radial-gradient(700px 260px at 95% 10%, rgba(255,255,255,.15), transparent 60%),
        radial-gradient(900px 360px at 50% 130%, rgba(14,165,233,.55), transparent 60%);
}
.profile-hero-content {
    position:relative;
    display:grid;
    grid-template-columns: auto 1fr auto;
    align-items:center;
    gap:22px;
    padding:30px 32px;
}
.profile-avatar-xl {
    width:108px; height:108px;
    border-radius:28px;
    background:linear-gradient(135deg,#fff 0%,#f5f3ff 100%);
    color:#5b4df5;
    display:grid;
    place-items:center;
    font-size:2.4rem;
    font-weight:950;
    letter-spacing:.06em;
    box-shadow:0 18px 36px rgba(15,23,42,.22), inset 0 0 0 3px rgba(255,255,255,.5);
    flex-shrink:0;
}
.profile-hero-meta h2 { margin:0 0 6px; color:#fff; font-size:1.65rem; letter-spacing:-.01em; }
.profile-role-pill {
    display:inline-flex; align-items:center; gap:7px;
    background:rgba(255,255,255,.18); backdrop-filter: blur(6px);
    color:#fff; font-weight:700; letter-spacing:.02em;
    padding:7px 14px; border-radius:999px;
    margin:0 0 10px; border:1px solid rgba(255,255,255,.22);
}
.profile-role-pill i { font-size:1rem; }
.profile-hero-links { list-style:none; padding:0; margin:0; display:flex; gap:18px; flex-wrap:wrap; }
.profile-hero-links li { color:#e9e7ff; display:inline-flex; align-items:center; gap:7px; font-weight:600; }
.profile-hero-links i { color:#fff; opacity:.85; }
.profile-hero-actions { display:flex; gap:10px; flex-wrap:wrap; justify-content:flex-end; }
.profile-grid-sections { display:grid; grid-template-columns: 1fr 1fr; gap:20px; }
.profile-password-box {
    grid-column:1 / -1;
    background:linear-gradient(135deg,#fafbff,#fff);
    border:1.5px dashed #c7d2fe;
    border-radius:16px; padding:16px 18px;
}
.profile-password-box ul { margin:0; padding-left:18px; color:#475569; }
.profile-password-box li { margin:3px 0; }
.profile-last-login {
    background:#fafbff;
    border:1.5px solid #e2e8f0;
    border-radius:16px; padding:14px 16px;
    display:flex; flex-direction:column; justify-content:center;
    min-height:110px;
}
.profile-last-login strong { font-size:1rem; color:#1e293b; }

/* ========= Settings Pro Design ========= */
.settings-main-grid { display:grid; grid-template-columns: 1.1fr 1fr; gap:14px; }
.settings-pro .pro-meta-section { padding:14px 16px; }
.settings-pro .pro-meta-grid { gap:10px 14px; }
.settings-logo-preview { display:flex; flex-direction:column; gap:8px; min-height:120px; }
.settings-logo-frame {
    flex:1;
    background:linear-gradient(135deg,#fafbff 0%,#f1f5f9 100%);
    border:1.5px dashed #cbd5e1;
    border-radius:14px;
    display:grid; place-items:center;
    padding:10px 14px;
    min-height:85px;
}
.sl-fallback { display:inline-flex; flex-direction:column; align-items:center; gap:6px; color:#64748b; font-weight:650; }
.sl-fallback i { font-size:1.55rem; color:#94a3b8; }
/* Currency/System section: stack inputs, then full preview cards below → no big empty space */
.settings-pro > .settings-main-grid > div:last-child .pro-meta-grid { grid-template-columns: 1fr; }
.currency-preview-card {
    grid-column:1 / -1;
    background:linear-gradient(135deg,#fff7ed 0%,#fff 55%,#ecfeff 100%);
    border:1.5px solid #fed7aa;
    border-radius:14px; overflow:hidden;
    margin-top:2px;
}
.cp-head {
    background:linear-gradient(135deg,#f59e0b,#dc2626);
    color:#fff; padding:9px 14px;
    font-weight:900; letter-spacing:.02em;
    display:inline-flex; align-items:center; gap:7px;
}
.cp-grid { padding:10px 12px; display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:8px 12px; }
.cp-grid div { display:flex; justify-content:space-between; align-items:center; padding:7px 11px; background:#fff; border-radius:11px; border:1px solid #fee2c5; }
.cp-grid span { color:#64748b; font-weight:600; font-size:.8rem; }
.cp-grid b { color:#1e293b; font-weight:900; font-size:.88rem; }
.system-toggle-card {
    grid-column:1 / -1;
    background:linear-gradient(135deg,#fafbff,#fff);
    border:1.5px solid #e0e7ff;
    border-radius:14px; overflow:hidden;
    margin-top:2px;
}
.st-row {
    display:grid;
    grid-template-columns: 1fr auto;
    align-items:center;
    gap:10px;
    padding:10px 14px;
    border-bottom:1px dashed #e0e7ff;
}
.st-row:last-child { border-bottom:0; }
.st-row h5 { margin:0 0 2px; color:#1e293b; font-size:.96rem; display:inline-flex; align-items:center; gap:7px; }
.st-row h5 i { color:#5b4df5; }
.st-row small { color:#64748b; font-weight:550; font-size:.76rem; }
.st-pill {
    display:inline-flex; align-items:center; gap:4px;
    border-radius:999px; padding:5px 11px;
    font-weight:900; letter-spacing:.02em; font-size:.78rem;
}
.st-pill.on { background:linear-gradient(135deg,#10b981,#059669); color:#fff; box-shadow:0 5px 12px rgba(16,185,129,.26); }
.st-pill.off { background:linear-gradient(135deg,#fecaca,#ef4444); color:#fff; box-shadow:0 5px 12px rgba(239,68,68,.24); }
.pro-alert { display:flex; align-items:center; gap:10px; font-weight:650; border-radius:14px!important; padding:14px 16px!important; }

/* ========= Responsive Profile/Settings ========= */
@media (max-width: 1100px) {
    .settings-main-grid, .profile-grid-sections { grid-template-columns: 1fr; }
    .profile-hero-content { grid-template-columns: auto 1fr; }
    .profile-hero-actions { grid-column:1 / -1; justify-content:flex-start; }
}
@media (max-width: 767px) {
    .profile-hero-content { grid-template-columns: 1fr; text-align:center; padding:22px 16px; gap:14px; }
    .profile-hero-meta { text-align:center; }
    .profile-hero-links { justify-content:center; }
    .profile-avatar-xl { margin:0 auto; width:92px; height:92px; border-radius:24px; font-size:2rem; }
    .profile-hero-actions { justify-content:stretch; width:100%; }
    .profile-hero-actions .btn { flex:1; }
    .cp-grid { grid-template-columns: 1fr; }
}

/* ========== NEW PRO SIDEBAR (Dark Navy Professional) ========== */
.ps-sidebar {
    width: var(--sidebar-width);
    background:
        radial-gradient(1200px 520px at 10% -10%, rgba(37,99,235,.28), transparent 60%),
        radial-gradient(900px 480px at 110% 120%, rgba(124,58,237,.22), transparent 62%),
        linear-gradient(180deg,#06142a 0%,#081a38 42%,#0a1e44 100%);
    color:#e3ecff;
    flex-direction:column;
    position:sticky; top:0;
    height:100vh;
    border-right:1px solid rgba(255,255,255,.06);
    flex-shrink:0;
    box-shadow: 16px 0 40px -30px rgba(15,23,42,.65), inset -1px 0 0 rgba(255,255,255,.05);
    transition: width .26s cubic-bezier(.4,0,.2,1);
    overflow: hidden;
}
.ps-sidebar::after {
    content:"";
    position:absolute; inset:0; pointer-events:none;
    background-image: radial-gradient(circle at 20% 90%, rgba(59,130,246,.10) 0, transparent 40%),
                      radial-gradient(circle at 80% 0%, rgba(124,58,237,.08) 0, transparent 45%);
}
.ps-sidebar::-webkit-scrollbar { width: 7px; }
.ps-sidebar::-webkit-scrollbar-track { background: transparent; }
.ps-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 999px; }
.ps-sidebar::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.2); }

/* --- Top Row: Brand + Collapse --- */
.ps-sidebar-top {
    position:relative; z-index:2;
    display:flex; align-items:center; justify-content:space-between;
    padding:18px 16px 16px 18px;
    border-bottom:1px solid rgba(255,255,255,.06);
    background: linear-gradient(180deg, rgba(10,30,68,.5), transparent);
}
.ps-brand {
    display:flex; align-items:center; gap:12px;
    text-decoration:none;
    flex:1; min-width:0;
}
.ps-brand-logo {
    width:44px; height:44px; border-radius:12px;
    background: linear-gradient(135deg,#0c4a9e 0%,#2563eb 55%,#3b82f6 100%);
    display:grid; place-items:center;
    box-shadow: 0 10px 20px rgba(37,99,235,.38), inset 0 0 0 1px rgba(255,255,255,.12);
    flex-shrink:0; overflow:hidden;
    color:#fff;
}
.ps-logo-img { max-width: 32px; max-height: 32px; object-fit: contain; display:block; filter: drop-shadow(0 4px 8px rgba(0,0,0,.3)); }
.brand-logo-compact { max-width: 100%; max-height: 100%; object-fit: contain; }
.ps-brand-logo-initials {
    color:#fff; font-weight:950; font-size:1rem; letter-spacing:.04em;
}
.ps-brand-text { min-width:0; }
.ps-brand-name {
    margin:0; color:#fff; font-size:1.12rem; font-weight:900;
    letter-spacing:-.01em;
    background: linear-gradient(90deg,#fff 0%,#93c5fd 100%);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
    line-height:1.1; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.ps-brand-name span:last-child {
    background: linear-gradient(90deg,#fb923c 0%,#f59e0b 100%);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.ps-brand-subtitle {
    margin:3px 0 0; color:#8aa3cf; font-size:.7rem;
    letter-spacing:.22em; font-weight:850;
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}

.ps-collapse-btn {
    position: absolute;
    top: 24px;
    right: -18px;
    width: 36px; height: 36px; border-radius:12px;
    border:1px solid rgba(255,255,255,.1);
    background: linear-gradient(135deg,#0e3473,#1d4ed8);
    color:#fff;
    display:grid; place-items:center;
    cursor:pointer;
    box-shadow: 0 12px 22px rgba(37,99,235,.45), 0 2px 6px rgba(0,0,0,.35);
    padding:0; z-index: 5;
    transition: transform .2s ease, box-shadow .2s ease;
}
.ps-collapse-btn:hover { transform: translateY(-1px) rotate(-4deg); box-shadow: 0 14px 26px rgba(37,99,235,.55), 0 3px 8px rgba(0,0,0,.4); }
.ps-collapse-icon { font-size:1.05rem; transition: transform .28s ease; }

/* --- Body (User card + Nav scroll) --- */
.ps-sidebar-body {
    position:relative; z-index:1;
    flex:1; min-height:0;
    display:flex; flex-direction:column;
    overflow-y:auto; overflow-x:hidden;
    padding:14px 14px 12px;
}

/* --- User Card --- */
.ps-user-card {
    position:relative;
    display:flex; align-items:center; gap:12px;
    padding:11px 12px;
    background: linear-gradient(135deg, rgba(37,99,235,.18) 0%, rgba(59,130,246,.08) 100%);
    border:1px solid rgba(96,165,250,.22);
    border-radius:16px;
    margin-bottom:14px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.03);
}
.ps-avatar {
    width:42px; height:42px; border-radius:14px;
    background: linear-gradient(135deg,#1e40af,#3b82f6);
    color:#fff; font-weight:900; font-size:1rem;
    display:grid; place-items:center;
    position:relative; flex-shrink:0;
    box-shadow:0 10px 18px rgba(30,64,175,.4), inset 0 0 0 1px rgba(255,255,255,.12);
}
.ps-avatar-dot {
    position:absolute; right:-1px; bottom:-1px;
    width:13px; height:13px; border-radius:50%;
    background: radial-gradient(circle,#22c55e 55%,#15803d 100%);
    box-shadow:0 0 0 2px #0a1e44, 0 4px 8px rgba(34,197,94,.4);
}
.ps-user-info { flex:1; min-width:0; }
.ps-user-name { margin:0; color:#fff; font-size:.93rem; font-weight:800; letter-spacing:-.01em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ps-user-role { margin:2px 0 0; color:#8da6d4; font-size:.76rem; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ps-user-chevron {
    color:#7f9bcb; font-size:.95rem; flex-shrink:0;
    background: rgba(255,255,255,.05);
    width: 26px; height:26px; border-radius: 8px;
    display:grid; place-items:center;
}

/* --- Nav Groups --- */
.ps-nav { display:flex; flex-direction:column; gap:6px; }
.ps-nav-group { display:flex; flex-direction:column; gap:4px; }
.ps-nav-group-title {
    width:100%; border:0; background:transparent;
    display:flex; align-items:center; gap:9px;
    padding:8px 4px 8px;
    cursor:pointer;
    text-align:left;
    color:#819bc9;
    line-height:1;
}
.ps-static-title { cursor:default; }
.ps-nav-group-icon {
    width:22px; height:22px; border-radius: 7px;
    display:grid; place-items:center;
    color:#93b0e2;
    background: rgba(255,255,255,.04);
    font-size:.88rem;
    flex-shrink:0;
}
.ps-nav-group-icon i { line-height:1; }
.ps-nav-group-label {
    font-weight: 850;
    font-size:.66rem;
    letter-spacing:.22em;
    color:#8ba7d6;
    white-space:nowrap;
}
.ps-nav-group-line {
    flex:1;
    height:1px;
    background: linear-gradient(90deg, rgba(255,255,255,.1), rgba(255,255,255,0));
}
.ps-nav-group-chevron {
    color:#7f9bcb;
    font-size:.76rem;
    transition: transform .25s ease, color .2s ease;
}
.ps-nav-group.collapsed .ps-nav-group-chevron { transform: rotate(-90deg); }
.ps-nav-group:not(.collapsed) .ps-nav-group-chevron { transform: rotate(0); }

.ps-nav-group-sub {
    display:flex; flex-direction:column; gap:3px;
    max-height: 800px;
    opacity:1;
    padding-left: 2px;
    overflow:hidden;
    transition: max-height .28s cubic-bezier(.4,0,.2,1), opacity .2s ease, margin .2s ease;
}
.ps-nav-group.collapsed > .ps-nav-group-sub {
    max-height:0; opacity:0; pointer-events:none; margin-top:-2px;
}

/* --- Nav Links (children) --- */
.ps-nav-link {
    position:relative;
    display:flex; align-items:center; gap:11px;
    padding:9px 13px 9px 15px;
    color:#b6c7e6;
    text-decoration:none;
    border-radius:12px;
    font-weight:650; font-size:.85rem;
    white-space:nowrap; overflow:hidden;
    transition: background .18s ease, color .18s ease, transform .15s ease, box-shadow .18s ease;
    z-index:1;
}
.ps-nav-link::before {
    content:""; position:absolute; left:0; top:50%;
    transform: translateY(-50%);
    width:0; height: 26px;
    background: linear-gradient(180deg,#fb923c,#d97706);
    border-radius: 0 4px 4px 0;
    opacity:0;
    box-shadow: 0 0 12px rgba(251,146,60,.55);
    transition: width .2s ease, opacity .2s ease;
}
.ps-nav-link-icon {
    font-size:1.02rem;
    width: 20px; text-align:center; flex-shrink:0;
    color:#93b0e2;
    transition: color .2s ease;
}
.ps-nav-link-label { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; }
.ps-nav-link:hover {
    color:#fff;
    background: rgba(255,255,255,.06);
    transform: translateX(2px);
}
.ps-nav-link:hover .ps-nav-link-icon { color:#c9d9f7; }

.ps-nav-link.active {
    color:#fff;
    background:
        linear-gradient(90deg, rgba(37,99,235,.42) 0%, rgba(59,130,246,.16) 60%, rgba(124,58,237,.12) 100%);
    box-shadow: inset 0 0 0 1px rgba(96,165,250,.28), 0 8px 22px -10px rgba(37,99,235,.55);
    font-weight: 750;
}
.ps-nav-link.active::before { width: 3.5px; opacity:1; }
.ps-nav-link.active .ps-nav-link-icon {
    color:#fcd9bd;
    filter: drop-shadow(0 0 4px rgba(251,146,60,.35));
}

/* --- Footer: Logout + Help Card --- */
.ps-sidebar-footer {
    position:relative; z-index:2;
    padding: 10px 14px 18px;
    display:flex; flex-direction:column; gap:10px;
    border-top: 1px solid rgba(255,255,255,.06);
    background: linear-gradient(0deg, rgba(10,30,68,.5), transparent);
}
.ps-logout-btn {
    display:flex; align-items:center; gap:11px;
    padding:11px 14px;
    border-radius:14px;
    border:1px solid rgba(251,146,60,.26);
    background: linear-gradient(135deg, rgba(249,115,22,.12) 0%, rgba(220,38,38,.10) 100%);
    color:#fdba74;
    text-decoration:none;
    font-weight:800; letter-spacing:.01em;
    transition: background .2s ease, color .2s ease, transform .15s ease, box-shadow .2s ease;
}
.ps-logout-btn i {
    font-size:1.2rem;
    color:#fb923c;
    width: 22px; text-align:center;
}
.ps-logout-btn:hover {
    background: linear-gradient(135deg, rgba(249,115,22,.22), rgba(220,38,38,.18));
    color:#fff;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px -8px rgba(249,115,22,.55);
}

.ps-help-card {
    display:flex; align-items:center; gap:11px;
    padding:13px 14px;
    border-radius:16px;
    background:
        radial-gradient(140% 160% at 0% 0%, rgba(37,99,235,.26) 0%, transparent 55%),
        radial-gradient(140% 160% at 100% 100%, rgba(124,58,237,.26) 0%, transparent 55%),
        linear-gradient(135deg, rgba(15,23,42,.4) 0%, rgba(30,64,175,.18) 100%);
    border:1px solid rgba(96,165,250,.28);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.03);
    cursor:pointer;
    transition: transform .18s ease, box-shadow .2s ease, border-color .2s ease;
}
.ps-help-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px -14px rgba(59,130,246,.7), inset 0 0 0 1px rgba(255,255,255,.05);
    border-color: rgba(129,140,248,.5);
}
.ps-help-icon {
    width:42px; height:42px; border-radius:14px;
    background:
        radial-gradient(120% 120% at 0% 0%, rgba(59,130,246,.6), transparent 55%),
        linear-gradient(135deg,#1d4ed8,#6366f1);
    color:#fff;
    display:grid; place-items:center;
    font-size:1.2rem;
    flex-shrink:0;
    box-shadow: 0 10px 18px rgba(37,99,235,.45);
}
.ps-help-text { flex:1; min-width:0; }
.ps-help-text h5 { margin:0; color:#fff; font-size:.92rem; font-weight:850; letter-spacing:-.01em; }
.ps-help-text p { margin:2px 0 0; color:#9fb5df; font-size:.76rem; font-weight:600; }
.ps-help-arrow { color:#93c5fd; font-size:1rem; }

/* ========== Collapsed State ========== */
.ps-sidebar.collapsed { width: var(--sidebar-collapsed); }
.ps-sidebar.collapsed .ps-brand-text,
.ps-sidebar.collapsed .ps-user-info,
.ps-sidebar.collapsed .ps-user-chevron,
.ps-sidebar.collapsed .ps-nav-group-label,
.ps-sidebar.collapsed .ps-nav-group-line,
.ps-sidebar.collapsed .ps-nav-group-chevron,
.ps-sidebar.collapsed .ps-nav-link-label,
.ps-sidebar.collapsed .ps-logout-btn span,
.ps-sidebar.collapsed .ps-help-text,
.ps-sidebar.collapsed .ps-help-arrow { display: none !important; }

.ps-sidebar.collapsed .ps-sidebar-top { padding: 18px 10px 16px; justify-content:center; }
.ps-sidebar.collapsed .ps-brand { justify-content:center; flex: 0 0 auto; }
.ps-sidebar.collapsed .ps-collapse-btn { right: -14px; top: 22px; width:30px; height:30px; border-radius:10px; }
.ps-sidebar.collapsed .ps-collapse-icon { transform: rotate(180deg); }
.ps-sidebar.collapsed .ps-sidebar-body { padding:14px 10px 12px; align-items:center; }
.ps-sidebar.collapsed .ps-user-card { justify-content:center; padding:10px 6px; margin:0 auto 14px; }
.ps-sidebar.collapsed .ps-nav { align-items:center; gap:6px; width:100%; }
.ps-sidebar.collapsed .ps-nav-group { width:100%; align-items:center; }
.ps-sidebar.collapsed .ps-nav-group-title { justify-content:center; padding: 5px 0 !important; }
.ps-sidebar.collapsed .ps-nav-group-sub {
    max-height: 0 !important; opacity: 0 !important; pointer-events: none !important;
}
.ps-sidebar.collapsed .ps-nav-link {
    justify-content:center; padding: 11px 0;
    gap:0; border-radius: 12px;
}
.ps-sidebar.collapsed .ps-nav-link-icon { margin:0; }
.ps-sidebar.collapsed .ps-sidebar-footer { padding:10px 10px 18px; align-items:center; }
.ps-sidebar.collapsed .ps-logout-btn { width:54px; justify-content:center; padding:11px 0; border-radius:14px; }
.ps-sidebar.collapsed .ps-logout-btn i { margin:0; }
.ps-sidebar.collapsed .ps-help-card { width:54px; justify-content:center; padding:14px 6px; border-radius:16px; }
.ps-sidebar.collapsed .ps-help-icon { width:40px; height:40px; border-radius: 13px; margin:0; }

/* -------- Compact Dashboard: equal heights grid + smaller paddings -------- */
.dash-grid-compact.dash-main-grid { align-items: stretch; gap: 14px; }
.dash-equal-card { display: flex; flex-direction: column; min-height: 360px; }
.dash-equal-card.pro-card-panel { padding: 16px 16px 14px; }
.dash-grid-compact .dash-welcome { padding: 10px 2px 12px; }
.dash-grid-compact .dash-welcome h1 { margin: 0; font-size: 1.32rem; }
.dash-grid-compact .pro-card-head { padding: 0 2px 12px; }
.dash-grid-compact .pro-card-title-icon { width: 34px; height: 34px; font-size: .98rem; }
.dash-grid-compact .pro-card-head h3 { font-size: .98rem; }
.dash-grid-compact .pro-card-head p { font-size: .76rem; }
.dash-grid-compact .balance-overview-head { padding-bottom: 10px; }
.dash-grid-compact .quick-tiles { gap: 9px; }
.dash-grid-compact .quick-tile { padding: 13px 6px 12px; border-radius: 12px; gap: 6px; }
.dash-grid-compact .quick-tile-icon { width: 38px; height: 38px; border-radius: 12px; font-size: .95rem; }
.dash-grid-compact .quick-tile small { font-size: .7rem; }
.dash-grid-compact .dash-pro-empty { padding: 20px 10px 10px; }
.dash-grid-compact .dash-pro-empty-illus { width: 92px; height: 92px; }
.dash-grid-compact .dash-pro-empty h4 { font-size: .95rem; }
.dash-grid-compact .dash-pro-empty p { font-size: .76rem; }
.dash-grid-compact .data-table thead th, .dash-grid-compact .data-table tbody td { padding: 9px 10px; font-size: .78rem; }
.dash-grid-compact .pro-primary-btn { padding: 7px 12px; font-size: .76rem; }
.dash-grid-compact .dash-pro-kpi-grid { gap: 12px; }
.dash-grid-compact .pro-kpi-card { padding: 13px 14px; gap: 10px; border-radius: 16px; }
.dash-grid-compact .pro-kpi-icon { width: 36px; height: 36px; border-radius: 11px; font-size: 1rem; }
.dash-grid-compact .pro-kpi-meta span { font-size: .68rem; }
.dash-grid-compact .pro-kpi-meta strong { font-size: 1.08rem; }
.dash-grid-compact .pro-kpi-meta small { font-size: .68rem; }
@media (max-width: 1080px) {
    .dash-equal-card { min-height: unset; }
}

/* ========= Responsive Profile/Settings (end) ========== */

@media print {
    .sidebar, .ps-sidebar, .sidebar-toggle, .sidebar-toggle-old, .topbar, .filter-grid, .export-actions, .table-actions, .btn, .toast-container { display: none !important; }
    .app-shell, .app-main, .content-wrap { display: block; padding: 0; }
    body { background: #fff; }
    .panel { border: 0; box-shadow: none; }
    .data-table { min-width: 0; width: 100%; font-size: 11px; }
}
