/* ============================================================
   R K Knit Fab Employee Onboarding Portal
   Design System  |  Aapka MIS Ecosystem
   Navy / Red / Cream · Ledger-Register · Rubber-Stamp Motif
   ============================================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@500;600;700;800&display=swap');

/* ---------- Design Tokens ---------- */
:root {
  /* Palette */
  --navy:        #1a237e;
  --navy-dark:   #0d1442;
  --navy-light:  #283593;
  --red:         #c62828;
  --red-dark:    #8e0000;
  --red-light:   #ef5350;
  --cream:       #fdf6e3;
  --cream-dark:  #f5e6c8;
  --cream-light: #fffdf7;
  --gold:        #d4a843;
  --gold-dark:   #b8860b;
  --green:       #2e7d32;
  --green-light: #4caf50;
  --text-dark:   #1a1a2e;
  --text-muted:  #5a5a7a;
  --text-light:  #fdf6e3;
  --border:      #c4b896;
  --border-dark: #8b7e5e;
  --shadow:      rgba(13,20,66,0.15);
  --shadow-heavy:rgba(13,20,66,0.25);

  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body:    'Inter', sans-serif;

  /* Spacing */
  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  16px;
  --space-lg:  24px;
  --space-xl:  32px;
  --space-2xl: 48px;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-med:  0.35s ease;
  --transition-slow: 0.5s ease;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--text-dark);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Ledger Background Texture ---------- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 39px,
      rgba(196,184,150,0.18) 39px,
      rgba(196,184,150,0.18) 40px
    );
}

/* ---------- App Shell ---------- */
.app-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- Header ---------- */
.app-header {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 60%, var(--navy-light) 100%);
  color: var(--text-light);
  padding: var(--space-md) var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  box-shadow: 0 4px 20px var(--shadow-heavy);
  position: sticky;
  top: 0;
  z-index: 100;
}

.app-header__logo {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: contain;
  background: white;
  padding: 3px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.app-header__text {
  flex: 1;
}

.app-header__title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.app-header__subtitle {
  font-size: 0.75rem;
  opacity: 0.75;
  font-weight: 400;
  letter-spacing: 0.3px;
}

.app-header__gojo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.app-header__gojo:hover {
  transform: scale(1.1);
}

.app-header__back {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  font-size: 1.2rem;
  text-decoration: none;
  flex-shrink: 0;
}

.app-header__back:hover {
  background: rgba(255,255,255,0.25);
  transform: scale(1.05);
}

/* Demo Mode Banner */
.demo-banner {
  background: linear-gradient(90deg, var(--gold-dark), var(--gold));
  color: var(--navy-dark);
  text-align: center;
  padding: var(--space-xs) var(--space-md);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
}

.demo-banner.hidden {
  display: none;
}

/* ---------- Landing Page ---------- */
.landing {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl) var(--space-lg);
  gap: var(--space-xl);
}

.landing__hero {
  text-align: center;
  max-width: 480px;
}

.landing__hero-logo {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-lg);
  object-fit: contain;
  background: white;
  padding: 8px;
  box-shadow: 0 8px 32px var(--shadow-heavy);
  margin-bottom: var(--space-lg);
  border: 3px solid var(--gold);
}

.landing__hero-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--navy-dark);
  letter-spacing: 1px;
  margin-bottom: var(--space-sm);
}

.landing__hero-tagline {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 500;
}

.landing__cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  width: 100%;
  max-width: 480px;
}

/* ---------- Nav Card ---------- */
.nav-card {
  background: var(--cream-light);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  cursor: pointer;
  transition: var(--transition-med);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
}

.nav-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  transition: var(--transition-med);
}

.nav-card--onboarding::before {
  background: var(--navy);
}

.nav-card--workprofile::before {
  background: var(--red);
}

.nav-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px var(--shadow-heavy);
  border-color: var(--gold);
}

.nav-card:active {
  transform: translateY(-1px);
}

.nav-card__icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}

.nav-card--onboarding .nav-card__icon {
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: white;
}

.nav-card--workprofile .nav-card__icon {
  background: linear-gradient(135deg, var(--red), var(--red-light));
  color: white;
}

.nav-card__content {
  flex: 1;
}

.nav-card__title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy-dark);
  margin-bottom: var(--space-xs);
}

.nav-card__desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.nav-card__arrow {
  color: var(--gold-dark);
  font-size: 1.4rem;
  align-self: center;
  transition: var(--transition-fast);
}

.nav-card:hover .nav-card__arrow {
  transform: translateX(4px);
}

/* ---------- Main Content Area ---------- */
.main-content {
  flex: 1;
  padding: var(--space-lg) var(--space-md);
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
}

/* ---------- Form Sections ---------- */
.form-section {
  background: var(--cream-light);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
  position: relative;
  box-shadow: 0 2px 12px var(--shadow);
}

.form-section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: var(--space-md);
  right: var(--space-md);
  height: 1px;
  background: repeating-linear-gradient(
    90deg,
    var(--border) 0px,
    var(--border) 4px,
    transparent 4px,
    transparent 8px
  );
}

.form-section:last-child::after {
  display: none;
}

.section-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--navy);
}

.section-header__icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.section-header__icon--navy {
  background: var(--navy);
  color: white;
}

.section-header__icon--red {
  background: var(--red);
  color: white;
}

.section-header__icon--green {
  background: var(--green);
  color: white;
}

.section-header__icon--gold {
  background: var(--gold-dark);
  color: white;
}

.section-header__title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy-dark);
}

/* ---------- Form Fields ---------- */
.form-group {
  margin-bottom: var(--space-md);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: var(--space-xs);
}

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

.form-label .optional-tag {
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 4px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-dark);
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  outline: none;
  min-height: 46px;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(26,35,126,0.1);
}

.form-input.error,
.form-select.error,
.form-textarea.error {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(198,40,40,0.1);
}

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

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235a5a7a' d='M6 8.5L1 3.5h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

.error-text {
  font-size: 0.78rem;
  color: var(--red);
  margin-top: var(--space-xs);
  display: none;
  align-items: center;
  gap: 4px;
}

.error-text.visible {
  display: flex;
}

/* ---------- Checkbox & Radio ---------- */
.form-check {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
  padding: var(--space-sm) 0;
  font-size: 0.9rem;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
  width: 20px;
  height: 20px;
  accent-color: var(--navy);
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xs) var(--space-md);
}

/* ---------- Toggle Switch ---------- */
.toggle-wrapper {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: rgba(26,35,126,0.04);
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border);
}

.toggle-label {
  font-weight: 600;
  font-size: 0.95rem;
  flex: 1;
}

.toggle-switch {
  position: relative;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 28px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: white;
  top: 3px;
  left: 3px;
  transition: var(--transition-fast);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--navy);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(24px);
}

/* ---------- Photo Upload ---------- */
.photo-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  background: rgba(253,246,227,0.5);
  cursor: pointer;
  transition: var(--transition-fast);
}

.photo-upload:hover {
  border-color: var(--navy);
  background: rgba(26,35,126,0.03);
}

.photo-upload__preview {
  width: 110px;
  height: 130px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  object-fit: cover;
  display: none;
  background: white;
}

.photo-upload__preview.has-photo {
  display: block;
}

.photo-upload__placeholder {
  width: 110px;
  height: 130px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  background: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  color: var(--text-muted);
  font-size: 0.8rem;
}

.photo-upload__placeholder .icon {
  font-size: 2rem;
}

.photo-upload__placeholder.hidden {
  display: none;
}

.photo-upload__actions {
  display: flex;
  gap: var(--space-sm);
}

/* ---------- Repeatable Block ---------- */
.repeatable-block {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
  background: rgba(255,255,255,0.7);
  position: relative;
  animation: slideDown 0.3s ease;
}

.repeatable-block__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.repeatable-block__number {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy);
  background: rgba(26,35,126,0.08);
  padding: 2px 10px;
  border-radius: 20px;
}

.repeatable-block__remove {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--red-light);
  background: rgba(198,40,40,0.05);
  color: var(--red);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition-fast);
}

.repeatable-block__remove:hover {
  background: var(--red);
  color: white;
}

.btn-add-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  width: 100%;
  padding: 12px;
  background: rgba(26,35,126,0.04);
  border: 2px dashed var(--navy-light);
  border-radius: var(--radius-sm);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-add-block:hover {
  background: rgba(26,35,126,0.08);
  border-color: var(--navy);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 14px 28px;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
  letter-spacing: 0.3px;
  min-height: 48px;
  text-decoration: none;
}

.btn--primary {
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: white;
  box-shadow: 0 4px 16px rgba(26,35,126,0.3);
}

.btn--primary:hover {
  box-shadow: 0 6px 24px rgba(26,35,126,0.4);
  transform: translateY(-2px);
}

.btn--primary:active {
  transform: translateY(0);
}

.btn--red {
  background: linear-gradient(135deg, var(--red), var(--red-light));
  color: white;
  box-shadow: 0 4px 16px rgba(198,40,40,0.3);
}

.btn--red:hover {
  box-shadow: 0 6px 24px rgba(198,40,40,0.4);
  transform: translateY(-2px);
}

.btn--secondary {
  background: white;
  color: var(--navy);
  border: 2px solid var(--navy);
}

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

.btn--green {
  background: linear-gradient(135deg, var(--green), var(--green-light));
  color: white;
  box-shadow: 0 4px 16px rgba(46,125,50,0.3);
}

.btn--green:hover {
  box-shadow: 0 6px 24px rgba(46,125,50,0.4);
  transform: translateY(-2px);
}

.btn--outline {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--border);
}

.btn--outline:hover {
  border-color: var(--navy);
  background: rgba(26,35,126,0.04);
}

.btn--small {
  padding: 8px 16px;
  font-size: 0.85rem;
  min-height: 36px;
}

.btn--full {
  width: 100%;
}

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

/* ---------- Stamp Badge ---------- */
.stamp-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 4px 14px;
  border: 2px solid var(--red);
  border-radius: 4px;
  color: var(--red);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transform: rotate(-3deg);
  opacity: 0.85;
}

.stamp-badge--navy {
  border-color: var(--navy);
  color: var(--navy);
}

.stamp-badge--green {
  border-color: var(--green);
  color: var(--green);
}

/* ---------- Spinner ---------- */
.spinner {
  width: 22px;
  height: 22px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.spinner--dark {
  border: 3px solid rgba(26,35,126,0.15);
  border-top-color: var(--navy);
}

/* ---------- Toast / Notification ---------- */
.toast-container {
  position: fixed;
  top: var(--space-lg);
  right: var(--space-lg);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.toast {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 8px 32px var(--shadow-heavy);
  animation: slideInRight 0.4s ease;
  max-width: 360px;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

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

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

.toast--info {
  background: var(--navy);
  color: white;
}

.toast.fade-out {
  animation: slideOutRight 0.3s ease forwards;
}

/* ---------- Success Screen ---------- */
.success-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13,20,66,0.85);
  backdrop-filter: blur(8px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  animation: fadeIn 0.3s ease;
}

.success-overlay.hidden {
  display: none;
}

.success-card {
  background: var(--cream-light);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl) var(--space-xl);
  text-align: center;
  max-width: 400px;
  width: 100%;
  animation: scaleIn 0.4s ease;
}

.success-card__stamp {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 4px double var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-lg);
  animation: stampPress 0.6s ease;
}

.success-card__stamp .icon {
  font-size: 2.5rem;
  color: var(--green);
}

.success-card__title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy-dark);
  margin-bottom: var(--space-sm);
}

.success-card__message {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: var(--space-xl);
  line-height: 1.5;
}

.success-card__id {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  background: rgba(26,35,126,0.06);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-xl);
  display: inline-block;
  letter-spacing: 1px;
}

.success-card__actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

/* ---------- Lookup / Search Bar ---------- */
.search-bar {
  display: flex;
  gap: var(--space-sm);
  align-items: stretch;
}

.search-bar .form-input {
  flex: 1;
}

.search-bar .btn {
  flex-shrink: 0;
}

.lookup-result {
  background: rgba(46,125,50,0.06);
  border: 1.5px solid var(--green);
  border-radius: var(--radius-sm);
  padding: var(--space-md);
  margin-top: var(--space-md);
  display: none;
}

.lookup-result.visible {
  display: block;
  animation: slideDown 0.3s ease;
}

.lookup-result__name {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--navy-dark);
  font-size: 1.05rem;
}

.lookup-result__details {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: var(--space-xs);
}

/* ---------- Auto-sum Display ---------- */
.auto-sum {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md);
  background: rgba(26,35,126,0.06);
  border-radius: var(--radius-sm);
  border: 1px solid var(--navy-light);
  margin-top: var(--space-md);
}

.auto-sum__label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--navy);
}

.auto-sum__value {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--navy-dark);
}

/* ---------- Declaration Box ---------- */
.declaration-box {
  background: rgba(212,168,67,0.08);
  border: 2px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: var(--space-md);
}

.declaration-box p {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-dark);
  margin-bottom: var(--space-md);
}

/* ---------- Document Checklist ---------- */
.doc-checklist {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xs) var(--space-md);
}

.doc-checklist .form-check {
  font-size: 0.85rem;
}

/* ---------- Conditional Section ---------- */
.conditional-section {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease;
  opacity: 0;
}

.conditional-section.visible {
  max-height: 3000px;
  opacity: 1;
}

/* ---------- Footer ---------- */
.app-footer {
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  color: var(--text-muted);
  font-size: 0.78rem;
}

.app-footer a {
  color: var(--navy);
  text-decoration: none;
  font-weight: 600;
}

/* ---------- Animations ---------- */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(60px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideOutRight {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(60px); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes stampPress {
  0% { transform: scale(1.6) rotate(-10deg); opacity: 0; }
  50% { transform: scale(0.95) rotate(2deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 4px 16px rgba(26,35,126,0.3); }
  50% { box-shadow: 0 4px 24px rgba(26,35,126,0.5); }
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .checkbox-group,
  .doc-checklist {
    grid-template-columns: 1fr;
  }

  .app-header {
    padding: var(--space-sm) var(--space-md);
  }

  .app-header__title {
    font-size: 1.05rem;
  }

  .main-content {
    padding: var(--space-md) var(--space-sm);
  }

  .form-section {
    padding: var(--space-md);
  }

  .landing__hero-title {
    font-size: 1.6rem;
  }

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

  .toast-container {
    left: var(--space-md);
    right: var(--space-md);
  }

  .toast {
    max-width: 100%;
  }

  .search-bar {
    flex-direction: column;
  }
}

@media (min-width: 768px) {
  .landing__cards {
    grid-template-columns: 1fr 1fr;
    max-width: 640px;
  }
}

/* ---------- Print ---------- */
@media print {
  .app-header,
  .demo-banner,
  .app-footer,
  .btn,
  .toast-container {
    display: none !important;
  }

  body::before {
    display: none;
  }

  .form-section {
    box-shadow: none;
    border: 1px solid #ccc;
    break-inside: avoid;
  }
}
