/* =====================================================================
   TAWREED | توريد — Enterprise Design System (RTL Arabic First)
   ===================================================================== */
:root {
  --navy-950: #091020;
  --navy-900: #0f172a;
  --navy-800: #1e293b;
  --navy-700: #334155;
  --emerald-700: #047857;
  --emerald-600: #059669;
  --emerald-500: #10b981;
  --emerald-400: #34d399;
  --emerald-100: #d1fae5;
  --emerald-50: #ecfdf5;
  --amber-600: #d97706;
  --amber-100: #fef3c7;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-500: #64748b;
  --slate-600: #475569;
  --white: #ffffff;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 10px 28px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.16);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Cairo', 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
  background-color: var(--slate-50);
  color: var(--navy-900);
  line-height: 1.7;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.section { padding: 72px 0; }
.section-alt { background: var(--white); border-top: 1px solid var(--slate-200); border-bottom: 1px solid var(--slate-200); }
.section-dark { background: linear-gradient(135deg, var(--navy-950) 0%, var(--navy-900) 65%, #064e3b 100%); color: var(--white); }

.section-header { text-align: center; max-width: 740px; margin: 0 auto 44px; }
.section-eyebrow {
  display: inline-block; font-size: 12.5px; font-weight: 800; color: var(--emerald-700);
  background: var(--emerald-50); border: 1px solid var(--emerald-100);
  padding: 4px 14px; border-radius: 999px; margin-bottom: 12px;
}
.section-dark .section-eyebrow {
  background: rgba(16, 185, 129, 0.15); color: var(--emerald-400); border-color: rgba(52, 211, 153, 0.35);
}
.section-header h2 { font-size: 30px; font-weight: 800; line-height: 1.35; margin-bottom: 10px; }
.section-header p { font-size: 16px; color: var(--slate-600); }
.section-dark .section-header p { color: #cbd5e1; }

/* Navigation */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--slate-200);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 74px; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 46px; height: 46px; border-radius: 10px; border: 1px solid var(--slate-200); object-fit: contain; background: #fff; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-title { font-size: 19px; font-weight: 800; color: var(--navy-900); }
.brand-sub { font-size: 11px; font-weight: 700; color: var(--emerald-700); letter-spacing: 0.6px; }

.nav-links { display: flex; align-items: center; gap: 6px; list-style: none; }
.nav-links a {
  padding: 8px 13px; border-radius: var(--radius-sm); font-size: 14.5px; font-weight: 700;
  color: var(--navy-700); transition: 0.2s;
}
.nav-links a:hover, .nav-links a.active { background: var(--emerald-50); color: var(--emerald-700); }

.nav-actions { display: flex; align-items: center; gap: 10px; }
.menu-toggle {
  display: none; background: var(--slate-100); border: 1px solid var(--slate-200);
  width: 42px; height: 42px; border-radius: var(--radius-sm); cursor: pointer;
  align-items: center; justify-content: center; font-size: 20px; color: var(--navy-900);
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 10px; font-size: 14.5px; font-weight: 700;
  cursor: pointer; border: 1px solid transparent; transition: all 0.2s ease; text-align: center;
}
.btn-sm { padding: 8px 14px; font-size: 13.5px; }
.btn-lg { padding: 14px 24px; font-size: 15.5px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--emerald-600); color: var(--white); }
.btn-primary:hover { background: var(--emerald-700); transform: translateY(-1px); }
.btn-bright { background: var(--emerald-500); color: #022c22; }
.btn-bright:hover { background: var(--emerald-400); transform: translateY(-1px); }
.btn-navy { background: var(--navy-900); color: var(--white); }
.btn-navy:hover { background: var(--navy-800); transform: translateY(-1px); }
.btn-outline-light { background: rgba(255,255,255,0.08); color: var(--white); border-color: rgba(255,255,255,0.28); }
.btn-outline-light:hover { background: rgba(255,255,255,0.18); }
.btn-outline { background: var(--white); color: var(--navy-900); border-color: var(--slate-300); }
.btn-outline:hover { border-color: var(--emerald-600); color: var(--emerald-700); background: var(--emerald-50); }
.btn-dashed {
  background: var(--emerald-50); color: var(--emerald-700); border: 1.5px dashed var(--emerald-500);
}
.btn-dashed:hover { background: var(--emerald-100); }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--navy-950) 0%, var(--navy-900) 58%, #064e3b 100%);
  color: var(--white); padding: 56px 0 68px; position: relative;
}
.hero-grid { display: grid; grid-template-columns: 1.12fr 0.88fr; gap: 36px; align-items: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(16, 185, 129, 0.16); color: var(--emerald-400);
  border: 1px solid rgba(52, 211, 153, 0.35);
  padding: 5px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; margin-bottom: 18px;
}
.hero h1 { font-size: 38px; font-weight: 800; line-height: 1.32; margin-bottom: 16px; }
.hero h1 span { color: var(--emerald-400); }
.hero-lead { font-size: 16.5px; color: #cbd5e1; margin-bottom: 26px; max-width: 590px; }
.hero-cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.hero-trust {
  display: flex; flex-wrap: wrap; gap: 18px; font-size: 13.5px; color: #94a3b8;
  padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.12);
}
.hero-trust span { display: inline-flex; align-items: center; gap: 6px; }
.hero-trust strong { color: var(--emerald-400); }

/* Subpage Banner */
.page-hero {
  background: linear-gradient(135deg, var(--navy-950) 0%, var(--navy-900) 70%, #065f46 100%);
  color: var(--white); padding: 48px 0;
}
.page-hero h1 { font-size: 32px; font-weight: 800; margin-bottom: 8px; }
.page-hero p { color: #cbd5e1; font-size: 16px; max-width: 720px; }

/* Cards & Forms */
.card {
  background: var(--white); color: var(--navy-900); border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow-sm);
}
.hero-card { box-shadow: var(--shadow-lg); border: none; }
.card-title { font-size: 19px; font-weight: 800; margin-bottom: 4px; }
.card-sub { font-size: 13.5px; color: var(--slate-500); margin-bottom: 18px; }

.form-group { margin-bottom: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
label { display: block; font-size: 13.5px; font-weight: 700; color: var(--navy-800); margin-bottom: 5px; }
.req { color: #dc2626; }
input[type="text"], input[type="tel"], input[type="email"], input[type="number"], input[type="date"], select, textarea {
  width: 100%; padding: 10px 13px; border: 1.5px solid var(--slate-300); border-radius: 9px;
  font-size: 14.5px; color: var(--navy-900); background: var(--slate-50); transition: 0.2s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--emerald-600); background: var(--white);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.14);
}
.form-divider { text-align: center; font-size: 12.5px; color: var(--slate-500); margin: 12px 0; }

/* Dual Track Switcher */
.track-tabs {
  display: inline-flex; background: var(--slate-200); padding: 5px; border-radius: 12px;
  margin-bottom: 32px; gap: 6px;
}
.track-tab {
  border: none; background: transparent; padding: 10px 20px; border-radius: 9px;
  font-size: 14.5px; font-weight: 700; color: var(--navy-700); cursor: pointer; transition: 0.2s;
}
.track-tab.active { background: var(--navy-900); color: var(--white); box-shadow: var(--shadow-sm); }

.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.step-card {
  background: var(--white); border: 1px solid var(--slate-200); border-radius: var(--radius-md);
  padding: 22px; position: relative;
}
.step-num {
  width: 34px; height: 34px; border-radius: 10px; background: var(--emerald-600); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px;
  margin-bottom: 12px;
}
.step-card h3 { font-size: 16.5px; font-weight: 800; margin-bottom: 6px; }
.step-card p { font-size: 13.8px; color: var(--slate-600); }

/* Grids */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }

/* Sector Cards */
.sector-card {
  background: var(--white); border: 1px solid var(--slate-200); border-radius: var(--radius-md);
  padding: 22px; transition: 0.2s;
}
.sector-card:hover { border-color: var(--emerald-500); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.sector-icon {
  width: 46px; height: 46px; border-radius: 12px; background: var(--emerald-50); color: var(--emerald-700);
  display: inline-flex; align-items: center; justify-content: center; font-size: 22px; margin-bottom: 14px;
}
.sector-card h3 { font-size: 17px; font-weight: 800; margin-bottom: 6px; }
.sector-card p { font-size: 13.8px; color: var(--slate-600); }

/* Packages */
.pkg-card {
  background: var(--white); border: 1px solid var(--slate-200); border-radius: var(--radius-lg);
  padding: 26px; display: flex; flex-direction: column; justify-content: space-between;
  transition: 0.2s;
}
.pkg-card.featured {
  border: 2px solid var(--emerald-500); background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 42%);
  box-shadow: var(--shadow-md);
}
.pkg-tag {
  display: inline-block; width: fit-content; font-size: 12px; font-weight: 800;
  padding: 4px 11px; border-radius: 999px; background: var(--slate-100); color: var(--navy-700); margin-bottom: 12px;
}
.pkg-card.featured .pkg-tag { background: var(--emerald-600); color: #fff; }
.pkg-card h3 { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.pkg-desc { font-size: 14px; color: var(--slate-600); margin-bottom: 16px; }
.pkg-fee {
  background: var(--slate-50); border: 1px solid var(--slate-200); border-radius: 10px;
  padding: 10px 12px; font-size: 13px; font-weight: 700; color: var(--navy-800); margin-bottom: 16px;
}
.check-list { list-style: none; margin-bottom: 22px; }
.check-list li {
  font-size: 14px; color: var(--navy-800); margin-bottom: 8px; padding-right: 22px; position: relative;
}
.check-list li::before {
  content: "✓"; color: var(--emerald-600); font-weight: 900; position: absolute; right: 0; top: 0;
}

/* Decision Card Preview */
.preview-box {
  background: var(--white); border: 1px solid var(--slate-200); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-md);
}
.preview-head {
  background: var(--navy-900); color: var(--white); padding: 18px 24px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
}
.preview-head small { color: var(--emerald-400); font-weight: 700; display: block; }
.table-wrap { width: 100%; overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 14px; text-align: right; }
table.data-table th {
  background: var(--slate-100); color: var(--navy-800); font-weight: 800;
  padding: 12px 14px; border-bottom: 2px solid var(--slate-200); white-space: nowrap;
}
table.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--slate-200); }
table.data-table tr.winner { background: #f0fdf4; font-weight: 700; }
.pill {
  display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800;
}
.pill-green { background: var(--emerald-100); color: var(--emerald-700); }
.pill-amber { background: var(--amber-100); color: var(--amber-600); }
.pill-slate { background: var(--slate-200); color: var(--navy-700); }

/* BOQ Builder Table */
.boq-table { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
.boq-table th {
  background: var(--navy-900); color: #fff; padding: 10px; font-size: 13px; text-align: right;
}
.boq-table td { padding: 8px; border: 1px solid var(--slate-200); background: #fff; }
.boq-table input, .boq-table select { margin: 0; padding: 8px 10px; font-size: 13.5px; }
.btn-remove {
  background: #fee2e2; color: #b91c1c; border: none; border-radius: 7px;
  width: 34px; height: 34px; cursor: pointer; font-weight: 800;
}
.btn-remove:hover { background: #fecaca; }

/* Group Buy Pools & Calculator */
.pool-card {
  background: var(--white); border: 1px solid var(--slate-200); border-radius: var(--radius-lg);
  padding: 22px; display: flex; flex-direction: column; justify-content: space-between;
}
.pool-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.progress-track {
  width: 100%; height: 10px; background: var(--slate-200); border-radius: 999px; overflow: hidden; margin: 10px 0 6px;
}
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--emerald-500), var(--emerald-700)); border-radius: 999px; }
.price-compare {
  display: flex; align-items: baseline; gap: 14px; background: var(--slate-50);
  padding: 10px 14px; border-radius: 10px; margin: 14px 0;
}
.price-old { text-decoration: line-through; color: var(--slate-500); font-size: 14px; }
.price-new { color: var(--emerald-700); font-size: 20px; font-weight: 800; }

.calc-result {
  background: var(--navy-900); color: var(--white); border-radius: var(--radius-md);
  padding: 20px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; text-align: center;
}
.calc-result .val { font-size: 24px; font-weight: 800; color: var(--emerald-400); }
.calc-result .lbl { font-size: 12.5px; color: #cbd5e1; }

/* Checkbox grid */
.check-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.check-chip {
  display: flex; align-items: center; gap: 8px; background: var(--slate-50);
  border: 1px solid var(--slate-300); border-radius: 9px; padding: 9px 12px; cursor: pointer; font-size: 14px;
}
.check-chip input { width: auto; accent-color: var(--emerald-600); }

/* FAQ Accordion */
.faq-list { max-width: 840px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: var(--white); border: 1px solid var(--slate-200); border-radius: var(--radius-md); overflow: hidden; }
.faq-q {
  width: 100%; text-align: right; background: transparent; border: none; padding: 16px 20px;
  font-size: 15.5px; font-weight: 800; color: var(--navy-900); cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq-a { display: none; padding: 0 20px 18px; font-size: 14.5px; color: var(--slate-600); border-top: 1px solid var(--slate-100); padding-top: 12px; }
.faq-item.open .faq-a { display: block; }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-icon { font-size: 20px; color: var(--emerald-600); transition: 0.2s; font-weight: 700; }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(9, 16, 32, 0.65); z-index: 200;
  display: none; align-items: center; justify-content: center; padding: 16px;
}
.modal-backdrop.open { display: flex; }
.modal-box {
  background: var(--white); border-radius: var(--radius-lg); width: 100%; max-width: 520px;
  padding: 26px; box-shadow: var(--shadow-lg); max-height: 92vh; overflow-y: auto;
}
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.modal-close {
  background: var(--slate-100); border: none; width: 34px; height: 34px; border-radius: 8px;
  font-size: 18px; cursor: pointer; font-weight: 800;
}

/* Footer */
.footer { background: var(--navy-950); color: #cbd5e1; padding: 54px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 28px; margin-bottom: 34px; }
.footer h4 { color: var(--white); font-size: 16px; font-weight: 800; margin-bottom: 14px; }
.footer ul { list-style: none; }
.footer li { margin-bottom: 8px; font-size: 14px; }
.footer a:hover { color: var(--emerald-400); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 13px; color: #94a3b8;
}

/* Floating WhatsApp Button */
.wa-float {
  position: fixed; bottom: 22px; left: 22px; z-index: 150;
  background: #25d366; color: #052e16; font-weight: 800; font-size: 14px;
  padding: 12px 18px; border-radius: 999px; box-shadow: 0 10px 26px rgba(37, 211, 102, 0.38);
  display: inline-flex; align-items: center; gap: 8px; transition: 0.2s;
}
.wa-float:hover { transform: translateY(-2px); background: #22c55e; }

/* Toast */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 250;
  background: var(--navy-900); color: #fff; padding: 12px 20px; border-radius: 10px;
  font-size: 14px; font-weight: 700; box-shadow: var(--shadow-lg);
  display: none; border-right: 4px solid var(--emerald-500);
}
.toast.show { display: block; }

/* Responsive */
@media (max-width: 960px) {
  .hero-grid, .grid-4, .steps-grid, .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .nav-links, .nav-actions { display: none; }
  .menu-toggle { display: inline-flex; }
  .navbar.open .nav-links {
    display: flex; flex-direction: column; width: 100%; position: absolute;
    top: 74px; right: 0; left: 0; background: #fff; padding: 14px 20px;
    border-bottom: 1px solid var(--slate-200); box-shadow: var(--shadow-md); align-items: stretch;
  }
  .hero h1 { font-size: 28px; }
  .section { padding: 52px 0; }
  .grid-2, .grid-4, .steps-grid, .form-row, .form-row-3, .check-grid, .footer-grid, .calc-result {
    grid-template-columns: 1fr;
  }
  .wa-float span.hide-sm { display: none; }
}


/* Legal Agreement & Print Styles */
.legal-doc {
  background: var(--white); border: 1px solid var(--slate-200); border-radius: var(--radius-lg);
  padding: 36px 40px; box-shadow: var(--shadow-md);
}
.legal-header {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding-bottom: 20px; border-bottom: 2px solid var(--navy-900); margin-bottom: 24px;
}
.legal-clause {
  padding: 16px 0; border-bottom: 1px solid var(--slate-200);
}
.legal-clause:last-of-type { border-bottom: none; }
.legal-clause h3 {
  font-size: 17px; font-weight: 800; color: var(--navy-900); margin-bottom: 8px;
  display: flex; align-items: center; gap: 8px;
}
.legal-clause h3 .clause-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 7px; background: var(--emerald-50);
  color: var(--emerald-700); font-size: 13px; font-weight: 800; flex-shrink: 0;
}
.legal-clause p, .legal-clause li {
  font-size: 14.5px; color: var(--slate-600); line-height: 1.8;
}
.legal-clause ul { padding-right: 22px; margin-top: 6px; }
.legal-highlight {
  background: #f0fdf4; border: 1px solid #86efac; border-right: 4px solid var(--emerald-600);
  border-radius: 10px; padding: 14px 18px; margin: 12px 0; color: #064e3b; font-size: 14.5px; font-weight: 600;
}
.legal-notice {
  font-size: 12.5px; color: var(--slate-500); text-align: center; margin-top: 10px;
}
.legal-notice a { color: var(--emerald-700); font-weight: 700; text-decoration: underline; }
.sig-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 24px;
  padding-top: 20px; border-top: 1.5px dashed var(--slate-300);
}
.sig-box {
  background: var(--slate-50); border: 1px solid var(--slate-200); border-radius: 10px; padding: 16px;
}
.sig-box strong { display: block; font-size: 14.5px; color: var(--navy-900); margin-bottom: 6px; }
.sig-box span { display: block; font-size: 13px; color: var(--slate-600); margin-bottom: 4px; }

@media (max-width: 768px) {
  .legal-doc { padding: 22px 18px; }
  .sig-grid { grid-template-columns: 1fr; }
}

@media print {
  body { background: #fff !important; color: #000 !important; font-size: 12px !important; }
  .navbar, .page-hero, .footer, .wa-float, .no-print, #tawreed-toast { display: none !important; }
  .section { padding: 0 !important; }
  .container { max-width: 100% !important; padding: 0 !important; }
  .legal-doc { box-shadow: none !important; border: none !important; padding: 10px !important; }
  .legal-clause { padding: 8px 0 !important; break-inside: avoid; }
  .legal-clause h3 { font-size: 14px !important; margin-bottom: 4px !important; }
  .legal-clause p, .legal-clause li { font-size: 11.5px !important; line-height: 1.55 !important; }
  .legal-highlight { padding: 8px 12px !important; font-size: 11.5px !important; }
}


/* v3 Enhancements: Compact Nav Fit, Preview Switcher & Contractor Badges */
.nav-links { gap: 4px; }
.nav-links a { padding: 7px 10px; font-size: 13.8px; white-space: nowrap; }
.brand-title { font-size: 18px; white-space: nowrap; }
.brand-sub { font-size: 10.5px; }

@media (max-width: 1120px) {
  .nav-actions .btn-outline { display: none; }
}
@media (max-width: 960px) {
  .nav-links, .nav-actions { display: none; }
  .menu-toggle { display: inline-flex; }
  .navbar.open .nav-links {
    display: flex; flex-direction: column; width: 100%; position: absolute;
    top: 74px; right: 0; left: 0; background: #fff; padding: 14px 20px;
    border-bottom: 1px solid var(--slate-200); box-shadow: var(--shadow-md); align-items: stretch;
  }
}

.preview-tabs {
  display: inline-flex; background: var(--slate-200); padding: 4px; border-radius: 10px;
  gap: 6px; margin-top: 18px; flex-wrap: wrap; justify-content: center;
}
.preview-tab {
  border: none; background: transparent; padding: 9px 18px; border-radius: 8px;
  font-size: 14px; font-weight: 700; color: var(--navy-700); cursor: pointer; transition: 0.2s;
}
.preview-tab.active { background: var(--emerald-600); color: #fff; box-shadow: var(--shadow-sm); }

.type-pills {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px;
}
.type-pill {
  position: relative; cursor: pointer;
}
.type-pill input {
  position: absolute; opacity: 0; pointer-events: none;
}
.type-pill span {
  display: block; text-align: center; padding: 8px 6px; border-radius: 9px;
  border: 1.5px solid var(--slate-300); background: var(--slate-50);
  font-size: 12.8px; font-weight: 800; color: var(--navy-700); transition: 0.2s;
}
.type-pill input:checked + span {
  background: var(--emerald-50); border-color: var(--emerald-600); color: var(--emerald-700);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.14);
}
.new-badge {
  display: inline-block; background: #fef3c7; color: #b45309; font-size: 11px;
  font-weight: 800; padding: 2px 8px; border-radius: 999px; margin-right: 6px;
}
@media (max-width: 520px) {
  .type-pills { grid-template-columns: 1fr; }
}


/* =====================================================================
   V3.1 Operational Pilot Additions (Modals, Alerts, File Upload, Honeypot)
   ===================================================================== */
.hp-field {
  position: absolute !important; left: -9999px !important; width: 1px !important;
  height: 1px !important; opacity: 0 !important; pointer-events: none !important;
}
.alert-banner {
  border-radius: 12px; padding: 14px 18px; margin-bottom: 18px; font-size: 14px; line-height: 1.7;
  border: 1px solid transparent;
}
.alert-warn { background: #fffbeb; border-color: #f59e0b; color: #92400e; }
.alert-error { background: #fef2f2; border-color: #ef4444; color: #991b1b; }
.alert-success { background: #ecfdf5; border-color: #10b981; color: #065f46; }
.alert-info { background: #eff6ff; border-color: #3b82f6; color: #1e40af; }

.ref-badge-box {
  background: var(--navy-900); color: #fff; border-radius: 14px; padding: 18px 20px;
  text-align: center; margin: 14px 0 18px; border: 1.5px solid var(--emerald-500);
}
.ref-badge-box .ref-lbl { font-size: 12.5px; color: #94a3b8; margin-bottom: 4px; }
.ref-badge-box .ref-code {
  font-size: 26px; font-weight: 900; color: var(--emerald-400); letter-spacing: 1px; direction: ltr;
}
.ref-badge-box .party-code { font-size: 13px; color: #cbd5e1; margin-top: 6px; direction: ltr; }

.file-drop {
  background: var(--slate-50); border: 1.5px dashed var(--slate-300); border-radius: 10px;
  padding: 12px 14px; font-size: 13.5px; color: var(--slate-600);
}
.file-drop input[type="file"] {
  width: 100%; background: transparent; border: none; padding: 4px 0; font-size: 13.5px;
}
.conditional-section {
  background: #f8fafc; border: 1px solid #cbd5e1; border-radius: 12px; padding: 18px;
  margin-bottom: 16px;
}
.conditional-section h3 {
  font-size: 15.5px; font-weight: 800; color: var(--navy-900); margin-bottom: 12px;
  padding-bottom: 8px; border-bottom: 1px solid #e2e8f0;
}
.btn[disabled] { opacity: 0.65; cursor: not-allowed; transform: none !important; }
.consent-box {
  display: flex; align-items: flex-start; gap: 10px; background: #f0fdf4;
  border: 1px solid #86efac; border-radius: 10px; padding: 11px 14px;
  font-size: 13.5px; color: #064e3b; cursor: pointer; margin: 12px 0;
}
.consent-box input { width: auto; margin-top: 4px; accent-color: var(--emerald-600); flex-shrink: 0; }
.consent-box a { color: #047857; font-weight: 800; text-decoration: underline; }
.empty-state {
  text-align: center; padding: 38px 22px; background: #fff; border: 1.5px dashed var(--slate-300);
  border-radius: var(--radius-lg); color: var(--slate-600);
}
