:root {
    --primary: #0f172a;
    --primary-light: #1e293b;
    --secondary: #b59d5c;
    --accent: #3b82f6;
    --background: #f1f5f9;
    --surface: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --error: #ef4444;
    --success: #22c55e;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 12px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .nav-brand, .bank-symbol {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}

.hidden {
    display: none !important;
}

/* Glassmorphism Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 0% 0%, rgba(181, 157, 92, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 100% 100%, rgba(15, 23, 42, 0.05) 0%, transparent 50%);
    z-index: -1;
}

/* Auth Section */
#auth-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    background: var(--surface);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
    border: 1px solid var(--border);
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 24px 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border);
}

.divider span {
    padding: 0 10px;
}

.btn-google {
    background: white;
    color: var(--text);
    border: 1px solid var(--border);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.btn-google:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.logo-box {
    text-align: center;
    margin-bottom: 32px;
}

.bank-symbol {
    width: 64px;
    height: 64px;
    background: var(--primary);
    color: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    margin: 0 auto 16px;
    font-size: 1.2rem;
    letter-spacing: 2px;
    border: 2px solid var(--secondary);
}

.logo-box h1 {
    font-size: 1.5rem;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.logo-box p {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 3px;
    color: var(--secondary);
    font-weight: 700;
}

/* Navbar */
.navbar {
    background: var(--primary);
    color: white;
    padding: 16px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
}

.bank-symbol-small {
    background: var(--secondary);
    color: var(--primary);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.9rem;
}

/* Dashboard Header & Balance Card */
.content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 5%;
}

.dashboard-header {
    margin-bottom: 32px;
}

.balance-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 32px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.balance-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(181, 157, 92, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.card-label {
    display: block;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
}

.balance-card h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.account-info {
    display: flex;
    gap: 24px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

/* Grid & Cards */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.card {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.card-header h3 {
    font-size: 1.1rem;
    color: var(--primary);
}

/* Tables */
.table-container {
    overflow-x: auto;
}

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

th {
    background: #f8fafc;
    text-align: left;
    padding: 12px 24px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

td {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

tr:last-child td {
    border-bottom: none;
}

.amount-payment { color: var(--success); font-weight: 600; }
.amount-interest { color: var(--error); font-weight: 600; }

/* Forms & Buttons */
.input-group {
    margin-bottom: 16px;
}

label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-muted);
}

input, select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

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

.btn-primary {
    background: var(--primary);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: var(--primary-light);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--primary);
    width: 100%;
}

.btn-secondary:hover {
    filter: brightness(1.1);
}

.btn-outline-sm {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 6px 12px;
    font-size: 0.8rem;
}

.btn-outline-sm:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

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

/* Loading Overlay */
#loading-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--background);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border);
    border-top-color: var(--secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error-text {
    color: var(--error);
    font-size: 0.8rem;
    margin-top: 12px;
    text-align: center;
}
