/* vendors/dashboard.css - xPayZen Dashboard */

/* ===== IMPORTS & VARIABLES ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    /* Purple Gradients - SEMUA UNGU */
    --gradient-primary: linear-gradient(135deg, #6d28d9 0%, #7c3aed 50%, #8b5cf6 100%);
    --gradient-secondary: linear-gradient(135deg, #5b21b6 0%, #6d28d9 50%, #7c3aed 100%);
    --gradient-hero: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 50%, #c4b5fd 100%);
    --gradient-card: linear-gradient(145deg, #ffffff 0%, #faf5ff 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.8) 100%);
    --gradient-hover: linear-gradient(135deg, rgba(124, 58, 237, 0.12) 0%, rgba(139, 92, 246, 0.06) 100%);
    --gradient-sidebar: linear-gradient(180deg, #f5f3ff 0%, #ede9fe 100%);
    --gradient-btn-primary: linear-gradient(135deg, #6d28d9 0%, #7c3aed 50%, #8b5cf6 100%);
    --gradient-badge: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%);
    --gradient-purple-glow: radial-gradient(circle at 50% 0%, rgba(124, 58, 237, 0.08) 0%, transparent 70%);
    
    /* Background Colors */
    --bg-primary: #f8f7ff;
    --bg-secondary: #f0edff;
    --bg-card: #ffffff;
    --bg-input: #f5f3ff;
    --bg-hover: #ede9fe;
    
    /* Border Colors */
    --border-color: rgba(124, 58, 237, 0.2);
    --border-light: rgba(124, 58, 237, 0.08);
    --border-focus: #7c3aed;
    
    /* Text Colors */
    --text-primary: #1e1b4b;
    --text-secondary: #4c4a6b;
    --text-muted: #8b8aa7;
    --text-white: #ffffff;
    
    /* Purple Accent */
    --accent-purple: #7c3aed;
    --accent-purple-dark: #5b21b6;
    --accent-purple-light: #a78bfa;
    --accent-purple-dim: rgba(124, 58, 237, 0.1);
    --accent-purple-hover: rgba(124, 58, 237, 0.15);
    --accent-purple-strong: rgba(124, 58, 237, 0.2);
    
    /* Status Colors - TETAP MERAH UNTUK DANGER, KUNING UNTUK WARNING */
    --accent-success: #059669;
    --accent-success-dim: rgba(5, 150, 105, 0.1);
    --accent-danger: #dc2626;
    --accent-danger-dim: rgba(220, 38, 38, 0.1);
    --accent-warning: #d97706;
    --accent-warning-dim: rgba(217, 119, 6, 0.1);
    
    /* Shadows - SEMUA UNGU */
    --shadow-sm: 0 2px 8px rgba(124, 58, 237, 0.08);
    --shadow-md: 0 4px 24px rgba(124, 58, 237, 0.12);
    --shadow-lg: 0 8px 48px rgba(124, 58, 237, 0.15);
    --shadow-xl: 0 12px 64px rgba(124, 58, 237, 0.2);
    --shadow-glow: 0 0 60px rgba(124, 58, 237, 0.06);
    --shadow-purple: 0 4px 24px rgba(124, 58, 237, 0.15);
    
    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --sidebar-width: 260px;
}

/* ===== RESET ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    background-image: radial-gradient(circle at 50% 0%, rgba(0, 255, 136, 0.05) 0%, transparent 70%), var(--gradient-dark);
    background-attachment: fixed;
    overflow-x: hidden;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--gradient-primary); border-radius: 10px; }

::selection { background: var(--accent-green); color: #0b0f1a; }

/* ===== APP LAYOUT ===== */
.app { display: flex; min-height: 100vh; }

/* ===== SIDEBAR ===== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--gradient-sidebar);
    border-right: 1px solid var(--border-color);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    flex-shrink: 0;
    transition: var(--transition);
    z-index: 100;
    overflow-y: auto;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px 24px 8px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.brand-icon {
    font-size: 28px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: pulseGlow 2.5s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { filter: drop-shadow(0 0 10px rgba(0, 255, 136, 0.3)); }
    50% { filter: drop-shadow(0 0 30px rgba(0, 255, 136, 0.6)); }
}

.brand-name {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.brand-name span { -webkit-text-fill-color: #00ff88; }
.brand-sub { font-size: 10px; color: var(--text-muted); letter-spacing: 0.5px; font-weight: 600; text-transform: uppercase; }

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) scaleX(0);
    width: 3px;
    height: 24px;
    background: var(--gradient-primary);
    border-radius: 0 4px 4px 0;
    transition: var(--transition);
}

.nav-item:hover { background: var(--gradient-hover); color: var(--text-primary); }
.nav-item.active { background: var(--accent-green-dim); color: var(--accent-green); }
.nav-item.active::before { transform: translateY(-50%) scaleX(1); }

.nav-item .nav-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}
.nav-item .nav-text { flex: 1; }

.nav-item .nav-badge {
    background: var(--gradient-primary);
    color: #0b0f1a;
    font-size: 11px;
    padding: 1px 10px;
    border-radius: var(--radius-full);
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}

.sidebar-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
    margin-top: auto;
}

.wallet-status {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-secondary);
    padding: 4px 0 14px 0;
}

.wallet-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-red);
    transition: var(--transition);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.3);
}

.wallet-dot.connected {
    background: var(--accent-green);
    box-shadow: 0 0 16px rgba(0, 255, 136, 0.5);
    animation: dotPulse 1.5s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { box-shadow: 0 0 12px rgba(0, 255, 136, 0.4); }
    50% { box-shadow: 0 0 28px rgba(0, 255, 136, 0.8); }
}

.sidebar-wallet-btn {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--gradient-glass);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.sidebar-wallet-btn:hover {
    background: var(--gradient-hover);
    border-color: var(--accent-green);
    color: var(--accent-green);
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow);
}

.sidebar-wallet-btn.connected {
    border-color: var(--accent-green);
    color: var(--accent-green);
    background: var(--accent-green-dim);
}

/* ===== MAIN CONTENT ===== */
.main {
    flex: 1;
    padding: 24px 36px 36px 36px;
    min-height: 100vh;
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.main::before {
    content: '';
    position: fixed;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 70% 30%, rgba(0, 255, 136, 0.04) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.main > * { position: relative; z-index: 1; }

/* ===== TOPBAR ===== */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 20px;
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-sm), var(--shadow-glow);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.page-title {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    white-space: nowrap;
}

.page-title i {
    -webkit-text-fill-color: var(--accent-green);
}

.page-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    display: block;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Wallet Connect Button di Topbar */
.wallet-connect-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    background: var(--gradient-glass);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    white-space: nowrap;
}

.wallet-connect-btn:hover {
    background: var(--gradient-hover);
    border-color: var(--accent-green);
    color: var(--text-primary);
}

.wallet-connect-btn.connected {
    border-color: var(--accent-green);
    color: var(--accent-green);
    background: var(--accent-green-dim);
    gap: 6px;
}

.wallet-connect-btn.connected:hover {
    background: rgba(239, 68, 68, 0.12);
    border-color: var(--accent-red);
    color: var(--accent-red);
}

.wallet-connect-btn i {
    font-size: 14px;
}

.topbar-btn {
    width: 38px;
    height: 38px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: var(--gradient-glass);
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.topbar-btn:hover {
    background: var(--gradient-hover);
    border-color: var(--accent-green);
    color: var(--accent-green);
    transform: rotate(60deg);
}

/* ===== HAMBURGER BUTTON ===== */
.hamburger-btn {
    display: none;
    width: 38px;
    height: 38px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--gradient-glass);
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hamburger-btn:hover {
    background: var(--gradient-hover);
    border-color: var(--accent-green);
    color: var(--text-primary);
}

/* ===== LOADING STATE ===== */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    gap: 16px;
}

.loading-state .spinner {
    font-size: 48px;
    color: var(--accent-green);
}

.loading-state p {
    color: var(--text-secondary);
    font-size: 16px;
}

.hidden { display: none !important; }

/* ===== DASHBOARD MAIN ===== */
.dashboard-main {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== STATS GRID ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stats-grid.financial-stats {
    grid-template-columns: repeat(3, 1fr);
}

.stat-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: var(--transition);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition);
}

.stat-card:hover::before { opacity: 1; }
.stat-card:hover {
    border-color: rgba(0, 255, 136, 0.3);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

.stat-card.financial:hover {
    border-color: rgba(59, 130, 246, 0.3);
}

.stat-card-icon {
    font-size: 20px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-green-dim);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    color: var(--accent-green);
}

.stat-card.financial .stat-card-icon {
    background: rgba(59, 130, 246, 0.1);
}

.stat-card-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.stat-card-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-card-change {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.stat-card-change.positive { background: var(--accent-green-dim); color: var(--accent-green); }
.stat-card-change.neutral { background: rgba(107, 114, 128, 0.1); color: var(--text-muted); }
.stat-card-change i { font-size: 5px; margin-right: 4px; }

/* ===== DASHBOARD GRID ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* ===== CARDS ===== */
.card {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    backdrop-filter: blur(20px);
    transition: var(--transition);
}

.card:hover {
    border-color: rgba(0, 255, 136, 0.15);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 8px;
}

.card-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

.card-header h3 i {
    margin-right: 8px;
    color: var(--accent-green);
}

.card-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 10px;
    background: var(--accent-green-dim);
    color: var(--accent-green);
    border-radius: var(--radius-full);
}

.card-link {
    color: var(--text-muted);
    font-size: 12px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-link:hover {
    color: var(--accent-green);
}

.card-body {
    padding: 14px 18px;
    max-height: 350px;
    overflow-y: auto;
}

/* ===== ACTIVITY LIST ===== */
.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
}

.activity-item:last-child { border-bottom: none; }

.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 13px;
}

.activity-icon.created {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-blue);
}

.activity-icon.paid {
    background: var(--accent-green-dim);
    color: var(--accent-green);
}

.activity-icon.received {
    background: rgba(139, 92, 246, 0.15);
    color: var(--accent-purple);
}

.activity-info {
    flex: 1;
    min-width: 0;
}

.activity-info .activity-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.activity-info .activity-desc {
    font-size: 11px;
    color: var(--text-muted);
    word-break: break-all;
}

.activity-time {
    font-size: 10px;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ===== INVOICE/PAYMENT LIST ===== */
.invoice-item, .payment-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: var(--transition);
}

.invoice-item:hover, .payment-item:hover {
    background: var(--accent-green-dim);
    margin: 0 -18px;
    padding: 8px 18px;
    border-radius: var(--radius-sm);
}

.invoice-item:last-child, .payment-item:last-child { border-bottom: none; }

.invoice-icon, .payment-icon {
    font-size: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.invoice-icon.pending {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-yellow);
}

.invoice-icon.paid {
    background: var(--accent-green-dim);
    color: var(--accent-green);
}

.invoice-icon.expired {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-red);
}

.payment-icon {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-blue);
}

.invoice-info, .payment-info {
    flex: 1;
    min-width: 0;
}

.invoice-info .invoice-title, .payment-info .payment-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.invoice-info .invoice-sub, .payment-info .payment-sub {
    font-size: 11px;
    color: var(--text-muted);
}

.invoice-amount, .payment-amount {
    font-weight: 600;
    font-size: 13px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.invoice-status {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.invoice-status.pending {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-yellow);
}

.invoice-status.paid {
    background: var(--accent-green-dim);
    color: var(--accent-green);
}

.invoice-status.expired {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-red);
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 24px 16px;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 32px;
    color: var(--text-muted);
    margin-bottom: 6px;
    display: block;
}

.empty-state p {
    font-size: 13px;
    color: var(--text-muted);
}

/* ===== MODAL ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 16px;
}

.modal.hidden { display: none; }

.modal-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 28px 24px;
    max-width: 540px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUpModal 0.4s ease;
    box-shadow: var(--shadow-lg), var(--shadow-glow-strong);
}

@keyframes slideUpModal {
    from { opacity: 0; transform: translateY(20px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 700;
}

.modal-header h2 i {
    color: var(--accent-green);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition);
    padding: 4px;
}

.modal-close:hover { color: var(--text-primary); transform: rotate(90deg); }

.modal-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid var(--border-light);
    gap: 8px;
}

.modal-detail-row:last-child { border-bottom: none; }

.modal-detail-label {
    color: var(--text-muted);
    font-size: 12px;
    white-space: nowrap;
}

.modal-detail-value {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 12px;
    word-break: break-all;
    text-align: right;
}

.modal-detail-value.amount {
    font-size: 16px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ===== MODAL DISCONNECT ===== */
.modal-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid rgba(239, 68, 68, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px auto;
    font-size: 28px;
    color: var(--accent-red);
}

.modal-body h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.modal-body p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    line-height: 1.6;
}

.modal-body .modal-sub {
    font-size: 13px;
    color: var(--text-muted);
}

.modal-wallet-display {
    margin: 14px 0 0 0;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.modal-wallet-display .wallet-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

.modal-wallet-display .wallet-address {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-green);
    font-family: 'Courier New', monospace;
    letter-spacing: 0.3px;
}

.modal-wallet-display .wallet-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-green);
    box-shadow: 0 0 12px rgba(0, 255, 136, 0.4);
    flex-shrink: 0;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    padding-top: 16px;
    margin-top: 12px;
    border-top: 1px solid var(--border-light);
}

.modal-actions .btn-cancel {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    flex: 1;
    justify-content: center;
}

.modal-actions .btn-cancel:hover {
    background: var(--border-color);
    color: var(--text-primary);
    border-color: var(--text-muted);
    transform: translateY(-1px);
}

.modal-actions .btn-danger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.25);
    flex: 1;
    justify-content: center;
}

.modal-actions .btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(239, 68, 68, 0.35);
}

/* ===== TOAST ===== */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 20px;
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 3000;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(20px);
    animation: slideInToast 0.4s ease;
}

@keyframes slideInToast {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

.toast.hidden { display: none; }
.toast-icon { font-size: 18px; color: var(--accent-green); }
.toast-message { font-size: 14px; font-weight: 500; }

/* ========================================
   RESPONSIVE BREAKPOINTS
   ======================================== */

/* ===== LARGE DESKTOP (1200px+) ===== */
@media (min-width: 1200px) {
    .stats-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ===== DESKTOP (992px - 1199px) ===== */
@media (max-width: 1199px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid.financial-stats { grid-template-columns: repeat(3, 1fr); }
    .dashboard-grid { grid-template-columns: 1fr; }
    .main { padding: 20px 24px 28px 24px; }
}

/* ===== TABLET / SMALL DESKTOP (768px - 991px) ===== */
@media (max-width: 991px) {
    .sidebar {
        width: 72px;
        padding: 16px 8px;
    }
    .sidebar .brand-text,
    .sidebar .nav-text,
    .sidebar .nav-badge,
    .sidebar .wallet-label,
    .sidebar .sidebar-wallet-btn span {
        display: none;
    }
    .sidebar .nav-item { justify-content: center; padding: 12px; }
    .sidebar .nav-item .nav-icon { font-size: 20px; width: auto; }
    .sidebar .sidebar-wallet-btn { font-size: 18px; padding: 10px; justify-content: center; }
    .sidebar .wallet-status { justify-content: center; }
    .sidebar-brand { justify-content: center; padding: 0 0 16px 0; }
    .brand-icon { font-size: 28px; }
    .main { padding: 16px 20px 24px 20px; }
    .topbar { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 16px; }
    .topbar-right { justify-content: space-between; flex-wrap: wrap; }
    .page-title { font-size: 20px; }
}

/* ===== MOBILE LANDSCAPE (576px - 767px) ===== */
@media (max-width: 767px) {
    .sidebar { display: none; }
    .main { padding: 12px 14px 20px 14px; }

    .topbar {
        padding: 10px 14px;
        gap: 8px;
    }

    .page-title {
        font-size: 18px;
    }

    .page-subtitle {
        font-size: 11px;
    }

    .topbar-right {
        gap: 8px;
        width: 100%;
        justify-content: space-between;
    }

    .wallet-connect-btn {
        font-size: 11px;
        padding: 5px 12px;
        flex: 1;
        justify-content: center;
    }

    .topbar-btn {
        width: 34px;
        height: 34px;
        font-size: 14px;
    }

    .hamburger-btn {
        display: flex !important;
        width: 34px;
        height: 34px;
        font-size: 16px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .stats-grid.financial-stats {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 12px 14px;
        gap: 10px;
    }

    .stat-card-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .stat-card-value {
        font-size: 16px;
    }

    .stat-card-label {
        font-size: 9px;
    }

    .stat-card-change {
        font-size: 9px;
        padding: 1px 8px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .card-header {
        padding: 12px 14px;
    }

    .card-header h3 {
        font-size: 13px;
    }

    .card-body {
        padding: 12px 14px;
        max-height: 300px;
    }

    .activity-item {
        gap: 10px;
        padding: 6px 0;
    }

    .activity-icon {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .activity-info .activity-title {
        font-size: 12px;
    }

    .activity-info .activity-desc {
        font-size: 10px;
    }

    .activity-time {
        font-size: 9px;
    }

    .invoice-item, .payment-item {
        gap: 10px;
        padding: 6px 0;
    }

    .invoice-icon, .payment-icon {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    .invoice-info .invoice-title, .payment-info .payment-title {
        font-size: 12px;
    }

    .invoice-info .invoice-sub, .payment-info .payment-sub {
        font-size: 10px;
    }

    .invoice-amount, .payment-amount {
        font-size: 12px;
    }

    .invoice-status {
        font-size: 9px;
        padding: 1px 6px;
    }

    .modal-card {
        margin: 12px;
        padding: 20px;
    }

    .modal-actions {
        flex-direction: column;
    }

    .modal-actions .btn-cancel,
    .modal-actions .btn-danger {
        flex: none;
        width: 100%;
    }

    .toast {
        bottom: 16px;
        right: 16px;
        left: 16px;
        padding: 10px 16px;
    }
}

/* ===== MOBILE PORTRAIT (480px and below) ===== */
@media (max-width: 480px) {
    .main {
        padding: 8px 10px 16px 10px;
    }

    .topbar {
        padding: 8px 10px;
    }

    .page-title {
        font-size: 16px;
    }

    .page-subtitle {
        font-size: 10px;
        display: none;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    .stat-card {
        padding: 10px 10px;
        gap: 8px;
    }

    .stat-card-icon {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    .stat-card-value {
        font-size: 14px;
    }

    .stat-card-label {
        font-size: 8px;
    }

    .stat-card-change {
        font-size: 8px;
        padding: 1px 6px;
    }

    .dashboard-grid {
        gap: 10px;
    }

    .card-header {
        padding: 10px 12px;
    }

    .card-header h3 {
        font-size: 12px;
    }

    .card-body {
        padding: 10px 12px;
        max-height: 250px;
    }

    .activity-item {
        gap: 8px;
        flex-wrap: wrap;
    }

    .activity-time {
        width: 100%;
        padding-left: 40px;
    }

    .invoice-item, .payment-item {
        flex-wrap: wrap;
        gap: 8px;
    }

    .invoice-status {
        margin-left: 40px;
    }

    .empty-state {
        padding: 16px 12px;
    }

    .empty-state i {
        font-size: 24px;
    }

    .empty-state p {
        font-size: 12px;
    }

    .modal-card {
        padding: 16px 12px;
        margin: 8px;
    }

    .modal-header h2 {
        font-size: 16px;
    }

    .modal-detail-row {
        flex-direction: column;
        gap: 2px;
    }

    .modal-detail-value {
        text-align: left;
    }

    .modal-icon-wrapper {
        width: 48px;
        height: 48px;
        font-size: 22px;
    }

    .modal-body h3 {
        font-size: 16px;
    }

    .modal-body p {
        font-size: 13px;
    }

    .modal-wallet-display .wallet-address {
        font-size: 12px;
    }

    .modal-actions .btn-cancel,
    .modal-actions .btn-danger {
        font-size: 12px;
        padding: 6px 16px;
    }

    .toast {
        padding: 8px 14px;
        font-size: 13px;
        bottom: 12px;
        right: 12px;
        left: 12px;
    }

    .toast-message {
        font-size: 13px;
    }

    .loading-state .spinner {
        font-size: 36px;
    }

    .loading-state p {
        font-size: 14px;
    }
}

/* ===== EXTRA SMALL (360px and below) ===== */
@media (max-width: 360px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .wallet-connect-btn {
        font-size: 10px;
        padding: 4px 10px;
    }

    .topbar-btn {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }

    .hamburger-btn {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    .page-title {
        font-size: 14px;
    }

    .card-header h3 {
        font-size: 11px;
    }
}