/* === The Wash Report — Design System === */

/* ---- Google Fonts loaded via <link> in HTML for performance ---- */

/* ---- Reset ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ---- Variables ---- */
:root {
  --sidebar-bg: #111827;
  --sidebar-text: #9ca3af;
  --sidebar-active: #ffffff;
  --sidebar-hover: #1f2937;
  --sidebar-accent: #3b82f6;
  --sidebar-width: 256px;

  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-border: #bfdbfe;

  --danger: #dc2626;
  --danger-hover: #b91c1c;
  --danger-light: #fef2f2;

  --success: #16a34a;
  --success-light: #f0fdf4;

  --warning: #d97706;
  --warning-light: #fffbeb;

  --text: #111827;
  --text-secondary: #4b5563;
  --text-muted: #9ca3af;

  --bg: #f9fafb;
  --white: #ffffff;
  --border: #d1d5db;
  --border-light: #e5e7eb;
  --border-xlight: #f3f4f6;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

/* ---- Base ---- */

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s;
}

a:hover {
  color: var(--primary-hover);
}

img { max-width: 100%; }

/* ---- Typography ---- */

h1, h2, h3, h4 {
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

h1 { font-size: 32px; }
h2 { font-size: 22px; }
h3 { font-size: 17px; }
h4 { font-size: 15px; }

p { color: var(--text-secondary); }

/* ---- Layout ---- */

.page-center {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 24px;
  background: var(--bg);
}

/* ---- Cards ---- */

.card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 36px;
}

.card-sm {
  max-width: 440px;
  width: 100%;
}

.card-header {
  margin-bottom: 28px;
  text-align: center;
}

.card-header h2 {
  margin-bottom: 6px;
  font-size: 24px;
}

.card-header p {
  color: var(--text-muted);
  font-size: 14px;
}

/* ---- Forms ---- */

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 500;
  font-size: 13px;
  margin-bottom: 6px;
  color: var(--text);
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input::placeholder {
  color: var(--text-muted);
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group .error-text {
  color: var(--danger);
  font-size: 12px;
  margin-top: 4px;
  display: none;
}

.form-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  color: var(--text-muted);
  font-size: 13px;
}

.form-divider::before,
.form-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-light);
}

.form-note {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 24px;
  text-align: center;
}

/* ---- Buttons ---- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-family: inherit;
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
  line-height: 1.4;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: var(--white);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--danger);
  color: var(--white);
  border-color: var(--danger);
}

.btn-danger:hover {
  background: var(--danger-hover);
  color: var(--white);
}

.btn-outline {
  background: var(--white);
  color: var(--text);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.btn-outline:hover {
  background: var(--bg);
  border-color: var(--border);
  color: var(--text);
  box-shadow: var(--shadow);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  padding: 8px 12px;
}

.btn-ghost:hover {
  background: var(--border-xlight);
  color: var(--text);
}

.btn-lg {
  padding: 12px 28px;
  font-size: 15px;
  border-radius: var(--radius);
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ============================================================
   SIDEBAR LAYOUT (Dashboard)
   ============================================================ */

.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
  border-right: 1px solid rgba(255,255,255,0.06);
}

.sidebar-brand {
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.sidebar-brand h1 {
  font-size: 17px;
  color: var(--white);
  font-weight: 700;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-brand h1 .brand-icon {
  width: 28px;
  height: 28px;
  background: var(--sidebar-accent);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: white;
  flex-shrink: 0;
}

.sidebar-brand span {
  font-size: 12px;
  color: var(--sidebar-text);
  display: block;
  margin-top: 4px;
}

.sidebar-section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
  padding: 20px 20px 8px;
}

.sidebar-nav {
  list-style: none;
  padding: 8px 0;
  flex: 1;
}

.sidebar-nav li {
  padding: 0 8px;
  margin-bottom: 2px;
}

.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  color: var(--sidebar-text);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all 0.12s ease;
}

.sidebar-nav li a:hover {
  background: var(--sidebar-hover);
  color: #d1d5db;
  text-decoration: none;
}

.sidebar-nav li a.active {
  color: var(--sidebar-active);
  background: var(--sidebar-hover);
  font-weight: 600;
}

.sidebar-nav li a .nav-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.5;
  flex-shrink: 0;
}

.sidebar-nav li a .nav-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-nav li a.active .nav-icon {
  opacity: 1;
  color: var(--sidebar-accent);
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.sidebar-footer .user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.sidebar-footer .user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #374151;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: #d1d5db;
  flex-shrink: 0;
}

.sidebar-footer .user-name {
  color: var(--white);
  font-weight: 600;
  font-size: 13px;
  line-height: 1.3;
}

.sidebar-footer .user-dept {
  color: var(--sidebar-text);
  font-size: 11px;
}

.sidebar-footer .logout-link {
  color: var(--sidebar-text);
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
  transition: color 0.15s;
}

.sidebar-footer .logout-link:hover {
  color: var(--white);
}

/* ---- Main Content ---- */

.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  padding: 32px 40px;
  min-height: 100vh;
  max-width: 1200px;
}

.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.main-header h2 {
  font-size: 22px;
}

.main-header .header-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 2px;
}

/* ============================================================
   SUMMARY CARDS
   ============================================================ */

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.summary-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
}

.summary-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
}

.summary-card:nth-child(1)::before { background: var(--primary); }
.summary-card:nth-child(2)::before { background: var(--success); }
.summary-card:nth-child(3)::before { background: var(--warning); }
.summary-card:nth-child(4)::before { background: #8b5cf6; }

.summary-card .label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.summary-card .value {
  font-size: 30px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1;
}

.summary-card .sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ============================================================
   TABLES
   ============================================================ */

.table-wrapper {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.table-wrapper-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
}

.table-wrapper-head h3 {
  font-size: 15px;
  font-weight: 600;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead th {
  background: var(--bg);
  font-weight: 600;
  text-align: left;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

tbody td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border-xlight);
  color: var(--text-secondary);
  font-size: 13px;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background: #f8fafc;
}

.table-empty {
  text-align: center;
  padding: 48px 20px !important;
  color: var(--text-muted);
  font-size: 14px;
}

.table-empty svg {
  display: block;
  margin: 0 auto 12px;
  opacity: 0.3;
}

/* ---- Status badges ---- */

.badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 10px;
  letter-spacing: 0.02em;
}

.badge-blue { background: var(--primary-light); color: var(--primary); }
.badge-green { background: var(--success-light); color: var(--success); }
.badge-red { background: var(--danger-light); color: var(--danger); }
.badge-yellow { background: var(--warning-light); color: var(--warning); }

/* ============================================================
   FILTER BAR
   ============================================================ */

.filter-bar {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 20px;
  flex-wrap: wrap;
  background: var(--white);
  padding: 16px 20px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
}

.filter-bar .form-group {
  margin-bottom: 0;
}

.filter-bar .form-group label {
  font-size: 12px;
  color: var(--text-muted);
}

.filter-bar input[type="date"] {
  padding: 8px 12px;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  color: var(--text);
  transition: border-color 0.2s;
}

.filter-bar input[type="date"]:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ============================================================
   PAGINATION
   ============================================================ */

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--white);
  border: 1px solid var(--border-light);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  font-size: 13px;
  color: var(--text-muted);
}

.pagination button {
  padding: 6px 14px;
  font-size: 13px;
  font-family: inherit;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  cursor: pointer;
  color: var(--text);
  transition: all 0.15s;
}

.pagination button:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.pagination button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ============================================================
   UPLOAD AREA
   ============================================================ */

.upload-area {
  background: var(--white);
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 56px 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.upload-area:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.upload-area.drag-over {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: scale(1.01);
}

.upload-area .upload-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  background: var(--bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-area .upload-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--text-muted);
  fill: none;
  stroke-width: 1.8;
}

.upload-area h3 {
  font-size: 15px;
  margin-bottom: 6px;
  color: var(--text);
}

.upload-area p {
  color: var(--text-muted);
  font-size: 13px;
}

.upload-area .upload-browse {
  color: var(--primary);
  font-weight: 600;
}

.upload-result {
  margin-top: 20px;
  padding: 18px 22px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--white);
  display: none;
}

.upload-result.show {
  display: block;
}

.upload-result .result-success {
  font-weight: 600;
  font-size: 15px;
}

.upload-result .result-info {
  color: var(--text-secondary);
  font-size: 13px;
  margin-top: 4px;
}

/* ============================================================
   ALERTS
   ============================================================ */

.alert {
  padding: 14px 18px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid;
}

.alert-error {
  background: var(--danger-light);
  border-color: #fecaca;
  color: var(--danger);
}

.alert-success {
  background: var(--success-light);
  border-color: #bbf7d0;
  color: var(--success);
}

.alert-info {
  background: var(--primary-light);
  border-color: var(--primary-border);
  color: var(--primary);
}

/* ============================================================
   SUBSCRIPTION PAGE
   ============================================================ */

.plan-card {
  background: var(--white);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-lg);
  max-width: 420px;
  margin: 0 auto;
  padding: 40px 36px;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.plan-card .plan-badge {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.plan-card h3 {
  font-size: 20px;
  margin-bottom: 4px;
}

.plan-card .plan-desc {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 20px;
}

.plan-card .plan-price {
  font-size: 48px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  letter-spacing: -0.03em;
}

.plan-card .plan-price sup {
  font-size: 22px;
  font-weight: 600;
  vertical-align: super;
  margin-right: 2px;
}

.plan-card .plan-period {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 28px;
  margin-top: 4px;
}

.plan-card ul {
  list-style: none;
  text-align: left;
  margin-bottom: 28px;
}

.plan-card ul li {
  padding: 10px 0;
  font-size: 14px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-xlight);
  display: flex;
  align-items: center;
  gap: 10px;
}

.plan-card ul li:last-child {
  border-bottom: none;
}

.plan-card ul li .check-icon {
  width: 20px;
  height: 20px;
  background: var(--success-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.plan-card ul li .check-icon svg {
  width: 12px;
  height: 12px;
  stroke: var(--success);
  fill: none;
  stroke-width: 2.5;
}

/* ============================================================
   LANDING PAGE
   ============================================================ */

/* Gradient band wrapping nav + hero as one seamless section */
.hero-band {
  background: linear-gradient(170deg, #dbeafe 0%, #eff6ff 28%, #f9fafb 65%, var(--white) 100%);
}

.landing-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-areas: "brand center links";
  align-items: center;
  padding: 0 max(40px, calc((100% - 1200px) / 2));
  height: 100px;
  background: transparent;
  border-bottom: none;
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background 0.25s, box-shadow 0.25s;
}

.landing-nav.nav-scrolled {
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 1px 10px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(8px);
}

.landing-nav .brand {
  grid-area: brand;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.landing-nav .brand .brand-icon {
  width: 32px;
  height: 32px;
  background: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.landing-nav .brand .brand-icon svg {
  width: 16px;
  height: 16px;
  stroke: white;
  fill: none;
  stroke-width: 2;
}

.nav-center {
  grid-area: center;
  display: flex;
  gap: 2px;
  align-items: center;
}

.landing-nav .nav-links {
  grid-area: links;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.nav-mobile-only {
  display: none;
}

.landing-nav .nav-links a {
  font-weight: 500;
  font-size: 14px;
}

.landing-nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text) !important;
  padding: 7px 16px;
  border-radius: 20px;
  border: 1px solid transparent;
  background: transparent;
  transition: background 0.15s, border-color 0.15s;
}

.landing-nav-link:hover {
  color: var(--text) !important;
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(37, 99, 235, 0.2);
}

.nav-scrolled .landing-nav-link:hover {
  background: var(--bg);
  border-color: var(--border-light);
}

.landing-nav-link-active {
  color: var(--text) !important;
  font-weight: 600;
}

/* Pill shape for nav action buttons */
.landing-nav .btn {
  border-radius: 20px;
}

/* Logo bar below nav */
.nav-logo-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px 20px;
  background: transparent;
}

.nav-logo-bar .brand {
  display: flex;
  align-items: center;
}

.nav-logo-bar .brand-logo-img {
  height: 76px;
  width: auto;
  display: block;
}

/* Hamburger button — hidden on desktop */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-direction: column;
  gap: 5px;
  z-index: 60;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.nav-hamburger-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-hamburger-active span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---- Shared landing section eyebrow ---- */

.hero-eyebrow,
.section-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 20px;
}

.section-eyebrow-centered {
  display: block;
  text-align: center;
}

/* Hero */

.landing-hero {
  text-align: center;
  padding: 80px 24px 96px;
  background: transparent;
  border-bottom: none;
}

.landing-hero h1 {
  font-size: 54px;
  letter-spacing: -0.035em;
  margin: 0 auto 22px;
  color: var(--text);
  line-height: 1.1;
  max-width: 780px;
}

.landing-hero p {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 40px;
  line-height: 1.75;
}

.landing-hero .cta-group {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
}

.landing-hero .btn-lg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ---- Dashboard Mockup ---- */

.mockup-section {
  background: #e8edf3;
  border-top: 1px solid #d8dfe8;
  border-bottom: 1px solid #d8dfe8;
  padding: 60px 24px 0;
  overflow: hidden;
}

.mockup-label {
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 28px;
  letter-spacing: 0.01em;
}

.dash-mockup {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  border: 1px solid var(--border-light);
  border-bottom: none;
  box-shadow: 0 -4px 40px rgba(0,0,0,0.08);
  overflow: hidden;
  min-height: 320px;
  will-change: transform;
  backface-visibility: hidden;
}

.mock-sidebar {
  width: 140px;
  flex-shrink: 0;
  background: #111827;
  padding: 16px 0;
}

.mock-brand {
  font-size: 10px;
  font-weight: 700;
  color: white;
  padding: 0 14px 16px;
  letter-spacing: -0.01em;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  margin-bottom: 8px;
}

.mock-nav-item {
  font-size: 11px;
  color: #9ca3af;
  padding: 7px 14px;
  border-radius: 6px;
  margin: 2px 8px;
  cursor: default;
  font-weight: 500;
}

.mock-nav-item.mock-active {
  background: rgba(59,130,246,0.15);
  color: #93c5fd;
}

.mock-main {
  flex: 1;
  background: var(--bg);
  padding: 16px;
  overflow: hidden;
}

.mock-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.mock-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.mock-dealer {
  font-size: 11px;
  color: var(--text-muted);
}

.mock-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.mock-stat {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 12px;
}

.mock-stat-label {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 4px;
}

.mock-stat-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.mock-table-wrap {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
}

.mock-table-header {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-light);
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
}

.mock-table {
  font-size: 11px;
}

.mock-row {
  display: grid;
  grid-template-columns: 36px 1fr 64px 72px 56px;
  gap: 8px;
  padding: 7px 12px;
  align-items: center;
  color: var(--text-secondary);
}

.mock-row-head {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 10px;
  background: var(--bg);
  border-bottom: 1px solid var(--border-light);
}

.mock-row-alt {
  background: #fafbfc;
}

.mock-badge {
  display: inline-block;
  background: #eff6ff;
  color: #2563eb;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.03em;
}

.mock-badge-warn {
  background: #fffbeb;
  color: #d97706;
}

/* ---- Problem / Solution ---- */

.problem-section {
  padding: 80px 24px;
  background: var(--white);
  border-bottom: 1px solid var(--border-light);
}

.problem-inner {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.problem-text h2,
.solution-text h2 {
  font-size: 26px;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  line-height: 1.25;
}

.problem-text p,
.solution-text p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 20px;
}

.problem-list,
.solution-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.problem-list li,
.solution-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.problem-list li svg {
  width: 16px;
  height: 16px;
  stroke: var(--danger);
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
  margin-top: 1px;
}

.solution-list li svg {
  width: 16px;
  height: 16px;
  stroke: var(--success);
  fill: none;
  stroke-width: 2.5;
  flex-shrink: 0;
  margin-top: 1px;
}

.solution-eyebrow {
  color: #16a34a;
}

.solution-eyebrow::before {
  background: #16a34a;
}

/* How it works */

.landing-steps {
  padding: 80px 24px;
  background: #f0f4f8;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.landing-steps-inner {
  max-width: 960px;
  margin: 0 auto;
}

.landing-steps h2,
.landing-steps .steps-subtitle,
.landing-steps .steps-grid {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

.landing-steps .steps-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 48px;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.step-item {
  text-align: center;
  padding: 32px 24px;
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}

.step-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.step-item .step-number {
  width: 40px;
  height: 40px;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  font-size: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.step-item h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.step-item p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.65;
}

/* Features */

.landing-features {
  padding: 80px 24px;
  background: var(--white);
  border-bottom: 1px solid var(--border-light);
}

.landing-features .features-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 48px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 960px;
  margin: 0 auto;
}

.feature-item {
  padding: 28px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}

.feature-item:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.feature-item .feature-icon {
  width: 48px;
  height: 48px;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.feature-item .feature-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--primary);
  fill: none;
  stroke-width: 1.8;
}

.feature-item h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.feature-item p {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.7;
}

.feature-item-viewall {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-decoration: none;
  color: var(--primary);
  font-size: 15px;
  font-weight: 600;
  height: 100%;
}

.feature-item-viewall:hover {
  color: var(--primary-dark, #1d4ed8);
}

.feature-item-viewall .viewall-arrow {
  width: 48px;
  height: 48px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.feature-item-viewall:hover .viewall-arrow {
  transform: translateX(3px);
}

.feature-item-viewall .viewall-arrow svg {
  width: 20px;
  height: 20px;
  stroke: white;
  fill: none;
  stroke-width: 2.5;
}

/* ---- Pricing Callout (homepage) ---- */

.pricing-callout {
  background: #111827;
  padding: 60px 24px;
}

.pricing-callout-inner {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.pricing-callout h2 {
  font-size: 22px;
  color: white;
  margin-bottom: 8px;
}

.pricing-callout p {
  font-size: 14px;
  color: #9ca3af;
  line-height: 1.65;
}

/* ---- CTA Section ---- */

.landing-cta {
  padding: 80px 24px;
  text-align: center;
  background: #f0f4f8;
}

.landing-cta h2 {
  font-size: 28px;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.landing-cta p {
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 28px;
}

.cta-sub {
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

/* ---- Contact form section (homepage + contact.html) ---- */

.landing-contact {
  padding: 80px 24px;
  text-align: center;
  background: var(--white);
  border-top: 1px solid var(--border-light);
}

.contact-subtitle {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 40px;
}

.contact-form {
  max-width: 560px;
  margin: 0 auto;
  text-align: left;
}

.contact-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.contact-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.contact-success {
  max-width: 400px;
  margin: 0 auto;
  text-align: center;
  padding: 40px 20px;
}

.contact-success h3 {
  margin: 16px 0 8px;
  font-size: 20px;
}

.contact-success p {
  color: var(--text-muted);
  font-size: 14px;
}

/* ---- Footer ---- */

.landing-footer {
  padding: 28px 40px;
  border-top: 1px solid var(--border-light);
  font-size: 13px;
  color: var(--text-muted);
  background: var(--white);
}

.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.footer-logo-img {
  height: 52px;
  width: auto;
  display: block;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}

.footer-links a:hover {
  color: var(--text);
}

/* ---- Pricing Page ---- */

.pricing-section {
  padding: 60px 24px 80px;
  background: var(--bg);
}

.pricing-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 24px;
  max-width: 820px;
  margin: 0 auto 24px;
}

.price-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.price-card-featured {
  border-color: var(--primary-border);
  box-shadow: 0 0 0 2px var(--primary-border), var(--shadow-md);
}

.price-card-badge {
  position: absolute;
  top: -12px;
  left: 28px;
  background: var(--primary);
  color: white;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border-radius: 20px;
}

.price-card-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

.price-card-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 12px;
}

.price-amount {
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}

.price-period {
  font-size: 15px;
  color: var(--text-muted);
  font-weight: 500;
}

.price-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 20px;
}

.price-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.price-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
}

.price-features li svg {
  width: 15px;
  height: 15px;
  stroke: var(--success);
  fill: none;
  stroke-width: 2.5;
  flex-shrink: 0;
}

.pricing-note {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: var(--warning-light);
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 13px;
  color: #92400e;
  line-height: 1.6;
}

.pricing-note svg {
  flex-shrink: 0;
  stroke: #d97706;
  fill: none;
  stroke-width: 2;
  margin-top: 1px;
}

/* ---- FAQ ---- */

.faq-section {
  padding: 80px 24px;
  background: var(--white);
  border-top: 1px solid var(--border-light);
}

.faq-inner {
  max-width: 820px;
  margin: 0 auto;
}

.faq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px 48px;
}

.faq-item h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.faq-item p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============================================================
   AUTH PAGE LAYOUT — full-viewport split (form left · preview right)
   ============================================================ */

.auth-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Left form panel ── */
.auth-form-side {
  width: 50%;
  flex-shrink: 0;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px 64px;
}

.auth-form-logo {
  height: 56px;
  width: auto;
  display: block;
  margin-bottom: 36px;
}

.auth-heading {
  font-size: 28px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 8px;
  line-height: 1.2;
}

.auth-sub {
  font-size: 14px;
  color: #6b7280;
  margin: 0 0 32px;
}

.auth-sub a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.auth-sub a:hover {
  text-decoration: underline;
}

.auth-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.auth-label-row label {
  margin-bottom: 0;
}

.auth-forgot {
  font-size: 13px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.auth-forgot:hover {
  text-decoration: underline;
}

/* ── Right preview panel ── */
.auth-preview-side {
  flex: 1;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 36px;
  overflow: hidden;
}

/* Dashboard mockup frame — designed at 880px, zoomed to fit panel */
.apv-frame {
  width: 880px;
  zoom: 0.72;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.1);
  flex-shrink: 0;
}

.apv-chrome {
  background: #e5e7eb;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid #d1d5db;
}

.apv-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: block;
  flex-shrink: 0;
}

/* App layout */
.apv-app {
  display: flex;
  height: 520px;
  overflow: hidden;
}

/* Sidebar */
.apv-sidebar {
  width: 192px;
  background: #111827;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.apv-sb-brand {
  padding: 18px 16px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.apv-sb-logo {
  height: 34px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
  margin-bottom: 5px;
  object-fit: contain;
  object-position: left;
}

.apv-sb-user {
  font-size: 11px;
  color: #6b7280;
}

.apv-sb-section {
  font-size: 9px;
  font-weight: 600;
  color: #4b5563;
  letter-spacing: 0.08em;
  padding: 14px 16px 6px;
  text-transform: uppercase;
}

.apv-sb-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  margin: 1px 8px;
  font-size: 12px;
  color: #9ca3af;
  text-decoration: none;
  border-radius: 6px;
  cursor: default;
  user-select: none;
}

.apv-sb-item.apv-active {
  background: rgba(37,99,235,0.2);
  color: #fff;
}

.apv-sb-item svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  stroke: currentColor;
}

.apv-sb-footer {
  margin-top: auto;
  padding: 12px 14px;
  border-top: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  gap: 9px;
}

.apv-sb-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}

.apv-sb-footer-name {
  font-size: 11px;
  color: #e5e7eb;
  font-weight: 500;
  line-height: 1.3;
}

.apv-sb-footer-sub {
  font-size: 10px;
  color: #6b7280;
}

/* Main content */
.apv-main {
  flex: 1;
  background: #f9fafb;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.apv-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px 14px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}

.apv-page-title {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 2px;
  line-height: 1;
}

.apv-page-sub {
  font-size: 11px;
  color: #9ca3af;
  margin: 0;
}

.apv-export-row {
  display: flex;
  gap: 5px;
  align-items: center;
  flex-shrink: 0;
}

.apv-btn-blue {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 6px 11px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  cursor: default;
}

.apv-btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fff;
  color: #374151;
  border: 1px solid #d1d5db;
  padding: 5px 11px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  cursor: default;
}

.apv-content {
  flex: 1;
  padding: 14px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}

.apv-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px 14px;
}

.apv-qr-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}

.apv-qr-title {
  font-size: 12px;
  font-weight: 600;
  color: #111827;
}

.apv-qr-sub {
  font-size: 10px;
  color: #9ca3af;
}

.apv-qr-btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* Table card */
.apv-table-card {
  flex: 1;
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.apv-table {
  width: 100%;
  border-collapse: collapse;
}

.apv-table th {
  background: #f9fafb;
  padding: 8px 12px;
  text-align: left;
  font-size: 9px;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  border-bottom: 1px solid #e5e7eb;
  white-space: nowrap;
}

.apv-table td {
  padding: 9px 12px;
  font-size: 12px;
  color: #374151;
  border-bottom: 1px solid #f3f4f6;
  white-space: nowrap;
}

.apv-table tr:last-child td {
  border-bottom: none;
}

.apv-td-link {
  color: #2563eb;
}

/* ── Form box (legacy — used by verify step) ── */
.auth-form-box {
  max-width: 100%;
  width: 100%;
}

.auth-form-box .card {
  padding: 0;
  box-shadow: none;
  background: transparent;
  border: none;
}

/* ---- Verification code input ---- */
.verify-code-input {
  width: 100%;
  max-width: 220px;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-align: center;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: monospace;
  color: var(--text);
}

.verify-code-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.resend-link {
  font-size: 13px;
  color: var(--primary);
  text-decoration: none;
}

.resend-link:hover {
  text-decoration: underline;
}

/* ============================================================
   LOADING
   ============================================================ */

.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================================
   UTILITIES
   ============================================================ */

.hidden { display: none !important; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-4 { margin-bottom: 4px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1024px) {
  .summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .auth-preview-side {
    display: none;
  }

  .auth-form-side {
    width: 100%;
  }
}

@media (max-width: 768px) {
  /* ── Core layout fix: stack sidebar on top, content below ── */
  .dashboard-layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    position: sticky;
    top: 0;
    left: auto;
    bottom: auto;
    height: auto;
    flex-direction: column;
    z-index: 200;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  }

  .sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: none;
  }

  .sidebar-brand span {
    display: none;
  }

  .sidebar-section-label {
    display: none;
  }

  .sidebar-nav {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    padding: 0 8px 10px;
    gap: 2px;
    /* hide scrollbar on mobile for cleanliness */
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .sidebar-nav::-webkit-scrollbar {
    display: none;
  }

  .sidebar-nav li {
    padding: 0;
    flex-shrink: 0;
  }

  .sidebar-nav li a {
    padding: 7px 14px;
    white-space: nowrap;
    font-size: 13px;
    gap: 6px;
  }

  .sidebar-nav li a .nav-icon {
    width: 16px;
    height: 16px;
  }

  .sidebar-nav li a .nav-icon svg {
    width: 15px;
    height: 15px;
  }

  .sidebar-footer {
    display: none;
  }

  /* ── Main content ── */
  .main-content {
    margin-left: 0;
    padding: 20px 16px;
    max-width: 100%;
    min-height: calc(100vh - 100px);
  }

  .main-header {
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
  }

  .main-header h2 {
    font-size: 20px;
  }

  .export-btn-group {
    width: 100%;
    flex-wrap: wrap;
    gap: 6px;
  }

  .summary-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  /* ── Tables: horizontally scrollable ── */
  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* ── Selection bar ── */
  .selection-bar {
    flex-wrap: wrap;
    gap: 8px;
  }

  /* ── Pagination ── */
  .pagination {
    flex-wrap: wrap;
    gap: 8px;
  }

  .landing-hero h1 {
    font-size: 36px;
  }

  .landing-hero .cta-group {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
  }

  .landing-hero .cta-group .btn {
    width: 100%;
    justify-content: center;
  }

  .steps-grid {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .landing-hero h1 {
    font-size: 28px;
  }

  .problem-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .mock-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .features-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
  }

  .contact-form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .mock-sidebar {
    width: 100px;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
  }

  .pricing-callout-inner {
    flex-direction: column;
    text-align: center;
  }

  .faq-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* ============================================================
   ONBOARDING TAB
   ============================================================ */

/* Locked sidebar — non-onboarding items are dimmed */
.sidebar-nav.onboarding-locked li:not(.onboarding-nav-item) a {
  opacity: 0.3;
  pointer-events: none;
  cursor: default;
}

.sidebar-nav.onboarding-locked .onboarding-nav-item a {
  background: rgba(37, 99, 235, 0.12);
  color: #93c5fd;
}

.sidebar-nav.onboarding-locked .onboarding-nav-item a .nav-icon {
  opacity: 1;
  color: var(--sidebar-accent);
}

.onboarding-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 32px 36px;
  max-width: 760px;
}

.onboarding-info-banner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 28px;
  font-size: 14px;
  color: #1e40af;
  line-height: 1.5;
}

.onboarding-info-banner svg {
  flex-shrink: 0;
  margin-top: 1px;
  stroke: #2563eb;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.req {
  color: var(--danger);
}

.onboarding-success {
  text-align: center;
  max-width: 560px;
}

.onboarding-success-icon {
  width: 64px;
  height: 64px;
  background: var(--success-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.onboarding-success h3 {
  font-size: 20px;
  margin-bottom: 10px;
  color: var(--success);
}

.onboarding-success p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

/* ============================================================
   EXPORT BUTTON GROUP
   ============================================================ */

.export-btn-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ============================================================
   SUPPORT / TICKET STYLES
   ============================================================ */

.ticket-message {
  padding: 16px 20px;
  border-radius: var(--radius);
  margin-bottom: 12px;
}

.ticket-message-customer {
  background: var(--bg);
  border: 1px solid var(--border-light);
}

.ticket-message-admin {
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
}

.ticket-message-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 500;
}

.ticket-message-admin .ticket-message-meta {
  color: #1e40af;
}

.ticket-message-body {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.ticket-reply-box {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
}

@media (max-width: 768px) {
  .form-row-2 {
    grid-template-columns: 1fr;
  }
  .export-btn-group {
    flex-wrap: wrap;
  }
}

/* ── Unrecognized entries warning banner ──────────────────────────────────── */
.unrecognized-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fffbeb;
  border: 1px solid #f59e0b;
  border-radius: var(--radius);
  padding: 12px 20px;
  margin: 16px 24px 0;
  font-size: 14px;
  color: #78350f;
}

/* ── Legal pages (terms.html, privacy.html) ───────────────────────────────── */
.legal-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 60px 24px 100px;
}

.legal-inner {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.legal-header {
  padding: 40px 48px 32px;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg);
}

.legal-header h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px;
}

.legal-header p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

.legal-body {
  padding: 40px 48px;
  font-size: 15px;
  line-height: 1.75;
  color: #374151;
}

.legal-body > p:first-child {
  margin-top: 0;
}

.legal-body h2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin: 40px 0 12px;
  padding-top: 8px;
  border-top: 1px solid var(--border-light);
}

.legal-body h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin: 24px 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.legal-body ul {
  margin: 12px 0 20px;
  padding-left: 20px;
}

.legal-body li {
  margin-bottom: 8px;
}

.legal-body a {
  color: var(--primary);
  text-decoration: underline;
}

.legal-body a:hover {
  color: var(--primary-hover);
}

.legal-contact {
  margin-top: 16px;
  padding: 20px 24px;
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.8;
}

@media (max-width: 640px) {
  .legal-header {
    padding: 28px 24px 20px;
  }
  .legal-body {
    padding: 28px 24px;
  }
}

/* ── Mobile enhancements (768px) ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-hamburger {
    display: flex;
  }

  .landing-nav {
    display: flex;
    justify-content: space-between;
    height: 72px;
    padding: 0 20px;
    position: relative;
  }

  .nav-center {
    display: none;
  }

  .nav-mobile-only {
    display: block;
  }

  .landing-nav .brand {
    font-size: 16px;
    white-space: nowrap;
  }

  .landing-nav .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--white);
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
    padding: 8px 0;
    gap: 0;
    z-index: 55;
  }

  .landing-nav .nav-links.nav-open {
    display: flex;
  }

  .landing-nav .nav-links a,
  .landing-nav .nav-links a.btn,
  .landing-nav .nav-links a.btn-primary,
  .landing-nav .nav-links a.btn-ghost,
  .landing-nav .nav-links a.landing-nav-link {
    display: block;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 0;
    text-align: left;
    border: none;
    box-shadow: none;
    background: transparent;
    color: var(--text);
    width: 100%;
    margin: 0;
    transform: none;
  }

  .landing-nav .nav-links a:hover {
    background: var(--bg);
  }

  .landing-nav .nav-links a.btn-primary {
    color: var(--primary);
    font-weight: 600;
  }

  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 600px;
  }

  .upload-area {
    padding: 36px 20px;
  }

  .card {
    padding: 24px 20px;
  }

  .auth-form-box .card {
    padding: 24px 20px;
  }

  .onboarding-card {
    padding: 24px 20px;
  }

  .main-header {
    flex-wrap: wrap;
    gap: 12px;
  }

  .main-header h2 {
    font-size: 19px;
  }

  .summary-card {
    padding: 14px 16px;
  }

  .summary-card .value {
    font-size: 24px;
  }

  .pagination {
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
  }

  .pagination button {
    padding: 6px 10px;
    font-size: 12px;
  }

  .price-card {
    padding: 24px 20px;
  }

  .unrecognized-banner {
    margin: 12px 12px 0;
    padding: 10px 14px;
    font-size: 13px;
  }

  .export-btn-group {
    gap: 6px;
  }

  .export-btn-group .btn {
    font-size: 12px;
    padding: 6px 10px;
  }
}

/* ── Small phone (480px) ──────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .summary-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .main-content {
    padding: 16px 12px;
  }

  .main-header h2 {
    font-size: 17px;
  }

  .landing-hero {
    padding: 56px 20px 72px;
  }

  .landing-hero h1 {
    font-size: 32px;
    letter-spacing: -0.025em;
    line-height: 1.15;
  }

  .landing-hero p {
    font-size: 16px;
    line-height: 1.65;
  }

  .upload-area {
    padding: 28px 16px;
  }

  .upload-area .upload-icon {
    width: 44px;
    height: 44px;
  }

  .upload-area h3 {
    font-size: 14px;
  }

  .upload-area p {
    font-size: 12px;
  }

  .card {
    padding: 20px 16px;
  }

  .auth-form-box .card {
    padding: 20px 16px;
  }

  .onboarding-card {
    padding: 20px 16px;
  }

  .auth-form-side {
    padding: 24px 16px;
  }

  .sidebar-nav li a {
    padding: 6px 10px;
    font-size: 12px;
  }

  .sidebar-brand h1 {
    font-size: 14px;
  }


  .filter-bar .form-group {
    width: 100%;
  }

  .filter-bar select,
  .filter-bar input[type="date"] {
    width: 100%;
  }

  .price-card {
    padding: 20px 16px;
  }

  .mock-sidebar {
    display: none;
  }

  .dash-mockup {
    min-height: 240px;
  }

  .problem-section {
    padding: 48px 16px;
  }

  .step-card {
    padding: 20px 16px;
  }

  .legal-header {
    padding: 20px 16px 16px;
  }

  .legal-body {
    padding: 20px 16px;
  }

  .legal-header h1 {
    font-size: 22px;
  }

  .form-row-2 {
    gap: 12px;
  }
}

/* ─── Selection Bar ──────────────────────────────────────────────────────────── */

.selection-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius);
  padding: 10px 16px;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--primary);
}

/* ─── Checkbox column ────────────────────────────────────────────────────────── */

.checkbox-col {
  width: 36px;
  padding-left: 12px !important;
  padding-right: 4px !important;
}

.checkbox-col input[type="checkbox"],
.row-checkbox {
  width: 15px;
  height: 15px;
  cursor: pointer;
  accent-color: var(--primary);
}

tr.row-selected td {
  background: var(--primary-light) !important;
}

/* ─── Modal ──────────────────────────────────────────────────────────────────── */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}

.modal-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 480px;
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border-light);
}

.modal-header h3 {
  margin: 0;
  font-size: 16px;
}

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}

.modal-close:hover {
  color: var(--text);
  background: var(--border-xlight);
}

.modal-body {
  padding: 20px 24px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
}

/* ─── AI Insight Card ────────────────────────────────────────────────────────── */

.ai-insight-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.ai-insight-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.ai-insight-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.ai-insight-badge svg {
  flex-shrink: 0;
}

.ai-insight-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.ai-insight-text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0;
}

.ai-insight-loading {
  color: var(--text-muted);
  font-style: italic;
  font-size: 13px;
}

/* ─── Reminder Banner ─────────────────────────────────────────────────────── */

.reminder-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: #eff6ff;
  border-top: 1px solid #bfdbfe;
  border-bottom: 1px solid #bfdbfe;
  font-size: 14px;
  color: #1e40af;
}

@media (max-width: 600px) {
  .reminder-banner {
    flex-wrap: wrap;
  }
}

/* ─── Reminders Tab ───────────────────────────────────────────────────────── */

.reminder-settings-card {
  max-width: 560px;
}

.reminder-next-send {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 20px;
}

.reminder-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-right: 6px;
}

.reminder-email-summary {
  font-size: 13px;
  color: var(--text-muted);
}

.reminder-recipients-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-link {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  white-space: nowrap;
}

.btn-link:hover {
  text-decoration: underline;
}

.reminder-email-edit {
  margin-top: 16px;
  padding: 16px;
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
}

.reminder-email-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  min-height: 32px;
}

.reminder-email-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 20px;
  font-size: 13px;
  color: #1d4ed8;
}

.reminder-email-chip button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: #93c5fd;
  display: flex;
  align-items: center;
  line-height: 1;
}

.reminder-email-chip button:hover {
  color: #1d4ed8;
}

.reminder-add-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.reminder-add-row input {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
}

.reminder-add-row input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.reminder-email-count {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 16px;
}

.reminder-email-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.reminder-test-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.reminder-test-remaining {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ─── Brand Logo Image ────────────────────────────────────────────────────── */

/* Landing nav — dark logo on light/gradient background */
.landing-nav .brand-logo-img {
  height: 76px;
  width: auto;
  display: block;
}

@media (max-width: 768px) {
  .landing-nav .brand-logo-img {
    height: 46px;
  }
}

/* Dashboard & Admin sidebar — invert for dark sidebar (auth brand logo removed) */

/* Dashboard & Admin sidebar — invert for dark sidebar */
.sidebar-brand .brand-logo-img {
  height: 44px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
}

/* ─── Quick Reports ───────────────────────────────────────────────────────── */

.quick-reports-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 20px;
}

.quick-reports-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.quick-reports-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.quick-reports-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.quick-report-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.quick-report-btn {
  font-size: 13px;
  padding: 6px 14px;
}

.quick-report-btn.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.quick-report-result {
  margin-top: 16px;
  border-top: 1px solid var(--border-light);
  padding-top: 14px;
}

.quick-report-loading,
.quick-report-empty {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
}

.quick-report-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}

.quick-report-table {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.qr-row {
  display: grid;
  grid-template-columns: 160px 100px 1fr;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  padding: 4px 0;
}

.qr-head {
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 6px;
  margin-bottom: 2px;
}

.qr-label {
  color: var(--text);
  white-space: nowrap;
}

.qr-count {
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.qr-sub {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 11px;
}

.qr-bar-col {
  height: 8px;
  background: var(--bg);
  border-radius: 4px;
  overflow: hidden;
}

.qr-bar {
  display: block;
  height: 100%;
  background: var(--primary);
  border-radius: 4px;
  min-width: 2px;
  transition: width 0.3s ease;
}

.qr-download-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

.qr-download-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin-right: 2px;
}
