/* =========================================================================
   GPF Portal — shared design system
   Civic / institutional aesthetic: deep navy, steel blue, warm gold accent.
   ========================================================================= */

@font-face {
    font-family: 'Shree0768';
    src: url('SHREE0768.TTF') format('truetype');
    font-display: swap;
}

:root {
    --ink:        #0f2540;   /* deep navy text / headings        */
    --brand:      #1c5d99;   /* primary steel blue               */
    --brand-dark: #16487a;
    --brand-soft: #e8f0f8;
    --accent:     #c08a2e;   /* warm gold for official touches   */
    --accent-soft:#fbf3e2;
    --bg:         #eef2f6;
    --surface:    #ffffff;
    --line:       #dfe6ee;
    --muted:      #6b7a8d;
    --ok:         #1f8a4c;
    --ok-soft:    #e4f4ea;
    --warn:       #b8860b;
    --warn-soft:  #fbf2da;
    --danger:     #c0392b;
    --danger-soft:#fbeae8;
    --info:       #2c7da0;
    --info-soft:  #e3f0f5;
    --radius:     14px;
    --radius-sm:  10px;
    --shadow:     0 6px 22px rgba(15, 37, 64, .08);
    --shadow-lg:  0 18px 48px rgba(15, 37, 64, .16);
    --sidebar-w:  264px;
}

* { box-sizing: border-box; }

body {
    font-family: 'Shree0768', 'Noto Sans Gujarati', 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--ink);
    margin: 0;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); }

/* ---------- Topbar -------------------------------------------------------- */
.app-topbar {
    position: fixed; top: 0; left: 0; right: 0; height: 66px; z-index: 1030;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 1.4rem;
    box-shadow: 0 2px 10px rgba(15,37,64,.05);
}
.app-topbar .brand {
    display: flex; align-items: center; gap: .65rem;
    font-weight: 700; color: var(--ink); font-size: 1.2rem; letter-spacing: .2px;
}
.app-topbar .brand .crest {
    width: 38px; height: 38px; border-radius: 10px; flex: none;
    background: linear-gradient(135deg, var(--brand) 0%, var(--ink) 100%);
    color: #fff; display: grid; place-items: center; font-size: 1.05rem;
    box-shadow: inset 0 0 0 2px rgba(192,138,46,.45);
}
.app-topbar .hamburger {
    font-size: 1.4rem; color: var(--brand); cursor: pointer; display: none;
    background: none; border: 0;
}
.topbar-user { display: flex; align-items: center; gap: .9rem; }
.topbar-user .who { color: var(--muted); font-size: .95rem; }
.topbar-user .who strong { color: var(--ink); }

/* ---------- Sidebar ------------------------------------------------------- */
.app-sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: var(--sidebar-w);
    background: linear-gradient(185deg, var(--ink) 0%, #0a1c33 100%);
    color: #cdd9e6; padding-top: 84px; z-index: 1020; overflow-y: auto;
    transition: transform .3s ease;
}
.app-sidebar .nav-section {
    padding: 1.2rem 1.4rem .4rem; font-size: .72rem; letter-spacing: .14em;
    text-transform: uppercase; color: #6f8198;
}
.app-sidebar a {
    display: flex; align-items: center; gap: .85rem;
    padding: .8rem 1.4rem; color: #c2d0e0; text-decoration: none;
    font-size: 1.02rem; border-left: 4px solid transparent;
    transition: background .2s, color .2s, border-color .2s;
}
.app-sidebar a i { width: 22px; text-align: center; font-size: 1.05rem; }
.app-sidebar a:hover { background: rgba(255,255,255,.06); color: #fff; }
.app-sidebar a.active {
    background: rgba(28,93,153,.32); color: #fff;
    border-left-color: var(--accent); font-weight: 600;
}
.sidebar-foot {
    margin-top: 1.2rem; padding: 1.1rem 1.4rem; border-top: 1px solid rgba(255,255,255,.08);
    font-size: .82rem; color: #7f93aa;
}

/* ---------- Layout -------------------------------------------------------- */
.app-main {
    margin-left: var(--sidebar-w);
    padding: 92px 2rem 3rem;
    min-height: 100vh;
}
.page-head { margin-bottom: 1.6rem; }
.page-head h1 { font-size: 1.7rem; font-weight: 700; margin: 0 0 .25rem; color: var(--ink); }
.page-head p { margin: 0; color: var(--muted); }

/* ---------- Detail view (admin) ------------------------------------------ */
.section-title {
    font-size: 1.05rem; font-weight: 700; color: var(--brand);
    margin: 0 0 1rem; padding-bottom: .6rem;
    border-bottom: 1px solid var(--line);
}
.detail-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem 1.5rem;
}
.detail-grid > div { display: flex; flex-direction: column; gap: .15rem; }
.detail-grid > div.full { grid-column: 1 / -1; }
.detail-grid span {
    font-size: .78rem; text-transform: uppercase; letter-spacing: .03em;
    color: var(--muted); font-weight: 600;
}
.detail-grid strong { color: var(--ink); font-weight: 600; word-break: break-word; }

/* ---------- Cards / surfaces --------------------------------------------- */
.surface {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); box-shadow: var(--shadow);
}
.surface-head {
    padding: 1.1rem 1.4rem; border-bottom: 1px solid var(--line);
    font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: .6rem;
}
.surface-body { padding: 1.4rem; }

.form-card-head {
    background: linear-gradient(135deg, var(--brand) 0%, var(--ink) 100%);
    color: #fff; padding: 1.4rem; border-radius: var(--radius) var(--radius) 0 0;
    text-align: center;
}
.form-card-head h3 { margin: 0; font-weight: 700; }
.form-card-head .sub { opacity: .85; font-size: .95rem; margin-top: .25rem; }

/* ---------- Stat cards ---------------------------------------------------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1.2rem; }
.stat {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.3rem 1.4rem; box-shadow: var(--shadow);
    display: flex; align-items: center; gap: 1rem;
    transition: transform .2s, box-shadow .2s;
}
.stat:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.stat .ico {
    width: 54px; height: 54px; border-radius: 14px; flex: none;
    display: grid; place-items: center; font-size: 1.35rem; color: #fff;
}
.stat .num { font-size: 1.9rem; font-weight: 800; line-height: 1; color: var(--ink); }
.stat .lbl { color: var(--muted); margin-top: .3rem; font-size: .95rem; }
.ico-brand  { background: linear-gradient(135deg,#1c5d99,#16487a); }
.ico-gold   { background: linear-gradient(135deg,#c9a227,#a8761f); }
.ico-ok     { background: linear-gradient(135deg,#1f8a4c,#15673a); }
.ico-info   { background: linear-gradient(135deg,#2c7da0,#1f5f7a); }
.ico-danger { background: linear-gradient(135deg,#c0392b,#962b20); }

/* ---------- Quick action tiles ------------------------------------------- */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 1.2rem; }
.tile {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 2rem 1.4rem; text-align: center; text-decoration: none; color: var(--ink);
    box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s, border-color .2s;
    display: block;
}
.tile:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--brand); color: var(--ink); }
.tile i { font-size: 2.4rem; color: var(--brand); margin-bottom: .8rem; }
.tile h5 { margin: 0; font-weight: 700; }

/* ---------- Badges -------------------------------------------------------- */
.badge-soft {
    display: inline-block; padding: .28rem .65rem; border-radius: 999px;
    font-size: .82rem; font-weight: 600; background: var(--brand-soft); color: var(--brand-dark);
}
.badge-draft     { background: #eceff3; color: #54637a; }
.badge-submitted { background: var(--info-soft); color: var(--info); }
.badge-paid      { background: var(--brand-soft); color: var(--brand-dark); }
.badge-approved  { background: var(--ok-soft); color: var(--ok); }
.badge-role-admin{ background: var(--accent-soft); color: var(--accent); }
.badge-role-user { background: var(--brand-soft); color: var(--brand-dark); }

/* ---------- Tables -------------------------------------------------------- */
.tbl-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .96rem; }
table.data thead th {
    background: var(--ink); color: #dfe8f2; text-align: left;
    padding: .85rem 1rem; font-weight: 600; white-space: nowrap; font-size: .9rem;
}
table.data tbody td { padding: .8rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tbody tr:hover { background: #f7fafc; }
table.data tbody tr:last-child td { border-bottom: 0; }

/* ---------- Buttons (used with Bootstrap; small overrides) --------------- */
.btn-brand { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn-gold { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-gold:hover { filter: brightness(.94); color: #fff; }

/* ---------- Alerts (custom) ---------------------------------------------- */
.note { padding: .9rem 1.1rem; border-radius: var(--radius-sm); margin-bottom: 1.2rem; border: 1px solid transparent; }
.note-ok     { background: var(--ok-soft);     border-color: #bfe6cd; color: var(--ok); }
.note-danger { background: var(--danger-soft); border-color: #f1c9c4; color: var(--danger); }
.note-info   { background: var(--info-soft);   border-color: #c3dfe9; color: var(--info); }
.note-warn   { background: var(--warn-soft);   border-color: #ecd9a3; color: var(--warn); }

/* ---------- Forms --------------------------------------------------------- */
.form-label { font-weight: 600; }
.form-control, .form-select { border-radius: var(--radius-sm); }
.form-control:focus, .form-select:focus {
    border-color: var(--brand); box-shadow: 0 0 0 .2rem rgba(28,93,153,.18);
}
.prefill-box { background: #f6f9fc; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1rem 1.2rem; }
.prefill-box strong { color: var(--ink); }

/* ---------- Floating help ------------------------------------------------- */
.fab-stack { position: fixed; bottom: 1.4rem; right: 1.4rem; z-index: 1040;
             display: flex; flex-direction: column; gap: .7rem; align-items: flex-end; }
.fab-wa {
    width: 60px; height: 60px; border-radius: 50%; background: #25d366; color: #fff;
    display: grid; place-items: center; font-size: 1.6rem; box-shadow: var(--shadow-lg);
    text-decoration: none;
}
.fab-credit { background: var(--ink); color: #fff; padding: .35rem .9rem; border-radius: 999px; font-size: .8rem; }

/* ---------- Responsive ---------------------------------------------------- */
@media (max-width: 992px) {
    .app-sidebar { transform: translateX(-100%); width: 280px; }
    .app-sidebar.open { transform: translateX(0); }
    .app-main { margin-left: 0; padding: 86px 1.1rem 3rem; }
    .app-topbar .hamburger { display: inline-block; }
    .topbar-user .who { display: none; }
}
.sidebar-backdrop {
    position: fixed; inset: 0; background: rgba(15,37,64,.45); z-index: 1015; display: none;
}
.sidebar-backdrop.show { display: block; }

/* =========================================================================
   PREMIUM — services hub, pricing, payment screens
   ========================================================================= */

/* Hero band on the services page */
.hero-band {
    display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
    flex-wrap: wrap;
    background: linear-gradient(135deg, var(--ink), var(--brand));
    color: #fff; border-radius: var(--radius); padding: 2rem 2.2rem;
    box-shadow: var(--shadow-lg);
}
.hero-band h1 { color: #fff; font-weight: 800; font-size: 1.9rem; margin: .5rem 0 .4rem; }
.hero-band p  { margin: 0; opacity: .92; max-width: 46ch; }
.hero-band .pill {
    display: inline-block; background: rgba(255,255,255,.16); color: #fff;
    padding: .3rem .8rem; border-radius: 999px; font-size: .82rem; font-weight: 600;
}
.hero-price { text-align: center; line-height: 1; white-space: nowrap; }
.hero-price .amt { font-size: 2.6rem; font-weight: 800; color: var(--accent); }
.hero-price .per { display: block; opacity: .85; font-size: .85rem; margin-top: .2rem; }

/* Service cards grid */
.svc-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.2rem;
}
.svc-card {
    --svc: var(--brand);
    display: block; text-decoration: none; color: var(--ink);
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow);
    border-top: 4px solid var(--svc); transition: transform .15s ease, box-shadow .15s ease;
}
.svc-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); color: var(--ink); }
.svc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .9rem; }
.svc-ico {
    width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
    font-size: 1.4rem; color: #fff; background: var(--svc);
}
.svc-card h5 { font-weight: 700; margin: 0 0 .35rem; }
.svc-card p  { color: var(--muted); font-size: .92rem; margin: 0 0 1rem; min-height: 2.6em; }
.svc-go { font-weight: 700; color: var(--svc); }
.price-tag {
    background: var(--accent-soft); color: var(--accent); font-weight: 800;
    padding: .3rem .7rem; border-radius: 999px; font-size: .95rem;
}

/* Type chips in the unified list */
.type-chip {
    display: inline-block; padding: .2rem .65rem; border-radius: 999px;
    font-size: .8rem; font-weight: 600; background: var(--brand-soft); color: var(--brand-dark);
}
.type-chip.type-gpf { background: var(--accent-soft); color: var(--accent); }

/* Pay buttons */
.btn-pay {
    background: var(--accent); border: 1px solid var(--accent); color: #fff; font-weight: 700;
}
.btn-pay:hover { filter: brightness(.95); color: #fff; }

/* Payment screen */
.pay-wrap { display: grid; place-items: center; padding: 1rem 0 2rem; }
.pay-card {
    width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 2rem 1.8rem; text-align: center;
}
.pay-card h1 { font-size: 1.4rem; font-weight: 800; color: var(--ink); margin: .6rem 0 .2rem; }
.pay-badge {
    display: inline-block; background: var(--ok-soft); color: var(--ok);
    padding: .3rem .8rem; border-radius: 999px; font-size: .8rem; font-weight: 600;
}
.pay-doc { color: var(--muted); margin: 0 0 1rem; }
.pay-amount { margin: .6rem 0 .2rem; color: var(--ink); }
.pay-amount .cur { font-size: 1.6rem; font-weight: 700; vertical-align: top; }
.pay-amount .val { font-size: 3.2rem; font-weight: 800; }
.pay-trust { margin-top: 1.2rem; color: var(--muted); font-size: .82rem; }
.pay-trust i { font-size: 1.1rem; margin: 0 .15rem; vertical-align: middle; }
