/* assets/style.css */
:root {
    --bg-primary: #08111f;
    --bg-secondary: #0f172a;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #38bdf8;
    --primary-hover: #0ea5e9;
    --border: rgba(255, 255, 255, 0.1);
    --glass: rgba(255, 255, 255, 0.05);
}

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

body {
    font-family: 'Inter', sans-serif;
    background: radial-gradient(circle at top, rgba(56,189,248,0.15), transparent 40%), 
                linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
}

/* Auth Pages */
.auth-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-box {
    width: 100%;
    max-width: 400px;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 2.5rem;
    backdrop-filter: blur(20px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.brand-icon-wrapper {
    display: inline-flex;
    padding: 1rem;
    background: rgba(56, 189, 248, 0.1);
    border-radius: 16px;
    color: var(--primary);
    margin-bottom: 1rem;
}

.auth-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.5rem 1rem;
    transition: color 0.3s;
}

.tab-btn.active {
    color: var(--text-main);
    border-bottom: 2px solid var(--primary);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.form-group input {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    color: white;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-align: center;
}

.btn-primary {
    background: white;
    color: #0f172a;
}

.btn-primary:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}

.btn-block {
    width: 100%;
}

.alert {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.alert-error {
    background: rgba(248, 113, 113, 0.1);
    color: #f87171;
    border: 1px solid rgba(248, 113, 113, 0.2);
}

/* App Layout */
.app-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: rgba(15, 23, 42, 0.8);
    border-right: 1px solid var(--border);
    backdrop-filter: blur(20px);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 3rem;
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.2s;
}

.nav-links a:hover, .nav-links a.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-footer {
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    color: #f87171;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.2s;
}

.logout-btn:hover {
    background: rgba(248, 113, 113, 0.1);
}

.main-content {
    flex: 1;
    padding: 2rem 3rem;
    overflow-y: auto;
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--text-muted);
}

/* Dashboard Specifics */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card {
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.card-icon {
    padding: 1rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-info {
    display: flex;
    flex-direction: column;
}

.card-info .label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.card-info .amount {
    font-size: 1.5rem;
    font-weight: 700;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.box {
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
}

.box h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.breakdown-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.breakdown-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.breakdown-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.breakdown-item .name {
    flex: 1;
    font-weight: 500;
}

.empty-state {
    color: var(--text-muted);
    text-align: center;
    padding: 2rem;
    font-style: italic;
}

/* form grid */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.mobile-header {
    display: none;
}
.sidebar-overlay {
    display: none;
}

/* Responsive Design (Mobile) */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    
    .mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem 1.5rem;
        background: rgba(15, 23, 42, 0.95);
        border-bottom: 1px solid var(--border);
        position: sticky;
        top: 0;
        z-index: 999;
        backdrop-filter: blur(10px);
    }
    
    .mobile-header .brand {
        margin-bottom: 0;
    }
    
    .menu-toggle {
        background: none;
        border: none;
        color: var(--text-main);
        cursor: pointer;
        padding: 0.5rem;
    }
    
    .sidebar {
        position: fixed;
        top: 0;
        left: -300px;
        width: 280px;
        height: 100vh;
        z-index: 1001;
        transition: left 0.3s ease;
        flex-direction: column;
        padding: 2rem 1.5rem;
        border-right: 1px solid var(--border);
        border-top: none;
        background: rgba(15, 23, 42, 0.98);
    }
    
    .sidebar.open {
        left: 0;
    }
    
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1000;
        backdrop-filter: blur(3px);
    }
    
    .sidebar-overlay.open {
        display: block;
    }
    
    .main-content {
        padding: 1.5rem 1rem;
    }
    
    .dashboard-grid, .form-grid {
        grid-template-columns: 1fr !important;
    }
    
    .summary-cards {
        grid-template-columns: 1fr;
    }
    
    .auth-box {
        padding: 1.5rem;
    }
    
    .page-header h1 {
        font-size: 1.75rem;
    }
}
