
:root {
  --blue:#2563eb;
  --blue-dark:#1d4ed8;
  --blue-soft:#eff6ff;
  --dark:#0f172a;
  --muted:#64748b;
  --line:#e2e8f0;
  --bg:#f8fafc;
  --white:#ffffff;
  --green:#16a34a;
  --green-soft:#dcfce7;
  --amber:#f59e0b;
  --amber-soft:#fef3c7;
  --red:#ef4444;
  --red-soft:#fee2e2;
  --purple:#7c3aed;
  --shadow:0 12px 30px rgba(15,23,42,.08);
  --shadow-lg:0 24px 70px rgba(15,23,42,.16);
  --radius:28px;
}

* { box-sizing:border-box; }
html { scroll-behavior:smooth; }
body {
  margin:0;
  font-family:"Nunito", Arial, Helvetica, sans-serif;
  background:var(--bg);
  color:var(--dark);
}
a { color:inherit; text-decoration:none; }
button, input, select, textarea { font-family:inherit; }
button { cursor:pointer; }

.container {
  max-width:1220px;
  margin:0 auto;
  padding:0 18px;
}

.nav {
  position:sticky;
  top:0;
  z-index:40;
  background:rgba(255,255,255,.92);
  backdrop-filter:blur(14px);
  border-bottom:1px solid var(--line);
}
.nav-inner {
  min-height:76px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}
.brand {
  display:flex;
  align-items:center;
  gap:12px;
}
.logo {
  width:48px;
  height:48px;
  border-radius:18px;
  background:linear-gradient(135deg,var(--blue),#60a5fa);
  color:white;
  display:grid;
  place-items:center;
  font-size:25px;
  font-weight:900;
  box-shadow:0 10px 24px rgba(37,99,235,.24);
  flex:0 0 auto;
}
.brand b { display:block; font-size:22px; line-height:1; }
.brand small { display:block; color:var(--muted); font-size:13px; font-weight:800; margin-top:4px; }
.nav-links {
  display:none;
  gap:22px;
  font-weight:900;
  color:#334155;
}
.nav-links a.active,
.nav-links a:hover { color:var(--blue); }
.nav-actions {
  display:flex;
  gap:10px;
  align-items:center;
}
.mobile-menu-btn { display:block; }

.btn {
  border:0;
  border-radius:16px;
  padding:12px 16px;
  font-weight:900;
  transition:.2s ease;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:44px;
}
.btn:hover { transform:translateY(-1px); }
.btn-primary {
  background:var(--blue);
  color:#fff;
  box-shadow:0 10px 22px rgba(37,99,235,.2);
}
.btn-primary:hover { background:var(--blue-dark); }
.btn-dark { background:var(--dark); color:#fff; }
.btn-light { background:#fff; color:var(--dark); border:1px solid var(--line); }
.btn-soft { background:var(--blue-soft); color:var(--blue); border:1px solid #dbeafe; }
.btn-green { background:var(--green-soft); color:#166534; border:1px solid #bbf7d0; }
.btn-red { background:var(--red-soft); color:#991b1b; border:1px solid #fecaca; }
.icon-btn {
  width:46px;
  height:46px;
  border:1px solid var(--line);
  background:#fff;
  border-radius:16px;
  font-size:20px;
  font-weight:900;
  display:grid;
  place-items:center;
}

.hero {
  position:relative;
  overflow:hidden;
  background:linear-gradient(135deg,#1d4ed8,#172554 60%,#020617);
  color:#fff;
  padding:58px 0 64px;
}
.hero::before,
.hero::after {
  content:"";
  position:absolute;
  border-radius:999px;
  filter:blur(48px);
  opacity:.22;
}
.hero::before { width:280px; height:280px; background:#60a5fa; right:-80px; top:-70px; }
.hero::after { width:320px; height:320px; background:#22d3ee; left:-120px; bottom:-130px; }
.hero-grid {
  position:relative;
  display:grid;
  gap:30px;
}
.pill {
  display:inline-flex;
  align-items:center;
  gap:8px;
  background:rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.18);
  color:#e0ecff;
  padding:10px 14px;
  border-radius:999px;
  font-weight:900;
}
.hero h1,
.page-title {
  margin:18px 0 12px;
  font-size:clamp(34px,6vw,66px);
  line-height:1.03;
  letter-spacing:-2px;
}
.hero p,
.page-sub {
  margin:0;
  max-width:760px;
  color:#dbeafe;
  font-size:18px;
  line-height:1.75;
}
.hero-actions {
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:22px;
}
.stats {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
  max-width:620px;
  margin-top:24px;
}
.stat {
  background:rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.18);
  border-radius:24px;
  padding:16px;
}
.stat b { display:block; font-size:26px; }
.stat span { display:block; color:#dbeafe; font-size:14px; font-weight:800; margin-top:4px; }

.search-box,
.glass-card {
  background:#fff;
  color:var(--dark);
  border-radius:32px;
  padding:18px;
  box-shadow:var(--shadow-lg);
}
.tabs {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px;
  background:#f1f5f9;
  padding:6px;
  border-radius:22px;
}
.tab {
  border:0;
  background:transparent;
  color:var(--muted);
  font-weight:900;
  padding:13px 8px;
  border-radius:16px;
}
.tab.active {
  background:#fff;
  color:var(--blue);
  box-shadow:0 8px 18px rgba(15,23,42,.08);
}

section { padding:50px 0; }
.section-head {
  display:flex;
  flex-direction:column;
  gap:16px;
  margin-bottom:24px;
}
.eyebrow {
  color:var(--blue);
  font-size:13px;
  font-weight:900;
  letter-spacing:.22em;
  text-transform:uppercase;
}
.section-head h2 {
  margin:6px 0 0;
  font-size:34px;
  letter-spacing:-1px;
}
.section-head p {
  margin:8px 0 0;
  color:var(--muted);
  line-height:1.65;
}

.grid { display:grid; gap:16px; }
.grid-2 { display:grid; gap:18px; }
.grid-3 { display:grid; gap:18px; }
.grid-4 { display:grid; gap:16px; }
.layout { display:grid; gap:20px; }
.card {
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:22px;
  box-shadow:var(--shadow);
  transition:.2s ease;
}
.card.hover:hover {
  transform:translateY(-2px);
  box-shadow:0 18px 40px rgba(15,23,42,.08);
}
.card h2,
.card h3 {
  margin:0 0 10px;
  letter-spacing:-.5px;
}
.desc {
  color:#475569;
  line-height:1.75;
}
.muted { color:var(--muted); }
.field { margin-top:14px; }
.field label {
  display:block;
  margin-bottom:8px;
  color:#475569;
  font-size:14px;
  font-weight:900;
}
.field input,
.field select,
.field textarea {
  width:100%;
  border:1px solid var(--line);
  border-radius:18px;
  padding:0 15px;
  font-size:15px;
  outline:none;
  background:#fff;
  transition:border-color .2s ease, box-shadow .2s ease;
}
.field input,
.field select { height:56px; }
.field textarea {
  min-height:120px;
  padding-top:14px;
  line-height:1.6;
  resize:vertical;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color:var(--blue);
  box-shadow:0 0 0 4px rgba(37,99,235,.08);
}

.quick-tags,
.chips,
.actions,
.service-tags,
.active-tags,
.meta-row {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.quick-tag,
.tag {
  border:1px solid #dbeafe;
  background:#f8fbff;
  color:var(--blue);
  border-radius:999px;
  padding:8px 12px;
  font-weight:900;
  font-size:13px;
}
.chip,
.badge {
  display:inline-flex;
  align-items:center;
  gap:6px;
  border-radius:999px;
  padding:6px 10px;
  font-size:12px;
  font-weight:900;
  background:#eff6ff;
  color:#1d4ed8;
}
.chip.green,
.badge.green { background:var(--green-soft); color:#166534; }
.chip.amber,
.badge.amber { background:var(--amber-soft); color:#92400e; }
.chip.red,
.badge.red { background:var(--red-soft); color:#991b1b; }
.chip.gray,
.badge.gray { background:#f1f5f9; color:#475569; }

.cat {
  background:#fff;
  border:1px solid var(--line);
  border-radius:24px;
  padding:18px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  box-shadow:var(--shadow);
  transition:.2s ease;
}
.cat:hover { transform:translateY(-2px); box-shadow:0 18px 36px rgba(15,23,42,.08); }
.cat span { display:block; color:var(--muted); font-size:14px; margin-top:4px; }

.company-card-top,
.result-top,
.card-top {
  display:flex;
  justify-content:space-between;
  gap:14px;
  align-items:flex-start;
}
.company-title {
  display:flex;
  gap:14px;
  align-items:flex-start;
}
.company-logo {
  width:62px;
  height:62px;
  border-radius:18px;
  background:#eff6ff;
  color:var(--blue);
  display:grid;
  place-items:center;
  font-size:24px;
  font-weight:900;
  flex:0 0 auto;
}
.rating {
  background:var(--dark);
  color:#fff;
  border-radius:999px;
  padding:8px 12px;
  font-weight:900;
  white-space:nowrap;
}
.loc {
  margin-top:7px;
  color:var(--muted);
  font-weight:800;
}
.mini-stats {
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:10px;
  margin:14px 0;
}
.mini {
  background:#f8fafc;
  border:1px solid var(--line);
  border-radius:16px;
  padding:12px;
}
.mini b {
  display:block;
  font-size:13px;
  color:#475569;
}
.mini span {
  display:block;
  margin-top:4px;
  font-weight:800;
  word-break:break-word;
}
.service-tags span {
  background:#f8fafc;
  border:1px solid var(--line);
  color:#475569;
  border-radius:999px;
  padding:7px 10px;
  font-size:12px;
  font-weight:800;
}

.toolbar {
  display:flex;
  flex-direction:column;
  gap:12px;
  margin-bottom:18px;
}
.sorts,
.sort-wrap,
.view-buttons {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
}
.sorts button,
.pagination button {
  border:0;
  border-radius:14px;
  background:#f1f5f9;
  padding:10px 14px;
  font-weight:900;
}
.sorts button.active,
.pagination button.active {
  background:var(--dark);
  color:#fff;
}
.pagination {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:center;
  margin-top:22px;
}
.results-grid { display:grid; gap:16px; }
.results-grid.list { grid-template-columns:1fr; }
.empty {
  display:none;
  border:1px dashed #cbd5e1;
  border-radius:24px;
  padding:30px;
  text-align:center;
  color:var(--muted);
  background:#fff;
}
.empty b {
  display:block;
  color:var(--dark);
  font-size:20px;
  margin-bottom:8px;
}

.table-wrap {
  overflow:auto;
  border:1px solid var(--line);
  border-radius:24px;
  background:#fff;
}
table {
  width:100%;
  border-collapse:collapse;
  min-width:760px;
}
th, td {
  text-align:left;
  padding:15px;
  border-bottom:1px solid var(--line);
  vertical-align:middle;
}
th {
  background:#f8fafc;
  color:#475569;
  font-size:13px;
  font-weight:900;
}
td { font-weight:800; color:#334155; }
tr:last-child td { border-bottom:0; }

.sidebar {
  display:grid;
  gap:16px;
}
.admin-layout {
  display:grid;
  min-height:100vh;
}
.admin-side {
  display:none;
  background:#020617;
  color:#cbd5e1;
  padding:18px;
}
.admin-side .brand { color:#fff; margin-bottom:22px; }
.admin-nav {
  display:grid;
  gap:8px;
}
.admin-nav button {
  justify-content:flex-start;
}
.admin-nav button.active {
  background:#fff;
  color:var(--dark);
}
.admin-top {
  position:sticky;
  top:0;
  z-index:35;
  background:rgba(255,255,255,.92);
  backdrop-filter:blur(14px);
  border-bottom:1px solid var(--line);
}
.admin-top-inner {
  min-height:76px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:0 18px;
}
.admin-section { display:none; }
.admin-section.active { display:block; }

.form-steps {
  display:grid;
  gap:10px;
}
.step-btn {
  justify-content:flex-start;
}
.step-btn.active {
  background:var(--blue);
  border-color:var(--blue);
  color:#fff;
}
.form-step { display:none; }
.form-step.active { display:block; }
.progress {
  height:10px;
  background:#e2e8f0;
  border-radius:999px;
  overflow:hidden;
}
.progress-bar {
  height:100%;
  width:20%;
  background:linear-gradient(90deg,var(--blue),#60a5fa);
  border-radius:999px;
  transition:.25s ease;
}
.package.active {
  border-color:#bfdbfe;
  background:#eff6ff;
}
.preview-card {
  position:sticky;
  top:96px;
}

.modal {
  display:none;
  position:fixed;
  inset:0;
  z-index:1000;
  background:rgba(2,6,23,.64);
  align-items:center;
  justify-content:center;
  padding:18px;
}
.modal.show { display:flex; }
.modal-card {
  width:min(680px,100%);
  max-height:90vh;
  overflow:auto;
  background:#fff;
  border-radius:30px;
  padding:22px;
  box-shadow:var(--shadow-lg);
}
.modal-head {
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
  margin-bottom:16px;
}
.modal-head h3 { margin:0; font-size:25px; }
.modal-head p { margin:6px 0 0; color:var(--muted); font-weight:800; }
.toast {
  display:none;
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:1001;
  max-width:360px;
  background:#dcfce7;
  color:#166534;
  border:1px solid #bbf7d0;
  border-radius:18px;
  padding:14px 16px;
  font-weight:900;
  box-shadow:var(--shadow-lg);
}
.footer {
  background:#020617;
  color:#cbd5e1;
  padding:30px 0;
}
.footer-inner {
  display:flex;
  flex-direction:column;
  gap:18px;
  justify-content:space-between;
}
.footer-links {
  display:flex;
  flex-wrap:wrap;
  gap:16px;
  font-weight:800;
}
.hidden { display:none!important; }

@media (min-width:760px) {
  .nav-links { display:flex; }
  .mobile-menu-btn { display:none; }
  .hero-grid { grid-template-columns:1.03fr .97fr; align-items:center; }
  .grid-2 { grid-template-columns:repeat(2,1fr); }
  .grid-3 { grid-template-columns:repeat(3,1fr); }
  .grid-4 { grid-template-columns:repeat(4,1fr); }
  .section-head { flex-direction:row; align-items:end; justify-content:space-between; }
  .toolbar { flex-direction:row; align-items:center; justify-content:space-between; }
  .results-grid.grid { grid-template-columns:repeat(2,1fr); }
  .footer-inner { flex-direction:row; align-items:center; }
}

@media (min-width:1020px) {
  .layout.listing { grid-template-columns:320px minmax(0,1fr); align-items:start; }
  .layout.detail { grid-template-columns:minmax(0,1.15fr) 360px; align-items:start; }
  .layout.form { grid-template-columns:300px minmax(0,1fr) 340px; align-items:start; }
  .sidebar.sticky { position:sticky; top:96px; }
  .admin-layout { grid-template-columns:290px 1fr; }
  .admin-side { display:block; position:sticky; top:0; height:100vh; }
}

@media (max-width:620px) {
  .nav-actions .btn-soft { display:none; }
  .stats { grid-template-columns:1fr; }
  .mini-stats { grid-template-columns:1fr; }
  .company-card-top,
  .result-top,
  .card-top { flex-direction:column; }
  .company-title { width:100%; }
  .actions .btn { width:100%; }
  .tabs { grid-template-columns:1fr; }
}
