@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root {
  --navy: #0b3d91;
  --navy-d: #072a66;
  --navy-l: #1a56c4;
  --navy-soft: #e8f0fe;
  --green: #7cb342;
  --green-d: #5e8c2e;
  --green-l: #9ccc65;
  --green-glow: rgba(124, 179, 66, 0.35);
  --ink: #1a2b4a;
  --muted: #5b6b86;
  --line: #d7e0ee;
  --bg: #f2f6fb;
  --card: #ffffff;
  --danger: #c62828;
  --warn: #ed6c02;
  --ok: #2e7d32;
  --shadow: 0 8px 16px -4px rgba(11, 61, 145, 0.08), 0 20px 40px -12px rgba(11, 61, 145, 0.14);
  --shadow-sm: 0 2px 4px rgba(11, 61, 145, 0.05), 0 8px 20px rgba(11, 61, 145, 0.07);
  --shadow-lift: 0 16px 40px -12px rgba(11, 61, 145, 0.22), 0 0 0 1px rgba(124, 179, 66, 0.12);
  --radius: 16px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --focus: 0 0 0 3px rgba(26, 86, 196, 0.35);
  --header-h: 72px;
}

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

html { scroll-behavior: smooth; }
html, body { min-height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: clip;
  width: 100%;
}

a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--navy-l); }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; }
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; width: 100%; }
img, svg, video, canvas { max-width: 100%; }
.topbar .wrap { max-width: 1180px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* —— Header —— */
.topbar {
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(215, 224, 238, 0.9);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(1.3) blur(14px);
  -webkit-backdrop-filter: saturate(1.3) blur(14px);
  box-shadow: 0 1px 0 rgba(124, 179, 66, 0.08);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  flex-shrink: 0;
}
.brand:hover { color: inherit; }
.brand img {
  height: 48px;
  width: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(11, 61, 145, 0.12);
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand-name {
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.03em;
  font-size: 1.08rem;
}
.brand-name span { color: var(--green); }
.brand-sub {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--navy);
  cursor: pointer;
  padding: 0;
  box-shadow: var(--shadow-sm);
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle[aria-expanded="true"] {
  background: var(--navy-soft);
  border-color: #c5d6f5;
  box-shadow: 0 0 0 3px rgba(124, 179, 66, 0.15);
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 12px;
  padding: 12px 20px;
  min-height: 44px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(165deg, var(--navy-l) 0%, var(--navy) 55%, var(--navy-d) 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(11, 61, 145, 0.35), inset 0 1px 0 rgba(255,255,255,0.15);
}
.btn-primary:hover {
  background: linear-gradient(165deg, #2263d4 0%, var(--navy-d) 100%);
  color: #fff;
  box-shadow: 0 8px 22px rgba(11, 61, 145, 0.4), 0 0 0 1px rgba(124, 179, 66, 0.2);
  transform: translateY(-1px);
}
.btn-green {
  background: linear-gradient(165deg, var(--green-l) 0%, var(--green) 50%, var(--green-d) 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(124, 179, 66, 0.4), inset 0 1px 0 rgba(255,255,255,0.2);
}
.btn-green:hover {
  background: linear-gradient(165deg, #8fd14f 0%, var(--green-d) 100%);
  color: #fff;
  box-shadow: 0 8px 22px rgba(124, 179, 66, 0.45);
  transform: translateY(-1px);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.7);
  color: var(--navy);
  border: 1.5px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.btn-ghost:hover {
  background: #fff;
  color: var(--navy);
  border-color: #b8c9e3;
  box-shadow: 0 4px 16px rgba(11, 61, 145, 0.1);
  transform: translateY(-1px);
}
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #a31f1f; color: #fff; }
.btn-warn { background: var(--warn); color: #fff; }
.btn-warn:hover { background: #d35f00; color: #fff; }
.btn-sm { padding: 8px 14px; font-size: 0.875rem; border-radius: 10px; min-height: 40px; }
.btn-lg {
  padding: 14px 26px;
  font-size: 1rem;
  border-radius: 14px;
}

/* —— Hero —— */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 55% at 95% -5%, rgba(124, 179, 66, 0.22), transparent 50%),
    radial-gradient(ellipse 55% 50% at 5% 90%, rgba(11, 61, 145, 0.14), transparent 55%),
    radial-gradient(ellipse 40% 35% at 55% 40%, rgba(26, 86, 196, 0.08), transparent 60%),
    linear-gradient(165deg, #ffffff 0%, #eef4ff 45%, #e4edfc 100%);
  border-bottom: 1px solid var(--line);
  padding: 72px 0 88px;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(rgba(11, 61, 145, 0.045) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.55), transparent 85%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.55), transparent 85%);
  pointer-events: none;
}
.hero-mesh {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.hero-mesh .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.55;
}
.hero-mesh .blob-a {
  width: 280px; height: 280px;
  background: rgba(124, 179, 66, 0.35);
  top: -60px; right: 8%;
}
.hero-mesh .blob-b {
  width: 220px; height: 220px;
  background: rgba(11, 61, 145, 0.2);
  bottom: -40px; left: 12%;
}
.hero-mesh .blob-c {
  width: 160px; height: 160px;
  background: rgba(156, 204, 101, 0.25);
  top: 40%; left: 42%;
}
.hero-bridge {
  position: absolute;
  right: -2%;
  bottom: 8%;
  width: min(420px, 48vw);
  height: auto;
  opacity: 0.14;
  pointer-events: none;
  color: var(--navy);
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green-d);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.72rem;
  background: rgba(124, 179, 66, 0.12);
  border: 1px solid rgba(124, 179, 66, 0.28);
  padding: 6px 12px;
  border-radius: 999px;
  box-shadow: 0 0 20px rgba(124, 179, 66, 0.15);
}
.kicker::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(124, 179, 66, 0.25);
}
h1 {
  font-size: clamp(1.85rem, 4.2vw, 2.85rem);
  line-height: 1.15;
  color: var(--navy);
  margin: 14px 0 16px;
  letter-spacing: -0.035em;
  font-weight: 800;
}
h2 {
  font-size: clamp(1.4rem, 2.6vw, 1.85rem);
  color: var(--navy);
  letter-spacing: -0.025em;
  font-weight: 800;
}
.lead {
  color: var(--muted);
  font-size: 1.125rem;
  max-width: 34rem;
  line-height: 1.65;
}
.steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 0 32px;
  align-items: center;
}
.pill {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 15px;
  font-size: 0.8125rem;
  color: var(--navy);
  font-weight: 700;
  box-shadow: var(--shadow-sm), 0 0 0 1px rgba(124, 179, 66, 0.06);
}
.pill-arrow {
  color: var(--green-d);
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0 2px;
  border: 0;
  background: none;
  box-shadow: none;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-actions .btn-primary {
  box-shadow: 0 6px 20px rgba(11, 61, 145, 0.4), 0 0 24px rgba(124, 179, 66, 0.2);
}
.logo-card-wrap {
  position: relative;
}
.logo-card-wrap::before {
  content: "";
  position: absolute;
  inset: -12px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(124, 179, 66, 0.35), transparent 45%, rgba(11, 61, 145, 0.25));
  filter: blur(18px);
  opacity: 0.7;
  z-index: 0;
}
.logo-card {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 24px;
  box-shadow: var(--shadow), 0 0 0 1px rgba(255,255,255,0.8);
  padding: 36px;
  text-align: center;
  border: 1px solid rgba(215, 224, 238, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.logo-card img {
  max-width: 340px;
  margin: 0 auto;
  border-radius: 12px;
}
.logo-card-deco {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  border-radius: 24px;
  pointer-events: none;
}
.logo-card-deco svg {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0.12;
  color: var(--navy);
}

/* —— Sections & cards —— */
.section {
  padding: 64px 0;
  position: relative;
}
.section-tight { padding-top: 0; }
.section-head { margin-bottom: 28px; }
.section-divider {
  height: 1px;
  border: 0;
  margin: 0;
  background: linear-gradient(90deg, transparent, rgba(11, 61, 145, 0.18), rgba(124, 179, 66, 0.35), rgba(11, 61, 145, 0.18), transparent);
}
.section-alt {
  background:
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(124, 179, 66, 0.06), transparent 50%),
    linear-gradient(180deg, #f7fafd 0%, var(--bg) 100%);
  border-top: 1px solid rgba(215, 224, 238, 0.7);
  border-bottom: 1px solid rgba(215, 224, 238, 0.7);
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.cards-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.22s ease, border-color 0.22s ease, transform 0.22s ease;
  position: relative;
  overflow: hidden;
}
.card::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--navy), var(--green));
  opacity: 0;
  transition: opacity 0.22s ease;
}
.card:hover {
  box-shadow: var(--shadow-lift);
  border-color: #c5d4ea;
  transform: translateY(-4px);
}
.card:hover::after { opacity: 1; }
.card h3 {
  color: var(--navy);
  margin-bottom: 8px;
  font-size: 1.05rem;
  letter-spacing: -0.015em;
  font-weight: 750;
  font-weight: 700;
}
.card ul {
  margin: 8px 0 0 1.15rem;
  color: var(--muted);
  font-size: 0.875rem;
}
.card li { margin: 5px 0; }
.card-link { margin-top: 14px; font-weight: 700; font-size: 0.875rem; }
.card-link a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.muted { color: var(--muted); }
.legal {
  font-size: 0.75rem;
  color: var(--muted);
  max-width: 52rem;
  line-height: 1.55;
}

/* Service icons */
.svc-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  background: linear-gradient(145deg, rgba(11, 61, 145, 0.08), rgba(124, 179, 66, 0.14));
  border: 1px solid rgba(11, 61, 145, 0.1);
  color: var(--navy);
  box-shadow: 0 4px 12px rgba(11, 61, 145, 0.08), inset 0 1px 0 rgba(255,255,255,0.8);
}
.svc-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.card:hover .svc-icon {
  background: linear-gradient(145deg, rgba(11, 61, 145, 0.12), rgba(124, 179, 66, 0.22));
  color: var(--navy-d);
  box-shadow: 0 6px 16px rgba(124, 179, 66, 0.2);
}

.info-banner {
  background: linear-gradient(135deg, #fff 0%, #f4f9ff 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.info-banner::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--navy), var(--green));
  border-radius: 4px 0 0 4px;
}

/* —— Auth —— */
.auth-shell {
  min-height: calc(100vh - var(--header-h));
  display: grid;
  place-items: center;
  padding: 48px 16px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 50% 40% at 85% 15%, rgba(124, 179, 66, 0.18), transparent 55%),
    radial-gradient(ellipse 45% 40% at 10% 85%, rgba(11, 61, 145, 0.12), transparent 55%),
    linear-gradient(165deg, #f7fafd 0%, #eef3fb 100%);
}
.auth-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(rgba(11, 61, 145, 0.04) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
}
.auth-shell::after {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  border: 40px solid rgba(11, 61, 145, 0.04);
  right: -80px;
  top: 10%;
  pointer-events: none;
}
.auth-card {
  position: relative;
  z-index: 1;
  width: min(460px, 100%);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(215, 224, 238, 0.95);
  border-radius: 22px;
  padding: 36px 32px;
  box-shadow: var(--shadow), 0 0 0 1px rgba(255,255,255,0.8), 0 0 40px rgba(124, 179, 66, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.auth-card::before {
  content: "";
  position: absolute;
  top: 0; left: 24px; right: 24px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, var(--navy), var(--green));
}
.auth-card h2 { color: var(--navy); margin: 10px 0 6px; }

/* —— Forms —— */
.form { display: grid; gap: 14px; margin-top: 18px; }
.field { display: grid; gap: 6px; }
label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--ink);
}
input, select, textarea {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:hover, select:hover, textarea:hover { border-color: #b8c7dc; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--navy-l);
  box-shadow: var(--focus);
}
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.alert {
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.875rem;
  display: none;
}
.alert.show { display: block; }
.alert-error { background: #fdecea; color: #8a1c1c; border: 1px solid #f5c6c2; }
.alert-ok { background: #e8f5e9; color: #1b5e20; border: 1px solid #c8e6c9; }
.alert-info { background: #e8f0fe; color: var(--navy); border: 1px solid #c5d6f5; }
.hint { font-size: 0.8125rem; color: var(--muted); line-height: 1.5; }
.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 500;
  font-size: 0.875rem;
}
.check input { width: auto; margin-top: 3px; flex-shrink: 0; }

/* —— Footer —— */
.footer {
  border-top: 1px solid var(--line);
  padding: 28px 0;
  color: var(--muted);
  font-size: 0.8125rem;
  background: linear-gradient(180deg, #fff 0%, #f7fafd 100%);
  margin-top: auto;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  align-items: center;
}
.footer a { color: var(--muted); font-weight: 600; }
.footer a:hover { color: var(--navy); }

/* —— App layouts (portal / admin) —— */
.layout {
  display: grid;
  grid-template-columns: 252px 1fr;
  min-height: calc(100vh - var(--header-h));
}
.side {
  background:
    radial-gradient(ellipse 80% 40% at 0% 0%, rgba(124, 179, 66, 0.18), transparent 55%),
    linear-gradient(185deg, #0a3578 0%, var(--navy-d) 40%, #041530 100%);
  color: #d7e6ff;
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: inset -1px 0 0 rgba(255,255,255,0.06);
}
.side a,
.side button.link {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  color: inherit;
  padding: 12px 16px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 650;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}
.side a.active,
.side a:hover,
.side button.link:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.side a.active {
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 3px 0 0 var(--green), 0 0 20px rgba(124, 179, 66, 0.12);
  color: #fff;
}
.main {
  padding: 28px 24px 40px;
  background:
    radial-gradient(ellipse 50% 30% at 100% 0%, rgba(124, 179, 66, 0.05), transparent 50%),
    var(--bg);
}
.page-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.page-title h2 { margin: 0; }
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 18px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.stat::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--navy), var(--green));
  opacity: 0.85;
}
.stat:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.stat b {
  display: block;
  font-size: 1.7rem;
  color: var(--navy);
  letter-spacing: -0.03em;
  margin-top: 4px;
  font-weight: 800;
}

/* —— Badges —— */
.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.75rem;
  font-weight: 750;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.b-pending { background: #fff4e5; color: #b35400; }
.b-approved { background: #e8f5e9; color: #1b5e20; }
.b-denied { background: #fdecea; color: #8a1c1c; }
.b-info { background: #e3f2fd; color: #0d47a1; }
.b-draft { background: #eceff1; color: #37474f; }
.b-verified { background: #e8f5e9; color: #1b5e20; }

/* —— Timeline —— */
.timeline {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
  margin: 8px 0 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 10px;
  box-shadow: var(--shadow-sm);
}
.t-step {
  flex: 1;
  min-width: 90px;
  text-align: center;
  position: relative;
  padding: 8px 4px 0;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
}
.t-step::before {
  content: "";
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--line);
  margin: 0 auto 8px;
}
.t-step.done { color: var(--navy); }
.t-step.done::before { background: var(--navy); }
.t-step.current { color: var(--green-d); }
.t-step.current::before {
  background: var(--green);
  box-shadow: 0 0 0 4px #e8f5e9, 0 0 12px var(--green-glow);
}

/* —— Chat —— */
.chat-box {
  display: grid;
  grid-template-rows: 1fr auto auto;
  height: min(62vh, 620px);
  min-height: 320px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  width: 100%;
  min-width: 0;
}
.chat-log {
  overflow: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background:
    radial-gradient(ellipse 40% 30% at 100% 0%, rgba(124, 179, 66, 0.04), transparent 50%),
    #f7fafc;
}
.bubble {
  max-width: min(78%, 100%);
  padding: 10px 13px;
  border-radius: 14px;
  font-size: 0.875rem;
  line-height: 1.45;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.bubble.me {
  margin-left: auto;
  background: linear-gradient(165deg, var(--navy-l), var(--navy));
  color: #fff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 12px rgba(11, 61, 145, 0.25);
}
.bubble.them {
  background: #fff;
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
  box-shadow: var(--shadow-sm);
}
.bubble.sys {
  margin: 0 auto;
  background: #eef4ff;
  color: var(--navy);
  font-size: 0.75rem;
}
.bubble img {
  display: block;
  max-width: 220px;
  border-radius: 8px;
  margin-top: 6px;
}
.bubble .meta {
  display: block;
  opacity: 0.7;
  font-size: 0.6875rem;
  margin-top: 4px;
}
.chat-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: #fff;
  align-items: center;
  min-width: 0;
}
.chat-form textarea {
  min-height: 44px;
  resize: none;
  flex: 1 1 auto;
  min-width: 0;
}
.chat-form .btn { flex-shrink: 0; }
.typing {
  font-size: 0.75rem;
  color: var(--muted);
  padding: 0 16px 8px;
  min-height: 18px;
}

/* —— Tables —— */
.table-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  max-width: 100%;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  min-width: 560px;
}
th, td {
  padding: 13px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  background: linear-gradient(180deg, #f5f8fc, #eef3fa);
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 750;
  font-weight: 700;
}
tr:last-child td { border-bottom: 0; }
tr:hover td { background: rgba(11, 61, 145, 0.02); }
.hidden { display: none !important; }
.progress {
  height: 8px;
  background: #e6edf7;
  border-radius: 99px;
  overflow: hidden;
}
.progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--navy), var(--green));
  box-shadow: 0 0 8px rgba(124, 179, 66, 0.4);
}
.preview { display: flex; flex-wrap: wrap; gap: 8px; }
.preview .doc {
  width: 90px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
  font-size: 0.6875rem;
  background: #fff;
  word-break: break-word;
}

.page-main { padding: 48px 20px 80px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.who-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
}

/* —— Responsive —— */

/* Wide desktop: premium wrap, balanced hero, no sparse gaps */
@media (min-width: 1100px) {
  .wrap { max-width: 1120px; }
  .topbar .wrap { max-width: 1180px; }
  .hero-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 40px 48px;
  }
  .cards { gap: 22px; }
  .cards-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Large tablet / small laptop */
@media (max-width: 1100px) {
  .cards-4 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .value-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { gap: 36px; }
}

/* Stack hero & app shell; keep 2-col marketing cards */
@media (max-width: 960px) {
  .hero-grid,
  .layout,
  .row-2 { grid-template-columns: 1fr; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .layout { display: block; }
  .side {
    flex-direction: row;
    overflow-x: auto;
    gap: 6px;
    padding: 12px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .side a,
  .side button.link {
    white-space: nowrap;
    width: auto;
    flex-shrink: 0;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .side a.active { box-shadow: inset 0 -3px 0 var(--green); }
  .brand-text { display: none; }
  .brand img { height: 42px; }
  .hero { padding: 40px 0 52px; }
  .hero-bridge { opacity: 0.08; width: min(280px, 70vw); }
  .section { padding: 40px 0; }
  .page-main { padding: 36px 16px 64px; }
  .logo-card img { max-width: 100%; }
  .main { padding: 22px 16px 36px; }

  /* Hamburger from tablet down — only when a toggle exists (public pages) */
  .nav-toggle { display: inline-flex; }
  .topbar-inner:has(.nav-toggle) {
    position: relative;
    gap: 12px;
  }
  .topbar-inner:has(.nav-toggle) .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px 16px;
    gap: 10px;
    box-shadow: var(--shadow);
    z-index: 60;
  }
  .topbar-inner:has(.nav-toggle) .nav.is-open { display: flex; }
  .topbar-inner:has(.nav-toggle) .nav .btn {
    width: 100%;
    justify-content: center;
    white-space: normal;
    min-height: 44px;
  }
  /* Portal/admin compact account nav without hamburger */
  .topbar-inner:not(:has(.nav-toggle)) .nav {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
  }
}

/* Phone / small tablet: single columns + touch polish */
@media (max-width: 720px) {
  :root { --header-h: 64px; }

  .wrap { padding: 0 16px; }

  .cards,
  .cards-4,
  .stats,
  .row-2,
  .about-points,
  .value-grid,
  .contact-grid { grid-template-columns: 1fr; }

  .hero { padding: 32px 0 40px; }
  .hero-actions { gap: 12px; }
  .hero-actions .btn { width: 100%; }
  .lead { font-size: 1.05rem; max-width: none; }
  h1 { font-size: clamp(1.55rem, 7.2vw, 2.1rem); margin: 12px 0 14px; }
  .steps { margin: 20px 0 24px; gap: 6px; }
  .pill { padding: 7px 12px; font-size: 0.78rem; }
  .logo-card { padding: 18px; border-radius: 18px; }
  .logo-card-wrap::before { inset: -8px; border-radius: 22px; }

  .auth-shell { padding: 28px 16px; }
  .auth-card { padding: 24px 18px; border-radius: 18px; width: 100%; }

  .section { padding: 36px 0; }
  .card { padding: 18px; }
  .info-banner { padding: 20px 18px 20px 22px; }

  .main { padding: 18px 14px 28px; }
  .page-main { padding: 28px 16px 56px; }
  .page-title { gap: 10px; margin-bottom: 16px; }

  .form-actions { gap: 12px; }
  .form-actions .btn { min-height: 44px; }

  #qSearch { max-width: none; }

  .timeline {
    padding: 10px 6px;
    gap: 2px;
  }
  .t-step { min-width: 72px; font-size: 0.7rem; }

  .chat-box { height: min(70vh, 560px); min-height: 280px; border-radius: 14px; }
  .chat-form {
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px;
  }
  .chat-form input[type="file"] {
    max-width: 100% !important;
    width: 100%;
    order: 3;
  }
  .chat-form textarea { width: 100%; flex: 1 1 100%; order: 1; }
  .chat-form .btn { width: 100%; order: 2; }
  .bubble { max-width: 92%; }
  .bubble img { max-width: min(220px, 100%); }

  .table-wrap { border-radius: 12px; margin: 0 -2px; }
  th, td { padding: 11px 12px; }

  .footer { padding: 24px 0; }
  .footer .footer-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  .footer-links {
    max-width: none;
    justify-content: flex-start;
    gap: 12px 16px;
  }
  .footer-trust { max-width: none; font-size: 0.875rem; }

  .stat b { font-size: 1.45rem; }
  .who-label {
    font-size: 0.8rem;
    max-width: 100%;
    overflow-wrap: anywhere;
  }
}

/* Narrow phones (~375–390px) */
@media (max-width: 400px) {
  .wrap { padding: 0 14px; }
  .brand img { height: 38px; }
  .nav-toggle { width: 40px; height: 40px; }
  .hero { padding: 28px 0 36px; }
  .kicker { font-size: 0.68rem; letter-spacing: 0.1em; padding: 5px 10px; }
  .card { padding: 16px; }
  .auth-card { padding: 22px 16px; }
  .main { padding: 16px 12px 24px; }
  .btn-lg { padding: 13px 18px; font-size: 0.95rem; }
  .pill-arrow { display: none; }
  .steps { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}


/* About / explanation block on home */
.about-block { max-width: 1120px; }
.about-prose {
  margin-top: 22px;
  max-width: 820px;
  display: grid;
  gap: 16px;
}
.about-prose p {
  color: var(--muted);
  font-size: 16.5px;
  line-height: 1.7;
}
.about-prose strong { color: var(--ink); font-weight: 700; }
.about-points {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 28px;
}
.about-point h3 {
  color: var(--navy);
  font-size: 1.05rem;
  margin-bottom: 8px;
}
@media (max-width: 900px) {
  .about-points { grid-template-columns: 1fr; }
}
@media (min-width: 721px) and (max-width: 960px) {
  .about-points { grid-template-columns: repeat(2, 1fr); }
}

.about-prose-long { max-width: 860px; gap: 14px; }
.about-prose-long h3 {
  color: var(--navy);
  font-size: 1.15rem;
  margin: 18px 0 0;
  line-height: 1.35;
}
.about-prose-long h3:first-child { margin-top: 0; }
.about-prose-long p { font-size: 16px; line-height: 1.75; }
.about-prose-long em { font-style: italic; }



/* Brand layout helpers */
.belief-list {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.belief-list li {
  position: relative;
  padding: 12px 14px 12px 40px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  font-size: 0.97rem;
  line-height: 1.5;
}
.belief-list li::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 16px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(124, 179, 66, 0.18);
}
.value-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}
.value-grid .card h3 {
  color: var(--navy);
  font-size: 1.05rem;
  margin: 8px 0 8px;
}
.how-steps, .steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
  gap: 16px;
  margin-top: 24px;
}
.how-step {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 18px 18px;
  box-shadow: var(--shadow-sm);
  position: relative;
}
.how-step .step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  font-size: 0.875rem;
  margin-bottom: 12px;
}
.how-step h3 {
  color: var(--navy);
  font-size: 1.05rem;
  margin-bottom: 8px;
}
.how-step p { color: var(--muted); font-size: 0.95rem; }
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 8px;
}
.trust-strip .pill {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--navy);
  font-weight: 600;
}
.checklist {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.checklist li {
  padding-left: 1.4rem;
  position: relative;
  color: var(--muted);
}
.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--green-d);
  font-weight: 700;
}
.faq-list { display: grid; gap: 12px; margin-top: 22px; }
.faq-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}
.faq-item h3 {
  color: var(--navy);
  font-size: 1.02rem;
  margin-bottom: 8px;
}
.faq-item p { color: var(--muted); }
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 22px;
}
.footer-trust {
  max-width: 42rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}
.footer .footer-inner {
  align-items: flex-start;
  gap: 18px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  font-size: 0.9rem;
  max-width: 28rem;
  justify-content: flex-end;
}
.footer-inner > div:first-child { flex: 1 1 280px; min-width: 0; }
.main, .layout, .hero-grid, .cards, .row-2, .stats { min-width: 0; }
#qSearch { width: 100%; max-width: 280px; }
.prose-narrow { max-width: 720px; }
.prose-narrow p + p { margin-top: 12px; }
.section-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}
@media (max-width: 900px) {
  .value-grid, .contact-grid { grid-template-columns: 1fr; }
}
@media (min-width: 721px) and (max-width: 960px) {
  .value-grid, .contact-grid { grid-template-columns: repeat(2, 1fr); }
}
