/* ============================================
   NAKSH JAIPUR — Fabric Data Collection System
   Design System & Core Styles
   ============================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,200..800&family=Figtree:ital,wght@0,300..900;1,300..900&family=Noto+Sans+Devanagari:wght@300;400;500;600&display=swap');

/* ── CSS Variables ── */
:root {
  /* Brand Colors */
  --color-primary: #C94038;
  --color-primary-light: #E05A52;
  --color-primary-dark: #A03230;
  --color-primary-rgb: 201, 64, 56;

  /* Neutrals */
  --color-bg: #FDF8F4;
  --color-bg-warm: #F2E9E2;
  --color-bg-card: #FFFFFF;
  --color-surface: #FAF5F0;
  --color-dark: #111111;
  --color-text: #444444;
  --color-text-light: #777777;
  --color-border: #E8DDD5;
  --color-border-light: #F0E8E0;

  /* Accents */
  --color-success: #2E7D5B;
  --color-success-light: #E8F5EE;
  --color-warning: #D4920D;
  --color-warning-light: #FFF8E6;
  --color-info: #3B7DD8;
  --color-info-light: #EBF3FC;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.10);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.12);
  --shadow-glow: 0 0 24px rgba(var(--color-primary-rgb), 0.15);

  /* Typography */
  --font-body: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-heading: 'Figtree', system-ui, sans-serif;
  --font-hindi: 'Noto Sans Devanagari', sans-serif;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-fast: 150ms var(--ease-out);
  --transition-base: 250ms var(--ease-out);
  --transition-slow: 400ms var(--ease-out);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Animated Background Texture ── */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: 
    radial-gradient(ellipse at 20% 50%, rgba(var(--color-primary-rgb), 0.04) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(var(--color-primary-rgb), 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 100%, rgba(210, 180, 140, 0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ── Main Container ── */
.app-container {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: var(--space-lg);
  min-height: 100vh;
}

/* ── Header / Brand ── */
.brand-header {
  text-align: center;
  padding: var(--space-2xl) 0 var(--space-xl);
  position: relative;
}

.brand-logo {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-dark);
  letter-spacing: -0.5px;
  margin-bottom: var(--space-xs);
}

.brand-logo span {
  color: var(--color-primary);
}

.brand-tagline {
  font-size: 0.85rem;
  color: var(--color-text-light);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 500;
}

.brand-divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
  margin: var(--space-md) auto 0;
  border-radius: var(--radius-full);
}

/* ── Progress Bar ── */
.progress-container {
  margin-bottom: var(--space-2xl);
  padding: 0 var(--space-md);
}

.progress-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  position: relative;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
}

.progress-step .step-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  border: 2.5px solid var(--color-border);
  background: var(--color-bg-card);
  color: var(--color-text-light);
  transition: all var(--transition-base);
  position: relative;
}

.progress-step.active .step-circle {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(var(--color-primary-rgb), 0.15), var(--shadow-sm);
  transform: scale(1.08);
}

.progress-step.completed .step-circle {
  border-color: var(--color-success);
  background: var(--color-success);
  color: #fff;
}

.progress-step .step-label {
  font-size: 0.7rem;
  color: var(--color-text-light);
  margin-top: 6px;
  font-weight: 500;
  text-align: center;
  max-width: 80px;
  transition: color var(--transition-base);
  white-space: nowrap;
}

.progress-step.active .step-label {
  color: var(--color-primary);
  font-weight: 600;
}

.progress-step.completed .step-label {
  color: var(--color-success);
}

.progress-connector {
  width: 50px;
  height: 2.5px;
  background: var(--color-border);
  border-radius: var(--radius-full);
  transition: background var(--transition-slow);
  flex-shrink: 0;
  margin-bottom: 20px;
}

.progress-connector.active {
  background: linear-gradient(90deg, var(--color-success), var(--color-primary));
}

/* ── Step Panels ── */
.step-panel {
  display: none;
  animation: fadeSlideIn 0.5s var(--ease-out) both;
}

.step-panel.active {
  display: block;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeSlideOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}

/* ── Cards ── */
.card {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-light);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  padding: var(--space-lg) var(--space-xl);
  border-bottom: 1px solid var(--color-border-light);
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.card-header-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.card-header-icon.red {
  background: rgba(var(--color-primary-rgb), 0.1);
  color: var(--color-primary);
}

.card-header-icon.green {
  background: var(--color-success-light);
  color: var(--color-success);
}

.card-header-icon.blue {
  background: var(--color-info-light);
  color: var(--color-info);
}

.card-header-icon.amber {
  background: var(--color-warning-light);
  color: var(--color-warning);
}

.card-header h2 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-dark);
  margin: 0;
}

.card-header p {
  font-size: 0.8rem;
  color: var(--color-text-light);
  margin-top: 2px;
}

.card-body {
  padding: var(--space-xl);
}

/* ── Step 1: Landing Cards ── */
.landing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

.landing-card {
  background: var(--color-bg-card);
  border-radius: var(--radius-xl);
  border: 2px solid var(--color-border-light);
  padding: var(--space-2xl) var(--space-xl);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.landing-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-base);
}

.landing-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  transform: translateY(-4px);
}

.landing-card:hover::before {
  transform: scaleX(1);
}

.landing-card-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 0 auto var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  transition: all var(--transition-base);
}

.landing-card:first-child .landing-card-icon {
  background: linear-gradient(135deg, #E8F5EE, #C8E6D9);
  color: var(--color-success);
}

.landing-card:last-child .landing-card-icon {
  background: linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.1), rgba(var(--color-primary-rgb), 0.2));
  color: var(--color-primary);
}

.landing-card:hover .landing-card-icon {
  transform: scale(1.1) rotate(-3deg);
}

.landing-card h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: var(--space-sm);
}

.landing-card p {
  font-size: 0.85rem;
  color: var(--color-text-light);
  line-height: 1.5;
}

.landing-card .arrow-icon {
  display: inline-flex;
  margin-top: var(--space-md);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-warm);
  color: var(--color-dark);
  font-size: 1rem;
  transition: all var(--transition-base);
}

.landing-card:hover .arrow-icon {
  background: var(--color-primary);
  color: #fff;
  transform: translateX(4px);
}

/* ── Existing Data Table ── */
.data-view-panel {
  display: none;
}

.data-view-panel.active {
  display: block;
  animation: fadeSlideIn 0.4s var(--ease-out) both;
}

.data-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
  gap: var(--space-md);
  flex-wrap: wrap;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--color-bg-card);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: var(--space-sm) var(--space-md);
  gap: var(--space-sm);
  flex: 1;
  max-width: 320px;
  transition: border-color var(--transition-fast);
}

.search-box:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.08);
}

.search-box input {
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 0.85rem;
  background: transparent;
  color: var(--color-dark);
  width: 100%;
}

.search-box input::placeholder {
  color: var(--color-text-light);
}

.search-box .search-icon {
  color: var(--color-text-light);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.data-table-wrapper {
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-light);
  overflow: hidden;
  background: var(--color-bg-card);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.data-table thead {
  background: var(--color-surface);
}

.data-table th {
  padding: var(--space-md) var(--space-lg);
  text-align: left;
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-dark);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1.5px solid var(--color-border);
  white-space: nowrap;
}

.data-table td {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--color-border-light);
  color: var(--color-text);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
  background: var(--color-surface);
}

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

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.badge.pass {
  background: var(--color-success-light);
  color: var(--color-success);
}

.badge.fail {
  background: #FDECEA;
  color: var(--color-primary);
}

.badge.pending {
  background: var(--color-warning-light);
  color: var(--color-warning);
}

.empty-state {
  text-align: center;
  padding: var(--space-3xl) var(--space-xl);
  color: var(--color-text-light);
}

.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
  opacity: 0.4;
}

.empty-state p {
  font-size: 0.9rem;
}

/* ── Form Sections ── */
.form-section {
  margin-bottom: var(--space-xl);
}

.section-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.section-title::before {
  content: '';
  width: 3px;
  height: 18px;
  background: var(--color-primary);
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

/* ── Checkbox Groups ── */
.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1.5px solid transparent;
  user-select: none;
}

.checkbox-item:hover {
  background: var(--color-surface);
  border-color: var(--color-border-light);
}

.checkbox-item input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-border);
  border-radius: 5px;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  transition: all var(--transition-fast);
  background: var(--color-bg-card);
}

.checkbox-item input[type="checkbox"]:checked {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.checkbox-item input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.checkbox-item input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.checkbox-item.checked {
  background: rgba(var(--color-primary-rgb), 0.04);
  border-color: rgba(var(--color-primary-rgb), 0.2);
}

.checkbox-label {
  font-size: 0.85rem;
  color: var(--color-text);
  line-height: 1.4;
}

/* ── Form Inputs ── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-label {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-dark);
}

.form-label .hindi-text {
  font-family: var(--font-hindi);
  font-size: 0.75rem;
  color: var(--color-text-light);
  font-weight: 400;
  margin-left: 4px;
}

.form-label .required {
  color: var(--color-primary);
  margin-left: 2px;
}

.form-input,
.form-select {
  padding: var(--space-md);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--color-dark);
  background: var(--color-bg-card);
  transition: all var(--transition-fast);
  outline: none;
}

.form-input:focus,
.form-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.08);
}

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

.form-input.error {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.08);
}

.form-error {
  font-size: 0.75rem;
  color: var(--color-primary);
  margin-top: 2px;
  display: none;
}

.form-error.visible {
  display: block;
}

/* ── Image Upload ── */
.upload-zone {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  background: var(--color-surface);
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--color-primary);
  background: rgba(var(--color-primary-rgb), 0.03);
  box-shadow: var(--shadow-glow);
}

.upload-zone input[type="file"] {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.upload-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.1), rgba(var(--color-primary-rgb), 0.2));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-md);
  font-size: 1.5rem;
  color: var(--color-primary);
  transition: transform var(--transition-base);
}

.upload-zone:hover .upload-icon {
  transform: scale(1.1) translateY(-2px);
}

.upload-text h4 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: var(--space-xs);
}

.upload-text p {
  font-size: 0.8rem;
  color: var(--color-text-light);
}

.upload-text .browse-link {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.image-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.image-preview-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 1;
  border: 1px solid var(--color-border-light);
  box-shadow: var(--shadow-xs);
}

.image-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-preview-item .remove-image {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-fast);
  backdrop-filter: blur(4px);
}

.image-preview-item:hover .remove-image {
  opacity: 1;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.5s, height 0.5s;
}

.btn:active::after {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: var(--color-dark);
  color: #fff;
  border-color: var(--color-dark);
}

.btn-primary:hover {
  background: #222;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-accent {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.btn-accent:hover {
  background: var(--color-primary-dark);
  box-shadow: var(--shadow-md), var(--shadow-glow);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--color-dark);
  border-color: var(--color-border);
}

.btn-outline:hover {
  border-color: var(--color-dark);
  background: var(--color-surface);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-light);
  border-color: transparent;
  padding: var(--space-sm) var(--space-md);
}

.btn-ghost:hover {
  color: var(--color-dark);
  background: var(--color-surface);
}

.btn-sm {
  padding: var(--space-sm) var(--space-md);
  font-size: 0.8rem;
}

.btn-lg {
  padding: var(--space-lg) var(--space-2xl);
  font-size: 1rem;
}

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

/* ── Button Groups ── */
.btn-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--color-border-light);
  margin-top: var(--space-xl);
}

.btn-group-right {
  display: flex;
  gap: var(--space-sm);
}

/* ── Thank You / Success ── */
.thank-you-screen {
  text-align: center;
  padding: var(--space-3xl) var(--space-xl);
}

.success-animation {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto var(--space-xl);
}

.success-circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-success), #34A06A);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: popIn 0.5s var(--ease-spring) both;
  box-shadow: 0 8px 24px rgba(46, 125, 91, 0.3);
}

.success-circle .check-icon {
  font-size: 2.5rem;
  color: #fff;
  animation: checkDraw 0.4s 0.3s var(--ease-out) both;
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes checkDraw {
  from {
    opacity: 0;
    transform: scale(0) rotate(-45deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

.success-rings {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 2px solid rgba(46, 125, 91, 0.2);
  animation: ringPulse 2s infinite var(--ease-out);
}

.success-rings::after {
  content: '';
  position: absolute;
  top: -10px; left: -10px; right: -10px; bottom: -10px;
  border-radius: 50%;
  border: 1px solid rgba(46, 125, 91, 0.1);
  animation: ringPulse 2s 0.5s infinite var(--ease-out);
}

@keyframes ringPulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0;
  }
}

.thank-you-screen h2 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--color-dark);
  margin-bottom: var(--space-sm);
  animation: fadeSlideIn 0.5s 0.3s var(--ease-out) both;
}

.thank-you-screen .hindi-thanks {
  font-family: var(--font-hindi);
  font-size: 1rem;
  color: var(--color-text-light);
  margin-bottom: var(--space-lg);
  animation: fadeSlideIn 0.5s 0.4s var(--ease-out) both;
}

.thank-you-screen p {
  font-size: 0.9rem;
  color: var(--color-text-light);
  max-width: 420px;
  margin: 0 auto var(--space-xl);
  animation: fadeSlideIn 0.5s 0.5s var(--ease-out) both;
  line-height: 1.6;
}

.submission-summary {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-xl);
  text-align: left;
  margin: var(--space-xl) auto;
  max-width: 480px;
  animation: fadeSlideIn 0.5s 0.6s var(--ease-out) both;
}

.submission-summary h4 {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--color-border-light);
  font-size: 0.82rem;
}

.summary-row:last-child {
  border-bottom: none;
}

.summary-row .label {
  color: var(--color-text-light);
}

.summary-row .value {
  color: var(--color-dark);
  font-weight: 600;
}

.thank-you-actions {
  animation: fadeSlideIn 0.5s 0.7s var(--ease-out) both;
  display: flex;
  gap: var(--space-md);
  justify-content: center;
}

/* ── Confetti animation keyframes ── */
.confetti-piece {
  position: fixed;
  width: 10px;
  height: 10px;
  top: -20px;
  z-index: 100;
  pointer-events: none;
  animation: confettiFall 3s linear forwards;
}

@keyframes confettiFall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

/* ── Back link ── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.85rem;
  color: var(--color-text-light);
  text-decoration: none;
  cursor: pointer;
  margin-bottom: var(--space-lg);
  transition: color var(--transition-fast);
  font-weight: 500;
}

.back-link:hover {
  color: var(--color-primary);
}

/* ── Page Title ── */
.page-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-dark);
  margin-bottom: var(--space-xs);
}

.page-subtitle {
  font-size: 0.9rem;
  color: var(--color-text-light);
  margin-bottom: var(--space-xl);
}

/* ── Toast Notification ── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--color-dark);
  color: #fff;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow-xl);
  z-index: 1000;
  transform: translateY(120%);
  transition: transform var(--transition-base);
}

.toast.visible {
  transform: translateY(0);
}

.toast.success {
  background: var(--color-success);
}

.toast.error {
  background: var(--color-primary);
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-light);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .app-container {
    padding: var(--space-md);
  }

  .brand-logo {
    font-size: 1.5rem;
  }

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

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

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

  .progress-connector {
    width: 30px;
  }

  .progress-step .step-circle {
    width: 36px;
    height: 36px;
    font-size: 0.8rem;
  }

  .progress-step .step-label {
    font-size: 0.6rem;
    max-width: 55px;
    white-space: normal;
  }

  .card-body {
    padding: var(--space-lg);
  }

  .card-header {
    padding: var(--space-md) var(--space-lg);
  }

  .btn-group {
    flex-direction: column-reverse;
    gap: var(--space-sm);
  }

  .btn-group-right {
    width: 100%;
  }

  .btn-group-right .btn {
    flex: 1;
  }

  .btn-group > .btn-ghost {
    width: 100%;
  }

  .data-table-wrapper {
    overflow-x: auto;
  }

  .data-table {
    min-width: 600px;
  }

  .thank-you-actions {
    flex-direction: column;
  }

  .thank-you-actions .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .brand-header {
    padding: var(--space-lg) 0 var(--space-md);
  }

  .progress-connector {
    width: 16px;
  }

  .page-title {
    font-size: 1.2rem;
  }

  .landing-card {
    padding: var(--space-lg) var(--space-md);
  }

  .landing-card-icon {
    width: 56px;
    height: 56px;
    font-size: 1.4rem;
  }
}

/* ── Loader Spinner ── */
.spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* ── Separator line with text ── */
.separator {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin: var(--space-lg) 0;
}

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

.separator span {
  font-size: 0.75rem;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}
