/* ── DASHBOARD NEW COMPONENTS ─────────────── */

/* KPI spark area */
.kpi-spark {
    margin: 8px 0 4px;
    height: 28px;
    overflow: hidden;
}

.kpi-spark canvas {
    width: 100% !important;
    height: 28px !important;
}

/* Chart legend pills */
.chart-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--text2);
}

.chart-legend-item span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

/* Donut center label overlay */
.donut-center-label {
    position: absolute;
    text-align: center;
    pointer-events: none;
}

/* Donut legend */
.donut-legend {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.donut-legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.donut-legend-item>span {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    flex-shrink: 0;
    display: inline-block;
}

.dl-name {
    font-size: 11px;
    color: var(--text2);
}

.dl-val {
    font-size: 12px;
    color: var(--text);
    font-weight: 600;
    font-family: 'Inter', sans-serif;
}

/* Performance bars */
.perf-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.perf-item {}

.perf-label {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text2);
    margin-bottom: 5px;
}

.perf-pct {
    font-weight: 700;
    color: var(--text);
}

.perf-bar {
    height: 5px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
}

.perf-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease;
}

/* Mini progress bar in table */
.mini-bar {
    height: 5px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    min-width: 60px;
}

.mini-bar>div {
    height: 100%;
    border-radius: 10px;
}

/* Status badges */
.status-badge {
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 600;
    display: inline-block;
}

.status-paid {
    background: rgba(0, 208, 132, 0.12);
    color: var(--accent);
}

.status-overdue {
    background: rgba(255, 107, 107, 0.12);
    color: var(--accent3);
}

.status-pending {
    background: rgba(255, 209, 102, 0.12);
    color: var(--accent4);
}

/* Activity feed */
.activity-feed {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.activity-body {
    flex: 1;
    min-width: 0;
}

.activity-title {
    font-size: 12px;
    color: var(--text);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-time {
    font-size: 10px;
    color: var(--text3);
    margin-top: 1px;
}

.activity-amount {
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

/* KPI card height adjustment for sparkline */
.kpi-card {
    min-height: 130px;
}

/* ── ACCORDION NAV GROUPS ────────────────── */

.nav-group {
    margin-bottom: 2px;
    border-radius: 10px;
    overflow: hidden;
}

.nav-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    color: var(--text2);
    font-size: 13px;
    font-weight: 500;
}

.nav-group-header:hover {
    background: var(--surface2);
    color: var(--text);
}

.nav-group.open>.nav-group-header {
    background: #2a9d5c;
    color: #fff;
    border-radius: 10px 10px 0 0;
}

.nav-group-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-chevron {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    transition: transform 0.25s ease;
    opacity: 0.7;
}

.nav-group.open>.nav-group-header .nav-chevron {
    transform: rotate(180deg);
    opacity: 1;
}

.nav-sub-items {
    display: none;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 0 0 10px 10px;
    padding: 4px 0 6px;
    border-left: 2px solid #2a9d5c;
    margin-left: 10px;
}

.nav-group.open>.nav-sub-items {
    display: block;
}

.nav-sub-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 12px 7px 16px;
    font-size: 12px;
    color: var(--text3);
    cursor: pointer;
    transition: color 0.15s;
    position: relative;
}

.nav-sub-item:hover {
    color: var(--text);
}

.nav-sub-item.active {
    color: #2a9d5c;
    font-weight: 600;
}

.nav-sub-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--text3);
    flex-shrink: 0;
    transition: background 0.15s;
}

.nav-sub-item.active .nav-sub-dot {
    background: #2a9d5c;
}

.nav-sub-item:hover .nav-sub-dot {
    background: var(--text2);
}

:root {
    --bg: #0b0f1a;
    --surface: #111827;
    --surface2: #1a2235;
    --border: rgba(255, 255, 255, 0.07);
    --accent: #00d084;
    --accent2: #00b8ff;
    --accent3: #ff6b6b;
    --accent4: #ffd166;
    --text: #e8edf5;
    --text2: #8b95a8;
    --text3: #556070;
    --card-radius: 16px;
    --sidebar-w: 240px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── SIDEBAR ─────────────────────────────── */
.sidebar {
    width: var(--sidebar-w);
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    overflow-y: auto;
    scrollbar-width: none;
}

.sidebar::-webkit-scrollbar {
    display: none;
}

.logo {
    padding: 24px 20px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border);
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent), #00a86b);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 16px;
    color: #000;
}

.logo-text {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: var(--text);
    letter-spacing: -0.3px;
}

.logo-text span {
    color: var(--accent);
}

.user-pill {
    margin: 16px 12px;
    background: var(--surface2);
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border);
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 12px;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 10px;
    color: var(--text3);
}

.nav-section {
    padding: 8px 12px 4px;
}

.nav-label {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text3);
    padding: 12px 8px 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    color: var(--text2);
    font-size: 13px;
    font-weight: 400;
    position: relative;
    margin-bottom: 1px;
}

.nav-item:hover {
    background: var(--surface2);
    color: var(--text);
}

.nav-item.active {
    background: rgba(0, 208, 132, 0.12);
    color: var(--accent);
    font-weight: 500;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 18px;
    background: var(--accent);
    border-radius: 0 3px 3px 0;
}

.nav-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.7;
}

.nav-item.active .nav-icon {
    opacity: 1;
}

.nav-badge {
    margin-left: auto;
    background: var(--accent);
    color: #000;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 20px;
}

/* ── FOOTER ──────────────────────────────── */
.site-footer {
    height: 56px;
    background: var(--surface);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    gap: 16px;
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    z-index: 95;
}

/* ── TOPBAR ──────────────────────────────── */
.main {
    margin-left: var(--sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
}

.topbar {
    min-height: 80px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 28px;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 90;
}

.topbar-title {
    font-family: 'Inter', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    flex: 1;
}

.topbar-title small {
    font-size: 11px;
    font-weight: 400;
    color: var(--text3);
    font-family: 'DM Sans', sans-serif;
    margin-left: 8px;
}

.search-bar {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 220px;
    transition: border-color 0.2s;
}

.search-bar:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.search-bar input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 13px;
    font-family: 'DM Sans', sans-serif;
    width: 100%;
}

.search-bar input::placeholder {
    color: var(--text3);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: var(--surface2);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
    color: var(--text2);
    position: relative;
}

.icon-btn:hover {
    background: var(--surface2);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text);
}

.icon-btn .dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 6px;
    height: 6px;
    background: var(--accent3);
    border-radius: 50%;
    border: 2px solid var(--surface);
}

.company-select {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 7px 12px;
    color: var(--text);
    font-size: 12px;
    font-family: 'DM Sans', sans-serif;
    outline: none;
    cursor: pointer;
}

/* ── CONTENT ─────────────────────────────── */
.content {
    padding: 28px;
    padding-bottom: 84px;
    flex: 1;
}

/* ── KPI CARDS ───────────────────────────── */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.kpi-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    padding: 18px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, border-color 0.2s;
    cursor: default;
}

.kpi-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.13);
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    border-radius: var(--card-radius) var(--card-radius) 0 0;
}

.kpi-card:nth-child(1)::before {
    background: var(--accent);
}

.kpi-card:nth-child(2)::before {
    background: var(--accent2);
}

.kpi-card:nth-child(3)::before {
    background: var(--accent4);
}

.kpi-card:nth-child(4)::before {
    background: #a78bfa;
}

.kpi-card:nth-child(5)::before {
    background: #a78bfa;
}

.kpi-label {
    font-size: 11px;
    color: var(--text3);
    font-weight: 500;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.kpi-value {
    font-family: 'Inter', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
    margin-bottom: 10px;
}

.kpi-sub {
    font-size: 11px;
    color: var(--text3);
    display: flex;
    align-items: center;
    gap: 4px;
}

.kpi-up {
    color: var(--accent);
}

.kpi-down {
    color: var(--accent3);
}

.kpi-icon {
    position: absolute;
    right: 14px;
    top: 14px;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.kpi-icon svg {
    width: 1em;
    height: 1em;
    fill: currentColor;
}

.kpi-card:nth-child(1) .kpi-icon {
    background: rgba(0, 208, 132, 0.1);
}

.kpi-card:nth-child(2) .kpi-icon {
    background: rgba(0, 184, 255, 0.1);
}

.kpi-card:nth-child(3) .kpi-icon {
    background: rgba(255, 209, 102, 0.1);
}

.kpi-card:nth-child(4) .kpi-icon {
    background: rgba(255, 107, 107, 0.1);
}

.kpi-card:nth-child(5) .kpi-icon {
    background: rgba(167, 139, 250, 0.1);
}

/* ── GRID LAYOUT ─────────────────────────── */
.grid-2 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 18px;
    margin-bottom: 18px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 18px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    padding: 22px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.card-title {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.card-action {
    font-size: 11px;
    color: var(--accent);
    cursor: pointer;
    font-weight: 500;
}

/* ── CHART ───────────────────────────────── */
.chart-wrapper {
    position: relative;
    height: 200px;
}

canvas {
    width: 100% !important;
    height: 100% !important;
}

.date-pill {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 11px;
    color: var(--text2);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ── CASH FLOW ───────────────────────────── */
.bank-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.bank-card {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: border-color 0.2s;
}

.bank-card:hover {
    border-color: rgba(255, 255, 255, 0.13);
}

.bank-name {
    font-size: 11px;
    color: var(--text3);
    font-weight: 500;
}

.bank-amount {
    font-family: 'Inter', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
}

.bank-actions {
    display: flex;
    gap: 6px;
    margin-top: 4px;
}

.btn-fill,
.btn-settle {
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    letter-spacing: 0.3px;
}

.btn-fill {
    background: rgba(0, 208, 132, 0.15);
    color: var(--accent);
}

.btn-settle {
    background: rgba(255, 107, 107, 0.15);
    color: var(--accent3);
}

.bank-icon {
    font-size: 20px;
    margin-bottom: 2px;
}

/* ── COLLECTION TABLE ────────────────────── */
.collection-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
}

.tab {
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    color: var(--text3);
    font-weight: 500;
    transition: all 0.15s;
}

.tab.active {
    background: rgba(0, 208, 132, 0.12);
    color: var(--accent);
}

.tab:hover:not(.active) {
    background: var(--surface2);
    color: var(--text2);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.data-table th {
    text-align: left;
    padding: 8px 10px;
    color: var(--text3);
    font-weight: 500;
    font-size: 10px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 10px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--text2);
    vertical-align: middle;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.td-green {
    color: var(--accent) !important;
    font-weight: 500;
}

.td-bold {
    color: var(--text) !important;
    font-weight: 600;
}

.td-red {
    color: var(--accent3) !important;
}

/* ── PROFIT FLOW ─────────────────────────── */
.profit-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 13px;
}

.profit-row:last-child {
    border-bottom: none;
}

.profit-row.highlight {
    background: rgba(0, 208, 132, 0.06);
    border-radius: 8px;
    padding: 10px 10px;
    margin: 4px -10px;
}

.profit-row .label {
    color: var(--text2);
}

.profit-row .value {
    font-weight: 600;
    color: var(--text);
    font-family: 'Inter', sans-serif;
}

.profit-row .value.green {
    color: var(--accent);
}

.profit-row .value.zero {
    color: var(--text3);
}

.section-divider {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text3);
    padding: 12px 0 4px;
}

/* ── SHAREHOLDER ─────────────────────────── */
.shareholder-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.badge {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
}

.badge-share {
    background: rgba(0, 184, 255, 0.15);
    color: var(--accent2);
}

.badge-cashout {
    background: rgba(255, 107, 107, 0.15);
    color: var(--accent3);
}

.badge-balance {
    background: rgba(0, 208, 132, 0.15);
    color: var(--accent);
}

/* ── FILTERS ─────────────────────────────── */
.filters {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 18px;
}

.filter-select {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 8px 12px;
    color: var(--text2);
    font-size: 12px;
    font-family: 'DM Sans', sans-serif;
    outline: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: 9px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    transition: opacity 0.15s;
}

.btn-primary:hover {
    opacity: 0.85;
}

/* ── CUSTOMER CREATE ─────────────────────── */
.customer-create-wrap {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.customer-page-title {
    font-family: 'Inter', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
}

.customer-create-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    align-items: start;
}

.customer-card {
    padding: 16px;
}

.customer-card-header {
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.customer-form-grid {
    display: grid;
    grid-template-columns: 95px 1fr;
    gap: 10px 12px;
    align-items: center;
}

.customer-label {
    font-size: 11px;
    color: var(--text2);
    text-align: right;
}

.customer-label span {
    color: var(--accent3);
}

.customer-input {
    width: 100%;
    height: 34px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0 10px;
    color: var(--text);
    font-size: 12px;
    font-family: 'DM Sans', sans-serif;
    outline: none;
}

.customer-input:focus {
    border-color: var(--accent);
}

.customer-select {
    cursor: pointer;
}

.customer-inline-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 8px;
    align-items: center;
}

.customer-switch {
    width: 36px;
    height: 20px;
    position: relative;
}

.customer-switch input {
    display: none;
}

.customer-switch span {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid var(--border);
}

.customer-switch span::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    left: 2px;
    top: 2px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s ease;
}

.customer-switch input:checked+span {
    background: rgba(0, 208, 132, 0.28);
    border-color: rgba(0, 208, 132, 0.45);
}

.customer-switch input:checked+span::after {
    transform: translateX(16px);
}

.customer-mini-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    background: rgba(0, 208, 132, 0.16);
    color: var(--accent);
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.customer-mini-btn svg {
    width: 14px;
    height: 14px;
}

.customer-address-row {
    grid-template-columns: 2fr 1fr 1fr auto auto;
}

.customer-textarea {
    height: 52px;
    padding-top: 8px;
    resize: vertical;
}

.customer-advance-grid {
    grid-template-columns: 130px 1fr;
}

.customer-actions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.customer-table-wrap {
    overflow-x: auto;
}

.customer-table-modern {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.customer-table-modern th {
    background: rgba(255, 255, 255, 0.02);
    font-size: 10px;
    letter-spacing: 0.7px;
}

.customer-table-modern td,
.customer-table-modern th {
    padding: 12px 14px;
}

/* ── SCROLLBAR ───────────────────────────── */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--surface2);
    border-radius: 2px;
}

/* ── ANIMATIONS ──────────────────────────── */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.kpi-card {
    animation: fadeUp 0.4s ease both;
}

.kpi-card:nth-child(1) {
    animation-delay: 0.05s;
}

.kpi-card:nth-child(2) {
    animation-delay: 0.1s;
}

.kpi-card:nth-child(3) {
    animation-delay: 0.15s;
}

.kpi-card:nth-child(4) {
    animation-delay: 0.2s;
}

.kpi-card:nth-child(5) {
    animation-delay: 0.25s;
}

.card {
    animation: fadeUp 0.4s ease 0.2s both;
}

/* Pulse dot */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

.live-dot {
    width: 7px;
    height: 7px;
    background: var(--accent);
    border-radius: 50%;
    display: inline-block;
    animation: pulse 1.8s infinite;
    margin-right: 5px;
}


/* login css */

:root {
    --bg: #0b0f1a;
    --surface: #111827;
    --surface2: #1a2235;
    --border: rgba(255, 255, 255, 0.07);
    --accent: #00d084;
    --accent2: #00b8ff;
    --accent3: #ff6b6b;
    --text: #e8edf5;
    --text2: #8b95a8;
    --text3: #556070;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* ── Background grid glow ── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 700px 500px at 20% 40%, rgba(0, 208, 132, 0.07) 0%, transparent 70%),
        radial-gradient(ellipse 600px 400px at 80% 60%, rgba(0, 184, 255, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.login-wrap {
    display: flex;
    width: 900px;
    max-width: 96vw;
    min-height: 540px;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 1;
}

/* ── Left panel ── */
.login-brand {
    width: 42%;
    background: linear-gradient(160deg, #0e1525 0%, #111e35 100%);
    padding: 52px 44px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-right: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.login-brand::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 208, 132, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 20px;
    color: #0b0f1a;
}

.brand-name {
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
}

.brand-name span {
    color: var(--accent);
}

.brand-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 24px 0;
}

.brand-title {
    font-family: 'Inter', sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.25;
    margin-bottom: 14px;
}

.brand-title span {
    color: var(--accent);
}

.brand-desc {
    font-size: 13px;
    color: var(--text2);
    line-height: 1.7;
    max-width: 260px;
}

.brand-stats {
    display: flex;
    gap: 24px;
}

.stat-item {}

.stat-val {
    font-family: 'Inter', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: var(--accent);
}

.stat-lbl {
    font-size: 11px;
    color: var(--text3);
    margin-top: 2px;
}

/* ── Right panel (form) ── */
.login-form-panel {
    flex: 1;
    background: var(--surface);
    padding: 52px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-heading {
    font-family: 'Inter', sans-serif;
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 6px;
}

.form-sub {
    font-size: 13px;
    color: var(--text2);
    margin-bottom: 32px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text2);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.form-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.form-input-wrap svg {
    position: absolute;
    left: 14px;
    color: var(--text3);
    pointer-events: none;
}

.form-input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 208, 132, 0.12);
}

.form-input::placeholder {
    color: var(--text3);
}

.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    font-size: 12px;
}

.remember-wrap {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--text2);
    cursor: pointer;
}

.remember-wrap input[type="checkbox"] {
    accent-color: var(--accent);
    width: 14px;
    height: 14px;
}

.forgot-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.forgot-link:hover {
    text-decoration: underline;
}

.btn-login {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, var(--accent), #00b87a);
    border: none;
    border-radius: 12px;
    color: #0b0f1a;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
    letter-spacing: 0.3px;
}

.btn-login:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-login:active {
    transform: translateY(0);
}

.error-msg {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    color: var(--accent3);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 20px;
}

.login-footer {
    text-align: center;
    margin-top: 28px;
    font-size: 11px;
    color: var(--text3);
}

/* Custom Switch Toggle */
.customer-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}
.customer-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.customer-switch span {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--surface2);
    border: 1px solid var(--border);
    transition: .3s;
    border-radius: 34px;
}
.customer-switch span:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: var(--text3);
    transition: .3s;
    border-radius: 50%;
}
.customer-switch input:checked + span {
    background-color: var(--accent);
    border-color: var(--accent);
}
.customer-switch input:checked + span:before {
    transform: translateX(18px);
    background-color: #000;
}

/* Export / Outline Button */
.export-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text3);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}
.export-btn:hover:not([disabled]) {
    background: var(--surface2);
    color: var(--text);
    border-color: rgba(255,255,255,0.2);
}
.export-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}