/* ═══════════════════════════════════════════
   Business Card Scanner — Premium Corporate
   ═══════════════════════════════════════════ */

:root {
  --blue: #006699;
  --blue-dark: #003d5c;
  --blue-deep: #0a1628;
  --blue-light: #e6f2fa;
  --blue-glow: rgba(0, 102, 153, 0.35);
  --red: #bd1b44;
  --red-hover: #d42050;
  --red-glow: rgba(189, 27, 68, 0.3);
  --grey-900: #0f1729;
  --grey-800: #1a2238;
  --grey-700: #3d4560;
  --grey-500: #6b7280;
  --grey-400: #9ca3af;
  --grey-300: #d1d5db;
  --grey-200: #e5e7eb;
  --grey-100: #f3f4f6;
  --grey-50: #f9fafb;
  --white: #ffffff;
  --text: #111827;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --success: #059669;
  --success-light: #d1fae5;
  --warn: #d97706;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 6px 16px rgba(0,0,0,0.04);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.06), 0 20px 40px rgba(0,0,0,0.08);
  --shadow-glow: 0 0 30px rgba(0, 102, 153, 0.12);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'jaf-domus', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--grey-50);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, .hero__title, .section-title, .success-msg h2, .form-fieldset__legend {
  font-family: 'paralucent', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 300;
}

.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Animations ──────────────────────────── */

.anim-fade {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.anim-fade.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.anim-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.anim-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(1.15); opacity: 0.15; }
  100% { transform: scale(1); opacity: 0.4; }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes scroll-hint {
  0%, 100% { opacity: 0.4; transform: translateY(0); }
  50% { opacity: 0.8; transform: translateY(5px); }
}

/* ── Buttons ─────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  font-family: 'jaf-domus', sans-serif;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  text-decoration: none;
  min-height: 48px;
  letter-spacing: 0.01em;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

.btn--glow {
  background: linear-gradient(135deg, var(--red) 0%, #e03060 100%);
  color: var(--white);
  box-shadow: 0 2px 8px var(--red-glow);
}
.btn--glow:hover, .btn--glow:active {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--red-glow);
}

.btn--glass {
  background: rgba(255,255,255,0.9);
  color: var(--blue);
  border: 1px solid var(--grey-200);
  backdrop-filter: blur(8px);
}
.btn--glass:hover, .btn--glass:active {
  background: var(--white);
  border-color: var(--blue);
  box-shadow: 0 2px 12px var(--blue-glow);
  transform: translateY(-2px);
}

.btn--small {
  padding: 8px 18px;
  font-size: 13px;
  min-height: 36px;
}

.btn--outline {
  background: var(--white);
  color: var(--blue);
  border: 1px solid var(--grey-200);
}
.btn--outline:hover {
  border-color: var(--blue);
  background: var(--blue-light);
}

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

/* ── Hero ────────────────────────────────── */

.hero {
  position: relative;
  color: var(--white);
  padding: 52px 24px 48px;
  text-align: center;
  overflow: hidden;
  background: var(--blue-deep);
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 20%, rgba(0, 102, 153, 0.3), transparent),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(189, 27, 68, 0.15), transparent),
    radial-gradient(ellipse 40% 40% at 50% 0%, rgba(0, 102, 153, 0.2), transparent),
    linear-gradient(170deg, var(--blue-deep) 0%, #0c2340 40%, var(--blue-dark) 100%);
  background-size: 200% 200%;
  animation: gradient-shift 15s ease infinite;
}

/* Subtle dot grid overlay */
.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 24px 24px;
}

.hero__inner {
  position: relative;
  max-width: 680px;
  margin: 0 auto;
  z-index: 1;
}

.hero__logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.hero__logo {
  height: 60px;
  object-fit: contain;
  filter: brightness(1.05);
}

.hero__logo--show {
  height: 78px;
}

.hero__logo-divider {
  width: 1px;
  height: 48px;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.25), transparent);
}

.hero__title {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 300;
  margin-bottom: 10px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.hero__subtitle {
  font-size: 16px;
  opacity: 0.65;
  font-weight: 400;
  max-width: 400px;
  margin: 0 auto;
  line-height: 1.5;
}

.hero__scroll {
  margin-top: 28px;
  opacity: 0.4;
  animation: scroll-hint 2.5s ease infinite;
}

/* ── Main Content ────────────────────────── */

.main {
  padding: 36px 0 56px;
  position: relative;
  background:
    radial-gradient(ellipse 60% 40% at 80% 10%, rgba(0, 102, 153, 0.04), transparent 60%),
    radial-gradient(ellipse 50% 50% at 10% 80%, rgba(189, 27, 68, 0.02), transparent 60%),
    var(--grey-50);
}

/* Top bleed from hero */
.main::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 180px;
  background: linear-gradient(180deg, rgba(10, 22, 40, 0.05) 0%, transparent 100%);
  pointer-events: none;
}

/* ── Card Scanner ────────────────────────── */

.card-scanner {
  margin-bottom: 28px;
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 1px solid var(--grey-200);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow), var(--shadow-glow);
  transition: box-shadow 0.4s var(--ease);
}

.card-scanner:hover {
  box-shadow: var(--shadow-lg), 0 0 40px rgba(0, 102, 153, 0.15);
}

.scanner__glow {
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--red), var(--blue));
  background-size: 200% 100%;
  animation: shimmer 4s linear infinite;
}

.scanner__dropzone {
  padding: 48px 28px 44px;
  text-align: center;
  transition: background 0.3s var(--ease);
}

.scanner__dropzone.dragover {
  background: var(--blue-light);
}

.scanner__icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin-bottom: 18px;
}

.scanner__icon-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--blue);
  opacity: 0.15;
  animation: pulse-ring 3s ease-in-out infinite;
}

.scanner__icon {
  color: var(--blue);
  z-index: 1;
}

.scanner__label {
  font-family: 'paralucent', sans-serif;
  font-size: 20px;
  font-weight: 300;
  color: var(--text);
  margin-bottom: 6px;
}

.scanner__hint {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.scanner__buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.scanner__btn { cursor: pointer; }

/* Scanner Preview */
.scanner__preview {
  padding: 28px;
  text-align: center;
}

.scanner__preview img {
  max-width: 100%;
  max-height: 260px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  object-fit: contain;
  border: 1px solid var(--grey-200);
}

.scanner__progress { margin-bottom: 12px; }

.progress-bar {
  width: 100%;
  height: 5px;
  background: var(--grey-100);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--red));
  background-size: 200% 100%;
  border-radius: 3px;
  transition: width 0.3s var(--ease);
  width: 0%;
  animation: shimmer 2s linear infinite;
}

.progress-bar__text {
  font-size: 13px;
  color: var(--text-muted);
}

.scanner__result {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

/* ── Registration Form ───────────────────── */

.reg-form {
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 0;
  overflow: hidden;
  box-shadow:
    0 1px 3px rgba(0,0,0,0.04),
    0 8px 24px rgba(0,0,0,0.06),
    0 20px 48px rgba(0,0,0,0.04);
  position: relative;
}

/* Gradient accent bar at the top of the form */
.reg-form::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--blue) 0%, var(--blue-dark) 40%, var(--red) 100%);
  z-index: 1;
}

.form-section {
  padding: 32px 32px 16px;
  position: relative;
}

/* Alternating subtle background tint on sections */
.form-section:nth-child(even) {
  background: var(--grey-50);
}

.form-section + .form-section {
  border-top: 1px solid var(--grey-100);
}

.form-section__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 22px;
}

.form-section__title {
  font-family: 'paralucent', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 18px;
  font-weight: 300;
  color: var(--text);
  letter-spacing: -0.01em;
}

.legend-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--blue-light), rgba(0, 102, 153, 0.12));
  color: var(--blue);
  flex-shrink: 0;
}

/* Form Grid */
.form-grid {
  display: grid;
  gap: 16px 20px;
  margin-bottom: 20px;
}

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

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

.form-group label {
  display: block;
  font-family: 'jaf-domus', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.form-group input:not([type="checkbox"]),
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  font-family: 'jaf-domus', sans-serif;
  font-size: 15px;
  border: 1.5px solid var(--grey-200);
  border-radius: 10px;
  background: var(--white);
  color: var(--text);
  transition: all 0.2s var(--ease);
  min-height: 48px;
  -webkit-appearance: none;
}

.form-group input:not([type="checkbox"]):hover,
.form-group select:hover,
.form-group textarea:hover {
  border-color: var(--grey-300);
}

.form-group input:not([type="checkbox"]):focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--blue);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(0, 102, 153, 0.08), 0 1px 2px rgba(0,0,0,0.04), inset 3px 0 0 var(--blue);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-group input.ocr-filled {
  border-color: var(--blue);
  background: linear-gradient(135deg, rgba(0, 102, 153, 0.03), rgba(0, 102, 153, 0.06));
}

.form-group input.ocr-low {
  border-color: var(--warn);
  background: rgba(217, 119, 6, 0.04);
}

.form-group select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

/* ── Product Interest Checkboxes ─────────── */

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.checkbox-label,
.form-group .checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  padding: 10px 14px;
  line-height: 1.4;
  margin-bottom: 0;
  border-radius: 10px;
  border: 1.5px solid var(--grey-200);
  background: var(--white);
  transition: all 0.2s var(--ease);
  user-select: none;
}

.checkbox-label:hover {
  border-color: var(--grey-300);
  background: var(--grey-50);
}

/* Checked state for product interest items */
.checkbox-label:has(input[type="checkbox"]:checked),
.checkbox-label.is-checked {
  border-color: var(--blue);
  background: linear-gradient(135deg, var(--blue-light), rgba(0, 102, 153, 0.08));
  color: var(--blue-dark);
  box-shadow: 0 2px 8px rgba(0, 102, 153, 0.12), inset 0 0 0 1px rgba(0, 102, 153, 0.1);
  transform: scale(1.02);
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  accent-color: var(--blue);
  cursor: pointer;
}

/* Consent group — no border style, just clean checkboxes */
.consent-group {
  padding: 24px 32px;
  border-top: 1px solid var(--grey-100);
  background: linear-gradient(180deg, var(--grey-50) 0%, var(--white) 100%);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.consent-group .checkbox-label {
  border: none;
  padding: 8px 0;
  border-radius: 0;
  background: none;
  align-items: flex-start;
}

.consent-group .checkbox-label:hover {
  background: none;
}

.consent-group .checkbox-label:has(input[type="checkbox"]:checked) {
  background: none;
  border: none;
  color: inherit;
}

.consent-group .checkbox-label input[type="checkbox"] {
  margin-top: 2px;
}

.consent-group a {
  color: var(--blue);
  text-decoration: underline;
  text-decoration-color: rgba(0,102,153,0.3);
  text-underline-offset: 2px;
  transition: text-decoration-color 0.2s;
}
.consent-group a:hover {
  text-decoration-color: var(--blue);
}

.consent-error {
  color: var(--red);
  padding: 10px 14px !important;
  border: 1.5px solid rgba(189, 27, 68, 0.25) !important;
  border-radius: 10px !important;
  background: rgba(189, 27, 68, 0.03) !important;
}
.consent-error input[type="checkbox"] {
  accent-color: var(--red);
}

/* Submit Button */
.btn--submit {
  width: 100%;
  padding: 20px 28px;
  font-size: 17px;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue) 50%, var(--red) 100%);
  background-size: 200% 100%;
  background-position: 0% center;
  color: var(--white);
  border: none;
  border-top: 1px solid var(--grey-100);
  box-shadow: none;
  letter-spacing: 0.03em;
  transition: all 0.4s var(--ease);
}
.btn--submit:hover {
  background-position: 100% center;
  box-shadow: inset 0 -3px 16px rgba(0,0,0,0.15);
  letter-spacing: 0.06em;
}

/* ── Success Message ─────────────────────── */

.success-msg {
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 1px solid var(--grey-200);
  padding: 64px 32px;
  text-align: center;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.success-msg__ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200px;
  height: 200px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, var(--success-light) 0%, transparent 70%);
  opacity: 0.5;
  pointer-events: none;
}

.success-msg__icon {
  position: relative;
  margin-bottom: 20px;
}

.success-msg h2 {
  font-size: 26px;
  color: var(--success);
  margin-bottom: 8px;
  position: relative;
}

.success-msg p {
  color: var(--text-muted);
  margin-bottom: 32px;
  position: relative;
}

.success-msg .btn {
  position: relative;
}

/* ── Sales Team ──────────────────────────── */

.sales-team {
  background: var(--white);
  padding: 64px 0;
  border-top: 1px solid var(--grey-100);
}

.section-header {
  margin-bottom: 32px;
}

.section-title {
  font-size: 24px;
  font-weight: 300;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.section-subtitle {
  font-size: 15px;
  color: var(--text-muted);
}

.section-title--light {
  color: var(--white);
}
.section-subtitle--light {
  color: rgba(255,255,255,0.5);
}

.sales-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.sales-card {
  padding: 24px;
  border: 1px solid var(--grey-200);
  border-radius: var(--radius);
  background: var(--white);
  position: relative;
  overflow: hidden;
  transition: all 0.3s var(--ease);
}

/* Gradient top accent */
.sales-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--blue-dark));
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.sales-card:hover {
  border-color: var(--grey-300);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.sales-card:hover::before {
  opacity: 1;
}

.sales-card__name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.sales-card__title {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.sales-card__info {
  list-style: none;
  font-size: 13px;
}

.sales-card__info li { margin-bottom: 8px; }

.sales-card__info a {
  color: var(--blue);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  word-break: break-all;
  transition: color 0.2s;
}
.sales-card__info a:hover { color: var(--blue-dark); }

.sales-card__info .info-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  opacity: 0.5;
}

/* ── Documents ───────────────────────────── */

.documents {
  position: relative;
  padding: 64px 0;
  overflow: hidden;
  background: var(--blue-deep);
}

/* Gradient mesh bg */
.documents::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 60% at 0% 100%, rgba(0, 102, 153, 0.25), transparent),
    radial-gradient(ellipse 50% 50% at 100% 0%, rgba(189, 27, 68, 0.1), transparent);
}

.documents > .container {
  position: relative;
  z-index: 1;
}

.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(195px, 1fr));
  gap: 16px;
}

.doc-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  color: var(--white);
  text-decoration: none;
  display: block;
  overflow: hidden;
  transition: all 0.35s var(--ease);
  position: relative;
}

.doc-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  opacity: 0;
  background: linear-gradient(135deg, rgba(0, 102, 153, 0.1), rgba(189, 27, 68, 0.05));
  transition: opacity 0.35s;
}

.doc-card:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.18);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.2);
}
.doc-card:hover::after { opacity: 1; }

.doc-card__preview {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: rgba(255,255,255,0.03);
}

.doc-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.doc-card:hover .doc-card__img {
  transform: scale(1.06);
}

.doc-card__icon {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 20px 20px 14px;
}

.doc-card__title {
  font-size: 15px;
  font-weight: 600;
  padding: 16px 18px 4px;
  position: relative;
  z-index: 1;
}

.doc-card__desc {
  font-size: 13px;
  opacity: 0.5;
  padding: 0 18px 18px;
  line-height: 1.5;
  position: relative;
  z-index: 1;
}

/* ── Footer ──────────────────────────────── */

.footer {
  background: var(--grey-900);
  color: rgba(255,255,255,0.35);
  padding: 28px 0;
  font-size: 13px;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer__data-link {
  color: rgba(255,255,255,0.15);
  font-size: 11px;
  text-decoration: none;
  transition: color 0.2s;
}
.footer__data-link:hover {
  color: rgba(255,255,255,0.45);
}

/* ── Data Page ───────────────────────────── */

.data-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.data-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.data-header__title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  padding: 24px 0;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
  text-align: center;
}

.stat-card__val {
  font-size: 32px;
  font-weight: 700;
  color: var(--blue);
}

.stat-card__label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

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

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-group input,
.filter-group select {
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  min-height: 40px;
}

.filter-bar .btn {
  min-height: 40px;
  padding: 8px 20px;
}

.export-buttons {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

/* Data Table */
.data-table-wrap {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow-x: auto;
  margin-bottom: 24px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th {
  background: var(--grey-900);
  color: var(--white);
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
  position: sticky;
  top: 0;
}

.data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--grey-100);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-table tr:hover td {
  background: var(--grey-50);
}

.data-table .actions {
  display: flex;
  gap: 8px;
}

.data-table .actions button {
  background: none;
  border: none;
  color: var(--blue);
  cursor: pointer;
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 4px;
}
.data-table .actions button:hover {
  background: var(--grey-100);
}
.data-table .actions button.delete-btn {
  color: var(--red);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 0;
}

.pagination button {
  padding: 8px 16px;
  border: 1px solid var(--border);
  background: var(--white);
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  min-height: 40px;
}
.pagination button:hover:not(:disabled) {
  background: var(--grey-100);
}
.pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.pagination span {
  font-size: 14px;
  color: var(--text-muted);
}

/* Detail Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.active { display: flex; }

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 720px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

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

.modal__header h3 { font-size: 18px; }

.modal__close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  line-height: 1;
}

.modal__body { padding: 24px; }

.modal__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.modal__field {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.modal__field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.modal__field-val {
  font-size: 15px;
  color: var(--text);
}

.modal__card-img {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-top: 16px;
  background: var(--grey-50);
}

.table-thumb {
  width: 80px;
  height: 50px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.table-thumb:hover {
  transform: scale(2.5);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  z-index: 10;
  position: relative;
}

.card-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  cursor: pointer;
  padding: 24px;
}
.card-lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 4px 40px rgba(0,0,0,0.5);
}
.card-lightbox__close {
  position: absolute;
  top: 16px;
  right: 24px;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
}

/* No data state */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state svg {
  margin-bottom: 16px;
  opacity: 0.4;
}
.empty-state h3 {
  font-size: 18px;
  margin-bottom: 4px;
  color: var(--text);
}

/* ── Responsive ──────────────────────────── */

@media (max-width: 768px) {
  .form-grid--3 { grid-template-columns: 1fr; }
  .form-grid--2 { grid-template-columns: 1fr; }
  .checkbox-grid { grid-template-columns: 1fr; }
  .hero { padding: 36px 16px 32px; }
  .hero__logo { height: 48px; }
  .hero__logo--show { height: 62px; }
  .hero__logo-divider { display: none; }
  .hero__scroll { display: none; }
  .form-section { padding: 24px 20px 8px; }
  .consent-group { padding: 20px 20px; }
  .scanner__dropzone { padding: 36px 20px 32px; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .export-buttons { margin-left: 0; }
  .modal__grid { grid-template-columns: 1fr; }
  .sales-grid { grid-template-columns: 1fr; }
  .footer__inner { flex-direction: column; gap: 8px; text-align: center; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .form-grid--3 { grid-template-columns: repeat(2, 1fr); }
}

/* ── Loading Spinner ─────────────────────── */

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* ── Toast Notifications ─────────────────── */

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--text);
  color: var(--white);
  padding: 14px 24px;
  border-radius: var(--radius);
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.35s var(--ease-spring);
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
}
.toast--error {
  background: var(--red);
}
.toast--success {
  background: var(--success);
}
