:root {
  /* Palette mirrors lib/core/theme/app_colors.dart in the app. */
  --green-darker: #0A2C21;   /* primaryDarker */
  --green-dark: #0E3B2C;     /* primaryDark */
  --green: #17784A;          /* primary */
  --green-light: #1F9D5F;    /* primaryLight */
  --green-surface: #E7F3EC;  /* primarySurface */
  --gold: #C9A24A;
  --gold-light: #E6C97A;
  --gold-dark: #A07B2E;
  --gold-surface: #FBF4E1;
  --text: #1E2422;
  --muted: #5C6763;
  --hint: #9AA5A0;
  --divider: #E6E9E7;
  --border: #DCE1DE;
  --bg: #F6F7F6;
  --surface: #FFFFFF;
  --hero: linear-gradient(120deg, #124734, #0C3125);            /* heroGradient */
  --hero-diag: linear-gradient(to bottom right, #124734, #0C3125);
  --radius: 14px;

  /* Type mirrors app_text_styles.dart: Poppins / Noto Nastaliq Urdu / Scheherazade New. */
  --font: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-ur: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", "Urdu Typesetting", serif;
  --font-ar: "Scheherazade New", "Amiri", "Traditional Arabic", serif;
}

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

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- Header ---------- */
.nav {
  background: var(--hero);
  color: #fff;
  padding: 14px 20px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.nav-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.nav img { width: 38px; height: 38px; border-radius: 9px; }
.brand { font-weight: 700; font-size: 1.05rem; letter-spacing: .2px; }
.brand small { display: block; font-weight: 400; font-size: .72rem; opacity: .75; }
.nav-links { margin-left: auto; display: flex; gap: 18px; flex-wrap: wrap; }
.nav-links a {
  color: #fff; text-decoration: none; font-size: .92rem; opacity: .9;
}
.nav-links a:hover { opacity: 1; text-decoration: underline; }
.nav-links a.nav-cta {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--gold-light); color: var(--green-dark);
  padding: 7px 14px; border-radius: 10px; font-weight: 600; opacity: 1;
}
.nav-links a.nav-cta:hover { background: #EFD690; text-decoration: none; }
.nav-cta .ms { font-size: 20px; }

/* ---------- Layout ---------- */
.wrap { max-width: 860px; margin: 0 auto; padding: 32px 20px 64px; }
.hero {
  background: var(--hero);
  color: #fff;
  text-align: center;
  padding: 56px 20px 64px;
}
.hero img { width: 104px; height: 104px; border-radius: 24px; margin-bottom: 18px; }
.hero h1 { font-size: 2rem; margin-bottom: 6px; }
.hero .ur { color: var(--gold-light); font-size: 1.25rem; margin-bottom: 10px; }
.hero p { opacity: .85; max-width: 560px; margin: 0 auto; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 18px;
}

h2 { font-size: 1.35rem; margin: 26px 0 10px; color: var(--green-dark); }
h3 { font-size: 1.05rem; margin: 18px 0 6px; color: var(--green); }
p, li { color: var(--muted); }
ul, ol { padding-left: 20px; margin: 8px 0; }
li { margin: 5px 0; }
strong { color: var(--text); }

.updated { font-size: .85rem; color: var(--muted); font-style: italic; }

/* ---------- Feature grid ---------- */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.feature {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px; text-align: center; font-size: .9rem;
}
.feature b { display: block; color: var(--text); margin-bottom: 2px; }

/* ---------- Buttons / forms ---------- */
.btn {
  display: inline-block; background: var(--green); color: #fff;
  padding: 13px 22px; border-radius: 10px; text-decoration: none;
  font-weight: 600; border: 0; cursor: pointer; font-size: 1rem;
}
.btn:hover { background: var(--green-light); }
.btn:disabled { background: #9AA5A0; cursor: not-allowed; }
.btn-block { display: block; width: 100%; }
.btn-outline {
  background: transparent; border: 1.5px solid var(--gold-light); color: var(--gold-light);
}

label { display: block; font-weight: 600; font-size: .9rem; margin: 14px 0 6px; color: var(--text); }
input[type=text], input[type=email], input[type=password], input[type=tel], textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border);
  border-radius: 10px; font-size: 1rem; font-family: inherit; background: #fff;
}
input:focus, textarea:focus { outline: 2px solid var(--green); border-color: var(--green); }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1 1 200px; }
.check { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.check input { width: 18px; height: 18px; }
.check label { margin: 0; }
.hint { font-size: .82rem; color: var(--muted); margin-top: 6px; }

.msg { padding: 12px 14px; border-radius: 10px; margin-top: 16px; display: none; }
.msg.err { background: #FDECEC; color: #B3261E; border: 1px solid #F3C2C2; display: block; }
.msg.ok  { background: #E7F3EC; color: #14603C; border: 1px solid #B8DEC8; display: block; }

/* ---------- Urdu (Nastaliq) / Arabic runs ---------- */
.ur { font-family: var(--font-ur); direction: rtl; unicode-bidi: isolate; line-height: 2; }
.ar { font-family: var(--font-ar); direction: rtl; unicode-bidi: isolate; }

/* ---------- Footer ---------- */
footer {
  background: var(--green-dark); color: #fff; text-align: center;
  padding: 26px 20px; font-size: .88rem;
}
footer a { color: var(--gold-light); margin: 0 8px; }

@media (max-width: 560px) {
  .hero h1 { font-size: 1.55rem; }
  .nav-links { gap: 12px; width: 100%; }
}
