:root {
  --navy: #0a1d38;
  --green: #2e7d32;
  --ink: #172033;
  --muted: #667085;
  --line: #d8dee8;
  --soft: #f5f7fa;
  --white: #ffffff;
  --warn: #a15c00;
  --danger: #b42318;
  --radius: 8px;
  --shadow: 0 18px 45px rgba(10,29,56,.08);
  font-family: Inter, Manrope, Avenir Next, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: #fbfcfd;
  color: var(--ink);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; }
p { color: var(--muted); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,.98);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(10,29,56,.06);
  backdrop-filter: blur(12px);
}
.nav {
  max-width: 1180px;
  margin: 0 auto;
  min-height: 68px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.brand { display: flex; align-items: center; min-width: 178px; }
.brand img { width: 166px; height: auto; }
.nav-links {
  display: flex;
  gap: 4px;
  align-items: center;
  flex: 1;
  justify-content: center;
  font-size: 14px;
  color: var(--navy);
}
.nav-links a {
  padding: 8px 11px;
  border-radius: 999px;
  color: #344054;
  font-weight: 700;
}
.nav-links a:hover, .nav-links a.active { background: #e8f3e9; color: var(--green); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.mobile-toggle { display: none; }
.mobile-rfq-link { display: none; }

.btn {
  border: 1px solid var(--navy);
  background: var(--navy);
  color: var(--white);
  min-height: 42px;
  padding: 10px 16px;
  border-radius: var(--radius);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:hover { background: #12315a; }
.btn.secondary { background: var(--white); color: var(--navy); }
.btn.secondary:hover { border-color: var(--green); color: var(--green); }
.btn.green { background: var(--green); border-color: var(--green); }
.btn.ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn.small { min-height: 34px; padding: 6px 10px; font-size: 13px; }
.btn.danger { background: var(--danger); border-color: var(--danger); }

.hero {
  min-height: min(720px, calc(100vh - 68px));
  display: grid;
  align-items: end;
  background:
    linear-gradient(90deg, rgba(10,29,56,.90), rgba(10,29,56,.58) 48%, rgba(10,29,56,.18)),
    url("https://images.unsplash.com/photo-1494412519320-aa613dfb7738?auto=format&fit=crop&w=1900&q=82") center/cover;
  color: var(--white);
}
.hero-inner {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 88px 0 86px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #cfe9d1;
  font-weight: 800;
  letter-spacing: 0;
  font-size: 14px;
}
.eyebrow::before { content: ""; width: 34px; height: 2px; background: var(--green); }
h1, h2, h3 { color: var(--navy); line-height: 1.12; margin: 0; letter-spacing: 0; }
.hero h1 {
  max-width: 760px;
  margin-top: 16px;
  font-size: clamp(40px, 6vw, 76px);
  color: var(--white);
}
.hero p {
  max-width: 680px;
  color: #eef4f8;
  font-size: 19px;
  line-height: 1.65;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-next {
  min-height: 52px;
  background: var(--white);
  border-top: 4px solid var(--green);
}

.section { padding: 72px 20px; }
.section.soft { background: var(--soft); }
.container { width: min(1180px, 100%); margin: 0 auto; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 28px;
}
.section-head p { max-width: 660px; color: var(--muted); margin: 12px 0 0; }
.section h2 { font-size: clamp(28px, 3.5vw, 42px); }
.grid { display: grid; gap: 18px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  min-width: 0;
  box-shadow: 0 12px 32px rgba(10,29,56,.06);
}
.card-body { padding: 22px; }
.card h3 { font-size: 21px; margin-bottom: 8px; }
.card p { color: var(--muted); margin: 0 0 14px; }
.card-media {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--soft);
}
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 12px;
}
.pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 9px;
  background: var(--white);
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
}
.step {
  border-left: 3px solid var(--green);
  padding: 4px 0 4px 16px;
}
.step strong { color: var(--navy); display: block; }
.feature-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.feature {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 10px 28px rgba(10,29,56,.05);
}
.feature-icon {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: #e8f3e9;
  color: var(--green);
  display: grid;
  place-items: center;
  flex: 0 0 34px;
}
.feature-icon svg { width: 20px; height: 20px; }

.page-hero {
  background: linear-gradient(135deg, var(--navy), #12315a);
  color: var(--white);
  padding: 70px 20px;
}
.page-hero h1 { color: var(--white); font-size: clamp(34px, 4.5vw, 56px); max-width: 880px; }
.page-hero p { color: #dce6ef; max-width: 820px; font-size: 18px; line-height: 1.7; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, .55fr); gap: 28px; align-items: start; }
.detail-image { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.facts { background: var(--white); border: 1px solid var(--line); padding: 22px; border-radius: var(--radius); box-shadow: 0 12px 32px rgba(10,29,56,.06); }
.facts dl { display: grid; gap: 10px; margin: 0; }
.facts dt { color: var(--muted); font-size: 13px; }
.facts dd { margin: 0; font-weight: 800; color: var(--navy); }

.form {
  display: grid;
  gap: 16px;
}
.form-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--white);
  box-shadow: 0 12px 32px rgba(10,29,56,.06);
}
.form-section h3 { margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { display: grid; gap: 6px; min-width: 0; }
label { color: var(--navy); font-size: 13px; font-weight: 800; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 12px;
  background: var(--white);
  color: var(--ink);
  min-height: 44px;
}
input:focus, textarea:focus, select:focus { outline: 3px solid rgba(46,125,50,.14); border-color: var(--green); }
textarea { min-height: 112px; resize: vertical; }
.span-2 { grid-column: span 2; }
.notice { padding: 12px 14px; border-radius: 6px; background: #e8f3e9; color: #14521a; border: 1px solid #b9ddb9; }
.notice.error { background: #fff1f0; color: var(--danger); border-color: #f5c2be; }
.form-help { margin: 12px 0 0; color: var(--muted); font-size: 13px; }
.rfq-line-list { display: grid; gap: 12px; }
.rfq-line-item {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
}
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
}
.checkbox-grid label {
  display: flex;
  gap: 8px;
  align-items: center;
  font-weight: 700;
}
.checkbox-grid input { width: auto; min-height: auto; }

.site-footer {
  background: var(--navy);
  color: var(--white);
  padding: 42px 20px 86px;
}
.footer-grid { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 1.2fr .8fr .8fr; gap: 24px; }
.footer-grid img { width: 180px; filter: brightness(0) invert(1); margin-bottom: 12px; }
.footer-grid p, .footer-grid a { color: #dce6ef; }
.whatsapp {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: var(--green);
  color: white;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 26px rgba(0,0,0,.24);
  font-weight: 900;
}
.whatsapp svg { width: 31px; height: 31px; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(10,29,56,.9);
  display: grid;
  place-items: center;
  padding: 20px;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-height: 78vh; border-radius: 8px; }
.lightbox-controls { margin-top: 12px; display: flex; justify-content: center; gap: 10px; }

.admin-shell { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; background: var(--soft); }
.admin-sidebar { background: var(--navy); color: white; padding: 20px 16px; position: sticky; top: 0; height: 100vh; }
.admin-sidebar img { width: 190px; filter: brightness(0) invert(1); margin-bottom: 24px; }
.admin-nav { display: grid; gap: 6px; }
.admin-nav a { padding: 10px 12px; border-radius: 6px; color: #e7edf5; font-weight: 700; }
.admin-nav a.active, .admin-nav a:hover { background: rgba(255,255,255,.12); color: white; }
.admin-main { min-width: 0; }
.admin-top { height: 64px; background: white; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 22px; }
.admin-content { padding: 22px; }
.admin-title { display: flex; justify-content: space-between; gap: 14px; align-items: center; margin-bottom: 18px; }
.admin-title h1 { font-size: 30px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat { background: white; border: 1px solid var(--line); border-radius: 8px; padding: 16px; }
.stat b { font-size: 28px; color: var(--navy); display: block; }
.table-wrap { overflow: auto; background: white; border: 1px solid var(--line); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { text-align: left; border-bottom: 1px solid var(--line); padding: 11px 12px; vertical-align: top; }
th { color: var(--navy); background: var(--soft); font-size: 13px; }
td { color: #344054; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(10,29,56,.58);
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal[hidden] { display: none; }
.modal-panel {
  width: min(920px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: white;
  border-radius: 8px;
  padding: 20px;
}
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #eef4f8, #ffffff);
  padding: 20px;
}
.login-card { width: min(420px, 100%); background: white; border: 1px solid var(--line); border-radius: 8px; padding: 28px; }
.login-card img { width: 230px; margin: 0 auto 22px; }
.empty { color: var(--muted); padding: 20px; text-align: center; }

@media (max-width: 980px) {
  .site-header { position: sticky; }
  .nav { height: auto; min-height: 64px; align-items: center; padding: 10px 16px; flex-wrap: wrap; gap: 10px; }
  .brand { min-width: 0; }
  .brand img { width: 150px; }
  .mobile-toggle { display: inline-flex; margin-left: auto; }
  .nav-links {
    display: none;
    width: 100%;
    order: 3;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 8px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 14px 34px rgba(10,29,56,.10);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 12px; border-radius: 6px; font-size: 15px; }
  .mobile-rfq-link {
    display: block;
    margin-top: 4px;
    background: var(--green);
    color: var(--white) !important;
    text-align: center;
  }
  .mobile-rfq-link.active, .mobile-rfq-link:hover { background: var(--green) !important; color: var(--white) !important; }
  .nav-actions { display: none; }
  .nav-links.open + .nav-actions { display: none; }
  .grid.cols-3, .grid.cols-4, .feature-list, .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-layout, .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; height: auto; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  body { font-size: 15px; }
  .hero { min-height: auto; background-position: center; }
  .hero-inner { width: min(100% - 32px, 1180px); padding: 52px 0 56px; }
  .hero h1 { font-size: 34px; }
  .hero p, .page-hero p { font-size: 16px; }
  .brand img { width: 142px; }
  .nav { padding-left: 14px; padding-right: 14px; }
  .mobile-toggle { min-height: 38px; padding: 7px 12px; }
  .nav-actions .btn { width: 100%; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4, .feature-list, .footer-grid, .fields, .stats, .checkbox-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .section { padding: 46px 16px; }
  .page-hero { padding: 46px 16px; }
  .section-head { display: block; }
  .card-body, .form-section, .facts { padding: 18px; }
  .hero-actions { display: grid; gap: 10px; }
  .hero-actions .btn { width: 100%; }
  .whatsapp { width: 52px; height: 52px; right: 14px; bottom: 14px; }
  .admin-content { padding: 14px; }
  .admin-title { align-items: flex-start; flex-direction: column; }
}
