:root {
  --usa-blue: #0a3161;
  --usa-blue-dark: #072448;
  --usa-red: #b50909;
  --ink: #1e1f21;
  --muted: #6b7280;
  --paper: #f6f7f9;
  --border: #e5e7eb;
}

html, body { height: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.usa-header .topbar { height: 4px; background: var(--usa-red); }
.usa-header .main { background: var(--usa-blue); color: #fff; }
.usa-header .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  font-weight: 700;
  min-width: 0;
}
.usa-header .header-row { gap: 16px; }
.usa-badge {
  width: 36px; height: 36px; border-radius: 50%;
  background: #fff; color: var(--usa-blue);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800;
}
.usa-subtitle { opacity: .95; font-weight: 500; font-size: 14px; }

.usa-header .lang-switch { display: inline-flex; }
.usa-header .lang-switch .btn {
  background: #fff;
  color: var(--usa-blue);
  border: none;
  border-radius: 999px;
  font-weight: 700;
  padding-inline: 14px;
  box-shadow: 0 6px 12px rgba(0,0,0,0.08);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.usa-header .lang-switch .btn:hover {
  background: #f3f6fb;
  box-shadow: 0 10px 20px rgba(0,0,0,0.12);
  transform: translateY(-1px);
}
.usa-header .lang-switch .btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 8px rgba(0,0,0,0.08);
}

@media (max-width: 575.98px) {
  .usa-header .header-row {
    display: grid !important;
    grid-template-columns: minmax(0, 3fr) minmax(110px, 1fr);
    align-items: center;
    column-gap: 12px;
  }
  .usa-header .brand { padding: 12px 0; }
  .usa-header .lang-switch {
    display: grid;
    gap: 8px;
    align-content: center;
    justify-items: stretch;
  }
  .usa-header .lang-switch .btn {
    width: 100%;
    text-align: center;
    padding-inline: 12px;
    margin: 0 !important;
  }
}

.card { border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.card .card-body { border-radius: 10px; }

h1, h2, h3, h4, h5 { letter-spacing: .2px; }
h1.h4 { font-weight: 700; }

.btn-primary { background-color: var(--usa-blue); border-color: var(--usa-blue); }
.btn-primary:hover { background-color: var(--usa-blue-dark); border-color: var(--usa-blue-dark); }
.btn-outline-secondary { border-color: #d1d5db; color: #374151; }
.btn-outline-secondary:hover { background-color: #f3f4f6; }

.form-label { font-weight: 600; color: #1f2937; }
.form-text { color: var(--muted); }

hr { opacity: .2; }

textarea.form-control { min-height: 90px; }

.section-title {
  padding-left: 10px;
  border-left: 4px solid var(--usa-blue);
}
html[dir="rtl"] .section-title { padding-left: 0; padding-right: 10px; border-left: 0; border-right: 4px solid var(--usa-blue); }

.footer-note { color: var(--muted); font-size: 12px; }

/* Stepper */
.sidebar-stepper { position: sticky; top: 18px; }
.sidebar-stepper .step {
  display: block;
  padding: 10px 12px;
  color: #111;
  border-left: 3px solid transparent;
  text-decoration: none;
  background: transparent;
  border-radius: 6px;
}
.sidebar-stepper .step:hover { background: #f3f4f6; }
.sidebar-stepper .step .num {
  width: 22px; height: 22px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #eef2f7; color: #374151; font-size: 12px; margin-inline-end: 8px;
}
.sidebar-stepper .step.active {
  border-left-color: var(--usa-blue);
  background: #f8fafc;
  font-weight: 600;
}
html[dir="rtl"] .sidebar-stepper .step { border-left: 0; border-right: 3px solid transparent; }
html[dir="rtl"] .sidebar-stepper .step.active { border-right-color: var(--usa-blue); }

/* Utilities */
.text-muted { color: var(--muted) !important; }
.small { font-size: .875rem; }
