/* ==========================================================================
   WEBICI ONBOARDING FORM — FRESH MODERN DESIGN SYSTEM
   ========================================================================== */

:root {
  /* Webici Official Brand Palette (https://webici.ca) */
  --primary-50: #f0f8ff;
  --primary-100: #e0f2fe;
  --primary-200: #bae6fd;
  --primary-300: #7dd3fc;
  --primary-400: #38bdf8;
  --primary-500: #0094fd;
  --primary-600: #0086e5;
  --primary-700: #026aa2;
  --primary-800: #033458;
  --primary-900: #02233c;

  --accent-50: #f0fdfa;
  --accent-100: #ccfbf1;
  --accent-400: #2dd4bf;
  --accent-500: #31cdcf;
  --accent-600: #0d9488;

  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;

  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-500: #f59e0b;
  --amber-700: #b45309;

  --rose-50: #fff1f2;
  --rose-100: #ffe4e6;
  --rose-500: #f43f5e;
  --rose-600: #e11d48;
  --rose-700: #be123c;

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.08), 0 1px 2px -1px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.05);

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-full: 9999px;

  /* Layout */
  --header-height: 72px;
  --sidebar-width: 320px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

body {
  font-family: var(--font-sans);
  background-color: #f8fafc;
  color: var(--slate-800);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: clip;
}

/* ==========================================================================
   APP HEADER
   ========================================================================== */
/* ==========================================================================
   APP HEADER — OFFICIAL WEBICI DARK NAVY (#033458)
   ========================================================================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: #033458;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 20px rgba(3, 52, 88, 0.3);
}

.header-container {
  max-width: 1440px;
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo-img {
  height: 32px;
  width: auto;
  object-fit: contain;
  display: block;
}

.brand-divider {
  width: 1px;
  height: 26px;
  background: rgba(255, 255, 255, 0.2);
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #38bdf8;
}

.brand-tag a {
  color: #38bdf8;
  text-decoration: none;
  transition: color 0.15s ease;
}

.brand-tag a:hover {
  color: #7dd3fc;
  text-decoration: underline;
}

.brand-title {
  font-size: 1.12rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
}

/* Progress Pill */
.header-center {
  flex: 1;
  max-width: 360px;
}

.progress-pill {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 6px 12px;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.progress-label {
  color: #cbd5e1;
}

.progress-percent {
  color: #38bdf8;
  font-family: var(--font-mono);
  font-weight: 700;
}

.progress-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #0094fd);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.save-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: #e2e8f0;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.save-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.3);
}

.save-status.saving .save-dot {
  background-color: var(--amber-500);
  box-shadow: 0 0 0 2px var(--amber-100);
}

.app-header .btn-outline {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

.app-header .btn-outline:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.45);
  color: #ffffff;
}

.app-header .btn-primary {
  background: linear-gradient(135deg, #0094fd 0%, #0076d6 100%);
  color: #ffffff;
  border-color: #38bdf8;
  box-shadow: 0 2px 8px rgba(0, 148, 253, 0.4);
}

.app-header .btn-primary:hover {
  background: linear-gradient(135deg, #38bdf8 0%, #0094fd 100%);
  border-color: #7dd3fc;
  box-shadow: 0 4px 14px rgba(0, 148, 253, 0.55);
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease-in-out;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
  color: #ffffff;
  border-color: var(--primary-600);
  box-shadow: 0 2px 6px rgba(0, 134, 229, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
  border-color: var(--primary-700);
  box-shadow: 0 4px 12px rgba(0, 134, 229, 0.35);
  transform: translateY(-1px);
}

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

.btn-outline {
  background: #ffffff;
  color: var(--slate-700);
  border-color: var(--slate-300);
}

.btn-outline:hover {
  background: var(--slate-50);
  border-color: var(--slate-400);
  color: var(--slate-900);
}

.btn-secondary {
  background: var(--slate-100);
  color: var(--slate-700);
  border-color: var(--slate-200);
}

.btn-secondary:hover {
  background: var(--slate-200);
  color: var(--slate-900);
}

.btn-lg {
  padding: 13px 24px;
  font-size: 0.98rem;
}

.w-full {
  width: 100%;
}

/* ==========================================================================
   INTEGRATOR MODE / MAGIC LINK BANNER
   ========================================================================== */
.integrator-mode-banner {
  background: linear-gradient(135deg, #033458 0%, #0086e5 100%);
  color: #ffffff;
  padding: 12px 24px;
  box-shadow: 0 4px 14px rgba(3, 52, 88, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  z-index: 90;
}

.integrator-banner-container {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.integrator-banner-content {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.88rem;
}

.integrator-icon {
  font-size: 1.3rem;
}

.integrator-banner-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ==========================================================================
   ALERT BANNER (CLAUSE 2.3.1)
   ========================================================================== */
.alert-banner {
  background: #fffbeb;
  border-bottom: 1px solid #fde68a;
  color: #92400e;
  font-size: 0.86rem;
  padding: 10px 24px;
}

.alert-banner-container {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.alert-icon {
  font-size: 1.15rem;
}

.alert-content {
  flex: 1;
}

.alert-close {
  background: none;
  border: none;
  font-size: 1.1rem;
  color: #b45309;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}

.alert-close:hover {
  background: #fef3c7;
}

/* ==========================================================================
   APP LAYOUT (SIDEBAR + MAIN)
   ========================================================================== */
.app-layout {
  max-width: 1440px;
  margin: 0 auto;
  padding: 30px 24px 80px;
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

/* Sidebar */
.app-sidebar {
  width: var(--sidebar-width);
  position: -webkit-sticky;
  position: sticky;
  top: calc(var(--header-height) + 20px);
  max-height: calc(100vh - var(--header-height) - 36px);
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 40;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--slate-100);
  margin-bottom: 12px;
}

.sidebar-header h3 {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--slate-900);
}

.sections-badge {
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--slate-100);
  color: var(--slate-600);
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.sidebar-nav {
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-right: 4px;
}

.sidebar-nav::-webkit-scrollbar {
  width: 4px;
}
.sidebar-nav::-webkit-scrollbar-thumb {
  background: var(--slate-200);
  border-radius: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--slate-600);
  transition: all 0.15s ease;
}

.nav-item:hover {
  background: var(--slate-50);
  color: var(--slate-900);
}

.nav-item.active {
  background: var(--primary-50);
  color: var(--primary-800);
  font-weight: 600;
}

.nav-num {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--slate-100);
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--slate-600);
  flex-shrink: 0;
}

.nav-item.active .nav-num {
  background: var(--primary-600);
  color: white;
}

.nav-item.completed .nav-num {
  background: var(--primary-100);
  color: var(--primary-700);
}

.nav-item.completed .nav-num::after {
  content: '✓';
}

.nav-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-footer {
  padding-top: 14px;
  border-top: 1px solid var(--slate-100);
  margin-top: 10px;
}

/* ==========================================================================
   MAIN CONTENT & FORM CARDS
   ========================================================================== */
.app-main {
  flex: 1;
  min-width: 0;
}

.form-card {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  padding: 32px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-xs);
  transition: all 0.2s ease;
}

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

.form-card.highlight-card {
  border-color: #93c5fd;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.08);
}

.form-card.critical-card {
  border-color: #fca5a5;
  box-shadow: 0 4px 12px rgba(244, 63, 94, 0.08);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--slate-100);
}

.card-title-group {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.card-number {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary-600);
  background: var(--primary-50);
  padding: 4px 10px;
  border-radius: var(--radius-md);
}

.card-header h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--slate-900);
  letter-spacing: -0.02em;
}

.card-subtitle {
  font-size: 0.86rem;
  color: var(--slate-500);
  margin-top: 3px;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-required {
  background: #f1f5f9;
  color: var(--slate-700);
  border: 1px solid var(--slate-300);
}

.badge-recommended {
  background: #eff6ff;
  color: var(--accent-600);
  border: 1px solid #bfdbfe;
}

.badge-recommended-inline {
  color: var(--accent-600);
  font-weight: 600;
  font-size: 0.75rem;
}

.badge-critical {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #93c5fd;
}

.badge-danger {
  background: var(--rose-50);
  color: var(--rose-700);
  border: 1px solid var(--rose-200);
}

.badge-info {
  background: var(--slate-100);
  color: var(--slate-600);
}

/* ==========================================================================
   FORM GRID & INPUTS
   ========================================================================== */
.form-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
}

.col-12 { grid-column: span 12; }
.col-8  { grid-column: span 8; }
.col-6  { grid-column: span 6; }
.col-4  { grid-column: span 4; }

.form-group {
  display: flex;
  flex-direction: column;
}

.form-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--slate-800);
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.form-label.required::after {
  content: '*';
  color: var(--rose-500);
  font-weight: 700;
  font-size: 1rem;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  color: var(--slate-900);
  background: #ffffff;
  border: 1.5px solid var(--slate-300);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  transition: all 0.18s ease;
  outline: none;
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover {
  border-color: var(--slate-400);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(0, 148, 253, 0.18);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--slate-400);
}

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

.field-hint {
  font-size: 0.77rem;
  color: var(--slate-500);
  margin-top: 6px;
  line-height: 1.4;
}

.text-warning {
  color: #b45309;
}

.text-lg { font-size: 1.05rem; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-medium { font-weight: 500; }
.text-sm { font-size: 0.82rem; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }

.hidden {
  display: none !important;
}

/* ==========================================================================
   CHECKBOX & RADIO CUSTOM CARDS
   ========================================================================== */
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}

.checkbox-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--slate-50);
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.checkbox-card:hover {
  background: #ffffff;
  border-color: var(--slate-300);
}

.checkbox-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.checkbox-box {
  width: 18px;
  height: 18px;
  border: 2px solid var(--slate-400);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

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

.checkbox-card input[type="checkbox"]:checked ~ .checkbox-box::after {
  content: '';
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-1px, -1px);
}

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

.checkbox-label {
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--slate-800);
}

/* Radio Pill Group */
.radio-toggle-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.radio-pill {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  background: #ffffff;
  border: 1.5px solid var(--slate-300);
  border-radius: var(--radius-full);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--slate-700);
  transition: all 0.15s ease;
  user-select: none;
}

.radio-pill input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.radio-pill:hover {
  border-color: var(--slate-400);
  background: var(--slate-50);
}

.radio-pill:has(input[type="radio"]:checked) {
  background: var(--primary-600);
  color: #ffffff;
  border-color: var(--primary-600);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 134, 229, 0.25);
}

/* ==========================================================================
   NESTED BLOCKS & WARNINGS
   ========================================================================== */
.nested-card {
  background: var(--slate-50);
  border: 1.5px dashed var(--slate-300);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.info-callout {
  background: var(--slate-100);
  border-left: 3px solid var(--accent-500);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--slate-700);
}

.security-warning-box {
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  gap: 16px;
}

.security-warning-icon {
  font-size: 1.5rem;
}

.security-warning-text {
  flex: 1;
}

.badge-plannit-info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-md);
  padding: 12px 16px;
}

.badge-plannit-title {
  font-weight: 700;
  font-size: 0.85rem;
  color: #1e40af;
  margin-bottom: 4px;
}

.badge-plannit-info p {
  font-size: 0.8rem;
  color: #3b82f6;
}

/* Blocking Notice Card */
.blocking-notice-card {
  background: #fff1f2;
  border: 1.5px solid #fecdd3;
  border-radius: var(--radius-lg);
  padding: 20px;
}

.blocking-notice-header {
  margin-bottom: 12px;
}

.blocking-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--rose-600);
  color: white;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

/* ==========================================================================
   SCHEDULE MATRIX
   ========================================================================== */
.schedule-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.schedule-presets {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--slate-600);
}

.preset-btn {
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--slate-700);
  cursor: pointer;
  transition: all 0.15s ease;
}

.preset-btn:hover {
  background: var(--primary-50);
  border-color: var(--primary-300);
  color: var(--primary-800);
}

.schedule-matrix {
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.schedule-row {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--slate-100);
  gap: 20px;
  background: #ffffff;
}

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

.day-name {
  width: 90px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--slate-800);
}

.switch-toggle {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
}

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

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--slate-300);
  transition: .2s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .2s;
  border-radius: 50%;
}

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

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

.hours-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--slate-500);
}

.time-input {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 5px 10px;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-sm);
  outline: none;
}

.closed-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--slate-400);
}

/* ==========================================================================
   CTA SELECTOR GRID (SECTION 7)
   ========================================================================== */
.cta-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.cta-card {
  position: relative;
  border: 2px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 16px;
  background: var(--slate-50);
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}

.cta-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cta-card:hover {
  background: #ffffff;
  border-color: var(--slate-300);
}

.cta-card:has(input[type="radio"]:checked) {
  background: var(--primary-50);
  border-color: var(--primary-600);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.15);
}

.cta-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cta-icon {
  font-size: 1.4rem;
  margin-bottom: 4px;
}

.cta-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--slate-900);
}

.cta-desc {
  font-size: 0.78rem;
  color: var(--slate-600);
  line-height: 1.4;
}

/* ==========================================================================
   RANKING WIDGET (5 SEO CITIES)
   ========================================================================== */
.ranking-container {
  background: var(--slate-50);
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.ranking-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 6px;
  width: 100%;
}

.ranking-note {
  font-size: 0.8rem;
  color: var(--slate-600);
  margin-bottom: 16px;
}

.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ranking-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  padding: 8px 12px;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-md);
  box-sizing: border-box;
}

.rank-badge {
  width: 28px;
  height: 28px;
  background: var(--slate-900);
  color: white;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ranking-item[data-rank="1"] .rank-badge {
  background: var(--primary-600);
}

.ranking-item[data-rank="2"] .rank-badge {
  background: var(--primary-700);
}

.ranked-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 6px 0;
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: none !important;
}

.ranked-input::placeholder {
  font-size: 0.78rem;
  color: var(--slate-400);
  font-weight: 400;
}

.ranked-input:focus {
  box-shadow: none;
}

.rank-tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--slate-400);
  padding: 2px 8px;
  background: var(--slate-100);
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

/* ==========================================================================
   UPLOAD DROPZONE
   ========================================================================== */
.upload-dropzone {
  border: 2px dashed var(--slate-300);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  background: var(--slate-50);
  cursor: pointer;
  transition: all 0.2s ease;
}

.upload-dropzone:hover {
  background: var(--primary-50);
  border-color: var(--primary-400);
}

.file-input-hidden {
  display: none;
}

.upload-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.upload-text {
  font-size: 0.92rem;
  color: var(--slate-700);
  margin-bottom: 4px;
}

.upload-text strong {
  color: var(--primary-700);
}

.upload-types {
  font-size: 0.76rem;
  color: var(--slate-400);
}

.file-preview-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  padding: 12px 16px;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
}

.preview-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.preview-icon {
  font-size: 1.5rem;
}

.preview-details {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.preview-filename {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--slate-900);
}

.preview-size {
  font-size: 0.75rem;
  color: var(--slate-500);
  font-family: var(--font-mono);
}

.btn-remove-file {
  background: var(--rose-50);
  color: var(--rose-600);
  border: 1px solid var(--rose-200);
  border-radius: var(--radius-sm);
  width: 28px;
  height: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-remove-file:hover {
  background: var(--rose-100);
}

/* ==========================================================================
   FORM BOTTOM BAR
   ========================================================================== */
.form-bottom-actions {
  margin-top: 10px;
}

.bottom-card {
  background: linear-gradient(135deg, var(--slate-900), var(--slate-800));
  border-radius: var(--radius-xl);
  padding: 32px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: var(--shadow-lg);
}

.bottom-info h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.bottom-info p {
  font-size: 0.86rem;
  color: var(--slate-300);
}

.bottom-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.bottom-buttons .btn-outline {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-color: rgba(255, 255, 255, 0.2);
}

.bottom-buttons .btn-outline:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   MODAL & EXPORT VIEW
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-card {
  background: #ffffff;
  border-radius: var(--radius-xl);
  max-width: 860px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.modal-card.modal-card-sm {
  max-width: 540px;
}

.text-center { text-align: center; }
.p-6 { padding: 24px; }
.flex-center { display: flex; justify-content: center; align-items: center; }
.gap-2 { gap: 8px; }

.spinner-loader {
  width: 48px;
  height: 48px;
  border: 4px solid var(--slate-200);
  border-top-color: var(--primary-600);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 10px auto 0;
}

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

.success-icon-badge,
.error-icon-badge {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto;
}

.success-icon-badge {
  background: var(--primary-100);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}

.error-icon-badge {
  background: var(--rose-100);
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.25);
}

.success-meta-box {
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 0.82rem;
  color: var(--slate-700);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.webhook-test-result {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
}

.webhook-test-result.success {
  background: var(--primary-50);
  border: 1px solid var(--primary-300);
  color: var(--primary-800);
}

.webhook-test-result.error {
  background: var(--rose-50);
  border: 1px solid var(--rose-300);
  color: var(--rose-800);
}

@media (max-width: 640px) {
  .btn-text-responsive {
    display: none;
  }
}


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

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.modal-icon {
  font-size: 1.6rem;
}

.modal-title-group h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--slate-900);
}

.modal-title-group p {
  font-size: 0.8rem;
  color: var(--slate-500);
}

.modal-close {
  background: var(--slate-100);
  border: none;
  border-radius: var(--radius-sm);
  width: 32px;
  height: 32px;
  font-size: 1rem;
  cursor: pointer;
  color: var(--slate-600);
}

.modal-close:hover {
  background: var(--slate-200);
}

.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--slate-200);
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.tab-btn {
  background: none;
  border: none;
  padding: 8px 14px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--slate-500);
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.tab-btn.active {
  background: var(--primary-50);
  color: var(--primary-800);
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

.summary-preview-box {
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 20px;
  font-size: 0.86rem;
  line-height: 1.65;
  color: var(--slate-800);
  white-space: pre-wrap;
  max-height: 480px;
  overflow-y: auto;
}

.json-code-box {
  background: var(--slate-900);
  color: #a7f3d0;
  padding: 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  max-height: 480px;
  overflow-y: auto;
}

.modal-footer {
  padding: 16px 24px;
  background: var(--slate-50);
  border-top: 1px solid var(--slate-200);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--slate-900);
  color: white;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 0.86rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideUp 0.25s ease-out;
}

.toast.toast-success {
  border-left: 4px solid var(--primary-400);
}

.toast.toast-warning {
  border-left: 4px solid var(--amber-500);
}

.toast.toast-error {
  border-left: 4px solid var(--rose-500);
}

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

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

/* ==========================================================================
   SECONDARY SERVICES DYNAMIC LIST
   ========================================================================== */
.secondary-services-container {
  background: var(--slate-50);
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
}

.secondary-services-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.secondary-services-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.secondary-service-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  padding: 6px 10px 6px 14px;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  animation: fadeIn 0.2s ease;
}

.service-order-badge {
  width: 24px;
  height: 24px;
  background: var(--primary-100);
  color: var(--primary-800);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.secondary-service-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 6px 0;
  font-size: 0.9rem;
  font-weight: 500;
  outline: none;
}

.btn-delete-service {
  background: none;
  border: none;
  color: var(--slate-400);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.15s ease;
}

.btn-delete-service:hover {
  color: var(--rose-600);
  background: var(--rose-50);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* ==========================================================================
   SOCIAL MEDIA URL FIELDS
   ========================================================================== */
.social-urls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.social-url-card {
  background: #ffffff;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  animation: fadeIn 0.2s ease;
}

.social-url-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--slate-800);
}

.social-icon-tag {
  font-size: 1rem;
}

/* ==========================================================================
   COLOR PICKER ROW (SECTION 12)
   ========================================================================== */
.color-picker-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.color-swatch-input {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.color-swatch-input::-webkit-color-swatch-wrapper {
  padding: 0;
}

.color-swatch-input::-webkit-color-swatch {
  border: 2px solid var(--slate-300);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
}

/* ==========================================================================
   STYLE TAGS GRID & MAX 3 SELECTOR
   ========================================================================== */
.style-selector-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.style-count-badge {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--slate-100);
  color: var(--slate-700);
  font-family: var(--font-mono);
}

.style-count-badge.limit-reached {
  background: var(--primary-100);
  color: var(--primary-800);
  border: 1px solid var(--primary-300);
}

.style-tags-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px;
}

.style-tag-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  background: var(--slate-50);
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--slate-700);
  text-align: center;
  transition: all 0.15s ease;
  user-select: none;
}

.style-tag-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.style-tag-card:hover {
  background: #ffffff;
  border-color: var(--slate-300);
}

.style-tag-card:has(input:checked) {
  background: var(--primary-50);
  border-color: var(--primary-600);
  color: var(--primary-800);
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.15);
}

.style-tag-card.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: var(--slate-100);
  border-color: var(--slate-200);
}

.pref-toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  color: var(--slate-600);
  cursor: pointer;
  user-select: none;
  font-weight: 500;
}

.pref-toggle-label input[type="checkbox"] {
  accent-color: var(--primary-600);
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.color-picker-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.color-picker-row .form-input {
  flex: 1;
  min-width: 0;
}

.style-tag-card.no-pref-tag-card {
  grid-column: 1 / -1;
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.style-tag-card.no-pref-tag-card:hover {
  background: #dbeafe;
}

.style-tag-card.no-pref-tag-card:has(input:checked) {
  background: #2563eb;
  border-color: #1d4ed8;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

/* ==========================================================================
   RESPONSIVE DESIGN (TABLETS & MOBILES)
   ========================================================================== */
@media (max-width: 1024px) {
  .app-layout {
    flex-direction: column;
    padding: 20px 16px 60px;
    gap: 20px;
  }
  .app-sidebar {
    width: 100%;
    position: relative;
    top: 0;
    max-height: 260px;
  }
  .header-center {
    display: none;
  }
}

@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
  }

  .app-header {
    height: auto;
    padding: 10px 0;
    width: 100%;
    max-width: 100vw;
  }

  .header-container {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 0 12px;
    width: 100%;
    box-sizing: border-box;
  }

  .brand-group {
    justify-content: flex-start;
  }

  .header-actions {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
  }

  .header-actions .btn {
    padding: 6px 10px;
    font-size: 0.76rem;
    flex: 1 1 auto;
  }

  .btn-text-responsive {
    display: inline;
  }

  .brand-logo-img {
    height: 26px;
  }

  .brand-title {
    font-size: 0.95rem;
  }

  .alert-banner {
    padding: 8px 12px;
    width: 100%;
    box-sizing: border-box;
  }

  .app-layout {
    display: flex;
    flex-direction: column;
    padding: 12px 10px 40px;
    gap: 14px;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  .app-main {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .app-sidebar {
    width: 100%;
    position: static;
    max-height: none;
    padding: 12px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    box-sizing: border-box;
  }

  .sidebar-header {
    padding-bottom: 8px;
    margin-bottom: 8px;
  }

  .sidebar-nav {
    max-height: 140px;
    overflow-y: auto;
  }

  .form-card {
    padding: 18px 12px;
    border-radius: var(--radius-lg);
    margin-bottom: 14px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding-bottom: 12px;
    margin-bottom: 16px;
    width: 100%;
    box-sizing: border-box;
  }

  .card-title-group {
    gap: 10px;
    width: 100%;
  }

  .card-header h2 {
    font-size: 1.15rem;
    word-break: break-word;
  }

  /* Form Flex Flow on Mobile */
  .form-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .col-12, .col-8, .col-6, .col-4 {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .form-group {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .form-label {
    word-break: break-word;
    white-space: normal;
  }

  .form-input,
  .form-select,
  .form-textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    font-size: 16px;
  }

  /* Radio Pills Wrap & Stack on Mobile */
  .radio-toggle-group {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 8px;
    box-sizing: border-box;
  }

  .radio-pill {
    display: flex;
    width: 100%;
    max-width: 100%;
    justify-content: center;
    text-align: center;
    padding: 11px 12px;
    font-size: 0.84rem;
    box-sizing: border-box;
    white-space: normal;
    word-break: break-word;
    border-radius: var(--radius-md);
  }

  .radio-pill span {
    text-align: center;
    max-width: 100%;
    word-break: break-word;
  }

  /* Style Tags Grid */
  .style-tags-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    width: 100%;
    box-sizing: border-box;
  }

  .style-tag-card {
    padding: 9px 8px;
    font-size: 0.76rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    word-break: break-word;
  }

  /* Color Pickers */
  .color-picker-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .color-picker-row .form-input {
    flex: 1;
    min-width: 0;
    width: 100%;
  }

  .color-swatch-input {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
  }

  /* Secondary Services */
  .secondary-services-container {
    padding: 12px 10px;
    width: 100%;
    box-sizing: border-box;
  }

  .secondary-service-item {
    padding: 6px 8px;
    gap: 6px;
    width: 100%;
    box-sizing: border-box;
  }

  .secondary-service-input {
    flex: 1;
    min-width: 0;
    width: 100%;
  }

  /* Schedule Matrix */
  .schedule-matrix {
    width: 100%;
    box-sizing: border-box;
  }

  .schedule-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px 8px;
    width: 100%;
    box-sizing: border-box;
  }

  .schedule-row .day-name {
    width: 100%;
  }

  .hours-inputs {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 6px;
    box-sizing: border-box;
  }

  .hours-inputs input[type="time"] {
    flex: 1;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
  }

  /* Ranking Widget */
  .ranking-container {
    padding: 14px 10px;
    width: 100%;
    box-sizing: border-box;
  }
  .ranking-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    width: 100%;
  }
  .ranking-header .form-label {
    width: 100%;
    font-size: 0.86rem;
  }
  .ranking-header .badge {
    white-space: normal;
    text-align: left;
    font-size: 0.7rem;
    padding: 3px 8px;
    line-height: 1.3;
  }
  .ranking-item {
    padding: 6px 8px;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
  }
  .rank-badge {
    width: 24px;
    height: 24px;
    font-size: 0.78rem;
  }
  .ranked-input {
    font-size: 0.82rem;
  }
  .ranked-input::placeholder {
    font-size: 0.72rem;
  }
  .rank-tag {
    font-size: 0.65rem;
    padding: 2px 6px;
  }

  /* Bottom Actions */
  .bottom-card {
    flex-direction: column;
    align-items: stretch;
    padding: 16px 12px;
    width: 100%;
    box-sizing: border-box;
  }

  .bottom-buttons {
    width: 100%;
    flex-direction: column;
    gap: 8px;
  }

  .bottom-buttons .btn {
    width: 100%;
  }

  .modal-container {
    width: 95%;
    max-height: 90vh;
    padding: 0;
    box-sizing: border-box;
  }

  .modal-body {
    padding: 16px 12px;
  }

  .modal-header, .modal-footer {
    padding: 12px 12px;
  }

  .toast-container {
    right: 10px;
    left: 10px;
    bottom: 12px;
  }

  .toast {
    width: 100%;
  }
}

/* ==========================================================================
   PORTAL / HUB SELECTION STYLES
   ========================================================================== */
.portal-body {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.portal-main {
  flex: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px 80px;
  width: 100%;
  box-sizing: border-box;
}

.portal-hero {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 48px;
}

.portal-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--primary-50);
  border: 1px solid var(--primary-200);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary-700);
  margin-bottom: 18px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-500);
  box-shadow: 0 0 0 0 rgba(0, 148, 253, 0.7);
  animation: pulseBlue 1.8s infinite;
}

@keyframes pulseBlue {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 148, 253, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(0, 148, 253, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 148, 253, 0); }
}

.portal-hero-title {
  font-size: 2.35rem;
  font-weight: 800;
  color: var(--slate-900);
  line-height: 1.25;
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}

.portal-hero-subtitle {
  font-size: 1.08rem;
  color: var(--slate-600);
  line-height: 1.6;
}

.portal-grid-container {
  width: 100%;
  margin-bottom: 48px;
}

.portal-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  align-items: stretch;
}

.portal-card {
  background: #ffffff;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-xl);
  padding: 32px 26px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.portal-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 32px -8px rgba(0, 134, 229, 0.18);
  border-color: var(--primary-400);
}

.portal-card-featured {
  border-color: var(--primary-500);
  box-shadow: 0 10px 30px -5px rgba(0, 148, 253, 0.15);
}

.portal-card-featured:hover {
  border-color: var(--primary-600);
}

.portal-featured-ribbon {
  position: absolute;
  top: 14px;
  right: -32px;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 34px;
  transform: rotate(45deg);
  box-shadow: 0 2px 6px rgba(0, 134, 229, 0.3);
}

.portal-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.portal-card-icon {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-emerald {
  background: var(--primary-50);
  color: var(--primary-600);
}

.icon-blue {
  background: #f0f8ff;
  color: var(--primary-800);
}

.icon-purple {
  background: var(--accent-50);
  color: var(--accent-600);
}

.portal-badge {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.badge-emerald {
  background: var(--primary-50);
  color: var(--primary-700);
  border: 1px solid var(--primary-200);
}

.badge-blue {
  background: #f0f8ff;
  color: var(--primary-800);
  border: 1px solid var(--primary-300);
}

.badge-purple {
  background: var(--accent-50);
  color: var(--accent-600);
  border: 1px solid var(--accent-100);
}

.portal-card-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 10px;
}

.portal-card-desc {
  font-size: 0.88rem;
  color: var(--slate-600);
  line-height: 1.55;
  margin-bottom: 22px;
  min-height: 60px;
}

.portal-features-list {
  list-style: none;
  padding: 0;
  margin: 0 0 28px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.portal-features-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.84rem;
  color: var(--slate-700);
  line-height: 1.4;
}

.check-icon {
  color: var(--primary-600);
  flex-shrink: 0;
  margin-top: 2px;
}

.icon-blue-svg {
  color: var(--primary-800);
}

.icon-purple-svg {
  color: var(--accent-600);
}

.btn-blue {
  background: var(--primary-600);
  color: #ffffff;
  border: 1px solid var(--primary-700);
}

.btn-blue:hover {
  background: var(--primary-700);
  color: #ffffff;
}

.btn-portal {
  padding: 13px 20px;
  font-size: 0.92rem;
  font-weight: 600;
  justify-content: center;
  border-radius: var(--radius-md);
  text-decoration: none;
}

.portal-support-box {
  background: #ffffff;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-xl);
  padding: 24px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: var(--shadow-sm);
}

.portal-support-content {
  display: flex;
  align-items: center;
  gap: 18px;
}

.portal-support-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.portal-support-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 3px;
}

.portal-support-text {
  font-size: 0.86rem;
  color: var(--slate-600);
  line-height: 1.45;
}

.portal-footer-bottom {
  text-align: center;
  padding: 24px;
  border-top: 1px solid var(--slate-200);
  background: #ffffff;
  color: var(--slate-500);
  font-size: 0.8rem;
}

/* Multi-page form specific highlights */
.highlight-card {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
}

.badge-info {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.btn-back-hub {
  font-size: 0.78rem;
  padding: 5px 10px;
}

@media (max-width: 1024px) {
  .portal-cards-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .portal-card-desc {
    min-height: auto;
  }
}

@media (max-width: 768px) {
  .portal-main {
    padding: 24px 14px 50px;
  }
  .portal-hero-title {
    font-size: 1.65rem;
  }
  .portal-hero-subtitle {
    font-size: 0.92rem;
  }
  .portal-card {
    padding: 22px 18px;
  }
  .portal-support-box {
    flex-direction: column;
    align-items: flex-start;
    padding: 18px 16px;
  }
}

/* ==========================================================================
   PRINT STYLES FOR CLIENT PDF EXPORT
   ========================================================================== */
@media print {
  .app-header,
  .app-sidebar,
  .alert-banner,
  .form-bottom-actions,
  .modal-backdrop,
  .toast-container {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .app-layout {
    padding: 0;
    margin: 0;
    max-width: 100%;
  }

  .form-card {
    border: 1px solid #ccc;
    box-shadow: none;
    page-break-inside: avoid;
    margin-bottom: 20px;
  }
}
