/* =========================================================
   PharmaPrice Global — Design System
   Palette: Navy #0A1F44 + Gold #C9A86B
   Display: Crimson Pro (serif) · Body: Inter (sans)
   ========================================================= */

:root {
  --navy-900: #0A1F44;
  --navy-800: #122B5A;
  --navy-700: #1E3A74;
  --navy-100: #E7EBF3;

  --gold-500: #C9A86B;
  --gold-600: #B08F4C;
  --gold-100: #F5EDDC;

  --ink-900: #0A1F44;
  --ink-700: #2B3856;
  --ink-500: #5B6478;
  --ink-300: #9AA1B2;

  --surface: #FFFFFF;
  --bg: #F7F8FA;
  --bg-tint: #FAFBFC;

  --border: #E5E7ED;
  --border-strong: #CFD3DE;

  --success: #0F5E3E;
  --success-50: #E4F2EB;
  --warning: #B77412;
  --warning-50: #FBEFDA;
  --danger: #B42318;
  --danger-50: #FDECEA;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;

  --shadow-sm: 0 1px 2px rgba(10, 31, 68, 0.04);
  --shadow: 0 2px 6px rgba(10, 31, 68, 0.06), 0 1px 3px rgba(10, 31, 68, 0.04);
  --shadow-lg: 0 12px 32px rgba(10, 31, 68, 0.08), 0 4px 8px rgba(10, 31, 68, 0.04);

  --font-display: "Crimson Pro", "Playfair Display", Georgia, serif;
  --font-body: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-700);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--navy-900); text-decoration: none; }
a:hover { color: var(--gold-600); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink-900);
  margin: 0 0 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
h1 { font-size: 48px; line-height: 1.1; }
h2 { font-size: 32px; line-height: 1.15; }
h3 { font-size: 22px; line-height: 1.25; }
h4 { font-size: 17px; line-height: 1.3; }

p { margin: 0 0 12px; }

small { color: var(--ink-500); font-size: 13px; }

/* ============ Topbar ============ */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 32px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar .brand {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--navy-900);
  letter-spacing: -0.01em;
}
.topbar .brand .brand-mark { color: var(--gold-500); }
.nav-right { display: flex; align-items: center; gap: 24px; }
.nav-right a:not(.btn) {
  color: var(--ink-700);
  font-size: 14px;
  font-weight: 500;
}
.nav-right a:not(.btn):hover { color: var(--navy-900); }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--gold-100);
  color: var(--navy-900);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid rgba(201, 168, 107, 0.3);
}

/* Language switcher */
.lang-switch {
  display: inline-flex;
  gap: 2px;
  align-items: center;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-left: 8px;
}
.lang-switch a {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 14px;
  color: var(--ink-500);
  transition: background 0.15s, color 0.15s;
}
.lang-switch a:hover { color: var(--navy-900); background: var(--bg); }
.lang-switch a.active { background: var(--navy-900); color: var(--gold-500); }

/* ============ Container / Layout ============ */
.container {
  max-width: 1200px;
  margin: 32px auto;
  padding: 0 24px;
}
.container-narrow { max-width: 720px; margin: 48px auto; padding: 0 24px; }

.layout-with-sidebar {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  max-width: 1360px;
  margin: 0 auto;
  padding: 32px 24px;
}
.sidebar {
  position: sticky;
  top: 88px;
  align-self: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 16px;
  height: fit-content;
}
.sidebar .balance-box {
  text-align: center;
  padding: 16px 12px 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.sidebar .balance-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-500);
  margin-bottom: 8px;
}
.sidebar .balance-value {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 600;
  color: var(--navy-900);
  line-height: 1;
  margin-bottom: 12px;
}
.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--ink-700);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  border-left: 3px solid transparent;
  margin-left: -3px;
}
.sidebar-nav a:hover { background: var(--bg); color: var(--navy-900); }
.sidebar-nav a.active {
  background: var(--gold-100);
  color: var(--navy-900);
  border-left-color: var(--gold-500);
  font-weight: 600;
}

/* ============ Card ============ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}
.card-title {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--ink-900);
  margin: 0 0 4px;
}
.card-subtitle { color: var(--ink-500); font-size: 14px; margin: 0; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-body);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
  line-height: 1.2;
}
.btn.primary {
  background: var(--navy-900);
  color: #fff;
  border-color: var(--navy-900);
}
.btn.primary:hover { background: var(--navy-800); color: #fff; }
.btn.accent {
  background: var(--gold-500);
  color: var(--navy-900);
  border-color: var(--gold-500);
}
.btn.accent:hover { background: var(--gold-600); color: #fff; }
.btn.outline {
  background: transparent;
  color: var(--navy-900);
  border-color: var(--border-strong);
}
.btn.outline:hover { border-color: var(--navy-900); background: var(--navy-100); }
.btn.ghost {
  background: transparent;
  color: var(--navy-900);
  border-color: transparent;
}
.btn.ghost:hover { background: var(--bg); }
.btn.sm { padding: 7px 14px; font-size: 13px; }
.btn.lg { padding: 14px 28px; font-size: 15px; }
.btn:disabled, .btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ============ Forms ============ */
form label {
  display: block;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-900);
}
form input, form select, form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  margin-top: 6px;
  font-size: 14px;
  font-family: var(--font-body);
  background: var(--surface);
  color: var(--ink-900);
  transition: border-color 0.15s, box-shadow 0.15s;
}
form input:focus, form select:focus, form textarea:focus {
  outline: none;
  border-color: var(--navy-900);
  box-shadow: 0 0 0 3px rgba(10, 31, 68, 0.08);
}
form input::placeholder { color: var(--ink-300); }

.input-big {
  font-size: 18px !important;
  padding: 18px 20px !important;
  border-radius: var(--radius) !important;
}

.err { color: var(--danger); font-size: 13px; margin-top: 6px; }

/* ============ Tables ============ */
.data {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 13px;
}
.data th, .data td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}
.data thead th {
  background: var(--navy-900);
  color: #fff;
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.data tbody tr:hover { background: var(--bg-tint); }
.data tr.unavailable td { color: var(--ink-300); font-style: italic; }
.data a { color: var(--navy-900); border-bottom: 1px solid var(--gold-500); }
.data a:hover { color: var(--gold-600); }

/* ============ Hero ============ */
.hero {
  position: relative;
  padding: 80px 24px 64px;
  background:
    radial-gradient(circle at 85% 0%, rgba(201, 168, 107, 0.08) 0%, transparent 55%),
    radial-gradient(circle at 10% 110%, rgba(10, 31, 68, 0.04) 0%, transparent 50%),
    var(--bg);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero h1 {
  font-size: 56px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.hero h1 em { font-style: italic; color: var(--gold-600); }
.hero .lead {
  font-size: 17px;
  color: var(--ink-500);
  line-height: 1.6;
  max-width: 520px;
  margin: 0 0 32px;
}
.hero .search-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-lg);
  max-width: 560px;
}
.hero .search-box .row {
  display: grid;
  grid-template-columns: 160px 1fr auto;
  gap: 10px;
  align-items: center;
}
.hero .search-box label {
  margin: 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-500);
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
}
.hero .social-proof {
  margin-top: 24px;
  font-size: 13px;
  color: var(--ink-500);
}
.hero .hero-illustration {
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero .hero-illustration .glass {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.3));
  backdrop-filter: blur(10px);
  border: 1px solid rgba(201, 168, 107, 0.2);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 380px;
}
.hero .hero-illustration h4 {
  font-family: var(--font-body);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-500);
  margin-bottom: 14px;
  font-weight: 600;
}
.mini-prices { display: flex; flex-direction: column; gap: 10px; }
.mini-price {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 13px;
}
.mini-price .country { font-weight: 600; color: var(--navy-900); }
.mini-price .price { color: var(--gold-600); font-variant-numeric: tabular-nums; font-weight: 600; }

/* ============ Sections ============ */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 24px;
}
.section-title {
  text-align: center;
  margin-bottom: 48px;
}
.section-title .eyebrow {
  display: inline-block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gold-600);
  font-weight: 700;
  margin-bottom: 12px;
}
.section-title h2 { font-size: 36px; margin: 0 0 8px; }
.section-title p { color: var(--ink-500); font-size: 16px; max-width: 600px; margin: 0 auto; }

/* Agency row (fontes oficiais) */
.agencies {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 40px;
  justify-content: center;
  align-items: center;
  padding: 32px 24px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.agencies .label {
  width: 100%;
  text-align: center;
  color: var(--ink-500);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 4px;
  font-weight: 600;
}
.agency-badge {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--ink-500);
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* Features grid */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.15s, transform 0.15s;
}
.feature:hover { border-color: var(--gold-500); transform: translateY(-2px); }
.feature .icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--gold-100);
  color: var(--gold-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
}
.feature h3 { font-size: 18px; margin-bottom: 8px; }
.feature p { font-size: 14px; color: var(--ink-500); margin: 0; }

/* How it works (steps) */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  position: relative;
}
.step { text-align: center; position: relative; }
.step .num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--navy-900);
  color: var(--gold-500);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.step h3 { font-size: 18px; margin-bottom: 6px; }
.step p { color: var(--ink-500); font-size: 14px; max-width: 280px; margin: 0 auto; }

/* Use cases (verticals) */
.use-case {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.use-case .vertical {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold-600);
  font-weight: 700;
}
.use-case h3 { font-size: 20px; margin: 0; }
.use-case p { color: var(--ink-500); font-size: 14px; margin: 0; }

/* Pricing cards */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.pkg {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  transition: border-color 0.15s, transform 0.15s;
  position: relative;
}
.pkg.featured {
  border: 2px solid var(--gold-500);
  transform: translateY(-4px);
}
.pkg.featured::before {
  content: "Mais escolhido";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold-500);
  color: var(--navy-900);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}
.pkg h4 {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--navy-900);
  margin-bottom: 4px;
}
.pkg .tokens-label { font-size: 13px; color: var(--ink-500); margin-bottom: 20px; }
.pkg .price {
  font-family: var(--font-display);
  font-size: 32px;
  color: var(--navy-900);
  margin-bottom: 2px;
}
.pkg .price-sub { font-size: 13px; color: var(--ink-500); margin-bottom: 20px; }
.pkg .pay-btns { display: flex; flex-direction: column; gap: 8px; }

/* ============ Summary cards (result page) ============ */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.summary-stat {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.summary-stat .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-500);
  font-weight: 600;
  margin-bottom: 8px;
}
.summary-stat .value {
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--navy-900);
  line-height: 1.1;
  margin-bottom: 2px;
}
.summary-stat .value.gold { color: var(--gold-600); }
.summary-stat .sub { font-size: 12px; color: var(--ink-500); }

/* Accordion (country groups) */
.accordion {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 12px;
}
.accordion-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  cursor: pointer;
  border-left: 4px solid transparent;
  transition: border-color 0.15s, background 0.15s;
}
.accordion-head:hover { background: var(--bg-tint); }
.accordion.open .accordion-head { border-left-color: var(--gold-500); }
.accordion-head h3 {
  font-family: var(--font-display);
  font-size: 18px;
  margin: 0;
}
.accordion-head .country-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--ink-500);
  font-size: 13px;
}
.accordion-body { display: none; padding: 0 22px 22px; }
.accordion.open .accordion-body { display: block; }
.accordion .chevron { transition: transform 0.2s; color: var(--ink-500); }
.accordion.open .chevron { transform: rotate(90deg); }

/* Status pills */
.pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}
.pill.ok, .pill.active, .pill.done { background: var(--success-50); color: var(--success); }
.pill.warn, .pill.degraded, .pill.running { background: var(--warning-50); color: var(--warning); }
.pill.fail, .pill.circuit_open, .pill.failed { background: var(--danger-50); color: var(--danger); }
.pill.disabled, .pill.refunded { background: var(--border); color: var(--ink-500); }

/* ============ Tabs (admin) ============ */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.tabs button {
  background: transparent;
  border: none;
  padding: 12px 18px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-500);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-family: var(--font-body);
}
.tabs button:hover { color: var(--navy-900); }
.tabs button.active {
  color: var(--navy-900);
  border-bottom-color: var(--gold-500);
  font-weight: 600;
}

/* ============ Suggestions dropdown ============ */
.sugs {
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow);
  position: absolute;
  width: 100%;
  z-index: 10;
  max-height: 260px;
  overflow-y: auto;
}
.sugs li {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}
.sugs li:last-child { border-bottom: none; }
.sugs li:hover { background: var(--gold-100); color: var(--navy-900); }

/* ============ Footer ============ */
.footer {
  margin-top: 64px;
  padding: 48px 32px 32px;
  background: var(--navy-900);
  color: var(--navy-100);
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(231, 235, 243, 0.15);
}
.footer-brand {
  font-family: var(--font-display);
  font-size: 24px;
  color: #fff;
  margin-bottom: 12px;
}
.footer-brand .brand-mark { color: var(--gold-500); }
.footer p { font-size: 13px; color: rgba(231, 235, 243, 0.7); line-height: 1.6; }
.footer h5 {
  font-family: var(--font-body);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-500);
  margin: 0 0 14px;
  font-weight: 700;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer ul a { color: rgba(231, 235, 243, 0.85); font-size: 13px; }
.footer ul a:hover { color: var(--gold-500); }
.footer-bottom {
  max-width: 1200px;
  margin: 24px auto 0;
  font-size: 12px;
  color: rgba(231, 235, 243, 0.5);
  text-align: center;
}

/* ============ Utilities ============ */
.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.mb-0 { margin-bottom: 0 !important; }
.mb-sm { margin-bottom: 8px !important; }
.mb { margin-bottom: 16px !important; }
.mb-lg { margin-bottom: 32px !important; }
.mt-lg { margin-top: 32px !important; }
.txt-muted { color: var(--ink-500); }
.txt-center { text-align: center; }
.txt-mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

/* ============ Responsive ============ */
@media (max-width: 960px) {
  h1 { font-size: 36px; }
  .hero h1 { font-size: 40px; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero .hero-illustration { display: none; }
  .layout-with-sidebar { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 24px; }
  .steps { grid-template-columns: 1fr; }
  .topbar { padding: 14px 16px; }
  .nav-right { gap: 12px; }
  .nav-right a:not(.btn):not(.chip) { display: none; }
}
