@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Devanagari:wght@400;500;600;700;800&family=Poppins:wght@400;500;600;700&display=swap');

:root {
    --saffron: #FF7722;
    --saffron-dark: #E4590F;
    --saffron-light: #FFF1E6;
    --maroon: #8B1E1E;
    --navy: #0F2A4A;
    --green: #128C4B;
    --bg: #FDF8F3;
    --card: #FFFFFF;
    --text: #23272B;
    --text-muted: #6B7280;
    --border: #EADFD3;
    --shadow: 0 8px 24px rgba(139, 30, 30, 0.08);
    --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Noto Sans Devanagari', 'Poppins', sans-serif;
    line-height: 1.5;
}

body {
    background-image:
        radial-gradient(circle at 10% 0%, rgba(255, 119, 34, 0.10), transparent 40%),
        radial-gradient(circle at 90% 10%, rgba(15, 42, 74, 0.08), transparent 40%);
    min-height: 100vh;
}

img { max-width: 100%; }

.top-strip {
    height: 6px;
    background: linear-gradient(90deg, var(--saffron) 0 33%, #FFFFFF 33% 66%, var(--green) 66% 100%);
}

.site-header {
    background: linear-gradient(135deg, var(--navy), #16375F 60%, var(--maroon));
    color: #fff;
    padding: 28px 20px 34px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.site-header::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 0%, rgba(255,119,34,0.25), transparent 55%);
    pointer-events: none;
}

.site-header .emblem {
    font-size: 34px;
    display: inline-block;
    margin-bottom: 6px;
}

.site-header h1 {
    margin: 0;
    font-size: clamp(20px, 4vw, 30px);
    font-weight: 800;
    letter-spacing: 0.3px;
}

.site-header p {
    margin: 6px 0 0;
    color: #F3D9C4;
    font-size: 14px;
    font-weight: 500;
}

.lang-switch {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 3;
    display: flex;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 999px;
    padding: 3px;
    gap: 2px;
}
.lang-switch .lang-btn {
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
    color: #fff;
    opacity: 0.75;
}
.lang-switch .lang-btn.active {
    background: #fff;
    color: var(--navy);
    opacity: 1;
}

.wrap {
    max-width: 720px;
    margin: -22px auto 40px;
    padding: 0 16px;
    position: relative;
    z-index: 2;
}

.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    padding: 26px 22px;
    margin-bottom: 20px;
}

.card + .card { margin-top: 20px; }

.intro-card {
    border-top: 5px solid var(--saffron);
}

.intro-card h2 {
    margin: 0 0 8px;
    font-size: 19px;
    color: var(--navy);
}

.intro-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 14.5px;
}

.required-note {
    color: var(--maroon);
    font-size: 13px;
    margin-top: 10px;
}

.field {
    margin-bottom: 20px;
}

.field label {
    display: block;
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 8px;
    color: var(--text);
}

.field label .req { color: var(--maroon); margin-left: 3px; }

.field input[type="text"],
.field input[type="tel"],
.field select,
.field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    background: #FFFDFB;
    color: var(--text);
    transition: border-color .15s, box-shadow .15s;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--saffron);
    box-shadow: 0 0 0 3px rgba(255,119,34,0.15);
}

.field textarea { resize: vertical; min-height: 90px; }

.field .hint { font-size: 12.5px; color: var(--text-muted); margin-top: 6px; }
.field .error-msg {
    display: none;
    color: var(--maroon);
    font-size: 13px;
    margin-top: 6px;
    font-weight: 600;
}
.field.has-error input,
.field.has-error select,
.field.has-error textarea {
    border-color: var(--maroon);
}
.field.has-error .error-msg { display: block; }

select:disabled { background: #F3F1EE; color: #9CA3AF; cursor: not-allowed; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: 10px;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    transition: transform .1s ease, box-shadow .15s ease, opacity .15s;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
    background: linear-gradient(135deg, var(--saffron), var(--saffron-dark));
    color: #fff;
    width: 100%;
    box-shadow: 0 6px 16px rgba(228, 89, 15, 0.35);
}
.btn-primary:hover { box-shadow: 0 8px 20px rgba(228, 89, 15, 0.45); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; box-shadow: none; }

.btn-outline {
    background: #fff;
    border: 1.5px solid var(--border);
    color: var(--text);
}

.btn-secondary {
    background: var(--navy);
    color: #fff;
}

.payment-apps {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 16px 0;
}

@media (max-width: 420px) {
    .payment-apps { grid-template-columns: 1fr; }
}

.pay-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px;
    border-radius: 12px;
    border: 1.5px solid var(--border);
    background: #fff;
    font-weight: 700;
    font-size: 14.5px;
    cursor: pointer;
    text-decoration: none;
    color: var(--text);
    transition: border-color .15s, box-shadow .15s;
}
.pay-btn:hover { border-color: var(--saffron); box-shadow: 0 4px 12px rgba(255,119,34,0.18); }
.pay-btn .icon {
    width: 34px; height: 34px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; font-weight: 800; color: #fff; flex-shrink: 0;
}
.icon-phonepe { background: #5F259F; }
.icon-gpay { background: #1A73E8; }
.icon-paytm { background: #00BAF2; }
.icon-upi { background: var(--green); }

.amount-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--saffron-light);
    color: var(--saffron-dark);
    font-weight: 800;
    font-size: 22px;
    padding: 10px 18px;
    border-radius: 12px;
    margin: 4px 0 18px;
}

.qr-box {
    text-align: center;
    margin: 18px 0;
    padding: 16px;
    background: var(--saffron-light);
    border-radius: 12px;
    border: 1px dashed var(--saffron);
}
.qr-box img { border-radius: 8px; background: #fff; padding: 8px; }
.qr-box p { margin: 10px 0 0; font-size: 13px; color: var(--text-muted); }

.divider-or {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 13px;
    margin: 18px 0;
}
.divider-or::before, .divider-or::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.status-pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 700;
}
.status-pending { background: #FFF3CD; color: #92650C; }
.status-paid { background: #DCFCE7; color: #14652E; }

.pay-verify-form { margin: 0; }
.pay-verify {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    white-space: nowrap;
}
.pay-verify input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--green);
}

.success-icon {
    width: 64px; height: 64px; border-radius: 50%;
    background: var(--green); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 32px; margin: 0 auto 14px;
}

.site-footer {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 12.5px;
}

/* ===================== Admin ===================== */
.admin-body { background: #F3F4F6; }

.admin-topbar {
    background: linear-gradient(135deg, var(--navy), #16375F);
    color: #fff;
    padding: 14px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}
.admin-topbar .brand { font-weight: 800; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.admin-topbar a.logout { color: #FFD9BE; text-decoration: none; font-weight: 600; font-size: 13.5px; }
.admin-topbar a.logout:hover { text-decoration: underline; }

.admin-wrap { max-width: 1400px; margin: 0 auto; padding: 20px; }

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}
.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 16px 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-left: 4px solid var(--saffron);
}
.stat-card .num { font-size: 24px; font-weight: 800; color: var(--navy); }
.stat-card .lbl { font-size: 12.5px; color: var(--text-muted); font-weight: 600; margin-top: 2px; }

.filter-bar {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}
.filter-bar .f-group { display: flex; flex-direction: column; gap: 5px; }
.filter-bar label { font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .3px; }
.filter-bar input, .filter-bar select {
    padding: 9px 10px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 13.5px;
    font-family: inherit;
    min-width: 140px;
}
.filter-bar .search-group { flex: 1 1 220px; }
.filter-bar .search-group input { width: 100%; }
.filter-bar .actions { display: flex; gap: 8px; margin-left: auto; }
.filter-bar .btn { padding: 9px 16px; font-size: 13.5px; width: auto; }

.table-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    overflow: hidden;
}
.table-scroll { overflow-x: auto; }

table.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    min-width: 1100px;
}
table.data-table th, table.data-table td {
    padding: 11px 12px;
    text-align: left;
    border-bottom: 1px solid #EFEFEF;
    white-space: nowrap;
}
table.data-table th {
    background: #FAFAFA;
    font-weight: 700;
    color: var(--navy);
    position: sticky;
    top: 0;
    z-index: 1;
}
table.data-table th a { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 4px; }
table.data-table th a:hover { color: var(--saffron-dark); }
table.data-table tbody tr:hover { background: #FFF8F2; }
table.data-table td.addr-cell { white-space: normal; max-width: 220px; }

.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 16px;
    border-top: 1px solid #EFEFEF;
    font-size: 13px;
    color: var(--text-muted);
}
.pagination-bar .pages { display: flex; gap: 6px; flex-wrap: wrap; }
.pagination-bar .pages a, .pagination-bar .pages span {
    padding: 6px 11px;
    border-radius: 6px;
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
}
.pagination-bar .pages a:hover { border-color: var(--saffron); color: var(--saffron-dark); }
.pagination-bar .pages .current { background: var(--saffron); color: #fff; border-color: var(--saffron); }

.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.login-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px 28px;
    width: 100%;
    max-width: 380px;
    border-top: 5px solid var(--saffron);
}
.login-card h1 { text-align: center; font-size: 20px; margin: 0 0 22px; color: var(--navy); }
.alert {
    padding: 11px 14px;
    border-radius: 8px;
    font-size: 13.5px;
    margin-bottom: 16px;
    font-weight: 600;
}
.alert-error { background: #FDECEC; color: #A32020; }
.alert-success { background: #DCFCE7; color: #14652E; }

.empty-state { text-align: center; padding: 50px 20px; color: var(--text-muted); }
