/* KFS Associates – design system from the logo: Green + Orange + White (+ logo grey).
   Token names are historical: --navy-* = brand green scale (dark surfaces, text, primary buttons),
   --gold-* = brand orange scale (CTAs, highlights). */
:root {
  --navy-900: #12301a;
  --navy-800: #1c4524;
  --navy-700: #2b6430;
  --navy-600: #4a9a2c;
  --navy-100: #e5f2dc;
  --navy-50: #f5f9f2;
  --gold-600: #b85f00;
  --gold-500: #f7901e;
  --gold-400: #ffa94d;
  --gold-100: #fff0df;
  --white: #ffffff;
  --ink: #1d2a1f;
  --muted: #5f6b62;
  --line: #dfe6dc;
  --on-dark: #d6e6cf;
  --on-dark-muted: #a9bfa3;
  --ok: #1e7f4f;
  --ok-bg: #e5f5ec;
  --warn: #9a6700;
  --warn-bg: #fff4d6;
  --err: #b3261e;
  --err-bg: #fdeaea;
  --info: #1d4f91;
  --info-bg: #e7effa;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(28, 69, 36, .06), 0 8px 24px rgba(28, 69, 36, .08);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--navy-50); line-height: 1.5; font-size: 15px; }
a { color: var(--navy-600); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; color: var(--navy-800); }
img, svg { max-width: 100%; }
.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: 10px; border: 1px solid transparent; font: 600 15px var(--font); cursor: pointer; text-decoration: none; transition: background .15s, box-shadow .15s, transform .05s; }
.btn:active { transform: translateY(1px); }
.btn-gold { background: var(--gold-500); color: var(--navy-900); box-shadow: 0 4px 14px rgba(247, 144, 30, .4); }
.btn-gold:hover { background: var(--gold-400); }
.btn-navy { background: var(--navy-800); color: var(--white); }
.btn-navy:hover { background: var(--navy-700); }
.btn-outline { background: transparent; border-color: currentColor; color: var(--navy-800); }
.btn-light { background: var(--white); color: var(--navy-800); border-color: var(--line); }
.btn-light:hover { background: var(--navy-50); }
.btn-danger { background: var(--err); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 15px 28px; font-size: 17px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }

/* Forms */
label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: var(--navy-800); }
.field { margin-bottom: 16px; }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=date], input[type=datetime-local], input[type=month], input[type=password], input[type=search], select, textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; font: 15px var(--font); color: var(--ink); background: var(--white);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--navy-600); box-shadow: 0 0 0 3px rgba(74, 154, 44, .2); }
.field.has-error input, .field.has-error select { border-color: var(--err); }
.field .error { color: var(--err); font-size: 13px; margin-top: 4px; }
.hint { color: var(--muted); font-size: 13px; margin-top: 4px; }
.input-prefix { display: flex; }
.input-prefix span { padding: 11px 12px; background: var(--navy-50); border: 1px solid var(--line); border-right: 0; border-radius: 10px 0 0 10px; color: var(--muted); }
.input-prefix input { border-radius: 0 10px 10px 0; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 760px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); } }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 14px; color: var(--ink); padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); }
.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--navy-800); flex: none; }

/* Cards, chips, alerts */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card + .card { margin-top: 16px; }
.card h2 { font-size: 18px; }
.chip { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: #eceeec; color: #4d554f; }
.chip-ok { background: var(--ok-bg); color: var(--ok); }
.chip-warn { background: var(--warn-bg); color: var(--warn); }
.chip-err { background: var(--err-bg); color: var(--err); }
.chip-info { background: var(--info-bg); color: var(--info); }
.chip-gold { background: var(--gold-100); color: var(--gold-600); }
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; }
.alert-ok { background: var(--ok-bg); color: var(--ok); }
.alert-err { background: var(--err-bg); color: var(--err); }
.alert-info { background: var(--info-bg); color: var(--info); }

/* ───────── Public site ───────── */
.site-header { background: var(--navy-800); color: var(--white); position: sticky; top: 0; z-index: 10; border-bottom: 1px solid rgba(247, 144, 30, .4); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--white); text-decoration: none; }
/* Logo: small sizes show only the emblem (hands + coin) cropped from the full logo on a white badge */
.logo-mark { width: 44px; height: 44px; flex: none; border-radius: 10px; background: #fff url('/static/img/kfs-logo.webp') no-repeat; background-size: 202%; background-position: 51% 12%; box-shadow: 0 0 0 1px rgba(255, 255, 255, .25); }
.logo-full { display: block; width: 100%; height: auto; }
.logo-panel { background: #fff; border-radius: 12px; padding: 10px; width: 150px; }
.brand-name { font-weight: 800; letter-spacing: .06em; font-size: 16px; }
.brand-sub { display: block; font-size: 10px; letter-spacing: .18em; color: var(--gold-400); font-weight: 600; }
.site-nav { display: flex; align-items: center; gap: 20px; }
.site-nav a.link { color: var(--on-dark); text-decoration: none; font-size: 14px; }
.site-nav a.link:hover { color: var(--white); }
.site-nav a.link.active { color: var(--gold-400); }
.nav-toggle { display: none; background: transparent; border: 1px solid rgba(255, 255, 255, .3); color: #fff; border-radius: 8px; font-size: 20px; padding: 4px 10px; cursor: pointer; }
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .site-nav { display: none; position: absolute; top: 68px; left: 0; right: 0; background: var(--navy-800); flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 16px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
  .site-nav.open { display: flex; }
  .site-nav a.link { padding: 12px 4px; border-bottom: 1px solid rgba(255, 255, 255, .08); font-size: 16px; }
  .site-nav .btn { margin-top: 12px; }
}
@media (max-width: 640px) { .brand-sub { display: none; } }
.topstrip { background: var(--navy-900); color: var(--on-dark); font-size: 13px; }
.topstrip .container { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 34px; flex-wrap: wrap; }
.topstrip a { color: var(--on-dark); text-decoration: none; margin-left: 16px; }
.topstrip a:hover { color: #fff; }
@media (max-width: 640px) { .topstrip .container > span:first-child { display: none; } .topstrip-links { width: 100%; display: flex; justify-content: space-between; } .topstrip a { margin: 0; } }

.hero { background: radial-gradient(1200px 500px at 80% -10%, rgba(247, 144, 30, .22), transparent 60%), linear-gradient(160deg, var(--navy-800), var(--navy-900)); color: var(--white); padding: 64px 0 88px; }
.hero .container { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.hero h1 { color: var(--white); font-size: clamp(30px, 5vw, 48px); letter-spacing: -.02em; }
.hero h1 em { color: var(--gold-400); font-style: normal; }
.hero p.lead { color: var(--on-dark); font-size: 18px; max-width: 560px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 20px; }
.hero .actions .btn-outline { color: var(--white); }
.trust { display: flex; gap: 22px; flex-wrap: wrap; color: var(--on-dark); font-size: 14px; }
.trust b { color: var(--gold-400); }
.calc { background: var(--white); color: var(--ink); border-radius: 16px; padding: 24px; box-shadow: 0 20px 50px rgba(0, 0, 0, .3); border-top: 4px solid var(--gold-500); }
.calc h2 { font-size: 20px; }
.calc-result { background: var(--navy-50); border-radius: 10px; padding: 16px; margin-top: 8px; text-align: center; }
.calc-result .amt { font-size: 30px; font-weight: 800; color: var(--navy-800); }
@media (max-width: 860px) { .hero .container { grid-template-columns: minmax(0, 1fr); } .hero { padding: 40px 0 56px; } }

.section { padding: 64px 0; }
.section.alt { background: var(--white); }
.section-title { text-align: center; max-width: 640px; margin: 0 auto 36px; }
.section-title .eyebrow { color: var(--gold-600); font-weight: 700; letter-spacing: .14em; font-size: 12px; text-transform: uppercase; }
.feature { padding: 24px; }
.feature .icon { width: 44px; height: 44px; border-radius: 10px; background: var(--gold-100); color: var(--gold-600); display: grid; place-items: center; font-weight: 800; margin-bottom: 12px; }
.steps { counter-reset: s; }
.step { position: relative; padding-left: 56px; margin-bottom: 20px; }
.step::before { counter-increment: s; content: counter(s); position: absolute; left: 0; top: 0; width: 40px; height: 40px; border-radius: 50%; background: var(--navy-800); color: var(--gold-400); display: grid; place-items: center; font-weight: 800; }
.doclist li { margin-bottom: 8px; }
.cta-band { background: linear-gradient(120deg, var(--navy-800), var(--navy-700)); color: var(--white); border-radius: 16px; padding: 36px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.cta-band h2 { color: var(--white); margin: 0; }
.site-footer { background: var(--navy-900); color: var(--on-dark-muted); padding: 40px 0 24px; font-size: 14px; }
.site-footer a { color: var(--on-dark); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 0.8fr 0.8fr; gap: 24px; }
@media (max-width: 1000px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: minmax(0, 1fr); } }
.footer-h { color: #fff; display: block; margin-bottom: 4px; }
.site-footer p { line-height: 1.9; }
.wa-float { position: fixed; right: 18px; bottom: 18px; width: 56px; height: 56px; border-radius: 50%; background: #25d366; display: grid; place-items: center; box-shadow: 0 6px 20px rgba(0, 0, 0, .25); z-index: 30; }
.wa-float svg { width: 30px; height: 30px; }
.wa-float:hover { transform: scale(1.05); }

/* Corporate pages */
.page-hero { background: radial-gradient(900px 400px at 85% -20%, rgba(247, 144, 30, .2), transparent 60%), linear-gradient(160deg, var(--navy-800), var(--navy-900)); color: #fff; padding: 56px 0 64px; }
.page-hero h1 { color: #fff; font-size: clamp(28px, 4vw, 42px); }
.page-hero p { color: var(--on-dark); font-size: 18px; max-width: 720px; margin: 0; }
.eyebrow { color: var(--gold-600); font-weight: 700; letter-spacing: .14em; font-size: 12px; text-transform: uppercase; }
.page-hero .eyebrow { color: var(--gold-400); }
.stats-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: -36px; position: relative; }
.stats-strip .stat { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; border-top: 3px solid var(--gold-500); }
.stats-strip .stat b { display: block; font-size: 22px; color: var(--navy-800); }
.stats-strip .stat span { color: var(--muted); font-size: 14px; }
@media (max-width: 860px) { .stats-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.prose { max-width: 760px; }
.prose p, .prose li { color: var(--ink); font-size: 16px; }
.value-card h3 { margin-bottom: 6px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--navy-800); font-size: 16px; }
.faq details[open] summary { margin-bottom: 8px; }
.faq details p { margin: 6px 0 0; color: var(--muted); }
.contact-card { display: flex; gap: 14px; align-items: flex-start; }
.contact-card .icon { width: 44px; height: 44px; border-radius: 10px; background: var(--gold-100); display: grid; place-items: center; font-size: 20px; flex: none; }
.contact-card a { font-weight: 600; }
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { padding-left: 28px; position: relative; margin-bottom: 10px; }
.check-list li::before { content: '✓'; position: absolute; left: 0; top: 0; color: var(--navy-600); font-weight: 800; }
.site-footer .disclaimer { border-top: 1px solid rgba(255, 255, 255, .08); margin-top: 24px; padding-top: 16px; font-size: 12px; }

/* Application wizard */
.page-head { background: var(--navy-800); color: var(--white); padding: 32px 0 72px; }
.page-head h1 { color: var(--white); font-size: 28px; }
.page-head p { color: var(--on-dark); margin: 0; }
.form-wrap { max-width: 760px; margin: -48px auto 48px; }
.stepper { display: flex; gap: 8px; margin-bottom: 20px; }
.stepper .st { flex: 1; text-align: center; font-size: 13px; font-weight: 600; color: var(--muted); padding-bottom: 8px; border-bottom: 3px solid var(--line); }
.stepper .st.active { color: var(--navy-800); border-color: var(--gold-500); }
.stepper .st.done { color: var(--ok); border-color: var(--ok); }
.product-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.product-switch a { display: block; padding: 12px 14px; border: 2px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); background: var(--white); }
.product-switch a b { display: block; color: var(--navy-800); }
.product-switch a span { font-size: 13px; color: var(--muted); }
.product-switch a.active { border-color: var(--gold-500); background: var(--gold-100); }
.wizard-step h2 { font-size: 18px; padding-bottom: 8px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.js .wizard-step { display: none; }
.js .wizard-step.active { display: block; }
.wizard-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; }
.secure-note { display: flex; gap: 8px; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; margin-top: 16px; }

/* Success */
.success-card { text-align: center; padding: 40px 24px; }
.success-mark { width: 72px; height: 72px; border-radius: 50%; background: var(--gold-100); color: var(--gold-600); display: grid; place-items: center; margin: 0 auto 16px; font-size: 36px; font-weight: 800; }
.appno { display: inline-block; font-size: 26px; font-weight: 800; letter-spacing: .08em; color: var(--navy-800); background: var(--navy-50); border: 1px dashed var(--navy-600); border-radius: 10px; padding: 8px 18px; margin: 8px 0 16px; }

/* Upload portal */
.progress { height: 10px; background: var(--navy-100); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-500), var(--gold-400)); width: 0; transition: width .3s; }
.doc-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.doc-row:last-child { border-bottom: 0; }
.doc-row .title { font-weight: 600; color: var(--navy-800); }
.doc-row .files { font-size: 13px; color: var(--muted); margin-top: 2px; word-break: break-all; }
.doc-row .reason { font-size: 13px; color: var(--err); margin-top: 4px; }
.doc-row .bar { grid-column: 1 / -1; display: none; }
.doc-row.uploading .bar { display: block; }
.doc-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
@media (max-width: 560px) { .doc-row { grid-template-columns: minmax(0, 1fr); } .doc-actions { justify-content: flex-start; } }

/* ───────── Admin ───────── */
.admin { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--navy-800); color: var(--on-dark); padding: 20px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .brand { margin: 0 6px 24px; }
.sidebar nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; color: var(--on-dark); text-decoration: none; font-size: 14px; font-weight: 500; margin-bottom: 2px; }
.sidebar nav a:hover { background: rgba(255, 255, 255, .06); color: var(--white); }
.sidebar nav a.active { background: rgba(247, 144, 30, .18); color: var(--gold-400); }
.sidebar .nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--on-dark-muted); margin: 18px 12px 6px; }
.main { padding: 0 0 40px; min-width: 0; }
.topbar { background: var(--white); border-bottom: 1px solid var(--line); height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; gap: 16px; position: sticky; top: 0; z-index: 5; }
.topbar form.search { flex: 1; max-width: 420px; }
.topbar .who { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.content { padding: 24px; }
.content-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.content-head h1 { font-size: 24px; margin: 0; }
.menu-toggle { display: none; }
@media (max-width: 900px) {
  .admin { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: -260px; width: 240px; z-index: 20; transition: left .2s; }
  .sidebar.open { left: 0; box-shadow: 0 0 40px rgba(0, 0, 0, .4); }
  .menu-toggle { display: inline-flex; }
  .content { padding: 16px; }
  .topbar { padding: 0 16px; }
  .topbar .who .name { display: none; }
}
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
@media (max-width: 1000px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); border-left: 4px solid var(--navy-700); }
.kpi.gold { border-left-color: var(--gold-500); }
.kpi .label { color: var(--muted); font-size: 13px; font-weight: 500; }
.kpi .value { font-size: 28px; font-weight: 800; color: var(--navy-800); margin-top: 4px; }
.funnel-row { display: grid; grid-template-columns: 170px 1fr 44px; gap: 10px; align-items: center; margin-bottom: 8px; font-size: 13px; }
.funnel-row .track { background: var(--navy-50); border-radius: 6px; height: 14px; overflow: hidden; }
.funnel-row .fill { background: var(--navy-700); height: 100%; border-radius: 6px; min-width: 2px; }
.funnel-row .fill.gold { background: var(--gold-500); }
.funnel-row .fill.red { background: var(--err); }
.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
@media (max-width: 1100px) { .two-col { grid-template-columns: minmax(0, 1fr); } }
.table-wrap { overflow-x: auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--navy-50); color: var(--navy-700); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafcf8; }
.card table th { background: transparent; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; align-items: flex-end; }
.filters > * { flex: 1 1 150px; }
.filters .btn { flex: 0 0 auto; }
.kv { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 6px 12px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; word-break: break-word; }
.timeline { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.timeline li { padding: 8px 0 8px 18px; border-left: 2px solid var(--line); position: relative; }
.timeline li::before { content: ''; position: absolute; left: -6px; top: 13px; width: 10px; height: 10px; border-radius: 50%; background: var(--gold-500); }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-form > input, .inline-form > select { width: auto; flex: 1 1 140px; }
details.box { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin-top: 10px; background: var(--navy-50); }
details.box summary { cursor: pointer; font-weight: 600; color: var(--navy-700); }
.login-wrap { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(160deg, var(--navy-800), var(--navy-900)); padding: 16px; }
.login-card { width: 100%; max-width: 400px; }
.login-card .brand { color: var(--navy-800); justify-content: center; margin-bottom: 20px; }
.pagination { display: flex; gap: 6px; margin-top: 16px; }
.danger-zone { border-color: #f1c2c0; }
@media print { .sidebar, .topbar, .content-head .btn, .alert.flash { display: none !important; } .admin { display: block; } .card { box-shadow: none; } }
