/* 
 * FinanceFlow Tracker - Custom Styling
 * Modern, Glassmorphism, Dark/Light Hybrid Aesthetic
 */

:root {
    --bg-main: #0f172a;
    --bg-card: #1e293b;
    --bg-card-hover: #26354a;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-blue: #6366f1;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --accent-amber: #f59e0b;
    --accent-purple: #8b5cf6;
    --border-color: rgba(255, 255, 255, 0.08);
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
}

/* Navbar */
.navbar-custom {
    background: rgba(30, 41, 59, 0.9);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
}

.navbar-brand {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff !important;
    letter-spacing: -0.5px;
}

.nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    padding: 0.6rem 1rem !important;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-link:hover, .nav-link.active {
    color: #fff !important;
    background: rgba(99, 102, 241, 0.15);
}

.nav-link.active {
    border-left: 3px solid var(--accent-blue);
}

/* Card Styling */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
    background: var(--bg-card-hover);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 16px;
}

.icon-income {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
}

.icon-expense {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-red);
}

.icon-balance {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-blue);
}

.icon-savings {
    background: rgba(139, 92, 246, 0.15);
    color: var(--accent-purple);
}

.icon-percentage {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-amber);
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Charts and Panels */
.panel-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.panel-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0;
}

/* Tables */
.table-custom {
    color: var(--text-primary);
    vertical-align: middle;
}

.table-custom th {
    background-color: rgba(15, 23, 42, 0.6);
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
    padding: 14px 16px;
}

.table-custom td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
}

.table-custom tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

/* Progress bar customization */
.progress {
    background-color: rgba(255, 255, 255, 0.08);
    height: 10px;
    border-radius: 6px;
    overflow: hidden;
}

.category-emoji {
    font-size: 1.25rem;
    margin-right: 8px;
    display: inline-block;
}

/* Buttons */
.btn-primary-custom {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border: none;
    color: #fff;
    font-weight: 600;
    border-radius: 10px;
    padding: 8px 18px;
    transition: all 0.2s ease;
}

.btn-primary-custom:hover {
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
    color: #fff;
    transform: translateY(-1px);
}

/* Modals */
.modal-content {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    color: var(--text-primary);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
}

.modal-footer {
    border-top: 1px solid var(--border-color);
}

.btn-close-white {
    filter: invert(1) grayscale(100%) brightness(200%);
}

.form-control, .form-select {
    background-color: #0f172a;
    border: 1px solid #334155;
    color: #f8fafc;
    border-radius: 10px;
}

.form-control:focus, .form-select:focus {
    background-color: #0f172a;
    border-color: #6366f1;
    color: #fff;
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
}

/* Badges */
.badge-income {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
}

.badge-expense {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
}
