/* ===== CleverisfX Admin Panel CSS ===== */

/* ── Global top progress bar ─────────────────────────────── */
#cfx-progress {
    position: fixed;
    top: 0; left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #1976D2, #43a047, #1976D2);
    background-size: 200% 100%;
    z-index: 99999;
    transition: width 0.25s ease, opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
    animation: cfx-shimmer 1.4s linear infinite;
}
#cfx-progress.active {
    opacity: 1;
    width: 85%;
}
#cfx-progress.done {
    width: 100% !important;
    opacity: 0;
    transition: width 0.15s ease, opacity 0.4s ease 0.15s;
}
@keyframes cfx-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Page transition overlay (nav click → new page loads) ── */
#cfx-page-overlay {
    position: fixed;
    inset: 0;
    z-index: 99990;
    background: rgba(15,27,45,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
}
#cfx-page-overlay.active {
    opacity: 1;
    pointer-events: all;
}
.cfx-spin-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}
.cfx-spinner {
    width: 42px; height: 42px;
    border: 3px solid rgba(255,255,255,0.18);
    border-top-color: #43a047;
    border-right-color: #1976D2;
    border-radius: 50%;
    animation: cfx-spin 0.75s linear infinite;
}
.cfx-spinner-label {
    color: rgba(255,255,255,0.82);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
}
@keyframes cfx-spin {
    to { transform: rotate(360deg); }
}

/* ── Inline fetch spinner (shown inside cards) ──────────── */
.cfx-fetch-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #1976D2;
    font-weight: 600;
    padding: 6px 12px;
    background: #e3f2fd;
    border-radius: 8px;
    border: 1px solid #bbdefb;
}
.cfx-fetch-indicator .cfx-dot-pulse {
    display: flex; gap: 4px;
}
.cfx-fetch-indicator .cfx-dot-pulse span {
    width: 6px; height: 6px;
    background: #1976D2;
    border-radius: 50%;
    animation: cfx-pulse 1.2s ease-in-out infinite;
}
.cfx-fetch-indicator .cfx-dot-pulse span:nth-child(2) { animation-delay: 0.2s; }
.cfx-fetch-indicator .cfx-dot-pulse span:nth-child(3) { animation-delay: 0.4s; }
@keyframes cfx-pulse {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40%           { transform: scale(1);   opacity: 1; }
}

:root {
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;
    --header-height: 64px;

    --blue-50: #e3f2fd;
    --blue-100: #bbdefb;
    --blue-500: #2196F3;
    --blue-600: #1e88e5;
    --blue-700: #1976D2;
    --blue-800: #1565C0;
    --blue-900: #0d47a1;

    --green-50: #e8f5e9;
    --green-500: #4CAF50;
    --green-600: #43a047;
    --green-700: #388E3C;
    --green-800: #2E7D32;

    --sidebar-bg: #0f1b2d;
    --sidebar-bg2: #162236;
    --sidebar-hover: #1e3352;
    --sidebar-active: linear-gradient(90deg, #1976D2, #1565C0);
    --sidebar-text: #8fa6bf;
    --sidebar-text-hover: #ffffff;

    --body-bg: #f0f4f8;
    --card-bg: #ffffff;
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --card-shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.14);

    --text-primary: #1a2332;
    --text-secondary: #5c6c7c;
    --text-muted: #94a3b8;

    --border-color: #e2e8f0;
    --border-radius: 16px;
    --border-radius-sm: 10px;
    --border-radius-xs: 8px;

    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--body-bg);
    color: var(--text-primary);
    overflow-x: hidden;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c1cdd8; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ===== SIDEBAR ===== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1000;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    padding: 14px 14px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}

.brand-logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.sidebar-logo-img {
    display: block;
    width: 100%;
    max-width: 168px;
    height: auto;
    object-fit: contain;
}

.sidebar-logo-collapsed {
    display: none;
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
}

/* Sidebar Nav */
.sidebar-nav {
    padding: 12px 0 32px;
    flex: 1;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    margin: 1px 12px;
}

.nav-section-label {
    font-size: 10px !important;
    font-weight: 600;
    color: rgba(143, 166, 191, 0.5);
    letter-spacing: 1.2px;
    text-transform: uppercase;
    padding: 16px 12px 6px !important;
    margin: 0 !important;
    pointer-events: none;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: var(--sidebar-text);
    text-decoration: none;
    border-radius: var(--border-radius-xs);
    transition: var(--transition);
    font-size: 14px;
    font-weight: 500;
}

.sidebar-nav li a i {
    width: 18px;
    font-size: 15px;
    flex-shrink: 0;
    text-align: center;
}

.sidebar-nav li a:hover {
    background: var(--sidebar-hover);
    color: var(--sidebar-text-hover);
}

.sidebar-nav li.active a {
    background: linear-gradient(90deg, #1976D2, #1565C0);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.35);
}

/* Sidebar sub-nav dropdown */
.nav-has-sub > a { position: relative; }
.nav-sub-arrow {
    margin-left: auto;
    font-size: 11px !important;
    width: auto !important;
    transition: transform 0.2s ease;
    opacity: .7;
}
.nav-has-sub.nav-sub-open > a .nav-sub-arrow { transform: rotate(180deg); }
.nav-sub {
    list-style: none;
    padding: 2px 0 4px 0;
    margin: 0 !important;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.25s ease;
}
.nav-has-sub.nav-sub-open > .nav-sub { max-height: 200px; }
.nav-sub > li {
    margin: 1px 0 1px 10px !important;
}
.nav-sub > li > a {
    font-size: 13px !important;
    padding: 8px 14px 8px 30px !important;
}
.nav-sub > li > a > i { font-size: 13px !important; }
.nav-sub > li.active > a {
    background: linear-gradient(90deg, #1976D2, #1565C0);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.35);
}
.sidebar-collapsed .nav-sub-arrow,
.sidebar-collapsed .nav-sub { display: none !important; }

/* ===== MAIN WRAPPER ===== */
.main-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

/* ===== TOP HEADER ===== */
.top-header {
    height: var(--header-height);
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sidebar-toggle {
    background: none;
    border: none;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: var(--border-radius-xs);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 16px;
}

.sidebar-toggle:hover {
    background: var(--body-bg);
    color: var(--text-primary);
}

.page-title h5 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
}

.breadcrumb {
    margin: 0;
    padding: 0;
    background: none;
    font-size: 12px;
}

.breadcrumb-item { color: var(--text-muted); }
.breadcrumb-item a { color: var(--blue-700); text-decoration: none; }
.breadcrumb-item.active { color: var(--text-secondary); }
.breadcrumb-item + .breadcrumb-item::before { color: var(--text-muted); }

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.header-btn {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    width: 38px;
    height: 38px;
    border-radius: var(--border-radius-xs);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 15px;
}

.header-btn:hover {
    background: var(--body-bg);
    color: var(--blue-700);
}

.header-btn .badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 16px;
    height: 16px;
    background: #ef5350;
    color: white;
    font-size: 9px;
    font-weight: 600;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.user-btn {
    background: none;
    border: 1px solid var(--border-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 8px;
    border-radius: 40px;
    transition: var(--transition);
    margin-left: 8px;
}

.user-btn:hover { background: var(--body-bg); }

.user-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--blue-700), var(--green-700));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 13px;
}

.user-info {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.user-role {
    font-size: 11px;
    color: var(--text-muted);
}

/* ===== PAGE CONTENT ===== */
.page-content {
    flex: 1;
    padding: 28px 28px;
    overflow-y: auto;
}

/* ===== FOOTER ===== */
.page-footer {
    padding: 16px 28px;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
}

/* ===== SECTION TITLE ===== */
.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.section-title i {
    color: var(--blue-700);
    font-size: 14px;
}

/* ===== STAT CARDS ===== */
.stat-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: var(--transition);
    border-bottom: 4px solid transparent;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-hover);
}

.stat-card-blue  { border-bottom-color: var(--blue-700); }
.stat-card-green { border-bottom-color: var(--green-700); }
.stat-card-orange { border-bottom-color: #f57c00; }
.stat-card-purple { border-bottom-color: #7b1fa2; }
.stat-card-teal   { border-bottom-color: #00796b; }
.stat-card-indigo { border-bottom-color: #303f9f; }
.stat-card-pink   { border-bottom-color: #c2185b; }
.stat-card-red    { border-bottom-color: #c62828; }

.stat-card-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 20px;
}

.stat-info {
    flex: 1;
}

.stat-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 8px;
    letter-spacing: -1px;
}

.stat-change {
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-change.positive { color: var(--green-700); }
.stat-change.negative { color: #e53935; }

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    margin-left: 16px;
}

.stat-icon-blue   { background: linear-gradient(135deg, #e3f2fd, #bbdefb); color: var(--blue-700); }
.stat-icon-green  { background: linear-gradient(135deg, #e8f5e9, #c8e6c9); color: var(--green-700); }
.stat-icon-orange { background: linear-gradient(135deg, #fff3e0, #ffe0b2); color: #f57c00; }
.stat-icon-purple { background: linear-gradient(135deg, #f3e5f5, #e1bee7); color: #7b1fa2; }
.stat-icon-teal   { background: linear-gradient(135deg, #e0f2f1, #b2dfdb); color: #00796b; }
.stat-icon-indigo { background: linear-gradient(135deg, #e8eaf6, #c5cae9); color: #303f9f; }
.stat-icon-pink   { background: linear-gradient(135deg, #fce4ec, #f8bbd0); color: #c2185b; }
.stat-icon-red    { background: linear-gradient(135deg, #ffebee, #ffcdd2); color: #c62828; }

.stat-card-footer {
    padding: 12px 24px;
    border-top: 1px solid var(--border-color);
    background: rgba(0,0,0,0.01);
}

.stat-card-footer a {
    font-size: 12px;
    font-weight: 500;
    color: var(--blue-700);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.2s;
}

.stat-card-footer a:hover { gap: 10px; }

/* ===== CHART CARDS ===== */
.chart-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    height: 100%;
    border-bottom: 4px solid var(--blue-700);
}

.chart-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border-color);
}

.chart-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 2px;
}

.chart-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
}

.chart-actions {
    display: flex;
    gap: 6px;
}

.chart-period-btn {
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid var(--border-color);
    background: none;
    border-radius: 20px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.chart-period-btn.active,
.chart-period-btn:hover {
    background: var(--blue-700);
    border-color: var(--blue-700);
    color: white;
}

.chart-body {
    padding: 20px 20px 16px;
    position: relative;
}
.chart-body canvas {
    display: block;
}
.dist-legend-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 8px;
    background: #f8fafc;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 0 20px 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

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

/* ===== PAGE CARD (Tables) ===== */
.page-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    border-bottom: 4px solid var(--blue-700);
}

.page-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    gap: 16px;
    flex-wrap: nowrap;
}

.page-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.badge-count {
    background: var(--blue-50);
    color: var(--blue-700);
    font-size: 12px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 20px;
}

.badge-count-green {
    background: var(--green-50);
    color: var(--green-700);
}

.badge-count-orange {
    background: #fff3e0;
    color: #f57c00;
}

.page-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.search-box i {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    font-size: 13px;
    pointer-events: none;
    z-index: 1;
}

.search-box .form-control {
    padding-left: 34px !important;
    height: 38px !important;
    font-size: 13px !important;
    border-color: var(--border-color) !important;
    border-radius: 20px !important;
    width: 200px !important;
    background: var(--body-bg) !important;
    box-shadow: none !important;
}

.search-box .form-control:focus {
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.12) !important;
    border-color: var(--blue-500) !important;
    background: white !important;
}

.filter-select {
    height: 38px !important;
    font-size: 13px !important;
    border-color: var(--border-color) !important;
    border-radius: 20px !important;
    background: var(--body-bg) !important;
    padding: 0 32px 0 14px !important;
    width: 130px !important;
    flex-shrink: 0;
    box-shadow: none !important;
    cursor: pointer;
}

.filter-select-account {
    width: 190px !important;
    border-color: var(--blue-100) !important;
    background: linear-gradient(135deg, var(--blue-50), #ffffff) !important;
    color: var(--blue-800) !important;
    font-weight: 600 !important;
}

.filter-select-account:focus {
    border-color: var(--blue-500) !important;
}

.account-filter-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 14px;
    border: 1.5px solid var(--blue-100);
    border-radius: 20px;
    background: linear-gradient(135deg, var(--blue-50), #ffffff);
    flex-shrink: 0;
}

.account-filter-wrap i {
    color: var(--blue-700);
    font-size: 13px;
}

.account-filter-wrap select {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    font-size: 13px !important;
    font-weight: 600;
    color: var(--blue-800);
    height: 36px !important;
    padding: 0 22px 0 0 !important;
    width: auto !important;
    min-width: 170px;
    cursor: pointer;
}

.btn-primary-action {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 18px;
    height: 38px;
    background: linear-gradient(135deg, var(--blue-700), var(--blue-800));
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.3);
}

.btn-primary-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(25, 118, 210, 0.4);
}

/* ===== ADMIN TABLE ===== */
.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table thead th {
    padding: 12px 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    background: var(--body-bg);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.admin-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s;
}

.admin-table tbody tr:last-child {
    border-bottom: none;
}

.admin-table tbody tr:hover {
    background: #f8fafc;
}

.admin-table tbody td {
    padding: 14px 20px;
    font-size: 13.5px;
    color: var(--text-primary);
    vertical-align: middle;
}

.admin-table tbody td code {
    background: var(--body-bg);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 12px;
    color: var(--blue-800);
    font-family: 'Consolas', monospace;
}

/* User cell */
.user-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar-sm {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--blue-700), var(--blue-500));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}

.avatar-green { background: linear-gradient(135deg, var(--green-700), var(--green-500)); }
.avatar-orange { background: linear-gradient(135deg, #f57c00, #ffb300); }

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-active   { background: #e8f5e9; color: #2E7D32; }
.status-inactive { background: #fce4ec; color: #c62828; }
.status-pending  { background: #fff8e1; color: #e65100; }

/* Type badges */
.type-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.type-real  { background: #e3f2fd; color: #1565C0; }
.type-demo  { background: #e8f5e9; color: #2E7D32; }
.type-cent  { background: #f3e5f5; color: #6a1b9a; }

/* Method badge */
.method-badge {
    background: var(--body-bg);
    color: var(--text-secondary);
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

/* Action buttons */
.action-btns {
    display: flex;
    gap: 4px;
    flex-wrap: nowrap;
}

.action-btn {
    width: 26px;
    height: 26px;
    border: none;
    border-radius: var(--border-radius-xs);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    transition: var(--transition);
    text-decoration: none;
    flex-shrink: 0;
}

.action-btn-view     { background: #e3f2fd; color: #1976D2; }
.action-btn-edit     { background: #e8f5e9; color: #2E7D32; }
.action-btn-delete   { background: #fce4ec; color: #c62828; }
.action-btn-deposit  { background: #e0f7fa; color: #00838f; }
.action-btn-withdraw { background: #fff8e1; color: #f57f17; }
.action-btn-block-wd { background: #fbe9e7; color: #bf360c; }

.action-btn:hover { filter: brightness(0.9); transform: scale(1.05); }

/* ===== USER ACTION KEBAB MENU ===== */
.user-action-menu {
    position: relative;
    display: inline-block;
}
.user-action-trigger {
    width: 32px;
    height: 32px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3.5px;
    transition: background .15s, border-color .15s, box-shadow .15s;
}
.user-action-trigger span {
    display: block;
    width: 3.5px;
    height: 3.5px;
    border-radius: 50%;
    background: #94a3b8;
    transition: background .15s;
}
.user-action-trigger:hover { background: #f0f4f8; border-color: #1976D2; box-shadow: 0 2px 8px rgba(25,118,210,.12); }
.user-action-trigger:hover span { background: #1976D2; }

.user-action-dropdown {
    display: none;
    position: fixed;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 6px 24px rgba(0,0,0,.13);
    min-width: 185px;
    max-height: 320px;
    overflow-y: auto;
    z-index: 99999;
    padding: 4px;
    animation: uadFadeIn .1s ease;
}
.user-action-dropdown.open { display: block; }
@keyframes uadFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.uad-item,
.user-action-dropdown a {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 7px 10px;
    border: none;
    background: transparent;
    border-radius: 7px;
    cursor: pointer;
    font-size: 13px;
    color: #374151;
    text-align: left;
    text-decoration: none;
    transition: background .1s;
    white-space: nowrap;
    box-sizing: border-box;
}
.uad-item:hover,
.user-action-dropdown a:hover { background: #f1f5f9; }
.uad-item-danger { color: #c62828; }
.uad-item-danger:hover { background: #fef2f2; }
.user-action-dropdown a.text-danger { color: #c62828; }
.user-action-dropdown a.text-danger:hover { background: #fef2f2; }
.user-action-dropdown a.text-success { color: #2e7d32; }
.user-action-dropdown a.text-success:hover { background: #f0fdf4; }

.uad-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
}

.uad-divider {
    height: 1px;
    background: #f0f4f8;
    margin: 3px 0;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state h5 {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
}

/* ===== LOGIN PAGE ===== */
.login-body {
    min-height: 100vh;
    background: var(--body-bg);
    overflow: hidden;
}

.login-container {
    display: flex;
    min-height: 100vh;
}

.login-left {
    flex: 1;
    background: linear-gradient(145deg, #0f1b2d 0%, #162236 40%, #1a3050 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    position: relative;
    overflow: hidden;
}

.login-left::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(25, 118, 210, 0.15), transparent 70%);
    top: -100px;
    right: -100px;
    border-radius: 50%;
}

.login-left::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(67, 160, 71, 0.12), transparent 70%);
    bottom: -80px;
    left: -80px;
    border-radius: 50%;
}

.login-brand {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    z-index: 1;
}

.login-logo-img-wrap {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.login-logo-img {
    width: 240px;
    height: auto;
    object-fit: contain;
}

.tagline {
    color: rgba(255,255,255,0.5);
    font-size: 14px;
    letter-spacing: 0.5px;
}

.login-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    color: rgba(255,255,255,0.8);
    font-size: 14px;
}

.feature-item i {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--blue-700), var(--green-700));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 15px;
    flex-shrink: 0;
}

.login-right {
    width: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: white;
}

.login-card {
    width: 100%;
    max-width: 380px;
}

.login-card-header {
    margin-bottom: 32px;
}

.login-card-header h3 {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.login-card-header p {
    color: var(--text-muted);
    font-size: 14px;
}

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

.form-group label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.forgot-link {
    font-weight: 500;
    color: var(--blue-700);
    text-decoration: none;
    font-size: 12px;
}

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

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon > i:first-child {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    font-size: 14px;
    z-index: 1;
}

.input-with-icon .form-control {
    padding-left: 40px;
    padding-right: 44px;
    height: 48px;
    border-radius: 12px;
    border: 1.5px solid var(--border-color);
    font-size: 14px;
    transition: var(--transition);
}

.input-with-icon .form-control:focus {
    border-color: var(--blue-700);
    box-shadow: 0 0 0 4px rgba(25, 118, 210, 0.1);
}

.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
    font-size: 14px;
}

.toggle-password:hover { color: var(--blue-700); }

.form-check-group {
    margin-bottom: 24px;
}

.form-check-input:checked {
    background-color: var(--blue-700);
    border-color: var(--blue-700);
}

.form-check-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.btn-login {
    width: 100%;
    height: 50px;
    background: linear-gradient(135deg, var(--blue-700), var(--blue-800));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(25, 118, 210, 0.35);
    letter-spacing: 0.2px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(25, 118, 210, 0.45);
}

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

.login-footer {
    margin-top: 32px;
    text-align: center;
}

.login-footer p {
    font-size: 12px;
    color: var(--text-muted);
}

/* ===== SIDEBAR COLLAPSED ===== */
.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed-width);
}

.sidebar-collapsed .sidebar .nav-section-label,
.sidebar-collapsed .sidebar li a span {
    display: none;
}

.sidebar-collapsed .sidebar .sidebar-logo-img {
    display: none;
}

.sidebar-collapsed .sidebar .sidebar-logo-collapsed {
    display: block;
}

.sidebar-collapsed .sidebar .brand-logo-link {
    justify-content: center;
}

.sidebar-collapsed .sidebar li a {
    justify-content: center;
    padding: 10px;
}

.sidebar-collapsed .sidebar li a i {
    width: auto;
}

.sidebar-collapsed .main-wrapper {
    margin-left: var(--sidebar-collapsed-width);
}

/* ===== KYC BADGES ===== */
.kyc-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.kyc-verified      { background: #e8f5e9; color: #2E7D32; }
.kyc-pending       { background: #fff8e1; color: #e65100; }
.kyc-rejected      { background: #fce4ec; color: #c62828; }
.kyc-not-submitted { background: #f3f4f6; color: #6b7280; }

/* ===== USER MODAL ===== */
.user-modal { border: none; border-radius: 16px; overflow: hidden; }

.user-modal-header {
    background: linear-gradient(135deg, #0f1b2d, #1a3050);
    padding: 20px 24px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-user-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.modal-avatar {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #1976D2, #43a047);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.modal-user-info h5 { color: white; font-size: 16px; }
.modal-user-info .text-muted { color: rgba(255,255,255,0.5) !important; }

/* KYC Banner */
.kyc-banner {
    background: #fff8e1;
    border-bottom: 1px solid #ffe082;
    padding: 12px 24px;
}

.kyc-banner-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.kyc-banner-inner > i { color: #e65100; font-size: 16px; }
.kyc-banner-inner > span { color: #5d4037; font-size: 13px; flex: 1; }

.kyc-banner-actions {
    display: flex;
    gap: 8px;
}

.btn-kyc-approve {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: linear-gradient(135deg, #2E7D32, #43a047);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(46,125,50,0.3);
    transition: all 0.2s;
}

.btn-kyc-approve:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(46,125,50,0.4); }

.btn-kyc-reject {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: linear-gradient(135deg, #c62828, #ef5350);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(198,40,40,0.3);
    transition: all 0.2s;
}

.btn-kyc-reject:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(198,40,40,0.4); }

/* User detail grid */
.user-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0;
}

@media (max-width: 768px) {
    .user-detail-grid { grid-template-columns: 1fr; }
}

.detail-section {
    padding: 20px 24px;
    border-right: 1px solid var(--border-color);
}

.detail-section:last-child { border-right: none; }

.detail-section-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.detail-section-title i { color: var(--blue-700); }

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 6px 0;
    border-bottom: 1px solid rgba(0,0,0,0.03);
    gap: 8px;
}

.detail-row span {
    font-size: 12px;
    color: var(--text-muted);
    flex-shrink: 0;
    min-width: 80px;
}

.detail-row strong {
    font-size: 12.5px;
    color: var(--text-primary);
    text-align: right;
    word-break: break-all;
}

/* KYC action buttons in table */
.action-btn-kyc-approve { background: #e8f5e9; color: #2E7D32; }
.action-btn-kyc-reject  { background: #fce4ec; color: #c62828; }
.action-btn-kyc-revoke  { background: #fff3e0; color: #e65100; }
.action-btn-docs        { background: #e3f2fd; color: #1565C0; }
.action-btn-kyc-approve:hover, .action-btn-kyc-reject:hover,
.action-btn-kyc-revoke:hover, .action-btn-docs:hover { filter: brightness(0.9); transform: scale(1.05); }

/* ---- KYC Banners ---- */
.kyc-banner-pending  { background: #fff8e1; border-bottom: 1px solid #ffe082; }
.kyc-banner-verified { background: #e8f5e9; border-bottom: 1px solid #a5d6a7; }
.kyc-banner-verified i { color: #2E7D32 !important; }
.kyc-banner-verified .kyc-banner-inner > span { color: #1b5e20; }
.kyc-banner-rejected { background: #fce4ec; border-bottom: 1px solid #f48fb1; }
.kyc-banner-rejected i { color: #c62828 !important; }
.kyc-banner-rejected .kyc-banner-inner > span { color: #880e4f; }

.btn-kyc-docs {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: linear-gradient(135deg, #1565C0, #1976D2);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(21,101,192,0.3);
    transition: all 0.2s;
}
.btn-kyc-docs:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(21,101,192,0.4); }

/* ---- Custom Account Picker ---- */
.acc-picker { position: relative; }
.acc-picker-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--border-radius-xs);
    background: #fff;
    padding: 9px 12px;
    cursor: pointer;
    transition: border-color 0.2s;
    min-height: 40px;
}
.acc-picker-trigger:focus-within { border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(33,150,243,0.1); }
.acc-picker-trigger input {
    border: none;
    outline: none;
    flex: 1;
    font-size: 13px;
    background: transparent;
    color: var(--text-primary);
    min-width: 0;
    cursor: pointer;
}
.acc-picker-trigger input::placeholder { color: var(--text-muted); }
.acc-picker-chevron { color: var(--text-muted); font-size: 11px; transition: transform 0.2s; flex-shrink: 0; }
.acc-picker-chevron.open { transform: rotate(180deg); }
.acc-picker-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1.5px solid var(--border-color);
    border-radius: var(--border-radius-xs);
    max-height: 200px;
    overflow-y: auto;
    z-index: 9999;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.acc-picker-dropdown.open { display: block; }
.acc-picker-item {
    padding: 10px 14px;
    font-size: 13px;
    cursor: pointer;
    color: var(--text-primary);
    border-bottom: 1px solid #f0f4f8;
    transition: background 0.12s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.acc-picker-item:last-child { border-bottom: none; }
.acc-picker-item:hover { background: var(--blue-50); color: var(--blue-700); }
.acc-picker-item.selected { background: var(--blue-50); color: var(--blue-700); font-weight: 600; }
.acc-picker-empty { padding: 14px; font-size: 12px; color: var(--text-muted); text-align: center; }

/* ---- Documents Modal ---- */
.docs-status-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--body-bg);
    border-radius: 10px;
}
.docs-status-label { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.docs-submitted-date { font-size: 12px; color: var(--text-muted); margin-left: auto; }

.doc-card {
    border: 1.5px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    background: white;
    transition: box-shadow 0.2s;
}
.doc-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.1); }

.doc-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--body-bg);
    border-bottom: 1px solid var(--border-color);
}

.doc-card-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #1976D2, #1565C0);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 17px;
    flex-shrink: 0;
}
.doc-card-icon-green { background: linear-gradient(135deg, #43a047, #2E7D32); }

.doc-card-type { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.doc-card-subtype { font-size: 12px; color: var(--text-muted); margin-top: 1px; }

.doc-card-body { padding: 16px; }

.doc-preview {
    position: relative;
    height: 110px;
    border-radius: 10px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.doc-preview-id {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 1.5px dashed #90caf9;
}
.doc-preview-addr {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border: 1.5px dashed #a5d6a7;
}

.doc-preview-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: #78909c;
}
.doc-preview-inner i { font-size: 28px; opacity: 0.5; }
.doc-preview-inner span { font-size: 12px; font-weight: 500; }

.doc-preview-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: white;
    color: #2E7D32;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
    display: flex;
    align-items: center;
    gap: 4px;
}

.doc-meta { display: flex; flex-direction: column; gap: 6px; }
.doc-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}
.doc-meta-row span { font-size: 11.5px; color: var(--text-muted); display: flex; align-items: center; gap: 5px; }
.doc-meta-row strong { font-size: 12px; color: var(--text-primary); font-family: 'Consolas', monospace; }

.doc-card-footer {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
    background: var(--body-bg);
}

.doc-btn-download, .doc-btn-view {
    flex: 1;
    padding: 7px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.2s;
}
.doc-btn-download { background: #e3f2fd; color: #1565C0; }
.doc-btn-download:hover { background: #1976D2; color: white; }
.doc-btn-view { background: #e8f5e9; color: #2E7D32; }
.doc-btn-view:hover { background: #43a047; color: white; }

/* ---- Edit Profile fields ---- */
.edit-field-group { margin-bottom: 18px; }
.edit-field-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 7px;
}
.edit-field-label i { color: var(--blue-700); width: 14px; text-align: center; }
.edit-field-input {
    border-radius: 10px !important;
    border: 1.5px solid var(--border-color) !important;
    font-size: 13.5px !important;
    height: auto !important;
    padding: 10px 14px !important;
    transition: all 0.2s !important;
}
.edit-field-input:focus {
    border-color: var(--blue-700) !important;
    box-shadow: 0 0 0 3px rgba(25,118,210,0.1) !important;
}

/* user avatar gradient */
.user-avatar-grad {
    background: linear-gradient(135deg, var(--blue-700), var(--green-700));
}

/* Delete modal icon */
.delete-icon-wrap {
    width: 56px;
    height: 56px;
    background: #fce4ec;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 16px auto 0;
    font-size: 22px;
    color: #c62828;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .login-left { display: none; }
    .login-right { width: 100%; }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    .main-wrapper {
        margin-left: 0;
    }
    .page-content {
        padding: 16px;
    }
    .stat-value {
        font-size: 26px;
    }
    .page-card-header {
        flex-wrap: wrap;
    }
    .page-card-actions {
        flex-wrap: wrap;
    }
    .search-box .form-control {
        width: 160px !important;
    }
}
