/* Loan24 - Main Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@400;500;600;700&display=swap');

:root {
    --primary: #00897B;
    --primary-dark: #00695C;
    --primary-light: #E0F2F1;
    --accent: #FF5252;
    --bg: #F5F5F5;
    --white: #FFFFFF;
    --text: #212121;
    --text-light: #757575;
    --border: #E0E0E0;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
}

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

body {
    font-family: 'Hind Siliguri', sans-serif;
    background: var(--bg);
    color: var(--text);
    max-width: 420px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
    padding-bottom: 70px;
}

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

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

.header-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.4);
    background: white;
}

.header-icon-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.header-name { font-size: 15px; font-weight: 600; }
.header-balance {
    font-size: 12px;
    background: rgba(255,255,255,0.15);
    padding: 3px 10px;
    border-radius: 20px;
    margin-top: 2px;
    cursor: pointer;
}

.logout-btn {
    background: none;
    border: none;
    color: white;
    font-size: 22px;
    cursor: pointer;
    text-decoration: none;
}

/* Welcome Banner */
.welcome-banner {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 24px 20px 20px;
    text-align: center;
}

.welcome-banner h2 { font-size: 24px; font-weight: 700; margin-bottom: 6px; }
.welcome-banner p { font-size: 14px; opacity: 0.85; margin-bottom: 16px; }

.btn-apply {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    color: var(--primary);
    padding: 12px 28px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    transition: transform 0.2s;
}

.btn-apply:hover { transform: translateY(-2px); }

/* Quick Menu Grid */
.menu-section {
    background: white;
    margin: 12px;
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--shadow);
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: var(--text);
}

.menu-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 2px solid var(--primary-light);
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: transform 0.2s;
}

.menu-item:hover .menu-icon-wrap { transform: scale(1.1); }

.menu-icon-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.menu-label { font-size: 11px; font-weight: 500; text-align: center; }

/* Banner */
.promo-banner {
    margin: 0 12px 12px;
    border-radius: 16px;
    overflow: hidden;
    height: 130px;
    background: linear-gradient(135deg, #FF6B6B, #FF8E53);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-shadow: var(--shadow);
}

.promo-text { color: white; }
.promo-text h3 { font-size: 22px; font-weight: 700; line-height: 1.2; }
.promo-text p { font-size: 13px; opacity: 0.9; margin-top: 4px; }
.promo-badge {
    background: white;
    color: var(--accent);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

/* Partners */
.partners-section {
    background: white;
    margin: 0 12px 12px;
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--shadow);
    text-align: center;
}

.partners-section p { font-size: 13px; color: var(--text-light); margin-bottom: 10px; }
.partners-section h4 { color: var(--primary); font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.partners-logos { display: flex; justify-content: center; gap: 20px; align-items: center; }
.partner-logo {
    height: 35px;
    object-fit: contain;
    filter: grayscale(0.3);
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 420px;
    background: white;
    display: flex;
    border-top: 1px solid var(--border);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
    z-index: 100;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 0;
    text-decoration: none;
    color: var(--text-light);
    font-size: 11px;
    gap: 4px;
    transition: color 0.2s;
}

.nav-item.active { color: var(--primary); }
.nav-item img { width: 24px; height: 24px; object-fit: contain; }

/* Auth Pages */
.auth-page {
    min-height: 100vh;
    background: #ECEFF1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
}

.auth-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    border: 3px solid var(--primary);
    background: white;
}

.auth-logo-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin-bottom: 20px;
    border: 3px solid white;
    box-shadow: 0 4px 15px rgba(0,137,123,0.3);
    color: white;
    font-weight: 700;
    font-size: 14px;
}

.auth-card {
    background: white;
    border-radius: 20px;
    padding: 28px 24px;
    width: 100%;
    max-width: 360px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

.auth-card h2 { text-align: center; font-size: 20px; margin-bottom: 24px; color: var(--text); }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text); }

.input-wrap {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    background: #FAFAFA;
    padding: 0 12px;
    transition: border-color 0.2s;
}

.input-wrap:focus-within { border-color: var(--primary); background: white; }
.input-wrap .icon { color: var(--text-light); font-size: 16px; margin-right: 8px; }
.input-wrap input, .input-wrap select {
    flex: 1;
    border: none;
    background: none;
    padding: 13px 0;
    font-size: 14px;
    font-family: 'Hind Siliguri', sans-serif;
    color: var(--text);
    outline: none;
}

.input-wrap select { cursor: pointer; }
.toggle-pass { cursor: pointer; color: var(--text-light); font-size: 16px; }

.btn-primary {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Hind Siliguri', sans-serif;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}

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

.auth-link { text-align: center; margin-top: 16px; font-size: 13px; color: var(--text-light); }
.auth-link a { color: var(--primary); font-weight: 600; text-decoration: none; }

/* Sections */
.section { margin: 12px; }
.section-title { font-size: 16px; font-weight: 700; margin-bottom: 12px; color: var(--text); }

/* Loan Card */
.loan-card {
    background: white;
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 10px;
    box-shadow: var(--shadow);
}

.loan-card .amount { font-size: 22px; font-weight: 700; color: var(--primary); }
.loan-card .status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status.pending { background: #FFF9C4; color: #F57F17; }
.status.approved { background: #E8F5E9; color: #2E7D32; }
.status.rejected { background: #FFEBEE; color: #C62828; }
.status.paid { background: #E3F2FD; color: #1565C0; }

/* Transaction */
.transaction-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.tx-icon { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.tx-deposit { background: #E8F5E9; }
.tx-withdraw { background: #FFEBEE; }

/* Alerts */
.alert { padding: 12px 16px; border-radius: 10px; font-size: 14px; margin-bottom: 16px; }
.alert-error { background: #FFEBEE; color: #C62828; border-left: 4px solid #C62828; }
.alert-success { background: #E8F5E9; color: #2E7D32; border-left: 4px solid #2E7D32; }

/* Admin */
.admin-stat {
    background: white;
    border-radius: 14px;
    padding: 16px;
    text-align: center;
    box-shadow: var(--shadow);
}

.admin-stat .number { font-size: 28px; font-weight: 700; color: var(--primary); }
.admin-stat .label { font-size: 13px; color: var(--text-light); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { background: var(--primary); color: white; padding: 10px; text-align: left; }
td { padding: 10px; border-bottom: 1px solid var(--border); }
tr:hover { background: var(--primary-light); }

.btn-sm {
    padding: 5px 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 12px;
    font-family: 'Hind Siliguri', sans-serif;
}

.btn-approve { background: #E8F5E9; color: #2E7D32; }
.btn-reject { background: #FFEBEE; color: #C62828; }

/* === SVG Icon Fixes === */
.input-wrap .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    margin-right: 8px;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}
.input-wrap .icon svg { display: block; }
.toggle-pass {
    cursor: pointer;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}
.toggle-pass svg { display: block; }
.header-icon-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}
.auth-logo-placeholder {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 1px;
    color: white;
    text-align: center;
    padding: 14px 24px;
    border-radius: 14px;
    background: var(--primary);
    display: inline-block;
    margin-bottom: 20px;
}
.logout-btn {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}
.nav-item svg { display: block; }
.menu-icon-wrap svg { display: block; }
.btn-apply {
    text-decoration: none;
}
