:root {
  --bg: #ffffff;
  --surface: #f8fafc;
  --surface-strong: #f1f5f9;
  --text: #18202a;
  --muted: #657386;
  --line: #e2e8f0;
  --brand: #f28b22;
  --brand-dark: #c65f11;
  --brand-soft: #fff2e5;
  --navy: #111827;
  --green: #16a34a;
  --blue: #2563eb;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 18px 50px rgba(17, 24, 39, 0.10);
  --shadow-soft: 0 10px 30px rgba(17, 24, 39, 0.07);
  --container: 1180px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  background: var(--navy);
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  z-index: 100;
}
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid rgba(242,139,34,.45); outline-offset: 3px; }

.container { width: min(100% - 32px, var(--container)); margin: 0 auto; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.nav {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand img { width: 54px; height: 42px; object-fit: contain; border-radius: 8px; }
.brand strong { display: block; font-size: 1.12rem; line-height: 1.1; }
.brand span { display: block; font-size: .78rem; color: var(--muted); white-space: nowrap; }
.nav-links { display: flex; align-items: center; gap: 18px; font-size: .95rem; color: #394557; }
.nav-links a:hover { color: var(--brand-dark); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.mobile-toggle { display: none; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 9px 11px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 750;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #171717; box-shadow: 0 12px 28px rgba(242,139,34,.24); }
.btn-primary:hover { background: #ff9d37; }
.btn-secondary { background: #fff; color: var(--navy); border-color: var(--line); box-shadow: var(--shadow-soft); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-ghost { background: transparent; color: var(--brand-dark); border-color: rgba(242,139,34,.35); }

.hero {
  position: relative;
  overflow: hidden;
  padding: 48px 0 42px;
  background:
    radial-gradient(circle at 82% 12%, rgba(242,139,34,.16), transparent 34%),
    linear-gradient(180deg, #fff 0%, #fff 52%, #f8fafc 100%);
}
.page-hero {
  padding: 64px 0 42px;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}
.page-hero h1 {
  margin: 0;
  font-size: clamp(2.25rem, 5vw, 4.8rem);
  line-height: 1;
  color: var(--navy);
}
.page-hero p { color: #415066; font-size: 1.1rem; max-width: 780px; }
.narrow { width: min(100% - 32px, 860px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 34px; align-items: center; }
.hero h1 { margin: 0; font-size: clamp(2.35rem, 5vw, 4.45rem); line-height: .98; letter-spacing: 0; color: var(--navy); }
.hero .lead { margin: 18px 0 0; max-width: 680px; font-size: clamp(1rem, 1.65vw, 1.22rem); color: #415066; }
.hero-actions { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-notes { margin-top: 18px; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.note-card { background: rgba(255,255,255,.78); border: 1px solid var(--line); border-radius: 14px; padding: 12px; color: #445166; font-size: .9rem; }
.hero-visual { position: relative; min-height: 390px; }
.visual-board {
  position: relative;
  min-height: 380px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  overflow: hidden;
  padding: 24px;
}
.visual-board:before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(242,139,34,.12), transparent 45%), radial-gradient(circle at 80% 88%, rgba(37,99,235,.10), transparent 30%);
}
.logo-tile, .flow-card, .metric-strip { position: relative; z-index: 1; }
.logo-tile { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 16px; }
.logo-tile img { width: 74px; height: 56px; object-fit: contain; }
.logo-tile b { color: var(--navy); font-size: 1.15rem; }
.flow-stack { margin-top: 18px; display: grid; gap: 10px; }
.flow-card { display: flex; gap: 12px; align-items: center; background: rgba(255,255,255,.88); border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.flow-icon { width: 38px; height: 38px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-dark); display: grid; place-items: center; font-weight: 900; flex: 0 0 auto; }
.metric-strip { margin-top: 18px; display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.metric { background: var(--navy); color: #fff; border-radius: 16px; padding: 14px; min-height: 78px; }
.metric span { color: #cbd5e1; font-size: .78rem; display:block; }
.metric strong { font-size: 1.35rem; display:block; margin-top: 6px; }

.section { padding: 76px 0; }
.section.alt { background: var(--surface); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.section-head h2 { margin: 0; font-size: clamp(1.8rem, 3vw, 3rem); line-height: 1.05; color: var(--navy); }
.section-head p { margin: 10px 0 0; color: var(--muted); max-width: 680px; }
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  box-shadow: var(--shadow-soft);
}
.step-card { min-height: 190px; }
.step-num { width: 42px; height: 42px; border-radius: 14px; background: var(--brand); display: grid; place-items: center; font-weight: 900; color: #171717; margin-bottom: 18px; }
.step-card h3, .lote-card h3, .category-card h3 { margin: 0 0 8px; color: var(--navy); }
.step-card p, .category-card p, .lote-card p { margin: 0; color: var(--muted); }
.category-card { background: linear-gradient(180deg, #fff, #f8fafc); min-height: 160px; }
.category-icon { font-size: 1.8rem; margin-bottom: 14px; }

.lote-card { display: grid; gap: 14px; }
.lote-top { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 9px; background: var(--brand-soft); color: var(--brand-dark); font-size: .76rem; font-weight: 800; white-space: nowrap; }
.badge.blue { background: #eaf1ff; color: #1d4ed8; }
.badge.green { background: #e9f8ee; color: #15803d; }
.lote-meta { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.meta-box { background: var(--surface); border-radius: 12px; padding: 10px; }
.meta-box span { display: block; color: var(--muted); font-size: .76rem; }
.meta-box strong { color: var(--navy); font-size: .94rem; }
.lote-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.split { display: grid; grid-template-columns: .95fr 1.05fr; gap: 28px; align-items: center; }
.panel-list { display: grid; gap: 12px; }
.panel-row { display:flex; gap:12px; align-items:start; padding:14px; border:1px solid var(--line); border-radius:14px; background:#fff; }
.panel-row b { color: var(--navy); }
.preview-note h2 { margin-top: 0; color: var(--navy); }
.preview-note p { color: var(--muted); }
.audience-card { min-height: 260px; }
.audience-card .flow-icon { margin-bottom: 16px; }
.audience-card h3 { margin: 0 0 10px; color: var(--navy); }
.audience-card p { margin: 0; color: var(--muted); }
.cta-band { background: var(--navy); color: #fff; border-radius: 28px; padding: 34px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 18px; box-shadow: var(--shadow); }
.cta-band h2 { margin: 0; font-size: clamp(1.55rem, 3vw, 2.6rem); line-height: 1.05; }
.cta-band p { margin: 10px 0 0; color: #cbd5e1; }

.site-footer { background: #0f172a; color: #e5e7eb; padding: 40px 0; }
.footer-grid { display: grid; grid-template-columns: 1.2fr repeat(3,.8fr); gap: 24px; }
.footer-grid p, .footer-grid a { color: #aeb8c7; }
.footer-grid h3, .footer-grid h4 { color: #fff; margin-top: 0; }
.footer-logo { width: 62px; height: 48px; object-fit: contain; background:#fff; border-radius:10px; padding:4px; margin-bottom:12px; }

.admin-shell { background: #f6f8fb; min-height: 100vh; }
.safety-banner {
  margin-top: 22px;
  background: #fff7ed;
  border: 1px solid rgba(242,139,34,.42);
  border-left: 6px solid var(--brand);
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: var(--shadow-soft);
}
.safety-banner strong { color: #8a4b00; font-size: 1.05rem; }
.safety-banner p { margin: 4px 0 0; color: #5f3900; }
.admin-hero { padding: 42px 0 24px; }
.admin-title { display:flex; justify-content:space-between; align-items:end; gap:18px; }
.admin-title h1 { margin:0; font-size:clamp(2rem,4vw,4rem); line-height:1; color:var(--navy); }
.admin-title p { margin:12px 0 0; color:var(--muted); max-width:760px; }
.toolbar { display:grid; grid-template-columns: 1fr 220px 240px; gap:12px; margin:24px 0; }
.input, .select {
  width:100%; min-height:46px; border:1px solid var(--line); border-radius:12px; background:#fff; padding:10px 12px; color:var(--text);
}
.dashboard-grid { display:grid; grid-template-columns: 280px minmax(0, 1fr); gap:20px; align-items:start; max-width:100%; }
.dashboard-grid > *, .match-layout > *, .tab-panel { min-width: 0; }
#tabla { min-width: 0; max-width: 100%; overflow: hidden; }
.workflow { position: sticky; top: 96px; }
.workflow ol { margin: 0; padding-left: 20px; color: #405064; }
.workflow li { margin: 0 0 12px; }
.table-wrap { width:100%; max-width:100%; overflow:auto; border:1px solid var(--line); border-radius:18px; background:#fff; box-shadow:var(--shadow-soft); }
table { width:100%; border-collapse:collapse; min-width:1120px; }
th, td { text-align:left; padding:14px 14px; border-bottom:1px solid var(--line); vertical-align:top; }
th { background:#f8fafc; color:#4b5563; font-size:.82rem; text-transform:uppercase; letter-spacing:.04em; }
td { font-size:.93rem; }
tr:hover td { background:#fffaf5; }
.product-cell strong { display:block; color:var(--navy); }
.product-cell span { display:block; color:var(--muted); font-size:.84rem; }
.kpi-row { display:grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap:14px; margin: 0 0 20px; }
.kpi { background:#fff; border:1px solid var(--line); border-radius:16px; padding:16px; }
.kpi span { color:var(--muted); font-size:.8rem; }
.kpi strong { display:block; margin-top:4px; color:var(--navy); font-size:1.4rem; }
.empty { padding: 28px; color: var(--muted); text-align:center; }
.admin-tabs { display:flex; flex-wrap:wrap; gap:10px; margin: 16px 0 20px; }
.tab-button {
  border:1px solid var(--line);
  background:#fff;
  color:#344054;
  min-height:42px;
  padding:10px 14px;
  border-radius:12px;
  font-weight:800;
  cursor:pointer;
}
.tab-button.active { background:var(--navy); color:#fff; border-color:var(--navy); box-shadow:var(--shadow-soft); }
.tab-panel { display:none; }
.tab-panel.active { display:block; }
.intake-form label, .match-search label { display:grid; gap:7px; color:#394557; font-weight:800; font-size:.9rem; }
.form-grid { display:grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap:14px; }
.full-span { grid-column: 1 / -1; }
.textarea { resize: vertical; min-height: 116px; }
.form-actions { display:flex; align-items:center; gap:16px; flex-wrap:wrap; margin-top:18px; }
.form-warning {
  margin:0;
  color:#8a4b00;
  background:var(--brand-soft);
  border:1px solid rgba(242,139,34,.35);
  border-radius:12px;
  padding:10px 12px;
  font-weight:800;
}
.match-layout { display:grid; grid-template-columns: 340px 1fr; gap:20px; align-items:start; }
.match-search { position:sticky; top:96px; }
.demo-query-list { display:flex; flex-wrap:wrap; gap:8px; margin-top:16px; }
.query-chip {
  border:1px solid var(--line);
  background:#f8fafc;
  color:#344054;
  border-radius:999px;
  padding:8px 10px;
  cursor:pointer;
  font-size:.84rem;
  font-weight:750;
}
.query-chip:hover { border-color:rgba(242,139,34,.65); background:var(--brand-soft); }
.match-results { display:grid; gap:14px; }
.match-card { display:grid; gap:14px; }
.best-match { border-color:rgba(22,163,74,.45); box-shadow:0 16px 36px rgba(22,163,74,.12); }
.compact { margin-top: 38px; }
.demo-contact-note {
  margin: 0;
  color: #8a4b00;
  font-size: .8rem;
  font-weight: 800;
}
.contact-action { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.sop-grid { display:grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap:18px; }
.sop-card h2 { margin: 0 0 12px; color: var(--navy); }
.sop-card p, .sop-card li { color: var(--muted); }
.sop-card ul { margin: 12px 0 0; padding-left: 20px; }
.wide-card { grid-column: 1 / -1; }
.script-box {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  color: var(--navy);
  font-weight: 700;
}

@media (max-width: 920px) {
  .mobile-toggle { display: inline-flex; }
  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 78px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 10px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px; border-radius: 10px; }
  .header-actions .btn { display: none; }
  .hero-grid, .split, .dashboard-grid, .cta-band, .match-layout, .sop-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 44px; }
  .hero-visual { min-height: auto; }
  .visual-board { min-height: 360px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .toolbar { grid-template-columns: 1fr; }
  .workflow, .match-search { position: static; }
  .kpi-row { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .form-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .container { width: min(100% - 24px, var(--container)); }
  .nav { height: 70px; }
  .brand img { width: 46px; height: 36px; }
  .brand span { display:none; }
  .nav-links { top:70px; }
  .hero h1 { font-size: 2.55rem; }
  .hero-notes, .metric-strip, .grid-3, .grid-4, .lote-meta, .kpi-row, .footer-grid, .form-grid { grid-template-columns: 1fr; }
  .section { padding: 54px 0; }
  .section-head { display:block; }
  .cta-band { border-radius: 20px; padding: 24px; }
  .admin-title { display:block; }
  .safety-banner { display:block; }
  .admin-tabs { display:grid; grid-template-columns: 1fr; }
  .wide-card { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior:auto !important; transition:none !important; animation:none !important; }
}

.muted { color: var(--muted); }
.supplier-card, .order-card { min-height: 190px; }
