/* ============================================================
   DGIP Pakistan — Master Stylesheet
   Clean, readable, citizen-friendly
   ============================================================ */

/* Fonts and colours follow DESIGN.md (the PassQ system); only the sign-in pages still load this file. */
@import url('https://fonts.googleapis.com/css2?family=Archivo:wdth,wght@62..125,300..800&family=Noto+Nastaliq+Urdu:wght@400..700&display=swap');

/* ── TOKENS ── */
:root {
  --green:       #0F5A3B;
  --green-dark:  #0B4A30;
  --green-light: #0B4A30;
  --green-pale:  #DDEBDD;
  --gold:        #865E1A;   /* stamp ink only */
  --gold-light:  #8FE0B0;   /* mint: green's stand-in on dark grounds */
  --white:       #FFFFFF;
  --cream:       #F2F3EF;
  --gray-100:    #E8EBE5;
  --gray-200:    #C9D2CB;
  --gray-400:    #9AA79F;
  --text:        #14231B;
  --text-mid:    #2C3D33;
  --text-muted:  #56665C;
  --error:       #A2352A;
  --success:     #0F5A3B;
  --radius:      10px;
  --shadow:      0 4px 20px rgba(0,0,0,.10);
  --shadow-lg:   0 12px 40px rgba(0,0,0,.16);
  --transition:  all .22s ease;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Archivo', system-ui, sans-serif;
  color: var(--text);
  background: var(--cream);
  line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }

/* ── LANGUAGE SYSTEM ──
   Default: English visible, Urdu hidden
   body.lang-ur flips this
─────────────────────────────────────── */

/* English ON by default */
.en { display: inline; }
p.en, div.en, li.en, h1.en, h2.en, h3.en, h4.en,
a.en, label.en, button.en, span.en { display: inline; }
div.en, p.en { display: block; }
li.en { display: list-item; }
a.en, button.en { display: inline-block; }

/* Urdu OFF by default */
.ur { display: none !important; }

/* ── URDU MODE (body.lang-ur) ── */
/* Hide English */
body.lang-ur .en { display: none !important; }

/* Show Urdu — restore proper display per tag */
body.lang-ur .ur                { display: inline !important; }
body.lang-ur p.ur               { display: block !important; }
body.lang-ur div.ur             { display: block !important; }
body.lang-ur h1.ur, body.lang-ur h2.ur,
body.lang-ur h3.ur, body.lang-ur h4.ur { display: block !important; }
body.lang-ur li.ur              { display: list-item !important; }
body.lang-ur a.ur               { display: inline-block !important; }
body.lang-ur button.ur          { display: inline-block !important; }
body.lang-ur label.ur           { display: block !important; }
body.lang-ur span.ur            { display: inline !important; }

/* Urdu font */
body.lang-ur,
body.lang-ur h1, body.lang-ur h2,
body.lang-ur h3, body.lang-ur h4 {
  font-family: 'Noto Nastaliq Urdu', 'Archivo', sans-serif;
  letter-spacing: 0 !important;
}
body.lang-ur { line-height: 2; }

/* ══════════════════════════════════════════
   SHARED NAV
══════════════════════════════════════════ */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 999;
  background: var(--green-dark);
  border-bottom: 2px solid rgba(200,151,58,.30);
  height: 64px;
  display: flex; align-items: center;
  padding: 0 2rem; gap: 1.5rem;
}
.nav-brand {
  display: flex; align-items: center; gap: 10px; flex-shrink: 0; text-decoration: none;
}
.nav-brand img {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1.5px solid var(--gold);
  object-fit: cover;
}
.nav-brand-text strong {
  display: block; font-size: 13px; font-weight: 700;
  color: var(--gold-light); letter-spacing: .03em;
}
.nav-brand-text span {
  display: block; font-size: 10.5px; color: rgba(255,255,255,.55);
  letter-spacing: .05em; text-transform: uppercase; margin-top: 1px;
}
.nav-links {
  display: flex; align-items: center; gap: 4px; flex: 1; justify-content: center;
}
.nav-links a {
  color: rgba(255,255,255,.80); font-size: 13.5px; font-weight: 500;
  padding: 8px 14px; border-radius: 4px;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
}
.nav-links a:hover { color: var(--gold-light); background: rgba(255,255,255,.06); }
.nav-links a.active { color: var(--gold-light); border-bottom-color: var(--gold); }
.nav-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.lang-toggle-btn {
  background: transparent; border: 1.5px solid rgba(255,255,255,.30);
  color: rgba(255,255,255,.80); padding: 6px 14px; border-radius: 20px;
  font-size: 12px; transition: var(--transition); white-space: nowrap;
}
.lang-toggle-btn:hover { border-color: var(--gold-light); color: var(--gold-light); }
.auth-box-top .lang-toggle-btn { border-color: var(--text); color: var(--text); font-size: 14px; padding: 5px 14px; border-radius: 999px; }
.auth-box-top .lang-toggle-btn.to-ur { font-family: 'Noto Nastaliq Urdu', serif; padding: 1px 14px 6px; }
.auth-box-top .lang-toggle-btn:hover { background: var(--text); color: var(--cream); border-color: var(--text); }
.btn-nav-signin {
  border: 1.5px solid var(--gold); color: var(--gold); background: transparent;
  padding: 7px 20px; border-radius: var(--radius); font-size: 13px; font-weight: 600;
  transition: var(--transition); white-space: nowrap;
}
.btn-nav-signin:hover { background: var(--gold); color: var(--green-dark); }
.btn-nav-register {
  background: var(--gold); color: var(--green-dark); border: none;
  padding: 7px 20px; border-radius: var(--radius); font-size: 13px; font-weight: 700;
  transition: var(--transition); white-space: nowrap;
}
.btn-nav-register:hover { background: var(--gold-light); }
.btn-nav-logout {
  border: 1.5px solid rgba(255,255,255,.30); color: rgba(255,255,255,.75);
  background: transparent; padding: 7px 16px; border-radius: var(--radius);
  font-size: 12.5px; transition: var(--transition); white-space: nowrap;
}
.btn-nav-logout:hover { border-color: var(--error); color: #ff8a80; }

/* ══════════════════════════════════════════
   HOME — HERO (full screen)
══════════════════════════════════════════ */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center;
  overflow: hidden;
  padding-top: 64px; /* nav offset */
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
}
.hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 25%;
}
/* Strong gradient so text is always readable */
.hero-bg::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(
    to right,
    rgba(8,30,16,.85) 0%,
    rgba(8,30,16,.70) 45%,
    rgba(8,30,16,.25) 100%
  );
}
.hero-body {
  position: relative; z-index: 10;
  padding: 4rem 7% 4rem 7%;
  max-width: 700px;
}
.hero-eyebrow {
  display: flex; align-items: center; gap: 10px; margin-bottom: 1.2rem;
}
.hero-eyebrow::before {
  content: ''; display: block;
  width: 32px; height: 2px; background: var(--gold); border-radius: 2px;
}
.hero-eyebrow span {
  font-size: 12px; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--gold);
}
.hero-h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 700; line-height: 1.15; color: #fff;
  margin-bottom: 1.1rem;
}
.hero-h1 em { font-style: normal; color: var(--gold-light); }
.hero-sub {
  font-size: 16px; font-weight: 400; color: rgba(255,255,255,.80);
  line-height: 1.8; max-width: 500px; margin-bottom: 2rem;
}
.hero-tags {
  display: flex; gap: 1.6rem; flex-wrap: wrap; margin-bottom: 2.2rem;
}
.hero-tag {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; color: rgba(255,255,255,.70); font-weight: 500;
}
.hero-tag::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold); flex-shrink: 0;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn-hero-primary {
  background: var(--gold); color: var(--green-dark); border: none;
  padding: 14px 32px; border-radius: var(--radius);
  font-size: 14.5px; font-weight: 700; letter-spacing: .04em;
  transition: var(--transition); display: inline-block;
}
.btn-hero-primary:hover { background: var(--gold-light); transform: translateY(-2px); }
.btn-hero-ghost {
  background: transparent; color: #fff;
  border: 2px solid rgba(255,255,255,.45);
  padding: 14px 32px; border-radius: var(--radius);
  font-size: 14.5px; font-weight: 500; letter-spacing: .04em;
  transition: var(--transition); display: inline-block;
}
.btn-hero-ghost:hover { border-color: var(--gold); color: var(--gold-light); }

/* Scroll hint */
.hero-scroll-hint {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  z-index: 10; display: flex; flex-direction: column; align-items: center; gap: 5px;
  color: rgba(255,255,255,.40); font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  animation: bobScroll 2s ease-in-out infinite;
}
.hero-scroll-hint::after { content: '↓'; font-size: 18px; }
@keyframes bobScroll {
  0%,100%{transform:translateX(-50%) translateY(0)}
  50%{transform:translateX(-50%) translateY(7px)}
}

/* ── STATS BAR ── */
.stats-bar {
  background: var(--green-dark);
  border-top: 2px solid rgba(200,151,58,.25);
  padding: 1rem 5%;
  display: flex; justify-content: center; gap: 4rem; flex-wrap: wrap;
}
.stat strong { display: block; font-size: 1.6rem; font-weight: 700; color: var(--gold); }
.stat span   { display: block; font-size: 11px; color: rgba(255,255,255,.50); letter-spacing: .08em; text-transform: uppercase; margin-top: 2px; }

/* ── HOME CONTENT SECTIONS ── */
.section { padding: 64px 0; }
.section-alt { background: var(--green-pale); }
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.sec-head { text-align: center; margin-bottom: 2.8rem; }
.sec-head h2 { font-size: 2rem; font-weight: 700; color: var(--green); margin-bottom: 10px; }
.sec-bar { width: 60px; height: 4px; background: var(--gold); margin: 0 auto 14px; border-radius: 2px; }
.sec-head p { color: var(--text-muted); font-size: 1rem; }
.lead-para { font-size: 1.05rem; line-height: 1.85; color: var(--text-mid); max-width: 820px; margin: 0 auto 14px; text-align: center; }

/* About boxes */
.about-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(260px,1fr)); gap: 20px; margin-top: 1.5rem; }
.about-box { background: var(--white); padding: 26px 24px; border-radius: var(--radius); border-left: 4px solid var(--green); box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.about-box h4 { font-size: 1.1rem; color: var(--green); margin-bottom: 8px; font-weight: 600; }
.about-box p  { color: #495057; font-size: .94rem; line-height: 1.75; }

/* Service cards */
.svc-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(285px,1fr)); gap: 20px; }
.svc-card { background: var(--white); padding: 28px 24px; border-radius: var(--radius); border-top: 4px solid var(--green); box-shadow: 0 2px 8px rgba(0,0,0,.06); transition: var(--transition); }
.svc-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.svc-icon { font-size: 2.4rem; margin-bottom: 12px; }
.svc-card h3 { font-size: 1.15rem; color: var(--green); margin-bottom: 8px; font-weight: 600; }
.svc-card p  { color: #495057; font-size: .93rem; line-height: 1.65; margin-bottom: 12px; }
.svc-card ul { list-style: none; margin-bottom: 14px; }
.svc-card li { padding: 4px 0; color: #495057; font-size: .9rem; }
.svc-link { color: var(--green); font-weight: 600; font-size: .9rem; transition: var(--transition); }
.svc-link:hover { color: var(--gold); }

/* ── FOOTER ── */
.site-footer { background: #EDF2EE; border-top: 4px solid var(--green); padding: 48px 0 0; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(200px,1fr)); gap: 30px; padding-bottom: 36px; border-bottom: 1px solid var(--gray-200); }
.fc h3 { font-size: .97rem; color: var(--green); font-weight: 700; margin-bottom: 12px; padding-bottom: 8px; position: relative; }
.fc h3::after { content:''; position:absolute; left:0; bottom:0; width:32px; height:2px; background:var(--gold); }
.fc p, .fc li { font-size: .87rem; color: #495057; line-height: 1.85; }
.fc ul { list-style: none; }
.fc ul li a { color: #495057; transition: var(--transition); display: inline-block; }
.fc ul li a:hover { color: var(--green); padding-left: 4px; }
.social-row { display: flex; gap: 8px; margin-top: 12px; }
.social-row a { padding: 6px 13px; background: var(--green); color: #fff; border-radius: 3px; font-size: .82rem; transition: var(--transition); }
.social-row a:hover { background: var(--green-light); }
.footer-bottom { padding: 18px 0; text-align: center; background: #E0EAE2; }
.footer-bottom p { font-size: .82rem; color: #6c757d; margin: 4px 0; }

/* ══════════════════════════════════════════
   AUTH PAGES — DIAGONAL SPLIT
   (signin.html / signup.html)
══════════════════════════════════════════ */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;   /* the image panel never stretches with a long form */
  overflow-x: clip;
  background: var(--white);
}

/* LEFT — image: always exactly one screen tall and pinned while the form scrolls,
   so sign in and register show the mosque identically */
.auth-left {
  flex: 0 0 42%;
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}
.auth-left img.bg {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 20%;
}
/* Overlay on left image */
.auth-left::before {
  content: '';
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(8,30,16,.50) 0%,
    rgba(8,30,16,.30) 60%,
    rgba(8,30,16,.70) 100%
  );
}
/* Diagonal cut on right edge */
.auth-left::after {
  content: '';
  position: absolute; top: 0; right: -1px; bottom: 0;
  width: 80px; z-index: 2;
  background: var(--white);
  clip-path: polygon(100% 0, 100% 100%, 0% 100%);
}
/* Badge top-left */
.auth-badge {
  position: absolute; top: 1.5rem; left: 1.5rem; z-index: 10;
  display: flex; align-items: center; gap: 10px;
  background: rgba(10,40,20,.75); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: var(--radius); padding: 10px 14px;
  text-decoration: none;
}
.auth-badge img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.auth-badge strong { display: block; font-size: 13px; font-weight: 800; font-stretch: 112%; color: #fff; }
.auth-badge span  { display: block; font-size: 12px; color: rgba(255,255,255,.78); margin-top: 1px; }
/* Caption bottom-left */
.auth-caption {
  position: absolute; bottom: 2rem; left: 2rem; right: 4rem; z-index: 10;
}
.auth-caption h2 {
  font-size: clamp(1.7rem, 2.8vw, 2.5rem);
  font-weight: 780; font-stretch: 115%; letter-spacing: -.03em;
  color: #fff; line-height: 1.05; margin-bottom: .7rem;
}
body.lang-ur .auth-caption h2 { font-stretch: normal; line-height: 1.8; font-weight: 700; }
.auth-caption p { font-size: 15px; color: rgba(255,255,255,.82); line-height: 1.6; }

/* RIGHT — form */
.auth-right {
  flex: 1;
  align-self: stretch;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 2rem 3rem 2rem 4rem;
  background: var(--white);
}
.auth-box {
  width: 100%; max-width: 400px;
}

/* Auth box top logo strip */
.auth-box-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.8rem;
  padding-bottom: 1.2rem;
  border-bottom: 1.5px solid var(--gray-200);
}
.auth-box-brand { display: flex; align-items: center; gap: 10px; }
.auth-box-brand img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.auth-box-brand strong { display: block; font-size: 13px; font-weight: 750; font-stretch: 110%; color: var(--green); letter-spacing: .04em; }
.auth-box-brand span  { display: block; font-size: 12.5px; color: var(--text-muted); margin-top: 1px; }

/* Tabs */
.auth-tabs {
  display: flex; background: var(--gray-100); border-radius: var(--radius);
  padding: 3px; gap: 3px; margin-bottom: 1.6rem;
}
.auth-tab {
  flex: 1; padding: 10px 0; border-radius: calc(var(--radius) - 2px);
  font-size: 15px; font-weight: 650; color: var(--text);
  transition: var(--transition); text-align: center; cursor: pointer; border: none;
  background: transparent;
}
.auth-tab.active {
  background: var(--green); color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
}

/* Welcome text */
.auth-welcome { margin-bottom: 1.5rem; }
.auth-welcome h2 {
  font-size: 1.9rem; font-weight: 780; font-stretch: 112%; letter-spacing: -.02em; color: var(--text); margin-bottom: 6px; line-height: 1.1;
}
.auth-welcome p { font-size: 15px; color: var(--text-muted); line-height: 1.55; }
body.lang-ur .auth-welcome h2 { line-height: 1.9; font-size: 1.6rem; font-stretch: normal; }

/* Form fields */
.f-group { margin-bottom: 1.1rem; }
.f-label {
  display: block; font-size: 14px; font-weight: 650;
  color: var(--text); margin-bottom: 7px;
}
.f-input, .f-select {
  width: 100%; border: 1.5px solid var(--gray-200);
  border-radius: 12px; padding: 12px 14px;
  font-size: 16px; color: var(--text); background: var(--white);
  font-family: inherit; outline: none; transition: var(--transition);
}
.f-input::placeholder { color: #5E6D64; }
.f-input:hover, .f-select:hover { border-color: var(--gray-400); }
.f-input:focus, .f-select:focus {
  border-color: var(--green); box-shadow: 0 0 0 4px rgba(15,90,59,.14);
}
.f-hint { display: block; font-size: 13px; color: var(--text-muted); margin-top: 6px; }
.f-submit {
  width: 100%; background: var(--green); color: #fff; border: none;
  padding: 14px; border-radius: 999px; font-size: 17px; font-weight: 650;
  transition: var(--transition); margin-top: 8px; cursor: pointer;
}
.f-submit:hover { background: var(--green-dark); transform: translateY(-1px); }

.auth-footer { text-align: center; margin-top: 1.2rem; font-size: 13px; color: var(--text-muted); }
.auth-footer a { color: var(--green); font-weight: 600; }
.auth-footer a:hover { color: var(--green-dark); text-decoration: underline; }

/* Flash messages */
.flash { padding: 10px 14px; border-radius: var(--radius); margin-bottom: 14px; font-size: 13px; font-weight: 500; }
.flash-error   { background: #FFF0EE; color: var(--error); border-left: 3px solid var(--error); }
.flash-success { background: #EEF8F2; color: var(--success); border-left: 3px solid var(--success); }
.flash-info    { background: #EEF8F2; color: var(--success); border-left: 3px solid var(--success); }

/* ── Auth motion (signin, signup, forgot/reset/verify) ──
   Image settles in with a slow zoom, then the form builds top to bottom.
   Switching Sign In <-> Register keeps the image still and only swaps the form. */
.auth-left img.bg { animation: authZoom 1.8s cubic-bezier(.16,1,.3,1) both; transform-origin: 50% 30%; }
.auth-badge       { animation: authFade .8s ease .3s both; }
.auth-caption     { animation: authRise 1s cubic-bezier(.16,1,.3,1) .4s both; }
.auth-box > :not(form),
.auth-box form > * { animation: authRise .75s cubic-bezier(.16,1,.3,1) both; animation-delay: calc(var(--i, 0) * 55ms + 120ms); }
html.auth-swap .auth-left img.bg,
html.auth-swap .auth-badge,
html.auth-swap .auth-caption { animation: none; }
.auth-box { transition: opacity .2s ease, transform .2s ease; }
.auth-right.is-leaving .auth-box { opacity: 0; transform: translateY(-8px); }
@keyframes authZoom { from { transform: scale(1.08); } to { transform: none; } }
@keyframes authFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes authRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.f-label { transition: color .25s ease; }
.f-group:focus-within .f-label { color: var(--green); }
.auth-tab:not(.active):hover { background: rgba(26,92,53,.08); color: var(--green); }

/* Submit: shows it is working and blocks a second click */
.f-submit { position: relative; }
.f-submit.is-loading { pointer-events: none; color: transparent !important; background: var(--green) !important; transform: none; }
.f-submit.is-loading::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px;
  border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%;
  animation: authSpin .7s linear infinite;
}
@keyframes authSpin { to { transform: rotate(360deg); } }
.auth-box .flash { animation: authRise .5s cubic-bezier(.16,1,.3,1) both; }

@media (prefers-reduced-motion: reduce) {
  .auth-page *, .auth-page *::after { animation: none !important; transition: none !important; }
  .f-submit.is-loading::after { border-top-color: #fff; }
}

/* ══════════════════════════════════════════
   DASHBOARD
══════════════════════════════════════════ */
.dash-wrap { padding-top: 64px; min-height: 100vh; background: #F4FAF6; }
.dash-inner { max-width: 920px; margin: 0 auto; padding: 2rem 1.5rem; }

.dash-welcome {
  background: var(--white); border-radius: var(--radius);
  box-shadow: 0 2px 10px rgba(0,0,0,.07);
  padding: 1.5rem 2rem; margin-bottom: 1.5rem;
  border-left: 4px solid var(--green);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
}
.dash-welcome h2 { font-size: 1.25rem; color: var(--green-dark); font-weight: 700; margin-bottom: 4px; }
.dash-welcome p  { font-size: .92rem; color: var(--text-muted); }
.dash-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.tokens-card {
  background: var(--white); border-radius: var(--radius);
  box-shadow: 0 2px 10px rgba(0,0,0,.07);
  padding: 1.5rem 2rem;
}
.tokens-card h4 { font-size: 1rem; color: var(--green); font-weight: 700; margin-bottom: 1.2rem; }

.tokens-table-wrap { overflow-x: auto; border-radius: 4px; }
.tokens-table { width: 100%; border-collapse: collapse; }
.tokens-table th {
  background: var(--green); color: #fff;
  padding: .75rem 1rem; font-size: .87rem; font-weight: 600; text-align: left;
}
.tokens-table td {
  padding: .7rem 1rem; font-size: .87rem;
  border-bottom: 1px solid var(--gray-100); color: var(--text);
}
.tokens-table tr:hover td { background: var(--green-pale); }

.empty-state {
  text-align: center; padding: 2.5rem;
  background: var(--green-pale); border-radius: var(--radius);
  border: 1.5px dashed var(--gray-200);
}
.empty-state .empty-icon { font-size: 2.8rem; margin-bottom: .8rem; }
.empty-state p { color: var(--text-muted); margin-bottom: 1rem; }

/* Shared buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .6rem 1.2rem; border-radius: var(--radius); font-weight: 600;
  font-size: .88rem; cursor: pointer; transition: var(--transition);
  text-decoration: none; border: none; font-family: inherit;
}
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-light); transform: translateY(-1px); }
.btn-outline-green { background: transparent; color: var(--green); border: 2px solid var(--green); }
.btn-outline-green:hover { background: var(--green); color: #fff; }
.btn-gold-fill { background: var(--gold); color: var(--green-dark); }
.btn-gold-fill:hover { background: var(--gold-light); }
.btn-sm { padding: .4rem .9rem; font-size: .82rem; }

/* ══════════════════════════════════════════
   THANK YOU PAGE
══════════════════════════════════════════ */
.ty-wrap {
  min-height: 100vh; background: #F4FAF6;
  display: flex; align-items: center; justify-content: center;
  padding: 80px 1rem 2rem;
}
.ty-card {
  background: var(--white); border-radius: 10px;
  box-shadow: var(--shadow-lg);
  padding: 3rem 2.5rem; max-width: 560px; width: 100%;
  text-align: center;
}
.ty-icon { font-size: 3.8rem; margin-bottom: 1rem; animation: tyBounce .8s ease-out; }
@keyframes tyBounce { 0%,100%{transform:translateY(0)} 40%{transform:translateY(-16px)} 70%{transform:translateY(-6px)} }
.ty-card h1 { color: var(--green); font-size: 1.8rem; font-weight: 700; margin-bottom: .5rem; }
.ty-card p  { color: var(--text-muted); font-size: .97rem; line-height: 1.7; margin-bottom: .8rem; }
.ty-summary {
  background: var(--green-pale); border-radius: var(--radius);
  padding: 1.4rem; margin: 1.5rem 0; text-align: left;
}
.ty-summary h3 { color: var(--green); font-size: .97rem; font-weight: 700; margin-bottom: .8rem; padding-bottom: .5rem; border-bottom: 2px solid rgba(26,92,53,.12); }
.ty-row { display: flex; justify-content: space-between; padding: .4rem 0; border-bottom: 1px solid rgba(26,92,53,.08); font-size: .9rem; }
.ty-row:last-child { border-bottom: none; }
.ty-row span:first-child { font-weight: 600; }
.ty-row span:last-child  { color: var(--text-muted); }
.ty-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 1.5rem; }

/* ══════════════════════════════════════════
   APPLICATION FORM PAGE
══════════════════════════════════════════ */
.form-page { padding-top: 64px; }
.form-page-wrap { max-width: 900px; margin: 2rem auto; padding: 0 1rem 3rem; }
.form-page-head {
  background: var(--white); border-radius: var(--radius);
  padding: 1.2rem 1.8rem; margin-bottom: 1.5rem;
  border-left: 4px solid var(--green); box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.form-page-head h2 { font-size: 1.1rem; color: var(--green-dark); font-weight: 700; }
.form-page-head p  { font-size: .86rem; color: var(--text-muted); margin-top: 3px; }

.passport-form { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.form-section { padding: 2rem; border-bottom: 1px solid var(--gray-100); }
.form-section:last-of-type { border-bottom: none; }
.form-section h3 {
  color: var(--green); font-size: 1.1rem; font-weight: 600;
  padding-bottom: .5rem; margin-bottom: 1.4rem;
  border-bottom: 2px solid var(--green-pale);
}
.form-row { display: flex; gap: 1.4rem; margin-bottom: 1.4rem; flex-wrap: wrap; }
.form-group { flex: 1; min-width: 200px; display: flex; flex-direction: column; }
.form-group.full { flex: 0 0 100%; }
.form-group label { font-weight: 500; color: var(--text); margin-bottom: .4rem; font-size: .92rem; }
.req { color: var(--error); }
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group input[type="password"],
.form-group textarea,
.form-group select {
  padding: .7rem 1rem; border: 1.5px solid var(--gray-200);
  border-radius: var(--radius); font-size: .97rem; font-family: inherit;
  transition: var(--transition); background: var(--white); width: 100%;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(26,92,53,.09);
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-group select {
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B8070' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px;
}
.phone-row { display: flex; gap: .5rem; }
.phone-row .country-code { width: 110px; flex-shrink: 0; }

/* File upload */
.upload-notice {
  background: var(--green-pale); border-left: 4px solid var(--green);
  padding: 1rem 1.2rem; border-radius: var(--radius); margin-bottom: 1.5rem;
}
.upload-notice p { font-weight: 600; color: var(--green); margin-bottom: .5rem; }
.upload-notice li { font-size: .9rem; color: var(--text); padding: 3px 0 3px 1.2rem; position: relative; }
.upload-notice li::before { content:'✓'; position:absolute; left:0; color:var(--success); font-weight:700; }

.doc-upload-group {
  background: var(--gray-100); padding: 1.4rem; border-radius: var(--radius);
  margin-bottom: 1.4rem; border: 1.5px solid var(--gray-200); transition: var(--transition);
}
.doc-upload-group:hover { border-color: var(--green); }
.doc-upload-group h4 { color: var(--green-dark); font-size: 1rem; margin-bottom: 1rem; padding-bottom: .5rem; border-bottom: 2px solid var(--green-pale); }
.file-upload-wrapper { position: relative; margin-bottom: .8rem; }
.file-input { position:absolute; width:.1px; height:.1px; opacity:0; overflow:hidden; z-index:-1; }
.file-label {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 1.8rem 1rem; border: 2px dashed var(--gray-200); border-radius: var(--radius);
  background: var(--white); cursor: pointer; transition: var(--transition); text-align: center; min-height: 130px;
}
.file-label:hover { border-color: var(--green); background: var(--green-pale); transform: translateY(-2px); }
.file-icon { font-size: 2rem; margin-bottom: .6rem; display: block; }
.file-text { color: var(--text); font-weight: 500; font-size: .93rem; }
.file-upload-wrapper.file-selected .file-label { border-color: var(--success); background: var(--green-pale); border-style: solid; }
.preview-container { background: var(--white); border: 2px solid var(--success); border-radius: var(--radius); padding: 1rem; display: flex; gap: 1rem; align-items: center; box-shadow: 0 2px 4px rgba(0,0,0,.05); margin-top: .8rem; }
.preview-image { width: 90px; height: 90px; object-fit: cover; border-radius: var(--radius); border: 1.5px solid var(--gray-200); }
.pdf-icon { font-size: 3.5rem; color: var(--error); width: 90px; height: 90px; display: flex; align-items: center; justify-content: center; background: #fff5f5; border-radius: var(--radius); }
.preview-info { flex: 1; display: flex; flex-direction: column; gap: .4rem; }
.preview-filename { font-weight: 600; color: var(--text); font-size: .9rem; }
.preview-filesize { color: var(--text-muted); font-size: .82rem; }
.remove-file { background: var(--error); color: #fff; border: none; padding: .4rem .9rem; border-radius: var(--radius); cursor: pointer; font-weight: 600; font-size: .83rem; transition: var(--transition); }
.remove-file:hover { background: #a93226; }

.submit-section { padding: 2rem; background: var(--gray-100); text-align: center; }
.submit-btn {
  background: var(--green); color: #fff; border: none;
  padding: .9rem 3rem; font-size: 1rem; font-weight: 700;
  border-radius: var(--radius); cursor: pointer; transition: var(--transition);
  letter-spacing: .04em; text-transform: uppercase;
}
.submit-btn:hover { background: var(--gold); color: var(--green-dark); transform: translateY(-2px); }

/* Badges */
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: .78rem; font-weight: 600; }
.badge-success { background: #e8f5ee; color: var(--success); }
.badge-warn    { background: #fef8ec; color: #D4820A; }
.badge-error   { background: #fdecea; color: var(--error); }

/* ── Responsive ── */
@media (max-width: 860px) {
  .auth-left { display: none; }
  .auth-right { padding: 2rem 1.5rem; }
  .nav-links { display: none; }
  .site-nav { padding: 0 1rem; }
}
@media (max-width: 600px) {
  .hero-h1 { font-size: 2rem; }
  .hero-actions { flex-direction: column; }
  .btn-hero-primary, .btn-hero-ghost { text-align: center; }
  .stats-bar { gap: 1.5rem; padding: 1rem 2rem; }
  .form-row { flex-direction: column; }
  .ty-btns { flex-direction: column; }
}

/* ── Live form validation ─────────────────────────────────────────────── */
.form-group input.is-invalid,
.form-group select.is-invalid,
.form-group textarea.is-invalid,
.file-upload-wrapper.is-invalid {
  border-color: var(--error) !important;
  background-color: #FFF6F5;
}
.form-group input.is-invalid:focus,
.form-group select.is-invalid:focus,
.form-group textarea.is-invalid:focus {
  box-shadow: 0 0 0 3px rgba(192,57,43,.14);
}
.form-group input.is-valid,
.form-group select.is-valid,
.form-group textarea.is-valid,
.file-upload-wrapper.is-valid {
  border-color: var(--success);
}
.form-group input[type="checkbox"].is-invalid { outline: 2px solid var(--error); outline-offset: 2px; }
.field-error {
  display: block; color: var(--error); font-size: .82rem; line-height: 1.35;
  margin-top: .35rem;
}
.field-error:empty { display: none; }
.field-hint { display: block; color: var(--text-muted); font-size: .82rem; margin-top: .35rem; }
.submit-summary { text-align: center; font-size: .92rem; font-weight: 600; margin-bottom: .8rem; }
.form-alert {
  background: #FFF0EE; color: var(--error); border-left: 4px solid var(--error);
  padding: .9rem 1.1rem; border-radius: var(--radius); margin-bottom: 1.4rem; font-weight: 500;
}
.form-alert[hidden] { display: none; }
.form-alert-info { background: #FFF9E6; color: #6B5310; border-left-color: var(--gold); }

/* ── Account security: password rules, OTP ─────────────────────────────── */
.pw-wrap { position: relative; }
.pw-wrap .f-input { padding-right: 2.6rem; }
.pw-toggle {
  position: absolute; right: .5rem; top: 50%; transform: translateY(-50%);
  background: none; border: 0; cursor: pointer; font-size: 1rem; opacity: .6;
}
.pw-toggle:hover { opacity: 1; }
.pw-rules { list-style: none; margin: .5rem 0 0; padding: 0; font-size: .8rem; color: var(--text-muted); }
.pw-rules li { padding: 1px 0 1px 1.2rem; position: relative; }
.pw-rules li::before { content: '•'; position: absolute; left: .3rem; }
.pw-rules li.ok { color: var(--success); }
.pw-rules li.ok::before { content: '✓'; left: 0; }
.pw-rules li.bad { color: var(--error); }
.pw-rules li.bad::before { content: '✗'; left: 0; }
.pw-rules.shake { animation: pw-shake .35s; }
@keyframes pw-shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.pw-match { display: block; font-size: .8rem; margin-top: .35rem; }
.pw-match.ok { color: var(--success); }
.pw-match.bad { color: var(--error); }
.f-input.is-invalid { border-color: var(--error) !important; }
.f-input.is-valid { border-color: var(--success); }
.otp-input { font-size: 1.5rem; letter-spacing: .6rem; text-align: center; font-weight: 700; }
.otp-resend { margin-top: 1rem; font-size: .85rem; color: var(--text-muted); text-align: center; }
.link-btn { background: none; border: 0; padding: 0; color: var(--green); font: inherit; font-weight: 600;
            cursor: pointer; text-decoration: underline; }
.f-group a.forgot-link { display: block; text-align: right; margin-top: .4rem; color: var(--green); font-weight: 500; }

/* Urdu (right-to-left): the diagonal cut sits on the other edge of the photo */
[dir="rtl"] .auth-left::after { right: auto; left: -1px; clip-path: polygon(0 0, 0 100%, 100% 100%); }
[dir="rtl"] .auth-badge { left: auto; right: 1.5rem; }
[dir="rtl"] .auth-caption { left: 4rem; right: 2rem; }
[dir="rtl"] .f-group a.forgot-link { text-align: left; }
[dir="rtl"] .pw-wrap .f-input { padding-right: 14px; padding-left: 2.6rem; }
[dir="rtl"] .pw-toggle { right: auto; left: .5rem; }
