/* ========================================================================
   Moving Surveyor — Global stylesheet
   Modern SaaS aesthetic: bold electric blue + lime accent, big type, generous space
   ======================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --accent: #84cc16;
  --accent-dark: #65a30d;
  --ink: #0f172a;
  --ink-2: #1e293b;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: #e2e8f0;
  --bg: #f8fafc;
  --bg-2: #f1f5f9;
  --white: #ffffff;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #0ea5e9;
  --purple: #8b5cf6;

  --radius: 12px;
  --radius-lg: 18px;
  --radius-sm: 8px;

  --shadow-sm: 0 1px 2px rgba(15,23,42,0.04);
  --shadow: 0 4px 12px rgba(15,23,42,0.06);
  --shadow-lg: 0 12px 32px rgba(15,23,42,0.10);
  --shadow-xl: 0 24px 64px rgba(15,23,42,0.16);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
input, button, textarea, select { font-family: inherit; }

/* ====== Buttons ====== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius);
  border: none;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--ink);
  color: var(--white);
}
.btn-primary:hover { background: var(--ink-2); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(15,23,42,0.2); }
.btn-blue {
  background: var(--primary); color: var(--white);
}
.btn-blue:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(37,99,235,0.3); }
.btn-accent {
  background: var(--accent); color: var(--ink);
}
.btn-accent:hover { background: var(--accent-dark); color: var(--white); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(132,204,22,0.3); }
.btn-ghost {
  background: transparent; color: var(--ink); border: 1px solid var(--line);
}
.btn-ghost:hover { background: var(--bg-2); }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-danger:hover { background: #dc2626; }
.btn-lg { padding: 16px 28px; font-size: 15px; border-radius: 14px; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ====== Forms ====== */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--ink-2); margin-bottom: 6px;
  letter-spacing: 0.02em;
}
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: 14px; color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.form-textarea { resize: vertical; min-height: 80px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 640px) {
  .row-2, .row-3 { grid-template-columns: 1fr; }
}

/* ====== Cards ====== */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 28px; }
.card-hover { transition: transform 0.2s, box-shadow 0.2s; }
.card-hover:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* ====== Badges / pills ====== */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 600;
  background: var(--bg-2); color: var(--ink-2);
}
.badge-success { background: rgba(16,185,129,0.12); color: var(--success); }
.badge-warning { background: rgba(245,158,11,0.14); color: var(--warning); }
.badge-info    { background: rgba(14,165,233,0.12); color: var(--info); }
.badge-purple  { background: rgba(139,92,246,0.12); color: var(--purple); }

/* ====== Layout primitives ====== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 720px; margin: 0 auto; padding: 0 24px; }

.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.flex-1 { flex: 1; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; }
.mb-2 { margin-bottom: 8px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }

/* ====== Typography ====== */
h1, h2, h3 { margin: 0; line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; }
.h-1 { font-size: 48px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.h-2 { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.h-3 { font-size: 22px; font-weight: 700; }
.text-muted { color: var(--muted); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.text-mono { font-family: 'JetBrains Mono', monospace; font-feature-settings: 'tnum'; }
.text-center { text-align: center; }
.uppercase-label { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; color: var(--muted); text-transform: uppercase; }

/* ====== Animations ====== */
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.fade-up { animation: fadeUp 0.6s cubic-bezier(.22,.61,.36,1) both; }
.fade-up-1 { animation: fadeUp 0.6s 0.1s cubic-bezier(.22,.61,.36,1) both; }
.fade-up-2 { animation: fadeUp 0.6s 0.2s cubic-bezier(.22,.61,.36,1) both; }
.fade-up-3 { animation: fadeUp 0.6s 0.3s cubic-bezier(.22,.61,.36,1) both; }
.float { animation: float 4s ease-in-out infinite; }

/* ====== Marketing site ====== */
.marketing-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.marketing-nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
  max-width: 1200px; margin: 0 auto;
}
.brand {
  display: flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: 19px; letter-spacing: -0.02em;
  color: var(--ink);
}
.brand-dot {
  width: 26px; height: 26px; border-radius: 7px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 14px;
  box-shadow: 0 4px 12px rgba(37,99,235,0.4);
}
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { color: var(--ink-2); font-weight: 500; font-size: 14px; }
.nav-links a:hover { color: var(--primary); text-decoration: none; }
@media (max-width: 768px) {
  .nav-links a:not(.btn) { display: none; }
}

.hero {
  position: relative; overflow: hidden;
  padding: 80px 24px 100px;
  background:
    radial-gradient(ellipse 800px 400px at 50% 0%, rgba(37,99,235,0.10), transparent 60%),
    radial-gradient(ellipse 600px 400px at 90% 30%, rgba(132,204,22,0.10), transparent 60%);
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(15,23,42,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,23,42,0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 70% 50% at 50% 0%, #000 30%, transparent 100%);
  pointer-events: none;
}
.hero-inner {
  position: relative; max-width: 1100px; margin: 0 auto;
  text-align: center;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  font-size: 12px; font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
}
.hero h1 {
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.02;
  margin-bottom: 22px;
}
.hero h1 .accent {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p {
  font-size: 20px; color: var(--muted);
  max-width: 640px; margin: 0 auto 36px;
}
.hero-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.section { padding: 80px 24px; }
.section-tight { padding: 56px 24px; }
.section-eyebrow {
  display: block; text-align: center;
  font-size: 12px; font-weight: 700; letter-spacing: 0.16em;
  color: var(--primary); text-transform: uppercase;
  margin-bottom: 14px;
}
.section-title {
  font-size: clamp(28px, 4vw, 44px); font-weight: 800;
  letter-spacing: -0.03em; text-align: center;
  margin: 0 0 16px;
}
.section-sub {
  font-size: 17px; color: var(--muted);
  text-align: center; max-width: 620px; margin: 0 auto 56px;
}

.feature-grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  max-width: 1100px; margin: 0 auto;
}
.feature {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  transition: all 0.2s;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: rgba(37,99,235,0.3); }
.feature-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary-light), rgba(132,204,22,0.15));
  color: var(--primary);
  margin-bottom: 16px;
}
.feature h3 { font-size: 18px; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 14px; margin: 0; }

.stat-band {
  background: var(--ink);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 48px;
  display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  max-width: 1100px; margin: 0 auto;
  position: relative; overflow: hidden;
}
.stat-band::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 400px 200px at 20% 100%, rgba(132,204,22,0.2), transparent 60%);
  pointer-events: none;
}
.stat-num {
  font-size: 44px; font-weight: 800;
  background: linear-gradient(135deg, #fff, var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}
.stat-label { font-size: 13px; color: var(--muted-2); margin-top: 4px; }

.pricing-grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  max-width: 1100px; margin: 0 auto;
}
.price-card {
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
}
.price-card.featured {
  border-color: var(--primary);
  background: linear-gradient(180deg, var(--white), var(--primary-light));
  transform: scale(1.03);
  box-shadow: 0 16px 40px rgba(37,99,235,0.12);
}
.price-badge {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: var(--ink);
  font-size: 11px; font-weight: 700; padding: 4px 12px;
  border-radius: 999px; letter-spacing: 0.08em;
}
.price-amount { font-size: 42px; font-weight: 800; letter-spacing: -0.03em; }
.price-amount .per { font-size: 14px; color: var(--muted); font-weight: 500; }
.price-features { list-style: none; padding: 0; margin: 20px 0; }
.price-features li { padding: 6px 0; color: var(--ink-2); font-size: 14px; display: flex; align-items: center; gap: 8px; }
.price-features li::before {
  content: ''; flex-shrink: 0;
  width: 18px; height: 18px; border-radius: 999px;
  background: rgba(16,185,129,0.15) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center/12px no-repeat;
}

/* ====== Footer ====== */
.footer {
  background: var(--ink);
  color: var(--muted-2);
  padding: 56px 24px 32px;
  margin-top: 80px;
}
.footer-inner { max-width: 1100px; margin: 0 auto; }
.footer-grid {
  display: grid; gap: 40px;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  margin-bottom: 40px;
}
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer h4 { color: var(--white); font-size: 13px; margin-bottom: 16px; letter-spacing: 0.05em; text-transform: uppercase; }
.footer a { color: var(--muted-2); font-size: 14px; display: block; padding: 4px 0; }
.footer a:hover { color: var(--white); text-decoration: none; }
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 12px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}

/* ====== CMS layout ====== */
.cms-shell {
  display: flex; min-height: 100vh;
}
.sidebar {
  width: 240px; flex-shrink: 0;
  background: var(--white);
  border-right: 1px solid var(--line);
  padding: 20px 14px;
  display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 0; height: 100vh;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 10px; margin-bottom: 18px;
  font-weight: 800; font-size: 16px; letter-spacing: -0.02em;
}
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 10px;
  font-size: 14px; font-weight: 500;
  color: var(--ink-2); cursor: pointer;
  transition: background 0.12s;
}
.nav-item:hover { background: var(--bg-2); text-decoration: none; }
.nav-item.active { background: var(--primary); color: #fff; }
.nav-item.active svg { color: #fff; }
.nav-item svg { color: var(--muted); flex-shrink: 0; }
.nav-item.active svg, .nav-item:hover svg { color: var(--ink-2); }
.nav-item.active:hover svg { color: #fff; }
.sidebar-footer { margin-top: auto; }
.cms-main { flex: 1; min-width: 0; }
.cms-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 28px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 5;
}
.cms-content { padding: 28px; }
@media (max-width: 768px) {
  .sidebar { display: none; }
  .cms-content { padding: 16px; }
  .cms-header { padding: 14px 16px; }
}

.page-title { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.page-sub { color: var(--muted); margin: 4px 0 0; font-size: 14px; }

.kpi-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-bottom: 24px;
}
.kpi {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 20px;
  position: relative; overflow: hidden;
}
.kpi-label { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.kpi-value { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; margin-top: 4px; }
.kpi-trend { font-size: 12px; color: var(--success); margin-top: 4px; display: flex; align-items: center; gap: 4px; }
.kpi-trend.down { color: var(--danger); }

/* Table */
.table-wrap {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden;
}
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl thead th {
  text-align: left; padding: 14px 18px;
  background: var(--bg);
  font-size: 12px; font-weight: 700;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em;
  border-bottom: 1px solid var(--line);
}
table.tbl tbody td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
table.tbl tbody tr:last-child td { border-bottom: none; }
table.tbl tbody tr { transition: background 0.1s; }
table.tbl tbody tr:hover { background: var(--bg); }
table.tbl tbody tr.clickable { cursor: pointer; }

.toolbar {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 18px; flex-wrap: wrap;
}
.search-wrap {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; flex: 1; min-width: 200px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--white);
}
.search-wrap input { border: none; outline: none; flex: 1; font-size: 14px; background: transparent; }

/* Alert */
.alert {
  padding: 12px 16px; border-radius: 10px;
  background: var(--primary-light); color: var(--primary-dark);
  border: 1px solid rgba(37,99,235,0.2);
  font-size: 14px; margin-bottom: 16px;
}
.alert-error { background: rgba(239,68,68,0.1); color: #b91c1c; border-color: rgba(239,68,68,0.2); }
.alert-success { background: rgba(16,185,129,0.1); color: #047857; border-color: rgba(16,185,129,0.2); }

/* Login */
.login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background:
    radial-gradient(ellipse 500px 300px at 20% 20%, rgba(37,99,235,0.08), transparent 70%),
    radial-gradient(ellipse 500px 300px at 80% 80%, rgba(132,204,22,0.08), transparent 70%),
    var(--bg);
}
.login-card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: 18px; padding: 36px;
  width: 100%; max-width: 420px;
  box-shadow: var(--shadow-lg);
}
