:root {
    --sidebar-width: 220px;
    --sidebar-bg: #0f172a;
    --sidebar-text: #94a3b8;
    --sidebar-active: #6366f1;
    --sidebar-hover: #1e293b;
    --header-height: 56px;
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --bg: #f1f5f9;
    --card-bg: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --radius: 10px;
    --shadow: 0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,.08), 0 2px 4px -1px rgba(0,0,0,.05);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); font-size: 0.875rem; line-height: 1.5; }

/* WRAPPER */
.wrapper { display: flex; min-height: 100vh; }

/* SIDEBAR */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 1000;
    overflow-y: auto;
    transition: transform 0.3s ease;
}
.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-thumb { background: #334155; border-radius: 4px; }

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px 12px;
    border-bottom: 1px solid #1e293b;
}
.brand-icon {
    width: 30px; height: 30px;
    background: var(--primary);
    border-radius: 7px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 13px;
    flex-shrink: 0;
}
.brand-name { color: white; font-weight: 700; font-size: 14px; }

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid #1e293b;
}
.sidebar-avatar {
    width: 34px; height: 34px;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 700; font-size: 13px;
    flex-shrink: 0;
}
.sidebar-username { color: white; font-weight: 600; font-size: 13px; display: block; }
.sidebar-badge {
    font-size: 9px;
    padding: 1px 7px;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-admin { background: rgba(99,102,241,.2); color: #818cf8; }
.badge-user { background: rgba(16,185,129,.2); color: #34d399; }

.sidebar-nav { padding: 8px 10px; flex: 1; }
.nav-section-title {
    color: #475569;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 6px 8px 3px;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 7px;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    margin-bottom: 1px;
    position: relative;
}
.nav-item:hover { background: var(--sidebar-hover); color: white; }
.nav-item.active { background: var(--primary); color: white; }
.nav-item i { font-size: 15px; min-width: 18px; }
.nav-item span:first-of-type { flex: 1; }
.nav-badge {
    font-size: 10px;
    background: rgba(255,255,255,.15);
    padding: 1px 6px;
    border-radius: 20px;
    color: inherit;
}
/* Operator role badges (table/list) */
.badge-mobile-op { background:#0ea5e9; color:#fff; font-size:10px; padding:3px 7px; border-radius:20px; font-weight:600; }
.badge-dob-op    { background:#8b5cf6; color:#fff; font-size:10px; padding:3px 7px; border-radius:20px; font-weight:600; }
/* Sidebar user badge variants for operators */
.badge-mobile-op-sb { background:#0284c7; color:#e0f2fe; font-size:9px; padding:2px 7px; border-radius:20px; font-weight:700; letter-spacing:.3px; }
.badge-dob-op-sb    { background:#7c3aed; color:#ede9fe; font-size:9px; padding:2px 7px; border-radius:20px; font-weight:700; letter-spacing:.3px; }

.text-danger-nav { color: #f87171 !important; }
.text-danger-nav:hover { background: rgba(239,68,68,.1) !important; color: #ef4444 !important; }

/* Sidebar Submenu */
.nav-submenu-wrap { margin-bottom: 1px; }
.nav-submenu-toggle { cursor: pointer; }
.nav-submenu-toggle .nav-arrow {
    font-size: 11px !important;
    min-width: unset !important;
    margin-left: auto;
    transition: transform 0.2s;
}
.nav-submenu-toggle[aria-expanded="true"] .nav-arrow { transform: rotate(180deg); }
.nav-submenu-toggle.active-parent { color: #a5b4fc; background: rgba(99,102,241,.12); }
.nav-submenu {
    padding-left: 8px;
    margin-bottom: 2px;
    border-left: 2px solid rgba(99,102,241,.3);
    margin-left: 18px;
}
.nav-sub-item {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 10px;
    border-radius: 6px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.15s;
    margin-bottom: 1px;
}
.nav-sub-item i { font-size: 13px; }
.nav-sub-item:hover { background: rgba(255,255,255,.07); color: #e2e8f0; }
.nav-sub-item.sub-active { background: rgba(99,102,241,.2); color: #a5b4fc; font-weight: 600; }

.sidebar-footer {
    padding: 10px 16px;
    border-top: 1px solid #1e293b;
    color: #475569;
    font-size: 10px;
}

/* MAIN CONTENT */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

/* HEADER */
.top-header {
    height: var(--header-height);
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: var(--shadow);
}
.header-left { display: flex; align-items: center; gap: 12px; }
.sidebar-toggle {
    background: none; border: none;
    width: 32px; height: 32px;
    border-radius: 7px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; color: var(--text-muted);
    cursor: pointer; transition: all 0.2s;
}
.sidebar-toggle:hover { background: var(--bg); color: var(--text); }
.page-title h5 { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 1px; }
.breadcrumb { font-size: 11px; margin-bottom: 0 !important; }
.breadcrumb-item a { color: var(--primary); text-decoration: none; }
.breadcrumb-item.active { color: var(--text-muted); }

.header-right { display: flex; align-items: center; gap: 6px; }
.header-wallet {
    display: flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 1px solid #bbf7d0;
    padding: 4px 11px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: #15803d;
}
.btn-icon {
    background: none; border: none;
    width: 34px; height: 34px;
    border-radius: 7px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}
.btn-icon:hover { background: var(--bg); color: var(--text); }
.badge-dot {
    position: absolute;
    top: 3px; right: 3px;
    width: 14px; height: 14px;
    background: var(--danger);
    color: white; font-size: 8px; font-weight: 700;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid white;
}
.user-dropdown-btn {
    display: flex; align-items: center; gap: 7px;
    background: none; border: none;
    padding: 5px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}
.user-dropdown-btn:hover { background: var(--bg); }
.user-avatar-sm {
    width: 28px; height: 28px;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    border-radius: 7px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 700; font-size: 11px;
}
.user-name-sm { display: block; font-size: 12px; font-weight: 600; color: var(--text); line-height: 1.2; }
.user-role-sm { display: block; font-size: 10px; color: var(--text-muted); }

/* NOTIFICATION DROPDOWN */
.notification-dropdown { width: 300px; }
.dropdown-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}
.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
    cursor: pointer;
}
.notification-item:hover { background: var(--bg); }
.notification-item.unread { background: #eff6ff; }
.notif-icon {
    width: 28px; height: 28px;
    background: #dbeafe; border-radius: 7px;
    display: flex; align-items: center; justify-content: center;
    color: var(--info); font-size: 12px; flex-shrink: 0;
}

/* CONTENT */
.content-area { padding: 18px; flex: 1; }

/* CARDS */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border);
    padding: 12px 16px;
}
.card-body { padding: 16px; }
.card-footer { background: transparent; border-top: 1px solid var(--border); padding: 10px 16px; }

/* STAT CARDS */
.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow);
    transition: all 0.2s;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.stat-icon {
    width: 44px; height: 44px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.stat-icon.indigo { background: #eef2ff; color: var(--primary); }
.stat-icon.green { background: #f0fdf4; color: var(--success); }
.stat-icon.red { background: #fef2f2; color: var(--danger); }
.stat-icon.yellow { background: #fffbeb; color: var(--warning); }
.stat-icon.blue { background: #eff6ff; color: var(--info); }
.stat-value { font-size: 20px; font-weight: 700; color: var(--text); line-height: 1.2; }
.stat-label { font-size: 12px; color: var(--text-muted); margin-bottom: 1px; }
.stat-change { font-size: 11px; font-weight: 500; }
.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* WALLET CARD */
.wallet-card {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border-radius: 12px;
    padding: 20px;
    color: white;
    position: relative;
    overflow: hidden;
}
.wallet-card::before {
    content: '';
    position: absolute;
    top: -20px; right: -20px;
    width: 110px; height: 110px;
    background: rgba(255,255,255,.08);
    border-radius: 50%;
}
.wallet-card::after {
    content: '';
    position: absolute;
    bottom: -30px; right: 60px;
    width: 90px; height: 90px;
    background: rgba(255,255,255,.05);
    border-radius: 50%;
}
.wallet-balance-main { font-size: 28px; font-weight: 800; letter-spacing: -0.5px; }
.wallet-label { font-size: 11px; opacity: .75; margin-bottom: 2px; }

/* TABLES */
.table { margin: 0; font-size: 13px; }
.table thead th {
    background: #f8fafc;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
    padding: 10px 14px;
}
.table td { padding: 11px 14px; vertical-align: middle; border-bottom: 1px solid var(--border); }
.table tbody tr:hover { background: #f8fafc; }
.table tbody tr:last-child td { border-bottom: none; }

/* BADGES */
.badge { font-weight: 500; font-size: 10px; padding: 3px 8px; border-radius: 20px; }
.badge-credit { background: #f0fdf4; color: #16a34a; }
.badge-debit { background: #fef2f2; color: #dc2626; }
.badge-admin { background: #eef2ff; color: #4f46e5; }
.badge-user { background: #f0fdf4; color: #16a34a; }
.badge-active { background: #f0fdf4; color: #16a34a; }
.badge-inactive { background: #fef2f2; color: #dc2626; }
.badge-completed { background: #f0fdf4; color: #16a34a; }
.badge-pending { background: #fffbeb; color: #d97706; }

/* FORMS */
.form-label { font-size: 12px; font-weight: 500; color: var(--text); margin-bottom: 5px; }
.form-control, .form-select {
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 8px 12px;
    font-size: 13px;
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,.12);
    outline: none;
}
.input-group-text {
    border: 1px solid var(--border);
    background: var(--bg);
    font-size: 13px;
    padding: 8px 12px;
}

/* BUTTONS */
.btn { border-radius: 7px; font-weight: 500; font-size: 13px; padding: 7px 14px; }
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-sm { padding: 4px 10px; font-size: 11px; border-radius: 6px; }

/* AVATAR */
.avatar-circle {
    width: 34px; height: 34px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 12px; color: white;
}

/* ALERTS */
.alert { border-radius: 8px; border: none; font-size: 13px; padding: 10px 14px; }
.alert-success { background: #f0fdf4; color: #15803d; }
.alert-danger { background: #fef2f2; color: #dc2626; }
.alert-warning { background: #fffbeb; color: #d97706; }
.alert-info { background: #eff6ff; color: #1d4ed8; }

/* AUTH PAGES */
.auth-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
}
.auth-card {
    background: white;
    border-radius: 16px;
    padding: 32px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
}
.auth-logo {
    width: 46px; height: 46px;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 20px; margin-bottom: 18px;
}
.auth-title { font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.auth-sub { color: var(--text-muted); font-size: 13px; margin-bottom: 22px; }

/* TRANSACTIONS LIST */
.txn-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid var(--border);
}
.txn-item:last-child { border-bottom: none; }
.txn-icon {
    width: 34px; height: 34px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; flex-shrink: 0;
}
.txn-icon.credit { background: #f0fdf4; color: var(--success); }
.txn-icon.debit { background: #fef2f2; color: var(--danger); }
.txn-amount { font-weight: 700; font-size: 13px; }
.txn-amount.credit { color: var(--success); }
.txn-amount.debit { color: var(--danger); }

/* RESPONSIVE */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.show { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .header-wallet { display: none; }
    .content-area { padding: 12px; }
}

/* EMPTY STATE */
.empty-state { padding: 36px; text-align: center; color: var(--text-muted); }
.empty-state i { font-size: 38px; opacity: .3; margin-bottom: 10px; display: block; }
.empty-state p { font-size: 13px; }

/* SECTION TITLE */
.section-title { font-size: 14px; font-weight: 700; color: var(--text); }
.section-sub { font-size: 12px; color: var(--text-muted); }

/* PROGRESS */
.progress { height: 5px; border-radius: 4px; background: var(--bg); }
.progress-bar { border-radius: 4px; }

/* WELCOME TEXT */
h4.fw-bold { font-size: 18px; }

/* ROW GAPS */
.row.g-3 { --bs-gutter-x: 0.75rem; --bs-gutter-y: 0.75rem; }
.row.g-4 { --bs-gutter-x: 1rem; --bs-gutter-y: 1rem; }
.mb-4 { margin-bottom: 1rem !important; }

.avatar-colors-0 { background: #6366f1; }
.avatar-colors-1 { background: #10b981; }
.avatar-colors-2 { background: #f59e0b; }
.avatar-colors-3 { background: #ef4444; }
.avatar-colors-4 { background: #3b82f6; }
.avatar-colors-5 { background: #8b5cf6; }

/* DROPDOWN */
.dropdown-menu { font-size: 13px; border: 1px solid var(--border); box-shadow: var(--shadow-md); border-radius: 10px; }
.dropdown-item { padding: 7px 14px; font-size: 13px; }
.dropdown-item:hover { background: var(--bg); }

/* ============ INFO STRIP (marquee + pending ticker below topbar) ============ */
.info-strip { background:#fff; border-bottom:1px solid var(--border); }
.info-row { display:flex; align-items:center; gap:10px; padding:7px 18px; font-size:12.5px; border-bottom:1px solid #f1f5f9; min-height:36px; overflow:hidden; }
.info-row:last-child { border-bottom:none; }
.info-strip .info-icon { width:26px; height:26px; display:inline-flex; align-items:center; justify-content:center; border-radius:6px; background:#eef2ff; color:#4f46e5; font-size:13px; flex-shrink:0; }
.info-strip .pending-icon { background:#fef3c7; color:#b45309; }
.info-strip .info-label { font-weight:700; color:#374151; font-size:11px; text-transform:uppercase; letter-spacing:.4px; flex-shrink:0; min-width:90px; }
.info-strip .info-text { flex:1; color:#1f2937; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-weight:500; }
.info-strip .info-count { font-size:11px; font-weight:700; color:#b45309; background:#fef3c7; padding:2px 8px; border-radius:10px; flex-shrink:0; }
.info-strip .marquee-row { background:linear-gradient(90deg,#eef2ff 0%,#ffffff 60%); }
.info-strip .pending-row  { background:linear-gradient(90deg,#fffbeb 0%,#ffffff 60%); }
.info-strip .upcoming-row { background:linear-gradient(90deg,#ecfdf5 0%,#ffffff 60%); }
.info-strip .upcoming-icon { color:#059669; }
/* Combined row: My Pending (left) + Next in Queue (right) on the same line */
.info-strip .combo-row {
    display:flex; align-items:stretch; gap:0; padding:0;
    background:linear-gradient(90deg,#fffbeb 0%,#ffffff 50%,#ecfdf5 100%);
}
.info-strip .combo-seg {
    flex:1 1 0; min-width:0;
    display:flex; align-items:center; gap:10px;
    padding:6px 14px;
    overflow:hidden;
}
.info-strip .combo-seg .info-text { min-width:0; }
.info-strip .combo-divider {
    width:1px; background:linear-gradient(180deg, transparent, #d1d5db 25%, #d1d5db 75%, transparent);
    flex-shrink:0; margin:4px 0;
}
@media (max-width: 780px) {
    .info-strip .combo-row { flex-direction:column; }
    .info-strip .combo-divider { width:100%; height:1px; margin:0; background:linear-gradient(90deg, transparent, #d1d5db, transparent); }
}
.info-strip .live-dot { display:inline-block; width:8px; height:8px; border-radius:50%; background:#10b981; margin-left:8px; box-shadow:0 0 0 0 rgba(16,185,129,.7); animation: live-pulse 1.6s ease-out infinite; flex-shrink:0; }
@keyframes live-pulse { 0% { box-shadow:0 0 0 0 rgba(16,185,129,.55);} 70%{ box-shadow:0 0 0 8px rgba(16,185,129,0);} 100%{ box-shadow:0 0 0 0 rgba(16,185,129,0);} }
.info-strip .type-caret { display:inline-block; margin-left:2px; color:#4f46e5; font-weight:700; animation: blink-caret 1s steps(1) infinite; }
@keyframes blink-caret { 50% { opacity:0; } }
.info-strip .pn-name { color:#7c3aed; font-weight:700; }
.info-strip .pn-type { color:#4f46e5; font-weight:700; }
.info-strip .pn-id   { color:#1f2937; font-weight:600; }
.info-strip .pn-fee  { color:#b91c1c; font-weight:700; }
.info-strip .pn-time { color:#16a34a; font-weight:600; }
.info-strip .pn-pos  { color:#94a3b8; font-size:11px; }
.info-strip .pn-sep  { color:#cbd5e1; }
@media (max-width: 768px) {
    .info-row { padding:6px 12px; font-size:11.5px; }
    .info-strip .info-label { display:none; }
}
