/* ManufacturersEU — shared styles */
:root {
  --navy: #0A1628;
  --navy-2: #12274A;
  --navy-3: #1A3A6B;
  --gold: #C9A84C;
  --gold-soft: #F6EFD9;
  --panel: #EEF1F6;
  --line: #D7DEE8;
  --text: #1F2937;
  --muted: #5B6B82;
  --green: #1B7A43;
  --green-soft: #E6F4EC;
  --red: #B42318;
  --red-soft: #FDECEA;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(10, 22, 40, 0.08);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: #fff;
  line-height: 1.55;
  font-size: 16px;
}
a { color: var(--navy-3); }
img { max-width: 100%; }
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.hidden { display: none !important; }

/* ── Header ── */
.site-header { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 50; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.brand { color: #fff; text-decoration: none; font-weight: 800; font-size: 20px; letter-spacing: 0.2px; white-space: nowrap; }
.brand span { color: var(--gold); }
.nav { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.nav a { color: #DCE4F0; text-decoration: none; font-size: 14.5px; padding: 8px 12px; border-radius: 8px; }
.nav a:hover, .nav a.active { background: var(--navy-2); color: #fff; }
.nav a.cta { background: var(--gold); color: var(--navy); font-weight: 700; }
.nav a.cta:hover { background: #d8b95c; }
.nav-toggle { display: none; background: none; border: 1px solid var(--navy-3); color: #fff; border-radius: 8px; padding: 6px 10px; font-size: 18px; cursor: pointer; }

/* ── Setup banner (shown until Supabase keys are pasted) ── */
.setup-banner { background: var(--gold-soft); border-bottom: 1px solid var(--gold); color: #6B5310; font-size: 14px; padding: 10px 0; }
.setup-banner code { background: #fff; padding: 1px 6px; border-radius: 4px; }

/* ── Hero ── */
.hero { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 65%, var(--navy-3) 100%); color: #fff; padding: 72px 0 80px; }
.kicker { color: var(--gold); font-weight: 700; font-size: 13px; letter-spacing: 2px; text-transform: uppercase; margin: 0 0 12px; }
.hero h1 { font-size: clamp(32px, 5vw, 52px); line-height: 1.1; margin: 0 0 18px; max-width: 760px; }
.hero h1 em { color: var(--gold); font-style: normal; }
.hero p.lead { font-size: 19px; color: #DCE4F0; max-width: 640px; margin: 0 0 30px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.trust-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 30px; }
.trust-row span { border: 1px solid var(--navy-3); color: #C9D4E6; font-size: 13px; padding: 5px 12px; border-radius: 999px; }
.live-count { margin-top: 18px; color: var(--gold); font-weight: 600; font-size: 15px; }

/* ── Buttons ── */
.btn { display: inline-block; border: 0; border-radius: 8px; padding: 13px 22px; font-size: 16px; font-weight: 700; cursor: pointer; text-decoration: none; text-align: center; font-family: inherit; }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: #d8b95c; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-2); }
.btn-ghost { background: transparent; color: #fff; border: 1.5px solid #9FB0C8; }
.btn-ghost:hover { border-color: #fff; }
.btn-light { background: #fff; color: var(--navy); border: 1px solid var(--line); }
.btn-light:hover { border-color: var(--navy-3); }
.btn-sm { padding: 7px 12px; font-size: 13.5px; }
.btn-green { background: var(--green); color: #fff; }
.btn-red { background: #fff; color: var(--red); border: 1px solid #F1B5AE; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ── Sections ── */
section.block { padding: 64px 0; }
section.block.alt { background: var(--panel); }
.section-title { font-size: clamp(26px, 3.4vw, 34px); color: var(--navy); margin: 0 0 10px; line-height: 1.2; }
.section-sub { color: var(--muted); font-size: 17px; margin: 0 0 34px; max-width: 700px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 8px; color: var(--navy); font-size: 19px; }
.card p { margin: 0; color: var(--muted); }
.step-num { width: 38px; height: 38px; border-radius: 50%; background: var(--navy); color: var(--gold); display: flex; align-items: center; justify-content: center; font-weight: 800; margin-bottom: 14px; }
.side-card { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 30px; }
.side-card h3 { color: var(--gold); margin: 0 0 12px; font-size: 21px; }
.side-card ul { margin: 0 0 22px; padding-left: 20px; color: #DCE4F0; }
.side-card li { margin-bottom: 7px; }
.cat-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.cat-pills a { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; color: var(--navy); text-decoration: none; font-size: 14.5px; }
.cat-pills a:hover { border-color: var(--gold); background: var(--gold-soft); }

/* ── Forms ── */
.page-head { background: var(--navy); color: #fff; padding: 44px 0 40px; }
.page-head h1 { margin: 0 0 8px; font-size: clamp(28px, 4vw, 38px); }
.page-head p { margin: 0; color: #C9D4E6; max-width: 680px; font-size: 17px; }
.form-wrap { max-width: 820px; margin: 0 auto; padding: 40px 20px 70px; }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
fieldset { border: 0; margin: 0 0 28px; padding: 0; }
legend { font-weight: 800; color: var(--navy); font-size: 18px; margin-bottom: 14px; padding: 0; }
legend small { font-weight: 400; color: var(--muted); font-size: 14px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 16px; }
.field label, .label { display: block; font-weight: 600; font-size: 14.5px; margin-bottom: 6px; color: var(--navy); }
.req { color: var(--red); }
input[type=text], input[type=email], input[type=tel], input[type=url], input[type=number], input[type=date], input[type=password], input[type=search], select, textarea {
  width: 100%; padding: 11px 13px; border: 1px solid #C5CFDC; border-radius: 8px; font-size: 15.5px; font-family: inherit; color: var(--text); background: #fff;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--navy-3); box-shadow: 0 0 0 3px rgba(26, 58, 107, 0.15); }
.hint { font-size: 13px; color: var(--muted); margin-top: 5px; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px 14px; }
.check { display: flex; align-items: flex-start; gap: 8px; font-size: 14.5px; cursor: pointer; }
.check input { margin-top: 4px; width: 16px; height: 16px; flex-shrink: 0; }
.consent { background: var(--panel); border-radius: 8px; padding: 14px; font-size: 14px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }  /* honeypot */
.error-msg { color: var(--red); font-size: 13.5px; margin-top: 5px; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--red); }
.field.has-error .checks { outline: 1px solid var(--red); outline-offset: 6px; border-radius: 4px; }

.alert { border-radius: 8px; padding: 14px 16px; margin-bottom: 18px; font-size: 15px; }
.alert-error { background: var(--red-soft); color: var(--red); border: 1px solid #F1B5AE; }
.alert-ok { background: var(--green-soft); color: var(--green); border: 1px solid #A9D8BC; }
.alert-info { background: var(--gold-soft); color: #6B5310; border: 1px solid #E4CF8F; }

.success-panel { text-align: center; padding: 30px 10px; }
.success-panel .tick { width: 64px; height: 64px; border-radius: 50%; background: var(--green-soft); color: var(--green); font-size: 34px; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.success-panel h2 { color: var(--navy); margin: 0 0 8px; }
.success-panel .ref { display: inline-block; background: var(--panel); border-radius: 8px; padding: 6px 14px; font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; color: var(--navy); margin: 10px 0 18px; }

/* ── Directory ── */
.filters { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 12px; margin-bottom: 22px; align-items: end; }
.result-meta { color: var(--muted); margin-bottom: 14px; font-size: 14.5px; }
.mfr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.mfr-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.mfr-card h3 { margin: 0 0 4px; color: var(--navy); font-size: 18px; }
.mfr-loc { color: var(--muted); font-size: 14px; margin-bottom: 10px; }
.mfr-products { font-size: 14.5px; margin: 0 0 12px; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.tag { background: var(--panel); color: var(--navy); font-size: 12.5px; padding: 3px 10px; border-radius: 999px; }
.tag.gold { background: var(--gold-soft); color: #6B5310; }
.verified { color: var(--green); font-size: 13px; font-weight: 700; }
.empty { text-align: center; color: var(--muted); padding: 50px 20px; border: 1px dashed var(--line); border-radius: var(--radius); }
.pager { display: flex; gap: 10px; justify-content: center; margin-top: 26px; }

/* ── Admin ── */
.admin-bar { background: var(--navy-2); color: #fff; }
.admin-bar .container { display: flex; justify-content: space-between; align-items: center; min-height: 52px; gap: 12px; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs button { background: none; border: 0; color: #C9D4E6; padding: 9px 14px; border-radius: 8px; cursor: pointer; font-size: 14.5px; font-family: inherit; }
.tabs button.active { background: var(--gold); color: var(--navy); font-weight: 700; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 26px 0; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.stat .num { font-size: 30px; font-weight: 800; color: var(--navy); line-height: 1.1; }
.stat .lbl { color: var(--muted); font-size: 13.5px; }
.milestones { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 26px; box-shadow: var(--shadow); }
.ms-row { display: grid; grid-template-columns: 170px 1fr 110px; gap: 14px; align-items: center; margin: 10px 0; font-size: 14.5px; }
.bar { background: var(--panel); border-radius: 999px; height: 12px; overflow: hidden; }
.bar > div { background: var(--gold); height: 100%; border-radius: 999px; }
.bar > div.done { background: var(--green); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.toolbar input[type=search] { max-width: 280px; }
.toolbar select { max-width: 200px; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { background: var(--navy); color: #fff; text-align: left; padding: 10px 12px; font-weight: 600; white-space: nowrap; }
table.data td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: top; }
table.data tr:hover td { background: #FAFBFD; }
table.data tr.clickable { cursor: pointer; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge.pending, .badge.new { background: var(--gold-soft); color: #6B5310; }
.badge.approved, .badge.offers_sent { background: var(--green-soft); color: var(--green); }
.badge.rejected, .badge.closed { background: #EEF0F3; color: #6B7280; }
.badge.in_progress { background: #E3ECFA; color: var(--navy-3); }

/* Detail drawer */
.drawer-bg { position: fixed; inset: 0; background: rgba(10, 22, 40, 0.45); z-index: 90; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: #fff; z-index: 100; overflow-y: auto; padding: 26px; box-shadow: -6px 0 24px rgba(0,0,0,0.15); }
.drawer h2 { margin: 0 0 4px; color: var(--navy); }
.drawer .close { float: right; background: none; border: 0; font-size: 26px; cursor: pointer; color: var(--muted); line-height: 1; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 14px; font-size: 14.5px; margin: 18px 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }
.drawer-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0; }
.match-list { font-size: 14px; }
.match-list li { margin-bottom: 6px; }

/* Login */
.login-box { max-width: 420px; margin: 70px auto; }

/* ── Footer ── */
.site-footer { background: var(--navy); color: #9FB0C8; padding: 34px 0; font-size: 14px; }
.site-footer .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: #DCE4F0; text-decoration: none; margin-right: 16px; }
.site-footer a:hover { color: var(--gold); }

/* ── Prose (privacy page) ── */
.prose { max-width: 780px; margin: 0 auto; padding: 40px 20px 70px; }
.prose h2 { color: var(--navy); margin-top: 30px; }

/* ── Responsive ── */
@media (max-width: 860px) {
  .grid-3, .grid-2, .stats { grid-template-columns: 1fr 1fr; }
  .filters { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--navy); flex-direction: column; align-items: stretch; padding: 10px 20px 16px; }
  .nav.open { display: flex; }
  .grid-3, .grid-2, .row, .stats, .filters { grid-template-columns: 1fr; }
  .form-card { padding: 20px; }
  .ms-row { grid-template-columns: 1fr; gap: 4px; }
  .kv { grid-template-columns: 1fr; }
  .hero { padding: 50px 0 56px; }
}
