@font-face {
  font-family: 'Inter';
  src: url('/fonts/Inter_400Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/fonts/Inter_500Medium.ttf') format('truetype');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/fonts/Inter_600SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/fonts/Inter_700Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Cairo';
  src: url('/fonts/Cairo_400Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Cairo';
  src: url('/fonts/Cairo_600SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Cairo';
  src: url('/fonts/Cairo_700Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'NotoSansEthiopic';
  src: url('/fonts/NotoSansEthiopic-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'NotoSansEthiopic';
  src: url('/fonts/NotoSansEthiopic-Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #f6f7f5;
  --surface: #ffffff;
  --surface-tint: #ebf4f4;
  --ink: #122124;
  --muted: #4b6166;
  --hairline: #d8e2e3;
  --primary: #005158;
  --primary-hover: #0e6b73;
  --on-primary: #ffffff;
  --success: #166534;
  --success-bg: #eaf7ee;
  --warn: #854d0e;
  --warn-bg: #fef9c3;
  --danger: #991b1b;
  --danger-bg: #fee2e2;
  --radius-lg: 24px;
  --radius-md: 14px;
  --shadow: 0 12px 32px rgba(0, 42, 46, 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1719;
    --surface: #122124;
    --surface-tint: #172d31;
    --ink: #eef5f5;
    --muted: #9eb5b8;
    --hairline: #233a3e;
    --primary: #1c858e;
    --primary-hover: #249da7;
    --on-primary: #ffffff;
    --success: #86efac;
    --success-bg: #112a1d;
    --warn: #fde047;
    --warn-bg: #2a2410;
    --danger: #fca5a5;
    --danger-bg: #2f1417;
    --shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
  }
}

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

html {
  font-family: 'Inter', 'NotoSansEthiopic', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
html[lang='ar'] { font-family: 'Cairo', 'Inter', system-ui, sans-serif; }
html[lang='ti'] { font-family: 'NotoSansEthiopic', 'Inter', system-ui, sans-serif; }

body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }

.container { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 20px; }

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--hairline);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-weight: 700; font-size: 1.125rem; line-height: 1.15; }
.brand-sub { font-size: 0.78rem; color: var(--muted); }

.topbar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lang-switch {
  display: inline-flex;
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 3px;
}
.lang-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.lang-btn.active { background: var(--primary); color: var(--on-primary); }

.main-grid {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 28px;
  padding-block: 32px 48px;
  align-items: start;
}

@media (max-width: 880px) {
  .main-grid { grid-template-columns: 1fr; padding-block: 20px 36px; }
}

.hero-card {
  background: linear-gradient(150deg, #005158 0%, #0a6870 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
}
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.86;
  margin-bottom: 10px;
}
.hero-card h1 { margin: 0 0 12px; font-size: 1.75rem; line-height: 1.2; letter-spacing: -0.02em; }
.hero-copy { margin: 0 0 22px; opacity: 0.92; font-size: 0.96rem; }

.steps-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.steps-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.steps-list li.active { background: rgba(255, 255, 255, 0.18); border-color: rgba(255, 255, 255, 0.45); }
.steps-list li.done { opacity: 0.85; }
.step-num {
  flex: 0 0 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.85rem;
}
.steps-list li.active .step-num { background: #ffffff; color: #005158; }
.steps-list strong { display: block; font-size: 0.92rem; }
.steps-list span { display: block; font-size: 0.8rem; opacity: 0.86; }

.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow);
}
.trust-card { margin-top: 20px; }
.trust-card h2 { margin: 0 0 12px; font-size: 1.05rem; }
.trust-card ul { margin: 0 0 16px; padding-inline-start: 20px; color: var(--muted); font-size: 0.9rem; display: grid; gap: 8px; }
.trust-links { display: flex; flex-wrap: wrap; gap: 14px; font-size: 0.88rem; }
.trust-links a, .footer-links a { color: var(--primary); font-weight: 600; text-decoration: none; }
.trust-links a:hover, .footer-links a:hover { text-decoration: underline; }

.panel h2 { margin: 0 0 6px; font-size: 1.35rem; letter-spacing: -0.015em; }
.muted { color: var(--muted); margin: 0 0 20px; font-size: 0.93rem; }
.small { font-size: 0.85rem; }

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: var(--bg);
  padding: 4px;
  border-radius: 14px;
  border: 1px solid var(--hairline);
  margin-bottom: 20px;
}
.tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
}
.tab.active { background: var(--surface); color: var(--ink); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); }

.pill {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--surface-tint);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .grid-2 { grid-template-columns: 1fr; } }

.field { margin-bottom: 16px; display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 0.88rem; font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 11px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 81, 88, 0.18);
}
.field input:-webkit-autofill,
.field input:-webkit-autofill:hover,
.field input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  -webkit-box-shadow: 0 0 0 1000px var(--bg) inset;
  transition: background-color 5000s ease-in-out 0s;
}
.field input[readonly] { opacity: 0.78; cursor: default; }
.hint { font-size: 0.78rem; color: var(--muted); }

.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--bg);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
}
.chip-check input { width: auto; margin: 0; accent-color: var(--primary); }

.checkbox-field { margin: 4px 0 18px; }
.check-row { display: flex; align-items: flex-start; gap: 10px; font-size: 0.88rem; color: var(--muted); cursor: pointer; }
.check-row input { margin-top: 3px; accent-color: var(--primary); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 14px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 18px;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-full { width: 100%; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn-outline { background: transparent; border-color: var(--hairline); color: var(--ink); }
.btn-outline:hover { background: var(--bg); }
.btn-ghost { background: transparent; color: var(--muted); padding: 8px 12px; font-size: 0.86rem; }
.btn-ghost:hover { color: var(--ink); background: var(--bg); }
.btn-sm { padding: 6px 10px; font-size: 0.82rem; }

.alert {
  padding: 13px 16px;
  border-radius: 14px;
  margin-bottom: 16px;
  font-size: 0.9rem;
  font-weight: 500;
}
.alert.error { background: var(--danger-bg); color: var(--danger); }
.alert.success { background: var(--success-bg); color: var(--success); }

.status-banner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--warn-bg);
  color: var(--warn);
  font-size: 0.85rem;
  margin-bottom: 14px;
}
.status-banner.approved { background: var(--success-bg); color: var(--success); }
.status-banner.rejected { background: var(--danger-bg); color: var(--danger); }
.status-dot { width: 8px; height: 8px; border-radius: 999px; background: currentColor; }

.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 0 20px;
  padding: 16px;
  border-radius: 16px;
  background: var(--bg);
  border: 1px solid var(--hairline);
}
@media (max-width: 520px) { .summary-grid { grid-template-columns: 1fr; } }
.summary-grid dt { font-size: 0.76rem; color: var(--muted); font-weight: 600; }
.summary-grid dd { margin: 2px 0 0; font-size: 0.94rem; font-weight: 600; }

.credential-box {
  padding: 18px;
  border-radius: 16px;
  background: var(--surface-tint);
  border: 1px solid var(--hairline);
  margin-bottom: 22px;
}
.credential-box h3 { margin: 0 0 4px; font-size: 1rem; }
.cred-current {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  margin-bottom: 12px;
  font-size: 0.88rem;
  font-weight: 600;
}
.upload-drop {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border-radius: 12px;
  border: 1.5px dashed var(--primary);
  background: var(--surface);
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  text-align: center;
}
.upload-drop input { display: none; }

.status-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.footer {
  border-top: 1px solid var(--hairline);
  background: var(--surface);
  padding-block: 18px;
  font-size: 0.85rem;
  color: var(--muted);
}
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; }

.hidden { display: none !important; }
