@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #0a2540;
    --primary-light: #15467a;
    --accent: #c9a227;
    --accent-hover: #b8941f;
    --bg: #f6f8fb;
    --bg-card: #ffffff;
    --text-primary: #0a2540;
    --text-secondary: #4a5568;
    --text-muted: #8896ab;
    --border: #e2e8f0;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.08), 0 10px 10px -5px rgba(0,0,0,0.02);
    --radius: 12px;
    --radius-sm: 8px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ===== LANDING PAGE ===== */
.landing-page { min-height: 100vh; }

.landing-nav {
    background: rgba(10, 37, 64, 0.98);
    backdrop-filter: blur(10px);
    padding: 0 2rem;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.landing-nav .logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: 700;
}

.logo-icon-main {
    width: 40px; height: 40px;
    background: var(--accent);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}
.nav-links a:hover { color: white; }

.hero {
    background: linear-gradient(135deg, #0a2540 0%, #15467a 50%, #0a2540 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 4rem 4rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('../images/hero-bg.jpg') center/cover;
    opacity: 0.15;
}

.hero-content {
    max-width: 600px;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    color: white;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero h1 span {
    color: var(--accent);
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    color: rgba(255,255,255,0.85);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.hero-buttons { display: flex; gap: 1rem; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--accent);
    color: var(--primary);
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
}
.btn-outline:hover { background: rgba(255,255,255,0.1); border-color: white; }

.btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; }

.features-section {
    padding: 5rem 4rem;
    background: white;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}
.section-header h2 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.75rem;
}
.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    transition: all 0.3s;
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.feature-icon {
    width: 56px; height: 56px;
    background: rgba(201, 162, 39, 0.1);
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    color: var(--accent);
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--primary);
}
.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.trust-bar {
    background: var(--bg);
    padding: 3rem 4rem;
    text-align: center;
    border-top: 1px solid var(--border);
}
.trust-bar h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
}
.trust-icons {
    display: flex;
    justify-content: center;
    gap: 3rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.trust-icons i {
    display: block;
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    color: var(--primary-light);
}

/* ===== DASHBOARD ===== */
.dashboard { display: flex; min-height: 100vh; }

.sidebar {
    width: 280px;
    background: var(--primary);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar .logo {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.2rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-nav {
    padding: 1rem 0;
    flex: 1;
}

.sidebar-nav .nav-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1.5rem;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s;
    margin: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
}

.sidebar-nav .nav-item:hover,
.sidebar-nav .nav-item.active {
    background: rgba(201, 162, 39, 0.15);
    color: var(--accent);
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.user-avatar {
    width: 40px; height: 40px;
    background: var(--accent);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    color: var(--primary);
}

.user-name { font-weight: 600; font-size: 0.9rem; }
.user-role { font-size: 0.75rem; color: rgba(255,255,255,0.5); }

.main-content {
    margin-left: 280px;
    flex: 1;
    padding: 2rem;
    max-width: calc(100% - 280px);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}
.page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
}

.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-info { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }

.balance-section {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.balance-card {
    background: var(--primary);
    color: white;
    border-radius: var(--radius);
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.balance-card::before {
    content: '';
    position: absolute;
    top: -50%; right: -20%;
    width: 300px; height: 300px;
    background: rgba(201, 162, 39, 0.1);
    border-radius: 50%;
}

.balance-label {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    position: relative;
}

.balance-amount {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    position: relative;
}

.balance-details {
    display: flex;
    gap: 2rem;
    position: relative;
}

.balance-detail-label {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.balance-detail-value {
    font-weight: 600;
    font-size: 0.95rem;
    font-family: 'SF Mono', monospace;
}

.quick-actions {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.quick-actions h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary);
}

.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.action-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
}

.action-btn i { font-size: 1.25rem; color: var(--accent); }
.action-btn:hover i { color: white; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: all 0.2s;
}
.stat-card:hover { box-shadow: var(--shadow); }

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
}

.stat-icon.blue { background: #dbeafe; color: var(--info); }
.stat-icon.green { background: #d1fae5; color: var(--success); }
.stat-icon.gold { background: #fef3c7; color: #d97706; }
.stat-icon.red { background: #fee2e2; color: var(--danger); }

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

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

.table-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.table-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.table-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    display: flex; align-items: center; gap: 0.5rem;
}

.table-responsive { overflow-x: auto; }

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

th {
    text-align: left;
    padding: 1rem 1.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

tr:hover td { background: var(--bg); }

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success { background: #d1fae5; color: #065f46; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info { background: #dbeafe; color: #1e40af; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--bg-card);
    color: var(--text-primary);
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.1);
}

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

/* ===== ADMIN ===== */
.admin-page { min-height: 100vh; background: var(--bg); }

.admin-header {
    background: var(--primary);
    color: white;
    padding: 0 2rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.admin-nav {
    display: flex;
    gap: 0.25rem;
}

.admin-nav a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.admin-nav a:hover,
.admin-nav a.active {
    background: rgba(201, 162, 39, 0.2);
    color: var(--accent);
}

.admin-content { padding: 2rem; max-width: 1400px; margin: 0 auto; }

/* ===== LOGIN / REGISTER ===== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0a2540 0%, #15467a 100%);
    padding: 2rem;
}

.auth-card {
    background: white;
    border-radius: var(--radius);
    padding: 2.5rem;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-lg);
}

.auth-card .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.auth-card .subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

/* ===== LOAN CALCULATOR ===== */
.loan-calculator {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); }
    .main-content { margin-left: 0; max-width: 100%; }
    .balance-section { grid-template-columns: 1fr; }
    .hero { padding: 6rem 2rem 3rem; }
    .hero h1 { font-size: 2.5rem; }
    .features-section { padding: 3rem 1.5rem; }
}

@media (max-width: 640px) {
    .form-row { grid-template-columns: 1fr; }
    .hero-buttons { flex-direction: column; }
    .stats-grid { grid-template-columns: 1fr; }
    .action-buttons { grid-template-columns: 1fr; }
}
/* ===== LOGO INTEGRATION ===== */
.logo-img {
    height: 52px;
    width: auto;
    display: block;
}

.sidebar .logo-img {
    height: 44px;
    margin-right: 0.5rem;
}

.auth-logo-img {
    height: 72px;
    width: auto;
    margin-bottom: 1.5rem;
}

/* ===== HERO WITH BANNER IMAGE ===== */
.hero-banner {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: url('../images/hero-banner.png') center right / cover no-repeat;
    padding: 8rem 4rem 4rem;
    overflow: hidden;
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 60%;
    background: linear-gradient(90deg, rgba(10,37,64,0.95) 0%, rgba(10,37,64,0.85) 50%, transparent 100%);
    z-index: 1;
}

.hero-banner .hero-content {
    position: relative;
    z-index: 2;
    max-width: 550px;
}

.hero-banner h1 {
    font-size: 3.5rem;
    font-weight: 800;
    color: white;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-banner h1 span {
    color: var(--accent);
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.hero-banner p {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

/* ===== RESPONSIVE HERO ===== */
@media (max-width: 1024px) {
    .hero-banner { background-position: center; padding: 6rem 2rem 3rem; }
    .hero-banner::before { width: 100%; background: rgba(10,37,64,0.88); }
    .hero-banner h1 { font-size: 2.5rem; }
}

@media (max-width: 640px) {
    .hero-banner h1 { font-size: 2rem; }
    .hero-banner p { font-size: 1rem; }
}