

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;

    --sidebar: #111827;
    --sidebar-hover: #1f2937;

    --background: #f5f7fb;
    --white: #ffffff;

    --text: #111827;
    --text-light: #374151;
    --muted: #80736b;

    --border: #e5e7eb;

    --green: #16a34a;
    --green-light: #dcfce7;

    --red: #dc2626;
    --red-light: #fee2e2;

    --orange: #f59e0b;
    --orange-light: #fef3c7;

    --purple: #9333ea;
    --purple-light: #f3e8ff;

    --blue-light: #dbeafe;

    --header-height: 75px;
    --sidebar-width: 250px;
}

/* =========================================================
   GLOBAL
   ========================================================= */

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--background);
    color: var(--text);
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

button {
    cursor: pointer;
}

img {
    max-width: 100%;
}

/* =========================================================
   APP
   ========================================================= */

.app {
    min-height: 100vh;
}

/* =========================================================
   SIDEBAR - FIXED
   ========================================================= */

.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar);
    color: white;

    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;

    z-index: 3000;

    display: flex;
    flex-direction: column;

    overflow-y: auto;

    transition: transform .3s ease;
}

/* Scrollbar */

.sidebar::-webkit-scrollbar {
    width: 5px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #374151;
    border-radius: 10px;
}

/* Logo */

.logo {
    height: var(--header-height);

    display: flex;
    align-items: center;

    gap: 12px;

    padding: 0 25px;

    font-size: 21px;
    font-weight: bold;

    border-bottom: 1px solid #263041;

    flex-shrink: 0;

    img{
        border-radius: 20px;
    }
}

.logo-icon {
    width: 38px;
    height: 38px;

    border-radius: 10px;

    background: var(--primary);

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 13px;
    font-weight: bold;
}

/* Sidebar menu */

.menu {
    padding: 15px;
    list-style: none;
}

.menu li {
    margin-bottom: 5px;
}

.menu li a {
    display: flex;
    align-items: center;

    gap: 13px;

    padding: 13px 15px;

    border-radius: 8px;

    color: #cbd5e1;

    font-size: 14px;

    transition: .2s;
}

.menu li a i {
    width: 18px;
    text-align: center;
}

.menu li a:hover,
.menu li.active a {
    background: var(--primary);
    color: white;
}

.menu-title {
    color: #64748b;

    font-size: 10px;
    font-weight: bold;

    margin: 20px 15px 8px;

    letter-spacing: 1px;
}

/* Sidebar bottom */

.sidebar-bottom {
    margin-top: auto;

    padding: 20px;

    border-top: 1px solid #263041;
}

.sidebar-bottom a {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 12px;

    color: #cbd5e1;

    border-radius: 7px;
}

.sidebar-bottom a:hover {
    background: var(--sidebar-hover);
    color: white;
}

/* =========================================================
   MAIN AREA
   ========================================================= */

.main {
    width: calc(100% - var(--sidebar-width));

    margin-left: var(--sidebar-width);

    min-height: 100vh;

    position: relative;
}

/* =========================================================
   HEADER - FIXED
   ========================================================= */

.topbar {
    height: var(--header-height);

    position: fixed;

    top: 0;
    left: var(--sidebar-width);
    right: 0;

    z-index: 2000;

    background: rgba(255, 255, 255, .98);

    border-bottom: 1px solid var(--border);

    display: flex;
    align-items: center;

    padding: 0 30px;

    gap: 25px;

    box-shadow: 0 1px 5px rgba(0, 0, 0, .03);
}

.menu-toggle {
    display: none;

    border: none;
    background: transparent;

    font-size: 24px;

    color: var(--text);

    cursor: pointer;
}

/* =========================================================
   SEARCH
   ========================================================= */

.search-box {
    width: 350px;
    height: 42px;

    background: #f8fafc;

    border: 1px solid var(--border);

    border-radius: 8px;

    display: flex;
    align-items: center;

    padding: 0 13px;

    gap: 8px;

    color: #94a3b8;
}

.search-box input {
    border: none;
    outline: none;

    background: transparent;

    width: 100%;

    color: var(--text);
}

.search-box input::placeholder {
    color: #94a3b8;
}

/* =========================================================
   TOP RIGHT
   ========================================================= */

.top-right {
    margin-left: auto;

    display: flex;
    align-items: center;

    gap: 25px;
}

.notification {
    position: relative;

    font-size: 20px;

    color: #475569;
}

.notification span {
    position: absolute;

    top: -7px;
    right: -8px;

    width: 17px;
    height: 17px;

    border-radius: 50%;

    background: var(--red);

    color: white;

    font-size: 9px;

    display: flex;
    align-items: center;
    justify-content: center;
}

/* Profile */

.profile {
    display: flex;
    align-items: center;

    gap: 10px;
}

.profile strong {
    display: block;

    font-size: 13px;
}

.profile small {
    display: block;

    color: var(--muted);

    margin-top: 3px;

    font-size: 11px;
}

.avatar {
    width: 40px;
    height: 40px;

    border-radius: 50%;

    background: var(--blue-light);

    color: var(--primary);

    display: flex;
    align-items: center;
    justify-content: center;

    font-weight: bold;
    i{
        font-size: 38px;
    }
}

/* =========================================================
   PAGE CONTENT
   ========================================================= */

.content {
    padding: 30px;

    padding-top: calc(var(--header-height) + 30px);

    min-height: 100vh;
}

/* =========================================================
   PAGE HEADER
   ========================================================= */

.page-heading {
    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 20px;

    margin-bottom: 25px;
}

.page-heading h1 {
    font-size: 25px;

    margin-bottom: 6px;
}

.page-heading p {
    color: var(--muted);

    font-size: 14px;
}

/* =========================================================
   BUTTONS
   ========================================================= */

.btn-primary,
.btn-primary:visited {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 8px;

    background: var(--primary);

    color: white;

    padding: 11px 18px;

    border: none;

    border-radius: 7px;

    font-size: 13px;

    transition: .2s;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 8px;

    background: white;

    color: var(--text-light);

    padding: 11px 18px;

    border: 1px solid var(--border);

    border-radius: 7px;

    font-size: 13px;
}

.btn-secondary:hover {
    background: #f8fafc;
}

.btn-danger {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 8px;

    background: var(--red-light);

    color: var(--red);

    padding: 11px 18px;

    border: 1px solid #fecaca;

    border-radius: 7px;

    font-size: 13px;
}

/* =========================================================
   GENERIC STATS
   ========================================================= */
.stats-grid{
    margin-top: -450px;
}
.stats-grid,
.customer-summary,
.saving-stat-grid,
.collection-stat-grid {
    display: grid;

    grid-template-columns: repeat(4, 1fr);

    gap: 18px;

    margin-bottom: 20px;
}

.stat-card,
.customer-summary-card,
.saving-stat-card,
.collection-stat-card {
    background: white;

    border: 1px solid var(--border);

    border-radius: 10px;

    padding: 20px;

    display: flex;

    align-items: center;

    gap: 15px;
}

/* Stat icons */

.stat-icon,
.summary-icon,
.saving-stat-icon,
.collection-stat-icon {
    width: 48px;
    height: 48px;

    min-width: 48px;

    border-radius: 10px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 19px;
}

.blue {
    background: var(--blue-light);
    color: var(--primary);
}

.green {
    background: var(--green-light);
    color: var(--green);
}

.purple {
    background: var(--purple-light);
    color: var(--purple);
}

.orange {
    background: var(--orange-light);
    color: #d97706;
}

.red {
    background: var(--red-light);
    color: var(--red);
}

/* Stat text */

.stat-card p,
.customer-summary-card span,
.saving-stat-card span,
.collection-stat-card span {
    display: block;

    color: var(--muted);

    font-size: 11px;

    margin-bottom: 5px;
}

.stat-card h2,
.customer-summary-card strong,
.saving-stat-card strong,
.collection-stat-card strong {
    font-size: 21px;
}

.stat-card small,
.saving-stat-card small,
.collection-stat-card small {
    display: block;

    font-size: 10px;

    margin-top: 5px;
}

.positive {
    color: var(--green);
}

.warning {
    color: var(--orange);
}

/* =========================================================
   PANELS
   ========================================================= */

.dashboard-grid,
.saving-layout,
.collection-overview-grid {
    display: grid;

    grid-template-columns: 2fr 1fr;

    gap: 20px;

    margin-bottom: 20px;
}

.saving-layout {
    grid-template-columns: 1.7fr 1fr;
}

.collection-overview-grid {
    grid-template-columns: 1.5fr 1fr;
}

.panel,
.settings-section {
    background: white;

    border: 1px solid var(--border);

    border-radius: 10px;
}

.panel {
    padding: 20px;
}

.panel-header {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 15px;

    margin-bottom: 20px;
}

.panel-header h3 {
    font-size: 16px;

    margin-bottom: 5px;
}

.panel-header p {
    color: var(--muted);

    font-size: 12px;
}

.panel-header select {
    padding: 8px;

    border: 1px solid var(--border);

    border-radius: 6px;

    background: white;
}

/* =========================================================
   CHART
   ========================================================= */
   .chart {
        width: 100%;
        padding: 25px;
        background: #fff;
        border: 1px solid #edf0f5;
        border-radius: 16px;
        box-shadow: 0 5px 20px rgba(0,0,0,.05);
        box-sizing: border-box;
        font-family: Arial, sans-serif;
    }

    .chart-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 15px;
        margin-bottom: 20px;
    }

    .chart-header h3 {
        margin: 0 0 7px;
        color: #202938;
        font-size: 19px;
    }

    .chart-header p {
        margin: 0;
        color: #8992a2;
        font-size: 13px;
    }

    .chart-totals {
        display: flex;
        flex-wrap: wrap;
        gap: 15px;
        margin-bottom: 25px;
    }

    .total-box {
        flex: 1;
        min-width: 120px;
        padding: 13px;
        border-radius: 10px;
        background: #f8fafc;
    }

    .total-box span {
        display: block;
        color: #727b8b;
        font-size: 12px;
        margin-bottom: 7px;
    }

    .total-box strong {
        font-size: 17px;
    }

    .total-in {
        color: #16a34a;
    }

    .total-out {
        color: #dc3545;
    }

    .chart-legend {
        display: flex;
        gap: 14px;
        flex-wrap: wrap;
    }

    .chart-legend span {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 12px;
        color: #667085;
    }

    .legend-color {
        width: 10px;
        height: 10px;
        border-radius: 3px;
    }

    .legend-in {
        background: #16a34a;
    }

    .legend-out {
        background: #dc3545;
    }

    .chart-bars {
        height: 230px;
        display: flex;
        align-items: stretch;
        justify-content: space-around;
        gap: 8px;
        padding: 10px 4px 0;
        border-bottom: 1px solid #e9edf3;
        background: repeating-linear-gradient(
            to top,
            transparent 0,
            transparent 54px,
            #f0f2f6 55px,
            transparent 56px
        );
    }

    .bar-item {
        flex: 1;
        min-width: 0;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        align-items: center;
    }

    .bar-group {
        width: 100%;
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: flex-end;
        gap: 4px;
    }

    .bar {
        width: 40%;
        max-width: 24px;
        min-width: 4px;
        border-radius: 4px 4px 0 0;
        transition: height .3s ease, opacity .2s ease;
        cursor: pointer;
    }

    .bar:hover {
        opacity: .7;
    }

    .bar-in {
        background: linear-gradient(180deg, #4ade80, #16a34a);
    }

    .bar-out {
        background: linear-gradient(180deg, #fb7185, #dc3545);
    }

    .bar-item > span {
        margin-top: 10px;
        padding-bottom: 10px;
        text-align: center;
        color: #667085;
        font-size: 11px;
        white-space: nowrap;
    }

    @media(max-width: 600px) {
        .chart {
            padding: 16px 10px;
        }

        .chart-bars {
            gap: 2px;
            height: 190px;
        }

        .bar-group {
            gap: 2px;
        }

        .bar-item > span {
            font-size: 9px;
        }

        .total-box strong {
            font-size: 14px;
        }
    }

/* =========================================================
   PROGRESS
   ========================================================= */

.progress {
    height: 8px;

    background: #e5e7eb;

    border-radius: 10px;

    overflow: hidden;
}

.progress div {
    height: 100%;

    background: var(--primary);
}

/* =========================================================
   TRANSACTIONS
   ========================================================= */

.transaction-list {
    display: flex;
    flex-direction: column;
}

.transaction {
    display: flex;

    align-items: center;

    padding: 15px 0;

    border-bottom: 1px solid var(--border);

    gap: 12px;
}

.transaction:last-child {
    border-bottom: none;
}

.customer-avatar {
    width: 40px;
    height: 40px;

    min-width: 40px;

    border-radius: 50%;

    background: #eff6ff;

    color: var(--primary);

    display: flex;

    justify-content: center;
    align-items: center;

    font-weight: bold;

    font-size: 12px;
}

.customer-avatar.large {
    width: 42px;
    height: 42px;
}

.transaction-info {
    flex: 1;
}

.transaction-info strong {
    display: block;

    font-size: 13px;
}

.transaction-info span {
    display: block;

    color: var(--muted);

    font-size: 11px;

    margin-top: 4px;
}

.transaction-amount {
    color: var(--green);

    font-weight: bold;

    font-size: 13px;
}

/* =========================================================
   BADGES
   ========================================================= */

.badge {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 20px;
    font-size: 15px;
    white-space: nowrap;
}

.badge.success {
    color: #15803d;

    /* background: var(--green-light); */
}

.badge.pending {
    color: #b45309;

    background: var(--orange-light);
}

.badge.inactive {
    color: #64748b;

    background: #f1f5f9;
}

/* =========================================================
   COLLECTION
   ========================================================= */

.collection-total {
    margin: 25px 0 15px;
}

.collection-total h2 {
    font-size: 28px;
}

.collection-total p {
    color: var(--muted);

    margin-top: 5px;

    font-size: 12px;
}

.collection-info {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    margin-top: 25px;

    text-align: center;
}

.collection-info strong {
    display: block;
}

.collection-info span {
    display: block;

    color: var(--muted);

    font-size: 11px;

    margin-top: 5px;
}

/* =========================================================
   COLLECTION CIRCLE
   ========================================================= */

.collection-progress-main {
    display: flex;

    align-items: center;

    gap: 35px;

    margin: 25px 0;
}

.collection-circle {
    width: 145px;
    height: 145px;

    min-width: 145px;

    border-radius: 50%;

    background:
        conic-gradient(
            var(--primary) 0deg 306deg,
            #e5e7eb 306deg 360deg
        );

    display: flex;

    align-items: center;
    justify-content: center;

    position: relative;
}

.collection-circle::after {
    content: "";

    position: absolute;

    width: 108px;
    height: 108px;

    background: white;

    border-radius: 50%;
}

.collection-circle div {
    position: relative;

    z-index: 2;

    text-align: center;
}

.collection-circle strong {
    display: block;

    font-size: 25px;
}

.collection-circle span {
    display: block;

    color: var(--muted);

    font-size: 10px;

    margin-top: 3px;
}

.collection-progress-details {
    flex: 1;
}

.collection-progress-details > div {
    display: flex;

    justify-content: space-between;

    padding: 11px 0;

    border-bottom: 1px solid var(--border);
}

.collection-progress-details span {
    color: var(--muted);

    font-size: 11px;
}

.collection-progress-details strong {
    font-size: 12px;
}

/* =========================================================
   METHOD PROGRESS
   ========================================================= */

.method-item {
    display: flex;

    justify-content: space-between;

    align-items: center;

    padding: 9px 0;

    font-size: 12px;
}

.method-item > div {
    display: flex;

    align-items: center;

    gap: 8px;
}

.method-dot {
    width: 8px;
    height: 8px;

    border-radius: 50%;
}

.method-dot.cash,
.cash-progress {
    background: var(--green);
}

.method-dot.transfer,
.transfer-progress {
    background: var(--primary);
}

.method-dot.pos,
.pos-progress {
    background: var(--purple);
}

.method-dot.online,
.online-progress {
    background: var(--orange);
}

.method-progress {
    height: 6px;

    border-radius: 10px;

    background: #f1f5f9;

    margin-top: 7px;

    overflow: hidden;
}

.method-progress div {
    height: 100%;

    border-radius: 10px;
}

/* =========================================================
   FILTERS
   ========================================================= */

.customer-filters,
.collection-filters,
.transaction-filters {
    display: flex;

    gap: 8px;

    align-items: center;
}

.customer-filter-panel {
    margin-bottom: 20px;
}

.customer-search,
.collection-search {
    height: 42px;

    border: 1px solid var(--border);

    border-radius: 7px;

    display: flex;

    align-items: center;

    padding: 0 12px;

    color: #94a3b8;
}

.customer-search {
    flex: 1;

    min-width: 250px;
}

.collection-search {
    width: 220px;
    height: 36px;
}

.customer-search input,
.collection-search input {
    width: 100%;

    border: none;

    outline: none;

    padding-left: 8px;

    background: transparent;
}

.customer-filters select,
.collection-filters select,
.transaction-filters select {
    height: 38px;

    border: 1px solid var(--border);

    border-radius: 7px;

    padding: 0 10px;

    background: white;

    outline: none;

    font-size: 11px;
}

.filter-btn,
.small-btn {
    height: 38px;

    border: 1px solid var(--border);

    background: white;

    padding: 0 15px;

    border-radius: 7px;
}

.filter-btn:hover,
.small-btn:hover {
    background: #f8fafc;
}

/* =========================================================
   CUSTOMER LIST
   ========================================================= */

.customer-list-header,
.customer-row,
.transaction-list-header,
.saving-transaction,
.collection-list-header,
.collection-record {
    display: grid;

    align-items: center;

    gap: 10px;
}

/* Customer */

.customer-list-header,
.customer-row {
    grid-template-columns:
        2fr
        1.2fr
        1.3fr
        1.2fr
        1.2fr
        1fr
        .5fr;
}

.customer-list-header {
    padding: 12px 0;

    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);

    color: var(--muted);

    font-size: 11px;

    font-weight: bold;
}

.customer-row {
    min-height: 78px;

    border-bottom: 1px solid var(--border);

    font-size: 15px;
}

.customer-row:last-child {
    border-bottom: none;
}

.customer-info {
    display: flex;

    align-items: center;

    gap: 10px;
}

.customer-info strong {
    display: block;
    text-transform: capitalize;
    font-size: 13px;
}

.customer-info span {
    display: block;

    color: var(--muted);

    margin-top: 4px;

    font-size: 10px;
}

.customer-phone {
    color: #475569;
}

.balance {
    font-weight: bold;

    color: var(--text);
}

.plan {
    background: #eff6ff;

    color: var(--primary);

    padding: 5px 8px;

    border-radius: 5px;

    font-size: 12px;
}
.active-Active {
    background: #eff6ff;

    color: var(--primary);

    padding: 5px 8px;

    border-radius: 5px;

    font-size: 12px;
}
.active-Closed {
    background: var(--red-light);

    color: var(--red);

    padding: 5px 8px;

    border-radius: 5px;

    font-size: 12px;
}
/* =========================================================
   SAVINGS TRANSACTIONS
   ========================================================= */

.transaction-list-header,
.saving-transaction {
    grid-template-columns:
        2fr
        1fr
        1fr
        1.2fr
        1fr
        1fr
        .4fr;
}

.transaction-list-header {
    padding: 12px 0;

    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);

    color: var(--muted);

    font-size: 10px;

    font-weight: bold;
}

.saving-transaction {
    min-height: 70px;

    border-bottom: 1px solid var(--border);

    font-size: 11px;
}

.transaction-customer,
.record-customer {
    display: flex;

    align-items: center;

    gap: 10px;
}

.transaction-customer strong,
.record-customer strong {
    display: block;

    font-size: 12px;
}

.transaction-customer span,
.record-customer span {
    display: block;

    color: var(--muted);

    font-size: 9px;

    margin-top: 3px;
}

.saving-amount,
.record-amount {
    color: var(--green);

    font-weight: bold;
}

.transaction-time,
.record-time {
    color: var(--muted);
}

/* =========================================================
   COLLECTION RECORDS
   ========================================================= */

.collection-list-header,
.collection-record {
    grid-template-columns:
        2fr
        1fr
        1.2fr
        1fr
        1fr
        1fr
        .4fr;
}

.collection-list-header {
    padding: 12px 0;

    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);

    color: var(--muted);

    font-size: 10px;

    font-weight: bold;
}

.collection-record {
    min-height: 70px;

    border-bottom: 1px solid var(--border);

    font-size: 11px;
}

/* =========================================================
   ACTION BUTTONS
   ========================================================= */

.action-btn,
.transaction-action,
.collection-action {
    width: 32px;
    height: 32px;

    border: 1px solid var(--border);

    background: white;

    border-radius: 6px;

    cursor: pointer;
}

.action-btn:hover,
.transaction-action:hover,
.collection-action:hover {
    background: #f8fafc;
}

/* =========================================================
   PAGINATION
   ========================================================= */

.pagination {
    display: flex;

    justify-content: flex-end;

    align-items: center;

    gap: 5px;

    margin-top: 20px;
}

.pagination button {
    width: 34px;
    height: 34px;

    border: 1px solid var(--border);

    background: white;

    border-radius: 6px;
}

.pagination button:hover {
    background: #f1f5f9;
}

.pagination .page-active {
    background: var(--primary);

    color: white;

    border-color: var(--primary);
}

.pagination button:disabled {
    opacity: .4;

    cursor: not-allowed;
}

/* =========================================================
   SAVINGS FORM
   ========================================================= */

.saving-form-panel form {
    position: relative;
}

.form-grid,
.saving-form-grid {
    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 17px;
}

.form-group.full {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;

    font-size: 12px;

    font-weight: bold;

    margin-bottom: 7px;
}

.form-group input,
.form-group select,
.form-control {
    width: 100%;

    height: 43px;

    border: 1px solid var(--border);

    border-radius: 7px;

    outline: none;

    padding: 0 12px;

    font-size: 13px;

    background: white;
}

.form-group textarea,
.form-control textarea {
    width: 100%;

    min-height: 80px;

    resize: vertical;

    border: 1px solid var(--border);

    border-radius: 7px;

    padding: 12px;

    outline: none;

    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-control:focus,
.form-group textarea:focus {
    border-color: var(--primary);

    box-shadow: 0 0 0 3px rgba(37, 99, 235, .08);
}

/* =========================================================
   SAVING CUSTOMER SEARCH
   ========================================================= */

.saving-customer {
    position: relative;
}

.customer-select-box {
    height: 45px;

    border: 1px solid var(--border);

    border-radius: 7px;

    display: flex;

    align-items: center;

    padding: 0 13px;

    gap: 10px;

    color: #94a3b8;
}

.customer-select-box input {
    flex: 1;

    border: none;

    outline: none;

    font-size: 13px;
}

.customer-results {
    position: absolute;

    left: 0;
    right: 0;

    top: 70px;

    background: white;

    border: 1px solid var(--border);

    border-radius: 8px;

    z-index: 100;

    box-shadow: 0 10px 30px rgba(0,0,0,.1);

    display: none;

    overflow: hidden;
}

.customer-result {
    display: flex;

    align-items: center;

    gap: 12px;

    padding: 12px;

    cursor: pointer;

    border-bottom: 1px solid #f1f5f9;
}

.customer-result:hover {
    background: #f8fafc;
}

/* =========================================================
   SELECTED CUSTOMER
   ========================================================= */

.selected-customer {
    margin-top: 15px;

    padding: 12px;

    background: #eff6ff;

    border: 1px solid #bfdbfe;

    border-radius: 8px;

    display: none;

    align-items: center;

    gap: 12px;
}

.selected-customer-avatar {
    width: 40px;
    height: 40px;

    border-radius: 50%;

    background: var(--primary);

    color: white;

    display: flex;

    align-items: center;
    justify-content: center;

    font-size: 12px;

    font-weight: bold;
}

.selected-customer-info {
    flex: 1;
}

.selected-customer-info strong {
    display: block;

    font-size: 13px;
}

.selected-customer-info span {
    display: block;

    color: var(--muted);

    font-size: 10px;

    margin-top: 3px;
}

/* =========================================================
   ACCOUNT INFO
   ========================================================= */

.customer-account-info {
    display: none;

    grid-template-columns: 1fr 1fr;

    gap: 10px;

    margin-top: 10px;
}

.customer-account-info > div {
    background: #f8fafc;

    border-radius: 7px;

    padding: 12px;
}

.customer-account-info span {
    display: block;

    color: var(--muted);

    font-size: 10px;

    margin-bottom: 5px;
}

/* =========================================================
   AMOUNT
   ========================================================= */

.amount-input {
    height: 50px;

    border: 1px solid var(--border);

    border-radius: 7px;

    display: flex;

    align-items: center;

    overflow: hidden;
}

.amount-input span {
    padding: 0 15px;

    font-weight: bold;

    color: var(--muted);
}

.amount-input input {
    height: 100%;

    flex: 1;

    border: none;

    outline: none;

    font-size: 20px;

    font-weight: bold;
}

.form-help {
    display: block;

    color: var(--muted);

    font-size: 10px;

    margin-top: 5px;
}

.optional {
    font-weight: normal;

    color: var(--muted);

    margin-left: 4px;
}

.save-payment-btn {
    width: 100%;

    height: 46px;

    border: none;

    border-radius: 7px;

    background: var(--primary);

    color: white;

    font-weight: bold;

    cursor: pointer;

    margin-top: 8px;
}

/* =========================================================
   SUMMARY
   ========================================================= */

.big-saving-total {
    padding: 20px 0;

    border-bottom: 1px solid var(--border);
}

.big-saving-total span {
    display: block;

    color: var(--muted);

    font-size: 12px;
}

.big-saving-total strong {
    display: block;

    font-size: 30px;

    margin: 7px 0;
}

.summary-progress {
    padding: 20px 0;
}

.summary-progress-header {
    display: flex;

    justify-content: space-between;

    font-size: 12px;

    margin-bottom: 8px;
}

.mini-summary {
    display: grid;

    grid-template-columns: 1fr 1fr;

    text-align: center;
}

.mini-summary > div:first-child {
    border-right: 1px solid var(--border);
}

.mini-summary strong {
    display: block;

    font-size: 20px;
}

.mini-summary span {
    display: block;

    color: var(--muted);

    font-size: 10px;

    margin-top: 4px;
}

/* =========================================================
   AGENT PERFORMANCE
   ========================================================= */

.agent-performance-list {
    display: flex;

    flex-direction: column;
}

.agent-collection-row {
    display: grid;

    grid-template-columns: 1.5fr 2fr .7fr 1fr;

    align-items: center;

    gap: 25px;

    padding: 16px 0;

    border-bottom: 1px solid var(--border);
}

.agent-profile {
    display: flex;

    align-items: center;

    gap: 10px;
}

.agent-profile strong {
    display: block;

    font-size: 12px;
}

.agent-profile span {
    display: block;

    color: var(--muted);

    font-size: 10px;

    margin-top: 4px;
}

.agent-collection-progress {
    min-width: 0;
}

.agent-progress-top {
    display: flex;

    justify-content: space-between;

    margin-bottom: 7px;

    font-size: 10px;
}

.agent-customer-count {
    text-align: center;
}

.agent-customer-count strong {
    display: block;

    font-size: 17px;
}

.agent-customer-count span {
    display: block;

    color: var(--muted);

    font-size: 9px;

    margin-top: 3px;
}

/* =========================================================
   COLLECTION DATE
   ========================================================= */

.collection-date {
    display: flex;

    align-items: center;

    gap: 8px;

    background: white;

    border: 1px solid var(--border);

    border-radius: 7px;

    padding: 10px 14px;

    color: #475569;

    font-size: 12px;
}

/* =========================================================
   MODALS
   ========================================================= */

.modal-overlay {
    position: fixed;

    inset: 0;

    background: rgba(15, 23, 42, .6);

    display: none;

    align-items: center;
    justify-content: center;

    z-index: 5000;

    padding: 20px;
}

.modal {
    width: 100%;
    max-width: 720px;
    max-height: 92vh;

    background: #ffffff;

    border-radius: 18px;

    overflow: hidden;

    box-shadow:
        0 25px 60px rgba(15, 23, 42, 0.20),
        0 8px 20px rgba(15, 23, 42, 0.08);

    animation: modalSlideUp 0.25s ease;

    font-family: "Inter", "Segoe UI", Arial, sans-serif;
}


/* Modal Animation */

@keyframes modalSlideUp {

    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 24px 28px;

    background: #ffffff;

    border-bottom: 1px solid #edf0f4;
}


.modal-header h2 {
    margin: 0;

    color: #111827;

    font-size: 21px;
    font-weight: 700;

    letter-spacing: -0.3px;
}


.modal-header p {
    margin: 6px 0 0;

    color: #6b7280;

    font-size: 13px;

    line-height: 1.5;
}


.modal-close {
    width: 35px;
    height: 35px;

    border: none;

    background: #f1f5f9;

    border-radius: 7px;

    font-size: 22px;
}

.modal-body {
    padding: 22px;
}

.modal-footer {
    display: flex;

    justify-content: flex-end;

    gap: 10px;

    padding: 20px 22px;

    border-top: 1px solid var(--border);
}

/* =========================================================
   COLLECTION DETAILS
   ========================================================= */

.collection-details-modal {
    width: 100%;

    max-width: 500px;

    background: white;

    border-radius: 12px;

    overflow: hidden;
}

.collection-details-body {
    padding: 25px;
}

.collection-detail-customer {
    display: flex;

    align-items: center;

    gap: 12px;

    padding-bottom: 20px;

    border-bottom: 1px solid var(--border);
}

.detail-avatar {
    width: 48px;
    height: 48px;

    border-radius: 50%;

    background: var(--blue-light);

    color: var(--primary);

    display: flex;

    align-items: center;
    justify-content: center;

    font-weight: bold;
}

.detail-amount {
    text-align: center;

    padding: 25px 0;

    background: #f8fafc;

    margin: 20px 0;

    border-radius: 8px;
}

.detail-amount span {
    display: block;

    color: var(--muted);

    font-size: 11px;
}

.detail-amount strong {
    display: block;

    color: var(--green);

    font-size: 28px;

    margin-top: 7px;
}

.details-grid {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 15px;
}

.details-grid > div {
    padding: 12px;

    background: #f8fafc;

    border-radius: 7px;
}

.details-grid span {
    display: block;

    color: var(--muted);

    font-size: 9px;

    margin-bottom: 5px;
}

/* =========================================================
   SUCCESS MODAL
   ========================================================= */

.success-modal {
    background: white;

    width: 100%;

    max-width: 430px;

    border-radius: 12px;

    padding: 30px;

    text-align: center;
}

.success-icon {
    width: 65px;
    height: 65px;

    border-radius: 50%;

    background: var(--green-light);

    color: var(--green);

    display: flex;

    align-items: center;
    justify-content: center;

    font-size: 28px;

    margin: 0 auto 18px;
}

.receipt-box {
    background: #f8fafc;

    border-radius: 8px;

    padding: 15px;

    margin: 20px 0;

    text-align: left;
}

.receipt-box > div {
    display: flex;

    justify-content: space-between;

    padding: 8px 0;

    border-bottom: 1px solid var(--border);
}

.success-actions {
    display: flex;

    gap: 10px;
}

.success-actions button {
    flex: 1;

    height: 42px;
}

/* =========================================================
   EMPTY STATES
   ========================================================= */

.no-customers,
.no-transactions,
.no-collection {
    display: none;

    text-align: center;

    padding: 50px 20px;

    color: var(--muted);
}

.no-customers i,
.no-transactions i,
.no-collection i {
    font-size: 35px;

    margin-bottom: 12px;
}

.no-customers h3,
.no-transactions h3,
.no-collection h3 {
    color: #374151;

    margin-bottom: 5px;
}

/* =========================================================
   SETTINGS
   ========================================================= */

.settings-layout {
    display: grid;

    grid-template-columns: 240px 1fr;

    gap: 25px;

    align-items: start;
}

.settings-nav {
    background: white;

    border: 1px solid var(--border);

    border-radius: 12px;

    padding: 10px;

    position: sticky;

    top: calc(var(--header-height) + 20px);
}

.settings-nav-title {
    font-size: 14px;

    font-weight: 700;

    padding: 14px 12px 10px;
}

.settings-nav a {
    display: flex;

    align-items: center;

    gap: 12px;

    padding: 12px;

    margin-bottom: 3px;

    border-radius: 8px;

    color: #666;

    font-size: 14px;
}

.settings-nav a:hover,
.settings-nav a.active {
    background: rgba(37,99,235,.10);

    color: var(--primary);
}

.settings-content {
    display: flex;

    flex-direction: column;

    gap: 20px;
}

.settings-section {
    overflow: hidden;
}

.settings-section-header {
    padding: 18px 20px;

    border-bottom: 1px solid var(--border);
}

.settings-section-header h3 {
    margin-bottom: 5px;

    font-size: 17px;
}

.settings-section-header p {
    margin: 0;

    color: var(--muted);

    font-size: 13px;
}

.settings-body {
    padding: 20px;
}

/* Settings toggle */

.setting-item {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    padding: 15px 0;

    border-bottom: 1px solid #f0f0f0;
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-info {
    flex: 1;
}

.setting-info h4 {
    margin-bottom: 4px;

    font-size: 14px;
}

.setting-info p {
    margin: 0;

    color: var(--muted);

    font-size: 12px;

    line-height: 1.5;
}

/* Toggle */

.switch {
    position: relative;

    width: 46px;
    min-width: 46px;

    height: 24px;
}

.switch input {
    display: none;
}

.slider {
    position: absolute;

    inset: 0;

    background: #d5d5d5;

    border-radius: 30px;

    cursor: pointer;
}

.slider:before {
    content: "";

    position: absolute;

    width: 18px;
    height: 18px;

    left: 3px;
    top: 3px;

    background: white;

    border-radius: 50%;

    transition: .25s;
}

.switch input:checked + .slider {
    background: var(--primary);
}

.switch input:checked + .slider:before {
    transform: translateX(22px);
}
/* =========================================================
   FORM
   ========================================================= */

#customerForm {
    width: 100%;
    height: 400px;
    /* border: 2px solid red; */
    overflow: scroll;
}


#customerForm .form-grid {
    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 19px;

    padding: 26px;
}


#customerForm .form-group {
    min-width: 0;
}


#customerForm .form-group.full {
    grid-column: 1 / -1;
}


/* =========================================================
   LABEL
   ========================================================= */

#customerForm .form-group label {
    display: block;

    margin-bottom: 7px;

    color: #374151;

    font-size: 12px;

    font-weight: 600;
}


/* =========================================================
   INPUTS
   ========================================================= */

#customerForm .form-group input,
#customerForm .form-group select {

    width: 100%;

    height: 45px;

    padding: 0 13px;

    box-sizing: border-box;

    border: 1px solid #dfe5ec;

    border-radius: 9px;

    outline: none;

    background: #f8fafc;

    color: #1e293b;

    font-family: inherit;

    font-size: 13px;

    transition:
        border-color .2s ease,
        background .2s ease,
        box-shadow .2s ease;
}


#customerForm .form-group input::placeholder {
    color: #a0a9b6;
}


#customerForm .form-group input:hover,
#customerForm .form-group select:hover {
    border-color: #cbd5e1;

    background: #ffffff;
}


#customerForm .form-group input:focus,
#customerForm .form-group select:focus {

    border-color: var(--primary);

    background: #ffffff;

    box-shadow:
        0 0 0 3px rgba(37, 99, 235, .09);
}


/* =========================================================
   SELECT
   ========================================================= */

#customerForm .form-group select {

    cursor: pointer;

    appearance: none;
    -webkit-appearance: none;

    padding-right: 38px;

    background-image:
        linear-gradient(45deg, transparent 50%, #64748b 50%),
        linear-gradient(135deg, #64748b 50%, transparent 50%);

    background-position:
        calc(100% - 16px) 19px,
        calc(100% - 11px) 19px;

    background-size:
        5px 5px,
        5px 5px;

    background-repeat: no-repeat;
}


/* =========================================================
   FOOTER
   ========================================================= */

#customerForm .modal-footer {

    display: flex;

    align-items: center;

    justify-content: flex-end;

    gap: 10px;

    padding: 17px 26px;

    border-top: 1px solid #edf1f5;

    background: #fafbfc;
}


/* =========================================================
   CANCEL BUTTON
   ========================================================= */

#customerForm .cancel-btn {

    height: 43px;

    padding: 0 19px;

    border: 1px solid #dfe5ec;

    border-radius: 9px;

    background: #ffffff;

    color: #475569;

    font-family: inherit;

    font-size: 12px;

    font-weight: 600;

    cursor: pointer;

    transition: all .2s ease;
}


#customerForm .cancel-btn:hover {

    border-color: #cbd5e1;

    background: #f1f5f9;

    color: #1e293b;
}


/* =========================================================
   REGISTER CUSTOMER BUTTON
   ========================================================= */

#customerForm .btn-primary {

    height: 43px;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 8px;

    padding: 0 20px;

    border: none;

    border-radius: 9px;

    background: var(--primary);

    color: #ffffff;

    font-family: inherit;

    font-size: 12px;

    font-weight: 600;

    cursor: pointer;

    box-shadow:
        0 5px 12px rgba(37, 99, 235, .18);

    transition:
        background .2s ease,
        transform .2s ease,
        box-shadow .2s ease;
}


#customerForm .btn-primary:hover {

    background: var(--primary-dark);

    transform: translateY(-1px);

    box-shadow:
        0 8px 18px rgba(37, 99, 235, .25);
}


#customerForm .btn-primary:active {

    transform: translateY(0);

}
.withdrawal-stats {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 20px;
            margin-bottom: 25px;
        }

        .withdrawal-stat {
            background: #fff;
            border: 1px solid var(--border);
            border-radius: 14px;
            padding: 20px;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .withdrawal-stat .stat-info h4 {
            margin: 0 0 8px;
            color: var(--muted);
            font-size: 13px;
            font-weight: 500;
        }

        .withdrawal-stat .stat-info h2 {
            margin: 0;
            font-size: 25px;
            color: #1f2937;
        }

        .withdrawal-stat .stat-icon {
            width: 48px;
            height: 48px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
        }

        .stat-icon.orange {
            background: #fff4e5;
            color: #f59e0b;
        }

        .stat-icon.green {
            background: #eaf8ef;
            color: var(--green);
        }

        .stat-icon.red {
            background: #fff0f0;
            color: #ef4444;
        }

        .stat-icon.blue {
            background: #eef5ff;
            color: #3b82f6;
        }
        .summary-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 13px 0;
            border-bottom: 1px solid #f1f1f1;
        }

        .summary-row:last-child {
            /* border-bottom: none; */
        }

        .summary-label {
            display: flex;
            align-items: center;
            gap: 10px;
            color: #4b5563;
            font-size: 14px;
        }

        .summary-label i {
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 8px;
            background: #f4f7f5;
            color: var(--green);
        }

        .summary-value {
            font-weight: 600;
            color: #1f2937;
        }

        /* Withdrawal methods */
        .method-item {
            margin-bottom: 18px;
        }

        .method-header {
            display: flex;
            justify-content: space-between;
            margin-bottom: 8px;
            font-size: 13px;
        }

        .method-name {
            color: #4b5563;
        }

        .method-amount {
            font-weight: 600;
            color: #1f2937;
        }

        .method-progress {
            width: 100%;
            height: 8px;
            background: #edf0ee;
            border-radius: 20px;
            overflow: hidden;
        }

        .method-progress span {
            display: block;
            height: 100%;
            border-radius: 20px;
            background: var(--green);
        }

        .method-progress .bank {
            background: #3b82f6;
        }

        .method-progress .cash {
            background: #f59e0b;
        }

        .method-progress .mobile {
            background: #8b5cf6;
        }

        /* Main panel */
        .withdrawal-panel {
            background: #fff;
            border: 1px solid var(--border);
            border-radius: 14px;
            overflow: hidden;
        }

        .panel-heading {
            padding: 20px;
            border-bottom: 1px solid var(--border);
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 15px;
        }

        .panel-heading h3 {
            margin: 0;
            font-size: 17px;
            color: #1f2937;
        }

        .panel-heading p {
            margin: 5px 0 0;
            color: var(--muted);
            font-size: 13px;
        }

        /* Filters */
        .withdrawal-filters {
            padding: 18px 20px;
            background: #fafbfa;
            border-bottom: 1px solid var(--border);
            display: grid;
            grid-template-columns: 1.6fr 1fr 1fr 1fr auto;
            gap: 12px;
        }

        .filter-box {
            position: relative;
        }

        .filter-box i {
            position: absolute;
            left: 12px;
            top: 50%;
            transform: translateY(-50%);
            color: #9ca3af;
            font-size: 13px;
        }

        .filter-box input,
        .filter-box select {
            width: 100%;
            height: 42px;
            border: 1px solid var(--border);
            border-radius: 8px;
            padding: 0 12px;
            outline: none;
            background: #fff;
            color: #374151;
            font-size: 13px;
        }

        .filter-box input {
            padding-left: 35px;
        }

        .filter-box input:focus,
        .filter-box select:focus {
            border-color: var(--green);
        }

        .reset-filter {
            height: 42px;
            padding: 0 15px;
            border: 1px solid var(--border);
            background: #fff;
            color: #4b5563;
            border-radius: 8px;
            cursor: pointer;
        }

        .reset-filter:hover {
            background: #f5f5f5;
        }

        /* Withdrawal records */
        .withdrawal-records {
            padding: 0 20px 20px;
        }

        .withdrawal-record {
            display: grid;
            grid-template-columns: 2fr 1.2fr 1.2fr 1.2fr 1fr 1fr auto;
            align-items: center;
            gap: 15px;
            padding: 17px 0;
            border-bottom: 1px solid #f0f1f0;
        }

        .withdrawal-record:last-child {
            border-bottom: none;
        }

        .customer-info {
            display: flex;
            align-items: center;
            gap: 11px;
        }

        .customer-avatar {
            width: 38px;
            height: 38px;
            border-radius: 50%;
            background: #eaf8ef;
            color: var(--green);
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 600;
            font-size: 13px;
        }

        .customer-info strong {
            display: block;
            font-size: 13px;
            color: #1f2937;
            margin-bottom: 3px;
        }

        .customer-info span {
            display: block;
            color: #9ca3af;
            font-size: 11px;
        }

        .record-column {
            font-size: 13px;
            color: #4b5563;
        }

        .record-column strong {
            color: #1f2937;
        }

        .amount {
            font-weight: 700;
            color: #1f2937;
        }

        .status-badge {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 6px 10px;
            border-radius: 20px;
            font-size: 11px;
            font-weight: 600;
        }

        .status-badge.pending {
            color: #b7791f;
            background: #fff8df;
        }

        .status-badge.approved {
            color: #16803c;
            background: #eaf8ef;
        }

        .status-badge.rejected {
            color: #c53030;
            background: #fff0f0;
        }

        .status-badge.processing {
            color: #2563eb;
            background: #eef5ff;
        }

        .action-buttons {
            display: flex;
            gap: 6px;
            justify-content: flex-end;
        }

        .action-btn {
            width: 34px;
            height: 34px;
            border: 1px solid var(--border);
            border-radius: 8px;
            background: #fff;
            cursor: pointer;
            color: #6b7280;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .action-btn:hover {
            background: #f5f5f5;
        }

        .action-btn.view:hover {
            color: #2563eb;
        }

        .action-btn.approve:hover {
            color: var(--green);
        }

        .action-btn.reject:hover {
            color: #ef4444;
        }

        /* Empty */
        .no-results {
            text-align: center;
            padding: 50px 20px;
            /* display: none; */
        }

        .no-results i {
            font-size: 40px;
            color: #d1d5db;
            margin-bottom: 12px;
        }

        .no-results h4 {
            margin: 0 0 5px;
            color: #374151;
        }

        .no-results p {
            margin: 0;
            font-size: 13px;
            color: #9ca3af;
        }

        /* Modal */
        .withdrawal-modal {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, .45);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 9999;
            padding: 20px;
        }

        .withdrawal-modal.show {
            display: flex;
        }

        .modal-box {
            width: 100%;
            height: 100vh;
            max-width: 500px;
            background: #fffefe;
            border-radius: 15px;
            overflow: scroll;
            box-shadow: 0 20px 50px rgba(0,0,0,.15);
        }

        .modal-header {
            padding: 18px 20px;
            border-bottom: 1px solid var(--border);
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .modal-header h3 {
            margin: 0;
            font-size: 17px;
            color: #1f2937;
        }

        .modal-close {
            width: 34px;
            height: 34px;
            border: none;
            background: #f5f5f5;
            border-radius: 8px;
            cursor: pointer;
        }

        .modal-body {
            padding: 20px;
        }

        .modal-customer {
            text-align: center;
            margin-bottom: 20px;
        }

        .modal-avatar {
            width: 55px;
            height: 55px;
            border-radius: 50%;
            margin: auto auto 10px;
            background: #eaf8ef;
            color: var(--green);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 18px;
            font-weight: 700;
        }

        .modal-customer h4 {
            margin: 0 0 3px;
            color: #1f2937;
        }

        .modal-customer p {
            margin: 0;
            color: #9ca3af;
            font-size: 12px;
        }

        .detail-list {
            border: 1px solid var(--border);
            border-radius: 10px;
            overflow: hidden;
        }

        .detail-row {
            display: flex;
            justify-content: space-between;
            padding: 12px 14px;
            border-bottom: 1px solid #f0f1f0;
            font-size: 13px;
        }

        .detail-row:last-child {
            border-bottom: none;
        }

        .detail-row span:first-child {
            color: #6b7280;
        }

        .detail-row span:last-child {
            color: #1f2937;
            font-weight: 600;
        }

        .modal-footer {
            padding: 15px 20px;
            border-top: 1px solid var(--border);
            display: flex;
            justify-content: flex-end;
            gap: 10px;
        }

        .modal-btn {
            padding: 10px 16px;
            border-radius: 8px;
            border: none;
            cursor: pointer;
            font-size: 13px;
            font-weight: 600;
        }

        .modal-btn.cancel {
            background: #f3f4f6;
            color: #4b5563;
        }

        .modal-btn.approve {
            background: var(--green);
            color: #fff;
        }

        .modal-btn.reject {
            background: #ef4444;
            color: #fff;
        }
.page-header{
    margin-top: 90px;
    margin-left: 30px;
}
 /* =========================================
           AGENTS PANEL
        ========================================== */

        .agents-panel {
            background: #fff;
            border: 1px solid var(--border);
            border-radius: 14px;
            overflow: hidden;
        }

        .agents-panel-header {
            padding: 20px;
            border-bottom: 1px solid var(--border);

            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 15px;
        }

        .agents-panel-header h3 {
            margin: 0;
            color: #1f2937;
            font-size: 17px;
        }

        .agents-panel-header p {
            margin: 5px 0 0;
            color: var(--muted);
            font-size: 13px;
        }

        .add-agent-btn {
            border: none;
            background: var(--green);
            color: #fff;
            border-radius: 8px;
            padding: 11px 16px;
            cursor: pointer;
            font-size: 13px;
            font-weight: 600;

            display: flex;
            align-items: center;
            gap: 7px;
        }

        .add-agent-btn:hover {
            opacity: .9;
        }


        /* =========================================
           AGENT GRID
        ========================================== */

        .agents-grid {
            padding: 20px;

            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 18px;
        }


        /* =========================================
           AGENT CARD
        ========================================== */

        .agent-card {
            border: 1px solid var(--border);
            border-radius: 13px;

            padding: 18px;

            background: #fff;

            transition: .2s ease;
        }

        .agent-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(0,0,0,.06);
        }

        .agent-card-top {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;

            margin-bottom: 18px;
        }

        .agent-profile {
            display: flex;
            align-items: center;
            gap: 11px;
        }

        .agent-avatar {
            width: 45px;
            height: 45px;

            border-radius: 50%;

            background: #eaf8ef;
            color: var(--green);

            display: flex;
            align-items: center;
            justify-content: center;

            font-size: 14px;
            font-weight: 700;
            img{
                border-radius: 20px;
            }
        }

        .agent-profile h4 {
            margin: 0 0 4px;

            color: #1f2937;
            font-size: 14px;
        }

        .agent-profile span {
            color: #9ca3af;
            font-size: 14px;
        }


        /* =========================================
           STATUS
        ========================================== */

        .agent-status {
            padding: 5px 9px;
            border-radius: 20px;

            font-size: 16px;
            font-weight: 600;
        }

        .agent-status.active {
            background: #eaf8ef;
            color: #16803c;
        }

        .agent-status.inactive {
            background: #fff0f0;
            color: #c53030;
        }

        .agent-status.leave {
            background: #fff7df;
            color: #b7791f;
        }


        /* =========================================
           AGENT INFORMATION
        ========================================== */

        .agent-details {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;

            margin-bottom: 17px;
        }

        .agent-detail {
            background: #f8faf9;
            padding: 10px;
            border-radius: 8px;
        }

        .agent-detail span {
            display: block;

            color: #9ca3af;
            font-size: 10px;

            margin-bottom: 4px;
        }

        .agent-detail strong {
            color: #374151;
            font-size: 12px;
        }


        /* =========================================
           PERFORMANCE
        ========================================== */

        .performance-header {
            display: flex;
            justify-content: space-between;

            margin-bottom: 7px;

            font-size: 11px;
        }

        .performance-header span:first-child {
            color: #6b7280;
        }

        .performance-header span:last-child {
            color: #1f2937;
            font-weight: 600;
        }

        .performance-bar {
            height: 7px;

            background: #fb0501;

            border-radius: 20px;
            overflow: hidden;

            margin-bottom: 16px;
        }

        .performance-bar span {
            display: block;

            height: 100%;

            border-radius: 20px;

            background: var(--green);
        }


        /* =========================================
           CARD FOOTER
        ========================================== */

        .agent-card-footer {
            display: flex;
            justify-content: space-between;
            align-items: center;

            border-top: 1px solid #f0f1f0;

            padding-top: 14px;
        }

        .collection-info {
            font-size: 11px;
            color: #9ca3af;
        }

        .collection-info strong {
            display: block;

            color: #1f2937;

            font-size: 13px;

            margin-top: 3px;
        }

        .agent-actions {
            display: flex;
            gap: 6px;
        }

        .agent-action-btn {
            width: 33px;
            height: 33px;

            border: 1px solid var(--border);

            background: #fff;

            border-radius: 8px;

            cursor: pointer;

            display: flex;
            align-items: center;
            justify-content: center;

            color: #6b7280;
        }

        .agent-action-btn:hover {
            background: #f5f5f5;
        }

        .agent-action-btn.view:hover {
            color: #2563eb;
        }

        .agent-action-btn.edit:hover {
            color: var(--green);
        }

        .agent-action-btn.delete:hover {
            color: #ef4444;
        }


        /* =========================================
           NO RESULT
        ========================================== */

        .no-agent-result {
            display: none;

            text-align: center;

            padding: 60px 20px;
        }

        .no-agent-result i {
            font-size: 40px;
            color: #d1d5db;

            margin-bottom: 12px;
        }

        .no-agent-result h4 {
            margin: 0 0 5px;

            color: #374151;
        }

        .no-agent-result p {
            margin: 0;

            color: #9ca3af;

            font-size: 13px;
        }


        /* =========================================
           MODAL
        ========================================== */

        .agent-modal {
            position: fixed;
            inset: 0;

            background: rgba(0,0,0,.45);

            display: none;

            align-items: center;
            justify-content: center;

            padding: 20px;

            z-index: 9999;
        }

        .agent-modal.show {
            display: flex;
        }

        .agent-modal-box {
            width: 100%;
            max-width: 520px;

            background: #fff;

            border-radius: 15px;

            overflow: hidden;

            box-shadow: 0 20px 50px rgba(0,0,0,.15);
        }

        .agent-modal-header {
            padding: 18px 20px;

            border-bottom: 1px solid var(--border);

            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .agent-modal-header h3 {
            margin: 0;

            color: #1f2937;

            font-size: 17px;
        }

        .agent-modal-close {
            width: 34px;
            height: 34px;

            border: none;

            background: #f5f5f5;

            border-radius: 8px;

            cursor: pointer;
        }

        .agent-modal-body {
            padding: 20px;
        }

        .modal-agent-profile {
            text-align: center;

            margin-bottom: 20px;
        }

        .modal-agent-avatar {
            width: 62px;
            height: 62px;

            margin: auto auto 10px;

            border-radius: 50%;

            background: #eaf8ef;
            color: var(--green);

            display: flex;
            align-items: center;
            justify-content: center;

            font-size: 20px;
            font-weight: 700;
        }

        .modal-agent-profile h4 {
            margin: 0 0 4px;

            color: #1f2937;
        }

        .modal-agent-profile p {
            margin: 0;

            color: #9ca3af;

            font-size: 12px;
        }

        .agent-modal-details {
            border: 1px solid var(--border);

            border-radius: 10px;

            overflow: hidden;
        }

        .modal-detail-row {
            display: flex;

            justify-content: space-between;

            padding: 12px 14px;

            border-bottom: 1px solid #f0f1f0;

            font-size: 13px;
        }

        .modal-detail-row:last-child {
            border-bottom: none;
        }

        .modal-detail-row span:first-child {
            color: #6b7280;
        }

        .modal-detail-row span:last-child {
            color: #1f2937;
            font-weight: 600;
        }

        .agent-modal-footer {
            padding: 15px 20px;

            border-top: 1px solid var(--border);

            display: flex;
            justify-content: flex-end;

            gap: 10px;
        }

        .agent-modal-btn {
            padding: 10px 16px;

            border-radius: 8px;

            border: none;

            cursor: pointer;

            font-size: 13px;

            font-weight: 600;
        }

        .agent-modal-btn.close {
            background: #f3f4f6;
            color: #4b5563;
        }

        .agent-modal-btn.edit {
            background: var(--green);
            color: #fff;
        }

#tot{
            background: var(--border);
            position: fixed;
            top: 120px;


}
.totbtn{
    padding: 10px 16px;

            border-radius: 8px;

            border: none;

            cursor: pointer;

            font-size: 13px;
            color:var(--white);
            font-weight: 600;
            background: var(--green);
            position: fixed;
            top: 70px;
right: 0px;

}
#tot {
    transform: translateX(100%);
    opacity: 0;
    transition: transform 0.5s ease, opacity 0.5s ease;
    visibility: hidden;
}

#tot.show {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
}

#tot.hide {
    transform: translateX(100%);
    opacity: 0;
    visibility: hidden;
}
/* Main container */
.plan-card-form {
    width: 150px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #f9f9f9;
    box-sizing: border-box;
}

/* Form layout */
.plan-card-form form {
    margin: 0;
    display: flex;
    gap: 5px;
    width: 100%;
}

/* Each field */
.plan-card-form .form-field {
    flex: 1;
    min-width: 0;
}

/* Labels */
.plan-card-form label {
    display: block;
    font-size: 9px;
    font-weight: bold;
    margin-bottom: 2px;
    white-space: nowrap;
}

/* Input and select */
.plan-card-form input,
.plan-card-form select {
    width: 100%;
    height: 20px;
    padding: 5px;
    font-size: 15px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 3px;
}

/* Select */
.plan-card-form select {
    padding: 0;
    font-size: 9px;
}


/* Popup overlay */
.profile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(15, 23, 42, 0.65);
    align-items: center;
    justify-content: center;
    padding: 15px;
}

/* Popup form */
.profile-form {
    width: 100%;
    max-width: 430px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 25px;
    background: #fff;
    color: #1e293b;
    border-radius: 16px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    animation: popupShow 0.2s ease;
}

@keyframes popupShow {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

.form-heading h2 {
    margin: 0;
    font-size: 21px;
}

.close-profile {
    width: 35px;
    height: 35px;
    border: none;
    border-radius: 50%;
    background: #f1f5f9;
    color: #334155;
    font-size: 22px;
    cursor: pointer;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    font-size: 14px;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    outline: none;
    font-size: 15px;
}

.form-group input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-buttons {
    display: flex;
    gap: 10px;
    margin-top: 22px;
}

.form-buttons button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.save-profile {
    background: #2563eb;
    color: #fff;
}

.cancel-profile {
    background: #e2e8f0;
    color: #334155;
}

#profileMessage {
    display: none;
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 7px;
    font-size: 14px;
}

@media (max-width: 480px) {
    .profile-form {
        padding: 20px;
    }
}
        /* =========================================
           RESPONSIVE
        ========================================== */

        @media(max-width: 1200px) {

            .agent-stats {
                grid-template-columns: repeat(2, 1fr);
            }

            .agents-grid {
                grid-template-columns: repeat(2, 1fr);
            }

            .agent-filters {
                grid-template-columns: repeat(2, 1fr);
            }

        }


        @media(max-width: 768px) {

            .agent-stats {
                grid-template-columns: 1fr;
            }

            .agents-grid {
                grid-template-columns: 1fr;
            }

            .agent-filters {
                grid-template-columns: 1fr;
            }

            .agents-panel-header {
                align-items: flex-start;
                flex-direction: column;
            }

            .add-agent-btn {
                width: 100%;
                justify-content: center;
            }

        }


        @media(max-width: 480px) {

            .agents-grid {
                padding: 15px;
            }

            .agent-stat {
                padding: 16px;
            }

            .agent-stat h2 {
                font-size: 21px;
            }

            .agent-card {
                padding: 15px;
            }

        }


        @media print {

            .sidebar,
            .topbar,
            .agent-filters,
            .agent-actions,
            .add-agent-btn {
                display: none !important;
            }

            .main-content {
                margin-left: 0 !important;
            }

        }
/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1200px) {
     .withdrawal-stats {
                grid-template-columns: repeat(2, 1fr);
            }

            .withdrawal-filters {
                grid-template-columns: repeat(2, 1fr);
            }

            .withdrawal-record {
                grid-template-columns: 2fr 1fr 1fr;
            }
    .stats-grid,
    .customer-summary,
    .saving-stat-grid,
    .collection-stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-grid,
    .saving-layout,
    .collection-overview-grid {
        grid-template-columns: 1fr;
    }

    .customer-list-header,
    /* .transaction-list-header, */
    .collection-list-header {
        display: none;
    }

    .customer-row {
        grid-template-columns: 1fr 2fr 1fr;

        padding: 15px 0;
    }

    .customer-phone {
        /* display: none; */
    }

    .saving-transaction {
        grid-template-columns: 2fr 1fr 1fr;

        padding: 15px 0;
    }

    /* .saving-transaction > div:nth-child(4),
    .saving-transaction > span:nth-child(5) {
        display: none;
    } */

    .collection-record {
        grid-template-columns: 2fr 1fr 1fr;

        padding: 15px 0;
    }

    .collection-record > span:nth-child(3),
    .collection-record > span:nth-child(4),
    .collection-record > span:nth-child(5) {
        display: none;
    }

}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 900px) {

    .settings-layout {
        grid-template-columns: 1fr;
    }

    .settings-nav {
        position: static;

        display: flex;

        overflow-x: auto;

        gap: 4px;
    }

    .settings-nav-title {
        display: none;
    }

    .settings-nav a {
        white-space: nowrap;

        margin: 0;
    }

    .agent-collection-row {
        grid-template-columns: 1fr 2fr;
    }

    /* .agent-customer-count,
    .agent-collection-row > .badge {
        display: none;
    } */

    .collection-filters {
        flex-wrap: wrap;
    }

}

/* =========================================================
   MOBILE SIDEBAR
   ========================================================= */

@media (max-width: 800px) {
 .withdrawal-stats {
                grid-template-columns: 1fr;
            }

            .withdrawal-filters {
                grid-template-columns: 1fr;
            }

            .withdrawal-record {
                grid-template-columns: 1fr auto;
                gap: 10px;
            }

            .withdrawal-record .record-column {
                /* display: none !important; */
            }

            .withdrawal-record .customer-info {
                grid-column: 1;
            }

            .withdrawal-record .action-buttons {
                grid-column: 2;
                grid-row: 1;
            }

            .withdrawal-record::after {
                content: attr(data-summary);
                grid-column: 1 / -1;
                color: #6b7280;
                font-size: 12px;
            }

            .panel-heading {
                align-items: flex-start;
                flex-direction: column;
            }
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main {
        width: 100%;

        margin-left: 0;
    }

    .topbar {
        left: 0;
    }

    .menu-toggle {
        display: block;
    }

    .search-box {
        width: 250px;
    }

    .content {
        padding-top: calc(var(--header-height) + 20px);
    }

    .saving-transaction {
        grid-template-columns: 2fr 1fr;
    }

    /* .saving-transaction > span:nth-child(3),
    .saving-transaction > span:nth-child(6) {
        display: none;
    } */

    .collection-record {
        grid-template-columns: 2fr 1fr;
    }

    .collection-record > span,
    .collection-record > button {
        display: none;
    }

    .collection-date {
        display: none;
    }

}

/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 600px) {

    :root {
        --header-height: 65px;
    }

    .content {
        padding: 15px;

        padding-top: calc(var(--header-height) + 20px);
    }

    .topbar {
        height: var(--header-height);

        padding: 0 15px;

        gap: 12px;
    }

    .search-box {
        display: none;
    }

    .profile div:last-child {
        display: none;
    }

    .profile {
        gap: 7px;
    }

    .avatar {
        width: 36px;
        height: 36px;
    }

    .stats-grid,
    .customer-summary,
    .saving-stat-grid,
    .collection-stat-grid {
        grid-template-columns: 1fr;
    }

    .page-heading {
        align-items: flex-start;

        flex-direction: column;

        gap: 15px;
    }

    .page-heading .btn-primary {
        width: 100%;
    }

    .panel {
        padding: 15px;
    }

    .panel-header {
        align-items: flex-start;

        flex-direction: column;
    }

    .customer-filters,
    .collection-filters {
        width: 100%;

        flex-direction: column;

        align-items: stretch;
    }

    .customer-search,
    .collection-search,
    .customer-filters select,
    .collection-filters select,
    .filter-btn {
        width: 100%;

        min-width: 0;
    }

    .customer-row {
        grid-template-columns: .6fr  2.5fr ;
    }

    /* .customer-row > div:nth-child(3), */
    /* .customer-row > div:nth-child(4), */
    /* .customer-row > div:nth-child(5), */
    /* .customer-row > div:nth-child(6) {
        display: none;
    } */

    .customer-info strong {
        white-space: nowrap;

        overflow: hidden;

        text-overflow: ellipsis;

        max-width: 160px;
    }

    .form-grid,
    .saving-form-grid {
        grid-template-columns: 1fr;
    }

    .form-group.full {
        grid-column: auto;
    }

    .customer-account-info {
        grid-template-columns: 1fr;
    }

    .saving-transaction {
        grid-template-columns: 1fr auto;
    }

    .saving-transaction > span,
    .saving-transaction > strong {
        margin-top: 5px;
    }

    .collection-progress-main {
        flex-direction: column;

        align-items: center;
    }

    .collection-progress-details {
        width: 100%;
    }

    .agent-collection-row {
        grid-template-columns: 1fr;
    }

    .agent-collection-progress {
        width: 100%;
    }

    .collection-record {
        grid-template-columns: 1fr auto;
    }

    .details-grid {
        grid-template-columns: 1fr;
    }

    .modal {
        max-height: 95vh;
    }

    .modal-footer {
        flex-direction: column-reverse;
    }

    .modal-footer button {
        width: 100%;

        min-height: 42px;
    }

    .success-actions {
        flex-direction: column;
    }

    .setting-item {
        align-items: flex-start;
    }

    .settings-body {
        padding: 15px;
    }

    .settings-section-header {
        padding: 15px;
    }

}

/* =========================================================
   PRINT
   ========================================================= */
  @media(max-width: 480px) {
            .withdrawal-stat {
                padding: 16px;
            }

            .withdrawal-stat .stat-info h2 {
                font-size: 21px;
            }

            .withdrawal-records {
                padding: 0 15px 15px;
            }

            .panel-heading {
                padding: 16px;
            }

            .withdrawal-filters {
                padding: 15px;
            }

            .modal-footer {
                flex-wrap: wrap;
            }

            .modal-btn {
                flex: 1;
            }
        }

        @media print {
            .sidebar,
            .topbar,
            .withdrawal-filters,
            .action-buttons {
                display: none !important;
            }

            .main-content {
                margin-left: 0 !important;
            }

            .withdrawal-panel,
            .withdrawal-stat, {
                box-shadow: none;
            }
        }
@media print {

    .sidebar,
    .topbar,
    .menu-toggle,
    .search-box,
    .notification,
    .profile,
    .btn-primary,
    .btn-secondary {
        display: none !important;
    }

    .main {
        width: 100%;

        margin: 0;
    }

    .content {
        padding: 0;
    }

    body {
        background: white;
    }

    .panel,
    .settings-section {
        border: 1px solid #ddd;

        box-shadow: none;
    }

}