/* ============================================================
   IHM Aurangabad — Fee Payment Portal
   Brand: navy #253A7D, gold accents, Montserrat
   ============================================================ */

:root {
    --navy: #253A7D;
    --navy-dark: #1b2c60;
    --gold: #c9a94e;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e5e7eb;
    --bg: #f6f8fc;
    --green: #15803d;
    --red: #dc2626;
    --amber: #d97706;
    --blue: #2563eb;
}

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

body {
    font-family: 'Montserrat', 'Inter', Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.main-content { flex: 1; }

/* ── Header ───────────────────────────────────────────────── */
.header {
    background: #ffffff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.logo-main img { height: 58px; width: auto; display: block; }

.nav-menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 2px;
}
.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 500;
    color: #000;
    text-decoration: none;
    border-radius: 12px;
    transition: background .2s, color .2s;
    white-space: nowrap;
}
.nav-link:hover, .nav-link.active { background: var(--navy); color: #fff; }
.nav-link.nav-pay { background: var(--navy); color: #fff; font-weight: 600; }
.nav-link.nav-pay:hover { background: var(--navy-dark); }

/* Dropdowns */
.dropdown { position: relative; }
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 230px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    list-style: none;
    padding: 8px 0;
    z-index: 1001;
}
.dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu li a {
    display: block;
    padding: 10px 16px;
    font-size: 13.5px;
    color: var(--text);
    text-decoration: none;
}
.dropdown-menu li a:hover { background: var(--navy); color: #fff; }

/* Mobile toggle */
.mobile-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; }
.mobile-toggle span { width: 26px; height: 3px; background: var(--navy); border-radius: 2px; }

@media (max-width: 992px) {
    .header-container { flex-wrap: wrap; }
    .mobile-toggle { display: flex; }
    .main-nav { width: 100%; }
    .nav-menu {
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 10px 0;
    }
    .nav-menu.active { display: flex; }
    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        border-left: 3px solid var(--navy);
        border-radius: 0;
        margin-left: 16px;
    }
}

/* ── Page banner ──────────────────────────────────────────── */
.page-banner {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
    color: #fff;
    padding: 44px 0;
}
.page-banner h1 { font-size: 28px; font-weight: 700; }
.page-banner p { margin-top: 8px; font-size: 14px; color: rgba(255,255,255,.85); max-width: 640px; }

/* ── Cards / forms ────────────────────────────────────────── */
.card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.card-accent { border-top: 4px solid var(--navy); }
.card-header { padding: 20px 24px 0; }
.card-header h2, .card-header h3 { font-size: 19px; color: var(--navy-dark); }
.card-header p { margin-top: 6px; font-size: 13px; color: var(--muted); }
.card-body { padding: 20px 24px 24px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }

.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.form-group input, .form-group select {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
}
.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(37, 58, 125, .12);
}
.field-error { color: var(--red); font-size: 12px; margin-top: 4px; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border: none;
    border-radius: 8px;
    font-size: 14.5px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: background .2s;
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-dark); }
.btn-outline { background: #fff; color: var(--navy); border: 1px solid var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-success { background: var(--green); color: #fff; }
.btn-danger { background: var(--red); color: #fff; }
.btn-sm { padding: 7px 12px; font-size: 12.5px; }
.btn:disabled { opacity: .6; cursor: not-allowed; }

.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 18px auto;
    padding: 13px 18px;
    border-radius: 8px;
    font-size: 14px;
    max-width: 1160px;
}
.alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }

/* ── Payment page layout ──────────────────────────────────── */
.payment-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 28px;
    padding: 36px 0 48px;
}
@media (max-width: 992px) { .payment-layout { grid-template-columns: 1fr; } }

.side-list { list-style: none; font-size: 13.5px; color: var(--muted); }
.side-list li { padding: 6px 0 6px 18px; position: relative; }
.side-list li::before { content: '\2022'; color: var(--navy); position: absolute; left: 0; font-weight: 700; }

.secure-note { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); }

/* ── Response page ────────────────────────────────────────── */
.status-icon { font-size: 64px; margin-bottom: 14px; }
.status-icon.success { color: var(--green); }
.status-icon.failed { color: var(--red); }
.status-icon.pending { color: var(--amber); }
.detail-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.detail-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); }
.detail-table td:first-child { color: var(--muted); width: 45%; }
.detail-table td:last-child { font-weight: 600; text-align: right; }
.detail-table tr:last-child td { border-bottom: none; }

/* ── Footer ───────────────────────────────────────────────── */
.footer { background: var(--navy-dark); color: #fff; margin-top: auto; }
.footer-main { padding: 44px 0 30px; }
.footer-content { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 768px) { .footer-content { grid-template-columns: 1fr; } }
.footer-logos img { height: 62px; background: #fff; border-radius: 8px; padding: 4px; }
.footer-tagline { margin-top: 14px; font-size: 13px; color: rgba(255,255,255,.75); max-width: 380px; line-height: 1.6; }
.footer-contact .address, .footer-contact .phone, .footer-contact .email {
    display: flex; gap: 10px; font-size: 13.5px; color: rgba(255,255,255,.85); margin-bottom: 12px; line-height: 1.6;
}
.footer-contact i { margin-top: 3px; color: var(--gold); }
.footer-contact a { color: rgba(255,255,255,.85); text-decoration: none; }
.footer-contact a:hover { color: #fff; }
.social-links { display: flex; gap: 10px; margin-top: 16px; }
.social-links a {
    width: 36px; height: 36px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.12);
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    transition: background .2s;
}
.social-links a:hover { background: var(--navy); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); padding: 18px 0; }
.footer-bottom-links { display: flex; flex-wrap: wrap; gap: 6px 20px; justify-content: center; margin-bottom: 10px; }
.footer-bottom-links a { color: rgba(255,255,255,.8); font-size: 12.5px; text-decoration: none; }
.footer-bottom-links a:hover { color: #fff; }
.copyright { text-align: center; font-size: 12px; color: rgba(255,255,255,.65); }
.copyright a { color: rgba(255,255,255,.85); text-decoration: none; }

/* Scroll to top */
.scroll-top {
    position: fixed; bottom: 26px; right: 26px;
    width: 42px; height: 42px;
    border: none; border-radius: 50%;
    background: var(--navy); color: #fff;
    cursor: pointer; display: none;
    box-shadow: 0 4px 14px rgba(0,0,0,.25);
    z-index: 900;
}
.scroll-top.visible { display: inline-flex; align-items: center; justify-content: center; }

/* ── Admin panel ──────────────────────────────────────────── */
.admin-body { background: #eef1f7; }
.admin-login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--navy), var(--navy-dark)); padding: 20px; }
.admin-login-card { width: 100%; max-width: 380px; text-align: center; }
.admin-login-card img { height: 56px; margin-bottom: 10px; }

.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 230px; flex-shrink: 0;
    background: var(--navy-dark); color: #fff;
    display: flex; flex-direction: column;
    position: sticky; top: 0; height: 100vh;
}
.admin-sidebar .brand { padding: 18px; border-bottom: 1px solid rgba(255,255,255,.12); }
.admin-sidebar .brand img { height: 40px; background: #fff; border-radius: 6px; padding: 2px; }
.admin-sidebar .brand span { display: block; margin-top: 8px; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,.6); }
.admin-nav { flex: 1; padding: 14px 10px; }
.admin-nav a {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 14px; margin-bottom: 4px;
    border-radius: 8px;
    color: rgba(255,255,255,.75);
    text-decoration: none; font-size: 13.5px; font-weight: 500;
}
.admin-nav a:hover, .admin-nav a.active { background: rgba(255,255,255,.12); color: #fff; }
.admin-sidebar .side-footer { padding: 12px 10px; border-top: 1px solid rgba(255,255,255,.12); }
.admin-main { flex: 1; padding: 28px; min-width: 0; }
.admin-main h1 { font-size: 22px; color: var(--navy-dark); margin-bottom: 20px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 26px; }
.stat-card { background: #fff; border-radius: 10px; padding: 18px; border: 1px solid var(--border); }
.stat-card .label { font-size: 12px; color: var(--muted); }
.stat-card .value { font-size: 22px; font-weight: 700; margin-top: 6px; color: var(--navy-dark); }

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; background: #fff; }
table.data th {
    text-align: left; padding: 12px 14px;
    color: var(--muted); font-weight: 600; font-size: 12px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
table.data td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.data tr:last-child td { border-bottom: none; }
table.data tr:hover td { background: #f8fafc; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11.5px; font-weight: 600; }
.badge-paid { background: #dcfce7; color: #166534; }
.badge-failed { background: #fee2e2; color: #991b1b; }
.badge-created { background: #f1f5f9; color: #475569; }
.badge-attempted { background: #fef3c7; color: #92400e; }
.badge-refunded { background: #dbeafe; color: #1e40af; }
.badge-test { background: #fef3c7; color: #92400e; font-size: 10px; margin-left: 4px; }

.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.filters input, .filters select {
    padding: 9px 12px; border: 1px solid #d1d5db; border-radius: 8px;
    font-size: 13.5px; font-family: inherit; background: #fff;
}
.pagination { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 16px; font-size: 13px; color: var(--muted); }

@media (max-width: 860px) {
    .admin-shell { flex-direction: column; }
    .admin-sidebar { width: 100%; height: auto; position: static; }
    .admin-nav { display: flex; flex-wrap: wrap; }
}

/* ── Print: output ONLY the receipt, never the website header/footer ──────── */
@media print {
    /* @page margin 0 removes the browser's own printed URL / date / page title */
    @page { size: A4; margin: 0; }
    html, body { background: #fff !important; }
    header, footer, nav,
    .site-header, .site-footer, .topbar, .page-banner,
    .scroll-top, .admin-sidebar, .flash, .alert { display: none !important; }
    body * { visibility: hidden; }
    .print-area, .print-area * { visibility: visible; }
    .print-area {
        position: absolute; top: 0; left: 0; width: 100%;
        margin: 0 !important; box-shadow: none !important; border: none !important;
        background: #fff !important;
        padding: 14mm 10mm;   /* replaces the removed page margin */
    }
    .print-area .no-print, .print-area .btn { display: none !important; }
    * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
