/* ===================================================
   SUSIEFIN - CLIENT DASHBOARD PREMIUM CSS
   Modern, Premium, Responsive Design with Bootstrap-like Grid
   Version: 3.0
   =================================================== */

/* ===== CSS VARIABLES ===== */
:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.4);
    --secondary: #8b5cf6;
    --secondary-light: #a78bfa;
    --accent-cyan: #06b6d4;
    --accent-pink: #ec4899;
    --accent-orange: #f97316;
    --success: #10b981;
    --success-light: #34d399;
    --warning: #f59e0b;
    --warning-light: #fbbf24;
    --danger: #ef4444;
    --danger-light: #f87171;
    --bg-dark: #0a0a0f;
    --bg-primary: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-card: rgba(26, 26, 46, 0.8);
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    --gradient-success: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    --gradient-danger: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    --gradient-warning: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
    --gradient-bg: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-primary) 50%, var(--bg-secondary) 100%);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gradient-bg);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 20% -20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 0%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* ===== BOOTSTRAP-LIKE GRID ===== */
.container { width: 100%; max-width: 1400px; margin: 0 auto; padding: 0 16px; }
.row { display: flex; flex-wrap: wrap; margin: 0 -12px; }
[class*="col-"] { padding: 0 12px; margin-bottom: 24px; }
.col-12 { flex: 0 0 100%; max-width: 100%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-4 { flex: 0 0 33.333%; max-width: 33.333%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }

@media (min-width: 576px) {
    .col-sm-6 { flex: 0 0 50%; max-width: 50%; }
    .col-sm-4 { flex: 0 0 33.333%; max-width: 33.333%; }
    .col-sm-3 { flex: 0 0 25%; max-width: 25%; }
}
@media (min-width: 768px) {
    .col-md-8 { flex: 0 0 66.666%; max-width: 66.666%; }
    .col-md-6 { flex: 0 0 50%; max-width: 50%; }
    .col-md-4 { flex: 0 0 33.333%; max-width: 33.333%; }
    .col-md-3 { flex: 0 0 25%; max-width: 25%; }
}
@media (min-width: 992px) {
    .col-lg-8 { flex: 0 0 66.666%; max-width: 66.666%; }
    .col-lg-6 { flex: 0 0 50%; max-width: 50%; }
    .col-lg-4 { flex: 0 0 33.333%; max-width: 33.333%; }
    .col-lg-3 { flex: 0 0 25%; max-width: 25%; }
}
@media (min-width: 1200px) {
    .col-xl-3 { flex: 0 0 25%; max-width: 25%; }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes countUp { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: scale(1); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== AUTH SCREENS ===== */
.auth-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
}
.auth-screen::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 600px; height: 600px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    filter: blur(80px);
    pointer-events: none;
    animation: pulse 4s ease-in-out infinite;
}
.auth-container { width: 100%; max-width: 440px; position: relative; z-index: 1; animation: fadeIn 0.6s ease-out; }
.auth-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    padding: 48px;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}
.auth-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--gradient-primary); }
.auth-header { text-align: center; margin-bottom: 32px; }
.auth-logo {
    width: 80px; height: 80px;
    margin: 0 auto 16px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    display: flex; align-items: center; justify-content: center;
    font-size: 2.5rem;
    box-shadow: var(--shadow-glow);
    animation: float 3s ease-in-out infinite;
}
.auth-header h1 { font-size: 1.75rem; font-weight: 700; margin-bottom: 8px; background: var(--gradient-primary); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.auth-header p { color: var(--text-secondary); font-size: 0.95rem; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 500; font-size: 0.9rem; color: var(--text-primary); }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition-normal);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
    background: rgba(255, 255, 255, 0.05);
}
.form-group input::placeholder { color: var(--text-muted); }
.form-hint { display: block; margin-top: 6px; font-size: 0.8rem; color: var(--text-muted); }
.code-input { text-align: center; font-size: 1.5rem !important; font-weight: 600; letter-spacing: 0.5rem; padding: 18px !important; }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 24px; border: none; border-radius: var(--radius-md);
    font-size: 0.95rem; font-weight: 600; font-family: inherit;
    cursor: pointer; transition: var(--transition-normal);
    text-decoration: none; white-space: nowrap;
}
.btn-primary { background: var(--gradient-primary); color: white; box-shadow: 0 4px 15px var(--primary-glow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px var(--primary-glow); }
.btn-outline { background: transparent; color: var(--text-primary); border: 1px solid var(--border-color); }
.btn-outline:hover { background: rgba(255, 255, 255, 0.05); border-color: var(--border-hover); }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-success { background: var(--gradient-success); color: white; }
.btn-danger { background: var(--gradient-danger); color: white; }

/* ===== DASHBOARD HEADER ===== */
.dashboard-header {
    background: rgba(15, 15, 26, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-content { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 12px; }
.logo-icon { width: 45px; height: 45px; display: flex; align-items: center; justify-content: center; }
.logo-icon img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.logo h1 { font-size: 1.25rem; font-weight: 700; background: var(--gradient-primary); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.user-menu { display: flex; align-items: center; gap: 20px; }
.user-info { display: flex; align-items: center; gap: 12px; }
.user-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--gradient-primary);
    display: flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 1rem; color: white; overflow: hidden;
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-name { font-weight: 500; color: var(--text-primary); }
@media (max-width: 576px) { .user-name { display: none; } .logo h1 { font-size: 1rem; } }

/* ===== DASHBOARD MAIN ===== */
.dashboard-main { padding: 32px 0; min-height: calc(100vh - 180px); }
.dashboard-screen { animation: fadeIn 0.5s ease-out; }

/* ===== WELCOME SECTION ===== */
.welcome-section { margin-bottom: 32px; animation: slideInUp 0.6s ease-out; }
.welcome-section h2 { font-size: 1.75rem; font-weight: 700; margin-bottom: 8px; }
.welcome-section p { color: var(--text-secondary); font-size: 1rem; }
@media (max-width: 576px) { .welcome-section h2 { font-size: 1.35rem; } }

/* ===== STAT CARDS ===== */
.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    transition: var(--transition-normal);
    height: 100%;
    animation: fadeIn 0.5s ease-out backwards;
}
.stat-card:hover { transform: translateY(-4px); border-color: var(--border-hover); box-shadow: var(--shadow-md); }
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.stat-card.income::before { background: var(--gradient-success); }
.stat-card.expense::before { background: var(--gradient-danger); }
.stat-card.balance::before { background: var(--gradient-primary); }
.stat-card.pending::before { background: var(--gradient-warning); }

.stat-card-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; }
.stat-card-icon {
    width: 48px; height: 48px; border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
}
.stat-card.income .stat-card-icon { background: rgba(16, 185, 129, 0.15); }
.stat-card.expense .stat-card-icon { background: rgba(239, 68, 68, 0.15); }
.stat-card.balance .stat-card-icon { background: rgba(99, 102, 241, 0.15); }
.stat-card.pending .stat-card-icon { background: rgba(245, 158, 11, 0.15); }

.stat-card-trend {
    display: flex; align-items: center; gap: 4px;
    font-size: 0.75rem; font-weight: 600; padding: 4px 10px; border-radius: var(--radius-full);
}
.stat-card-trend.up { color: var(--success); background: rgba(16, 185, 129, 0.1); }
.stat-card-trend.down { color: var(--danger); background: rgba(239, 68, 68, 0.1); }

.stat-card-title { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-card-value { font-size: 1.75rem; font-weight: 700; color: var(--text-primary); animation: countUp 0.5s ease-out; line-height: 1.2; }
.stat-card.income .stat-card-value { color: var(--success); }
.stat-card.expense .stat-card-value { color: var(--danger); }
.stat-card-subtitle { font-size: 0.75rem; color: var(--text-muted); margin-top: 8px; }

@media (max-width: 768px) { .stat-card-value { font-size: 1.5rem; } }

/* ===== CARDS ===== */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: var(--transition-normal);
    height: 100%;
}
.card:hover { border-color: var(--border-hover); }
.card-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px; border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap; gap: 12px;
}
.card-header h3 { font-size: 1.1rem; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.card-body { padding: 20px; }

/* ===== STATS CARDS ===== */
.stats-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: var(--transition-normal);
    height: 100%;
}
.stats-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.stats-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.stats-card-icon svg {
    width: 22px;
    height: 22px;
    stroke-width: 2;
}
.stats-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.stats-card-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.stats-card-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}
.stats-card-value.positive { color: var(--success); }
.stats-card-value.negative { color: var(--danger); }
.stats-card-value.neutral { color: var(--text-secondary); }
.stats-card-change {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--text-muted);
}
.stats-card-change.positive { color: var(--success); }
.stats-card-change.negative { color: var(--danger); }
.stats-card-change svg { width: 14px; height: 14px; }

/* Stats Card Variations */
.stats-card-balance .stats-card-icon { background: var(--gradient-primary); color: white; }
.stats-card-income .stats-card-icon { background: var(--gradient-success); color: white; }
.stats-card-expense .stats-card-icon { background: var(--gradient-danger); color: white; }
.stats-card-transactions .stats-card-icon { background: var(--gradient-warning); color: white; }

/* ===== CASHFLOW ===== */
.cashflow-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 576px) { .cashflow-grid { grid-template-columns: 1fr; } }

.cashflow-item {
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    padding: 20px;
    border: 1px solid var(--border-color);
}
.cashflow-item.income { border-left: 3px solid var(--success); }
.cashflow-item.expense { border-left: 3px solid var(--danger); }
.cashflow-item-header { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.cashflow-item-icon { font-size: 1.25rem; }
.cashflow-item-title { font-size: 0.85rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }
.cashflow-item-value { font-size: 1.5rem; font-weight: 700; }
.cashflow-item.income .cashflow-item-value { color: var(--success); }
.cashflow-item.expense .cashflow-item-value { color: var(--danger); }

.cashflow-details { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border-color); }
.cashflow-detail-item { display: flex; justify-content: space-between; padding: 6px 0; font-size: 0.85rem; }
.cashflow-detail-item span:first-child { color: var(--text-secondary); }

.balance-box {
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    padding: 28px;
    text-align: center;
    margin-top: 20px;
    position: relative;
    overflow: hidden;
}
.balance-box::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 50%);
    animation: pulse 4s ease-in-out infinite;
}
.balance-box-title { font-size: 0.9rem; opacity: 0.9; margin-bottom: 8px; position: relative; }
.balance-box-value { font-size: 2rem; font-weight: 800; position: relative; }
.balance-box.positive { background: var(--gradient-success); }
.balance-box.negative { background: var(--gradient-danger); }

/* ===== CHART CONTAINER ===== */
.chart-container {
    width: 100%;
    height: 280px;
    position: relative;
}
.chart-container canvas {
    max-width: 100%;
}

/* ===== MONTH SELECTOR ===== */
.month-selector {
    display: flex; gap: 8px; flex-wrap: wrap;
    margin-bottom: 20px; padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
}
.month-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
}
.month-btn:hover { background: rgba(255, 255, 255, 0.08); border-color: var(--border-hover); }
.month-btn.active { background: var(--gradient-primary); border-color: transparent; color: white; }
.selected-month-title { font-size: 1rem; font-weight: 600; color: var(--text-primary); margin-bottom: 20px; }

/* ===== FINANCE LIST ===== */
.finance-list, .list-container { display: flex; flex-direction: column; gap: 12px; }
.finance-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: var(--transition-fast);
    flex-wrap: wrap; gap: 12px;
}
.finance-item:hover { background: rgba(255, 255, 255, 0.04); border-color: var(--border-hover); }

.finance-item-left { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 200px; }
.finance-item-icon {
    width: 40px; height: 40px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem; flex-shrink: 0;
}
.finance-item.income .finance-item-icon { background: rgba(16, 185, 129, 0.15); }
.finance-item.expense .finance-item-icon { background: rgba(239, 68, 68, 0.15); }
.finance-item-info { flex: 1; }
.finance-item-name { font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.finance-item-details { font-size: 0.8rem; color: var(--text-muted); }

.finance-item-right { display: flex; align-items: center; gap: 16px; }
.finance-item-amount { font-weight: 700; font-size: 1.1rem; text-align: right; }
.finance-item.income .finance-item-amount { color: var(--success); }
.finance-item.expense .finance-item-amount { color: var(--danger); }

.finance-item-actions { display: flex; gap: 8px; }
.finance-item-actions button {
    padding: 6px 10px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 0.85rem;
}
.finance-item-actions button:hover { background: rgba(255, 255, 255, 0.05); border-color: var(--border-hover); }
.finance-item-actions button.delete:hover { background: rgba(239, 68, 68, 0.1); border-color: var(--danger); color: var(--danger); }

.status-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px; border-radius: var(--radius-full);
    font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
}
.status-badge.paid { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.status-badge.pending { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.status-badge.overdue { background: rgba(239, 68, 68, 0.15); color: var(--danger); }

/* ===== PROMPTS LIST ===== */
.prompts-list { display: flex; flex-direction: column; gap: 12px; max-height: 400px; overflow-y: auto; }
.prompt-item { background: rgba(255, 255, 255, 0.02); border-radius: var(--radius-md); padding: 16px; border: 1px solid var(--border-color); }
.prompt-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; flex-wrap: wrap; gap: 8px; }
.prompt-command { font-weight: 600; color: var(--primary-light); font-family: 'Fira Code', monospace; }
.prompt-date { font-size: 0.8rem; color: var(--text-muted); }
.prompt-body { font-size: 0.9rem; color: var(--text-secondary); }
.prompt-message, .prompt-response { margin-bottom: 4px; }
.prompt-status { font-size: 0.8rem; color: var(--text-muted); }

/* ===== EMPTY & ERROR STATES ===== */
.empty-state { text-align: center; padding: 48px 24px; color: var(--text-secondary); }
.empty-state-icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.5; }
.empty-state h4 { margin-bottom: 8px; color: var(--text-primary); }
.empty-state p { font-size: 0.9rem; color: var(--text-muted); }
.no-data { text-align: center; color: var(--text-muted); padding: 32px; }
.error-message { color: var(--danger); font-size: 0.9rem; margin-top: 16px; padding: 16px; background: rgba(239, 68, 68, 0.1); border-radius: var(--radius-md); display: none; }
.error-message.show { display: block; }

/* ===== FOOTER ===== */
.dashboard-footer { background: rgba(15, 15, 26, 0.95); border-top: 1px solid var(--border-color); padding: 24px 0; text-align: center; }
.dashboard-footer p { color: var(--text-muted); font-size: 0.85rem; }
.dashboard-footer a { color: var(--primary-light); text-decoration: none; }
.dashboard-footer a:hover { text-decoration: underline; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ===== LOADING ===== */
.loading { display: flex; align-items: center; justify-content: center; padding: 48px; }
.spinner { width: 40px; height: 40px; border: 3px solid var(--border-color); border-top-color: var(--primary); border-radius: 50%; animation: spin 1s linear infinite; }

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) { .container { padding: 0 12px; } }
@media (max-width: 576px) {
    .btn { padding: 10px 16px; font-size: 0.9rem; }
    .finance-item-amount { font-size: 1rem; }
    .stat-card { padding: 16px; }
    .card-body, .card-header { padding: 16px; }
}

/* ===== CATEGORY ITEMS (CASHFLOW) ===== */
.category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--border-color);
    transition: var(--transition-fast);
    margin-bottom: 8px;
}
.category-item:last-child { margin-bottom: 0; }
.category-item:hover { background: rgba(255, 255, 255, 0.04); }
.category-item.income { border-left-color: var(--success); }
.category-item.expense { border-left-color: var(--danger); }
.category-info { display: flex; flex-direction: column; gap: 2px; }
.category-name { font-weight: 500; color: var(--text-primary); font-size: 0.9rem; }
.category-count { font-size: 0.75rem; color: var(--text-muted); }
.category-amount { font-weight: 600; font-size: 0.95rem; }
.category-item.income .category-amount { color: var(--success); }
.category-item.expense .category-amount { color: var(--danger); }

/* ===== EMPTY STATE SMALL ===== */
.empty-state-small {
    text-align: center;
    padding: 24px 16px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ===== CASHFLOW CARDS ===== */
.cashflow-card { border-radius: var(--radius-lg); }
.cashflow-card.income-card .card-header h3 { color: var(--success-light); }
.cashflow-card.expense-card .card-header h3 { color: var(--danger-light); }
.cashflow-items { display: flex; flex-direction: column; gap: 8px; max-height: 280px; overflow-y: auto; }

/* Cashflow List Items */
.cashflow-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--border-color);
    transition: var(--transition-fast);
}

.cashflow-list-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.cashflow-list-item.income {
    border-left-color: var(--success);
}

.cashflow-list-item.expense {
    border-left-color: var(--danger);
}

.cashflow-list-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.cashflow-list-name {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cashflow-list-detail {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.cashflow-list-amount {
    font-weight: 600;
    font-size: 0.95rem;
    flex-shrink: 0;
    margin-left: 12px;
}

.cashflow-list-item.income .cashflow-list-amount {
    color: var(--success);
}

.cashflow-list-item.expense .cashflow-list-amount {
    color: var(--danger);
}

.cashflow-list-more {
    text-align: center;
    padding: 10px;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    margin-top: 8px;
}

/* ===== FINANCES CARD ===== */
.finances-card { height: 100%; }
.finances-list { display: flex; flex-direction: column; gap: 12px; max-height: 500px; overflow-y: auto; }

/* ===== CHART CARD ===== */
.card-chart .card-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.chart-legend { display: flex; gap: 16px; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--text-secondary); }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; }
.legend-income .legend-dot { background: var(--success); }
.legend-expense .legend-dot { background: var(--danger); }

/* ===== PROMPTS CARD ===== */
.prompts-card .card-body { padding: 16px; }

/* ===== FOOTER ENHANCED ===== */
.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}
.footer-links { display: flex; gap: 24px; }
.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition-fast);
}
.footer-links a:hover { color: var(--primary-light); }

@media (max-width: 576px) {
    .footer-content { justify-content: center; text-align: center; }
    .footer-links { justify-content: center; }
}

/* ===== WELCOME SECTION ENHANCED ===== */
.welcome-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding: 24px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 16px;
}
.welcome-text h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 4px;
}
.welcome-text p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}
.welcome-date {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: capitalize;
}

@media (max-width: 576px) {
    .welcome-section { padding: 16px; }
    .welcome-text h2 { font-size: 1.25rem; }
}

/* ===== STATS CARDS COMPACT FIX ===== */
@media (max-width: 768px) {
    .stats-card { padding: 16px; }
    .stats-card-value { font-size: 1.25rem; }
    .stats-card-icon { width: 40px; height: 40px; }
    .stats-card-icon svg { width: 18px; height: 18px; }
}

/* ===== FINANCE ITEM ACTION BUTTONS ===== */
.finance-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

.btn-edit {
    border-color: rgba(99, 102, 241, 0.3);
    color: var(--primary-light);
}

.btn-edit:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-delete {
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--danger-light);
}

.btn-delete:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: var(--danger);
    color: var(--danger);
}

/* ===== SWEETALERT2 CUSTOM THEME ===== */
.swal2-popup {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-xl) !important;
    color: var(--text-primary) !important;
    box-shadow: var(--shadow-lg) !important;
}

.swal2-popup::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-xl);
    background: radial-gradient(ellipse at top, rgba(99, 102, 241, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

.swal2-title {
    color: var(--text-primary) !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
}

.swal2-html-container {
    color: var(--text-secondary) !important;
    font-family: 'Inter', sans-serif !important;
}

.swal2-html-container label {
    color: var(--text-secondary) !important;
}

.swal2-input,
.swal2-select,
.swal2-textarea {
    background: var(--bg-dark) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-md) !important;
    color: var(--text-primary) !important;
    font-family: 'Inter', sans-serif !important;
    padding: 12px 16px !important;
    font-size: 0.95rem !important;
    transition: var(--transition-fast) !important;
    min-height: 3em !important;
}

.swal2-input:focus,
.swal2-select:focus,
.swal2-textarea:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important;
    outline: none !important;
}

.swal2-input::placeholder {
    color: var(--text-muted) !important;
}

.swal2-select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.swal2-confirm {
    background: var(--gradient-primary) !important;
    border: none !important;
    border-radius: var(--radius-md) !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
    padding: 12px 24px !important;
    font-size: 0.95rem !important;
    transition: var(--transition-fast) !important;
}

.swal2-confirm:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4) !important;
}

.swal2-confirm:focus {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3) !important;
}

.swal2-cancel {
    background: transparent !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-md) !important;
    color: var(--text-secondary) !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 500 !important;
    padding: 12px 24px !important;
    font-size: 0.95rem !important;
    transition: var(--transition-fast) !important;
}

.swal2-cancel:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: var(--border-hover) !important;
}

.swal2-deny {
    background: var(--gradient-danger) !important;
    border: none !important;
    border-radius: var(--radius-md) !important;
}

/* SweetAlert Delete Confirmation */
.swal2-icon.swal2-warning {
    border-color: var(--warning) !important;
    color: var(--warning) !important;
}

.swal2-icon.swal2-warning .swal2-icon-content {
    color: var(--warning) !important;
}

.swal2-icon.swal2-success {
    border-color: var(--success) !important;
    color: var(--success) !important;
}

.swal2-icon.swal2-success .swal2-success-ring {
    border-color: rgba(16, 185, 129, 0.3) !important;
}

.swal2-icon.swal2-success [class^='swal2-success-line'] {
    background-color: var(--success) !important;
}

.swal2-icon.swal2-error {
    border-color: var(--danger) !important;
}

.swal2-icon.swal2-error .swal2-x-mark-line-left,
.swal2-icon.swal2-error .swal2-x-mark-line-right {
    background-color: var(--danger) !important;
}

/* Loading spinner */
.swal2-loading .swal2-confirm {
    background: transparent !important;
}

.swal2-loader {
    border-color: var(--primary) transparent var(--primary) transparent !important;
}

/* Backdrop */
.swal2-backdrop-show {
    background: rgba(0, 0, 0, 0.75) !important;
    backdrop-filter: blur(4px) !important;
}

/* Recurrence checkbox styling in modal */
.swal2-html-container input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* Modal recurrence options box */
#recurrence-options {
    background: var(--bg-dark) !important;
    border-radius: var(--radius-md);
    padding: 12px !important;
}

/* ===== Z-INDEX FIXES FOR CASHFLOW CARDS ===== */
.row {
    position: relative;
}

.card-chart {
    position: relative;
    z-index: 1;
}

.cashflow-card {
    position: relative;
    z-index: 2;
}

.finances-card {
    position: relative;
    z-index: 3;
}

/* Fix nested rows inside col-lg-8 */
.col-lg-8 > .row {
    margin-top: 24px;
}

.col-lg-8 > .row > [class*="col-"] {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .col-lg-8 > .row > [class*="col-"] {
        margin-bottom: 24px;
    }
    .col-lg-8 > .row > [class*="col-"]:last-child {
        margin-bottom: 0;
    }
}

/* ===== FINANCE ITEM LAYOUT FIX ===== */
.finance-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: var(--transition-fast);
    flex-wrap: wrap;
}

.finance-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-hover);
}

.finance-info {
    flex: 1;
    min-width: 200px;
}

.finance-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}

.finance-details:last-child {
    margin-bottom: 0;
}

.finance-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.finance-details span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.finance-amount {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
    text-align: right;
    flex-shrink: 0;
}

/* Status toggle */
.status-toggle-container {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.status-toggle {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 22px;
}

.status-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: rgba(239, 68, 68, 0.3);
    border-radius: 22px;
    transition: var(--transition-fast);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: var(--transition-fast);
}

.status-toggle input:checked + .toggle-slider {
    background: var(--success);
}

.status-toggle input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

.status-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-label.paid {
    color: var(--success);
}

.status-label.pending {
    color: var(--warning);
}

/* Badge styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

@media (max-width: 576px) {
    .finance-item {
        flex-direction: column;
        align-items: stretch;
    }
    
    .finance-actions {
        justify-content: flex-end;
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid var(--border-color);
    }
    
    .finance-amount {
        text-align: left;
    }
    
    .btn-icon {
        padding: 10px 16px;
        flex: 1;
        justify-content: center;
    }
}

/* =====================================================
   SIDEBAR & TABS LAYOUT
   ===================================================== */

/* Dashboard Layout Container */
.dashboard-layout {
    display: flex;
    min-height: calc(100vh - 70px);
}

/* Header Adjustments */
.container-fluid {
    width: 100%;
    padding: 0 24px;
}

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

.sidebar-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 991px) {
    .sidebar-toggle {
        display: flex;
    }
}

/* Sidebar Styles */
.dashboard-sidebar {
    width: 260px;
    min-width: 260px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    transition: var(--transition-normal);
    position: sticky;
    top: 70px;
    height: calc(100vh - 70px);
    overflow-y: auto;
}

.sidebar-nav {
    flex: 1;
}

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

.sidebar-item {
    margin-bottom: 4px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    font-weight: 500;
    font-size: 0.95rem;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.sidebar-link svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.sidebar-item.active .sidebar-link {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.sidebar-item.active .sidebar-link svg {
    opacity: 1;
}

/* Sidebar Plan Badge */
.sidebar-plan-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-top: auto;
}

.plan-badge-icon {
    font-size: 1.5rem;
}

.plan-badge-info {
    display: flex;
    flex-direction: column;
}

.plan-badge-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.plan-badge-name {
    font-weight: 600;
    color: var(--primary-light);
}

/* Sidebar Overlay (Mobile) */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 199;
    backdrop-filter: blur(4px);
}

.sidebar-overlay.active {
    display: block;
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.tab-content.active {
    display: block;
}

.tab-header {
    margin-bottom: 32px;
    animation: slideInUp 0.4s ease-out;
}

.tab-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.tab-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Main Content Adjustments */
.dashboard-main {
    flex: 1;
    padding: 32px 0;
    min-height: calc(100vh - 180px);
    overflow-x: hidden;
}

/* Mobile Sidebar */
@media (max-width: 991px) {
    .dashboard-sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        height: 100vh;
        z-index: 200;
        padding-top: 80px;
    }
    
    .dashboard-sidebar.active {
        left: 0;
    }
    
    .dashboard-layout {
        flex-direction: column;
    }
}

/* =====================================================
   PROFILE TAB STYLES
   ===================================================== */

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

.form-actions {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.profile-card .card-body {
    padding: 32px;
}

.profile-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin: 0 auto 16px;
}

.profile-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.profile-since {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.profile-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.profile-stat {
    text-align: center;
}

.profile-stat .stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-light);
}

.profile-stat .stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.text-center {
    text-align: center;
}

/* =====================================================
   PLANS TAB STYLES
   ===================================================== */

.current-plan-info {
    text-align: center;
    padding: 20px 0;
}

.plan-icon-large {
    font-size: 3rem;
    margin-bottom: 16px;
}

.current-plan-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.current-plan-desc {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.plan-usage {
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.usage-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.usage-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 8px;
}

.usage-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
}

.usage-text {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Upgrade Card */
.upgrade-promo {
    text-align: center;
}

.promo-badge {
    display: inline-block;
    padding: 8px 20px;
    background: var(--gradient-primary);
    color: white;
    font-weight: 700;
    font-size: 1rem;
    border-radius: var(--radius-full);
    margin-bottom: 16px;
}

.upgrade-promo h4 {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.promo-features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
    text-align: left;
}

.promo-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    color: var(--text-secondary);
}

.promo-features .check-icon {
    color: var(--success);
    font-weight: 700;
}

.promo-price {
    margin-bottom: 20px;
}

.promo-price .price-currency {
    font-size: 1rem;
    color: var(--text-secondary);
    vertical-align: top;
}

.promo-price .price-amount {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
}

.promo-price .price-period {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Payment History */
.payment-history {
    min-height: 150px;
}

.payments-table {
    width: 100%;
    border-collapse: collapse;
}

.payments-table thead th {
    text-align: left;
    padding: 12px 16px;
    background: rgba(99, 102, 241, 0.1);
    border-bottom: 2px solid var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.payments-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-fast);
}

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

.payments-table tbody td {
    padding: 14px 16px;
    font-size: 0.95rem;
}

.payment-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.payment-status.status-pending {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.payment-status.status-paid {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.payment-status.status-failed {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.payment-status.status-expired {
    background: rgba(107, 114, 128, 0.15);
    color: #6b7280;
}

.payment-status.status-cancelled {
    background: rgba(107, 114, 128, 0.15);
    color: #6b7280;
}

.payment-status.status-refunded {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.payment-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
}

/* =====================================================
   CATEGORIES TAB STYLES
   ===================================================== */

.categories-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

.category-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-hover);
}

.category-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.category-info {
    flex: 1;
}

.category-name {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
}

.category-count {
    font-size: 0.85rem;
    color: var(--text-muted);
}

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

.category-chart-container {
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =====================================================
   SETTINGS TAB STYLES
   ===================================================== */

.settings-list {
    display: flex;
    flex-direction: column;
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.setting-info {
    flex: 1;
}

.setting-name {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.setting-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider-settings {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 26px;
    transition: var(--transition-fast);
}

.toggle-slider-settings::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: var(--transition-fast);
}

.toggle-switch input:checked + .toggle-slider-settings {
    background: var(--primary);
}

.toggle-switch input:checked + .toggle-slider-settings::before {
    transform: translateX(24px);
}

/* Settings Select */
.setting-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    cursor: pointer;
}

.setting-select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Danger Zone */
.danger-zone-card {
    border-color: rgba(239, 68, 68, 0.3);
}

.danger-zone-card .card-header h3 {
    color: var(--danger);
}

.danger-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.danger-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-md);
}

.danger-info {
    flex: 1;
}

.danger-name {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.danger-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
}

@media (max-width: 576px) {
    .danger-item {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .danger-item .btn {
        width: 100%;
    }
}

/* Welcome Section Update */
.welcome-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.welcome-date {
    color: var(--text-muted);
    font-size: 0.9rem;
}
