/* BKI-Fuel shared styles */
:root {
  /* Official BKI-Fuel white-label palette: main #D9772B, secondary #1B365D */
  --navy: #1B365D;
  --navy-2: #142947;
  --navy-3: #2a4d80;
  --orange: #D9772B;
  --orange-dark: #b65f1e;
  --sun: #e9a05e;
  --bg: #f4f6f9;
  --card: #ffffff;
  --ink: #16222e;
  --muted: #5c6b7a;
  --line: #dde4ec;
  --green: #1e9e5a;
  --red: #d4452c;
  --amber: #c98a00;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(13, 27, 42, .10);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: var(--orange); text-decoration: none; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--navy); color: #fff;
  border-bottom: 3px solid var(--orange);
}
.nav-inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; color: #fff; letter-spacing: .5px; }
.brand .flame { width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--sun), var(--orange) 70%);
  display: grid; place-items: center; font-size: 18px; }
.brand b { color: var(--orange); }
.nav-logo { height: 40px; width: 40px; border-radius: 50%; object-fit: cover;
  background: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,.35); }

/* inline SVG icon system (feather-style strokes) */
.fi { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.12em; display: inline-block; }
.card .icon { color: var(--orange); }
.card .icon .fi { width: 34px; height: 34px; }
.big-ico { display: flex; justify-content: center; margin-bottom: 8px; color: var(--green); }
.big-ico .fi { width: 56px; height: 56px; }
.ci-row { display: flex; align-items: center; gap: 12px; padding: 5px 0; }
.ci-row .fi { color: var(--orange); width: 20px; height: 20px; flex: 0 0 20px; }
.brand-tagline { display: block; font-size: .62rem; font-weight: 600; letter-spacing: 1.5px;
  color: #cfdae6; text-transform: uppercase; margin-top: -2px; }
.nav-links { display: flex; gap: 22px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.nav-links a { color: #cfdae6; font-weight: 500; font-size: .95rem; }
.nav-links a:hover { color: #fff; }
.nav-links a.cta {
  background: var(--orange); color: #fff; padding: 8px 18px; border-radius: 999px; font-weight: 700;
}
.nav-links a.cta:hover { background: var(--orange-dark); }

/* ---------- hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-3) 60%, #27506f 100%);
  color: #fff; padding: 72px 0 64px; position: relative; overflow: hidden;
}
.hero::after {
  content: ''; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px;
  border-radius: 50%; background: radial-gradient(circle, rgba(242,106,33,.35), transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero h1 { font-size: 2.9rem; line-height: 1.15; font-weight: 800; }
.hero h1 span { color: var(--orange); }
.hero p.lead { margin: 18px 0 28px; font-size: 1.15rem; color: #d8e2ec; max-width: 54ch; }
.hero-img { border-radius: var(--radius); box-shadow: var(--shadow); border: 4px solid rgba(255,255,255,.12); }
.btn {
  display: inline-block; background: var(--orange); color: #fff; font-weight: 700;
  padding: 13px 28px; border-radius: 999px; border: none; cursor: pointer; font-size: 1rem;
  font-family: inherit; transition: background .15s, transform .15s;
}
.btn:hover { background: var(--orange-dark); transform: translateY(-1px); }
.btn.ghost { background: transparent; border: 2px solid rgba(255,255,255,.5); }
.btn.ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.btn.dark { background: var(--navy); }
.btn.small { padding: 8px 16px; font-size: .88rem; }
.btn.danger { background: var(--red); }
.btn.green { background: var(--green); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- sections ---------- */
section { padding: 64px 0; }
section.alt { background: #fff; }
.sec-head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.sec-head .kicker { color: var(--orange); font-weight: 700; text-transform: uppercase; letter-spacing: 2px; font-size: .85rem; }
.sec-head h2 { font-size: 2.1rem; margin-top: 6px; }
.sec-head p { color: var(--muted); margin-top: 10px; }

.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }

.card {
  background: var(--card); border-radius: var(--radius); padding: 26px;
  box-shadow: var(--shadow); border: 1px solid var(--line);
}
.card .icon { font-size: 2rem; margin-bottom: 12px; }
.card h3 { font-size: 1.12rem; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: .95rem; }

.stat { text-align: center; }
.stat .num { font-size: 2.2rem; font-weight: 800; color: var(--orange); }
.stat .lbl { color: var(--muted); font-size: .9rem; }

.steps { counter-reset: step; }
.step { display: flex; gap: 18px; margin-bottom: 22px; align-items: flex-start; }
.step .n {
  counter-increment: step; flex: 0 0 44px; height: 44px; border-radius: 50%;
  background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 800;
}
.step .n::before { content: counter(step); }

/* ---------- forms ---------- */
form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
label { display: block; font-weight: 600; font-size: .9rem; margin: 14px 0 6px; }
label .req { color: var(--red); }
input, select, textarea {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 10px;
  font-family: inherit; font-size: .98rem; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--orange); }
textarea { min-height: 92px; resize: vertical; }
.checks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 4px; }
.checks label { display: flex; align-items: center; gap: 8px; font-weight: 500; margin: 0; font-size: .92rem; }
.checks input { width: auto; }
.form-msg { margin-top: 16px; padding: 12px 16px; border-radius: 10px; display: none; font-weight: 500; }
.form-msg.ok { display: block; background: #e7f6ee; color: var(--green); border: 1px solid #bfe6d0; }
.form-msg.err { display: block; background: #fdeeea; color: var(--red); border: 1px solid #f3cdc4; }

/* ---------- tables & badges ---------- */
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: .93rem; }
th { background: var(--navy); color: #fff; font-weight: 600; white-space: nowrap; }
tr:hover td { background: #f8fafc; }
.badge { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.badge.submitted, .badge.under_review { background: #e8eef7; color: #2d5d9f; }
.badge.approved, .badge.payment_submitted { background: #fff3e4; color: var(--amber); }
.badge.certified, .badge.won, .badge.verified, .badge.sent, .badge.active { background: #e7f6ee; color: var(--green); }
.badge.rejected, .badge.lost, .badge.failed, .badge.suspended { background: #fdeeea; color: var(--red); }
.badge.changes_requested, .badge.queued { background: #fdf6e3; color: #9a7b10; }
.badge.lead { background: #eef1f5; color: var(--muted); }
.badge.contacted { background: #e8eef7; color: #2d5d9f; }
.badge.demo { background: #eee8f7; color: #6b3fa0; }
.badge.negotiation { background: #fff3e4; color: var(--amber); }

/* ---------- portal layout ---------- */
.portal-top { background: var(--navy); color: #fff; padding: 14px 0; border-bottom: 3px solid var(--orange); }
.portal-top .container { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.portal-top .who { margin-left: auto; font-size: .9rem; color: #cfdae6; }
.portal-main { padding: 28px 0 60px; }
.tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.tabs button {
  border: 1.5px solid var(--line); background: #fff; padding: 9px 18px; border-radius: 999px;
  cursor: pointer; font-family: inherit; font-weight: 600; font-size: .92rem; color: var(--muted);
}
.tabs button.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 24px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.kpi .v { font-size: 1.7rem; font-weight: 800; color: var(--navy); }
.kpi .k { color: var(--muted); font-size: .84rem; }
.modal-bg {
  display: none; position: fixed; inset: 0; background: rgba(13,27,42,.55); z-index: 100;
  align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto;
}
.modal-bg.open { display: flex; }
.modal { background: #fff; border-radius: var(--radius); max-width: 760px; width: 100%; padding: 28px; position: relative; }
.modal .x { position: absolute; right: 16px; top: 12px; font-size: 1.5rem; cursor: pointer; color: var(--muted); background: none; border: none; }
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 18px; margin: 14px 0; }
.detail-grid div { padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: .92rem; }
.detail-grid b { color: var(--muted); font-weight: 600; display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .5px; }

/* ---------- auth card ---------- */
.auth-wrap { min-height: calc(100vh - 64px); display: grid; place-items: center; padding: 40px 16px; }
.auth-card { width: 100%; max-width: 420px; }

/* ---------- footer ---------- */
footer { background: var(--navy); color: #9fb0c0; padding: 44px 0 28px; margin-top: 0; }
footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; margin-bottom: 26px; }
footer h4 { color: #fff; margin-bottom: 10px; }
footer a { color: #9fb0c0; display: block; padding: 3px 0; font-size: .92rem; }
footer a:hover { color: var(--orange); }
footer .fine { border-top: 1px solid #23374a; padding-top: 18px; font-size: .85rem; text-align: center; }

/* ---------- certificate ---------- */
.cert-wrap { max-width: 900px; margin: 36px auto; padding: 0 16px; }
.cert {
  background: #fff; border: 10px double var(--navy); padding: 56px 64px; position: relative;
  box-shadow: var(--shadow);
}
.cert::before {
  content: ''; position: absolute; inset: 18px; border: 2px solid var(--orange); pointer-events: none;
}
.cert .c-head { text-align: center; }
.cert .c-head .flame {
  width: 72px; height: 72px; margin: 0 auto 10px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--sun), var(--orange) 70%);
  display: grid; place-items: center; font-size: 34px;
}
.cert h1 { font-size: 1.9rem; color: var(--navy); letter-spacing: 2px; }
.cert .c-sub { color: var(--orange); font-weight: 700; letter-spacing: 4px; text-transform: uppercase; font-size: .85rem; margin-top: 4px; }
.cert .c-body { text-align: center; margin: 34px 0; }
.cert .c-body .to { font-size: .95rem; color: var(--muted); }
.cert .c-body .name { font-size: 2.1rem; font-weight: 800; color: var(--navy); margin: 8px 0; }
.cert .c-body .desc { max-width: 60ch; margin: 14px auto; color: var(--ink); }
.cert .c-meta { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 44px; gap: 20px; }
.cert .c-meta .box { font-size: .88rem; }
.cert .c-meta .box b { display: block; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: 1px; }
.cert .sig { text-align: center; }
.cert .sig .line { width: 200px; border-top: 1.5px solid var(--ink); margin-bottom: 6px; }
.cert .qr img { width: 110px; height: 110px; }
@media print {
  body { background: #fff; }
  .no-print { display: none !important; }
  .cert-wrap { margin: 0; max-width: none; }
  .cert { box-shadow: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 920px) {
  .nav-inner { height: auto; min-height: 64px; flex-wrap: wrap; padding: 10px 0; gap: 10px; }
  .nav-links { margin-left: 0; gap: 14px; }
  .hero-grid, .grid3, .grid4, .grid2, footer .cols { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.1rem; }
  form .row, .checks, .detail-grid { grid-template-columns: 1fr; }
  .cert { padding: 36px 24px; }
  .cert .c-meta { flex-direction: column; align-items: center; }
}
