/* Candidate Intake Portal - Core Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&family=Great+Vibes&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --font-primary: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Outfit", "Segoe UI", Roboto, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --font-signature: 'Great Vibes', cursive;

  /* Apple iOS 18 Cosmic Frosted Glass Theme */
  --bg-main: #060913;
  --bg-gradient: radial-gradient(circle at 50% -10%, #151d38 0%, #0a0e1c 50%, #050811 100%);
  --surface-card: rgba(18, 24, 40, 0.65);
  --surface-card-alt: rgba(26, 35, 58, 0.72);
  --surface-card-hover: rgba(34, 46, 76, 0.82);
  --surface-input: rgba(255, 255, 255, 0.05);
  --surface-input-border: rgba(255, 255, 255, 0.13);
  --surface-input-focus: rgba(255, 255, 255, 0.09);

  /* Apple iOS System Palette */
  --primary: #0A84FF;           /* iOS Blue */
  --primary-hover: #0071E3;
  --primary-light: #EBF5FF;
  --primary-glow: rgba(10, 132, 255, 0.45);
  --ios-indigo: #5E5CE6;
  --ios-purple: #BF5AF2;

  --accent-teal: #64D2FF;        /* iOS Cyan */
  --accent-emerald: #30D158;     /* iOS Green */
  --accent-amber: #FF9F0A;       /* iOS Orange */
  --accent-rose: #FF453A;        /* iOS Red */
  --accent-purple: #BF5AF2;

  --text-main: #FFFFFF;
  --text-muted: #A1A1A6;
  --text-subtle: #7C7C82;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.15);

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 35px var(--primary-glow);
  --glass-specular: inset 0 1px 1px 0 rgba(255, 255, 255, 0.25);

  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: var(--font-body);
  background: var(--bg-main);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}

/* Apple iOS Ambient Mesh Aurora Glows */
.ios-ambient-glows {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ios-glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(95px);
  opacity: 0.55;
  will-change: transform;
}

.ios-glow-orb.orb-1 {
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(10, 132, 255, 0.65) 0%, rgba(94, 92, 230, 0.3) 60%, transparent 80%);
  top: -120px;
  left: 8%;
  animation: floatOrb1 20s ease-in-out infinite alternate;
}

.ios-glow-orb.orb-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(191, 90, 242, 0.6) 0%, rgba(255, 69, 58, 0.3) 60%, transparent 80%);
  top: 35%;
  right: -80px;
  animation: floatOrb2 24s ease-in-out infinite alternate;
}

.ios-glow-orb.orb-3 {
  width: 580px;
  height: 580px;
  background: radial-gradient(circle, rgba(48, 209, 88, 0.4) 0%, rgba(100, 210, 255, 0.35) 60%, transparent 80%);
  bottom: -150px;
  left: 15%;
  animation: floatOrb3 22s ease-in-out infinite alternate;
}

@keyframes floatOrb1 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(70px, 50px) scale(1.1); }
  100% { transform: translate(-30px, 80px) scale(0.96); }
}

@keyframes floatOrb2 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-80px, -60px) scale(1.12); }
  100% { transform: translate(40px, 50px) scale(0.94); }
}

@keyframes floatOrb3 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, -50px) scale(1.08); }
  100% { transform: translate(-50px, 30px) scale(0.95); }
}

/* Container */
.container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px 80px 16px;
}

/* Top Navigation / Apple Frosted Glass Capsule */
.portal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding: 16px 22px;
  background: rgba(18, 24, 40, 0.68);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-xl);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.22);
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0A84FF 0%, #5E5CE6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(10, 132, 255, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

.brand-icon-box svg {
  width: 24px;
  height: 24px;
  stroke: #ffffff;
}

.brand-text h1 {
  font-family: var(--font-primary);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #FFFFFF 0%, #E2E8F0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

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

.btn-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  font-size: 0.86rem;
  font-weight: 600;
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

.btn-nav:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.btn-nav-primary {
  background: linear-gradient(135deg, #0A84FF 0%, #5E5CE6 100%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(10, 132, 255, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.35);
}

.btn-nav-primary:hover {
  box-shadow: 0 6px 20px rgba(10, 132, 255, 0.55), inset 0 1px 1px rgba(255, 255, 255, 0.45);
  transform: translateY(-1px);
}

/* Apple Frosted Glass Card Wrapper */
.form-sheet-card {
  background: var(--surface-card);
  backdrop-filter: blur(36px) saturate(190%);
  -webkit-backdrop-filter: blur(36px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-xl);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), inset 0 1px 1.5px rgba(255, 255, 255, 0.25);
  overflow: hidden;
  position: relative;
}

.form-sheet-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #0A84FF, #5E5CE6, #BF5AF2, #64D2FF);
}

/* Form Sheet Header */
.form-header-bar {
  padding: 28px 32px 20px 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  background: rgba(255, 255, 255, 0.02);
}

.form-title-group h2 {
  font-family: var(--font-primary);
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  gap: 12px;
}

.form-title-group p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

.app-no-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(10, 132, 255, 0.12);
  border: 1px solid rgba(10, 132, 255, 0.35);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

.app-no-badge span:first-child {
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.app-no-badge strong {
  font-family: var(--font-mono);
  color: #64D2FF;
  letter-spacing: 0.05em;
}

/* Sections */
.form-section {
  padding: 28px 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  position: relative;
}

.form-section:last-of-type {
  border-bottom: none;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-left: 4px solid var(--primary);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 18px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-bottom: 24px;
}

.section-num {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-teal);
}

.section-title h3 {
  font-family: var(--font-primary);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #F1F5F9;
}

/* Grid Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

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

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
}

.form-group.col-span-2 {
  grid-column: span 2;
}

.form-group.col-span-3 {
  grid-column: span 3;
}

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

label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #CBD5E1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

label .req {
  color: var(--accent-rose);
  margin-left: 4px;
}

label .hint {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-subtle);
}

/* Inputs, Selects, Textareas - Apple Frosted Glass */
input[type="text"],
input[type="tel"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
  -webkit-tap-highlight-color: transparent;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25);
}

input[type="date"] {
  color-scheme: dark;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #0A84FF;
  box-shadow: 0 0 0 3.5px rgba(10, 132, 255, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.09);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-subtle);
}

select option {
  background: #0E1524;
  color: #F8FAFC;
}

textarea {
  min-height: 95px;
  resize: vertical;
}

/* Pill / Radio Option Groups */
.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 4px;
}

.pill-option {
  position: relative;
  cursor: pointer;
}

.pill-option input[type="radio"],
.pill-option input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.pill-box {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
  user-select: none;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.pill-option:hover .pill-box {
  border-color: rgba(10, 132, 255, 0.5);
  color: #FFFFFF;
  background: rgba(10, 132, 255, 0.12);
}

.pill-option input:checked + .pill-box {
  background: linear-gradient(135deg, rgba(10, 132, 255, 0.35) 0%, rgba(94, 92, 230, 0.28) 100%);
  border-color: #0A84FF;
  color: #FFFFFF;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(10, 132, 255, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.35);
}

.pill-check-icon {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2.5;
  display: none;
}

.pill-option input:checked + .pill-box .pill-check-icon {
  display: inline-block;
}

/* Checkbox Cards / Position Grid */
.position-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
  margin-top: 6px;
}

.check-card {
  position: relative;
  cursor: pointer;
}

.check-card input[type="radio"],
.check-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.check-card-content {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 500;
  color: #E2E8F0;
  transition: var(--transition);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.08);
}

.check-card:hover .check-card-content {
  border-color: rgba(10, 132, 255, 0.45);
  background: rgba(10, 132, 255, 0.08);
}

.check-card input:checked + .check-card-content {
  background: linear-gradient(135deg, rgba(10, 132, 255, 0.28) 0%, rgba(94, 92, 230, 0.2) 100%);
  border-color: #0A84FF;
  color: #FFFFFF;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(10, 132, 255, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

.custom-checkbox-indicator {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}

.check-card input:checked + .check-card-content .custom-checkbox-indicator {
  background: #0A84FF;
  border-color: #0A84FF;
  box-shadow: 0 2px 8px rgba(10, 132, 255, 0.5);
}

.custom-checkbox-indicator svg {
  width: 12px;
  height: 12px;
  stroke: #FFFFFF;
  stroke-width: 3;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.check-card input:checked + .check-card-content .custom-checkbox-indicator svg {
  opacity: 1;
}

/* Experience Toggle Card */
.exp-toggle-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.exp-choice-card {
  position: relative;
  cursor: pointer;
}

.exp-choice-card input {
  position: absolute;
  opacity: 0;
}

.exp-choice-box {
  padding: 16px;
  text-align: center;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  transition: var(--transition);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.exp-choice-card:hover .exp-choice-box {
  border-color: rgba(10, 132, 255, 0.5);
  background: rgba(10, 132, 255, 0.06);
}

.exp-choice-card input:checked + .exp-choice-box {
  border-color: #0A84FF;
  background: linear-gradient(135deg, rgba(10, 132, 255, 0.25) 0%, rgba(94, 92, 230, 0.18) 100%);
  box-shadow: 0 4px 18px rgba(10, 132, 255, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

.exp-choice-title {
  font-size: 1rem;
  font-weight: 700;
  color: #FFFFFF;
}

.exp-choice-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Sub-card details */
.sub-panel {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-top: 14px;
  margin-bottom: 18px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.12);
}

.sub-panel-title {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-teal);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Self Rating Circles (1 to 5) */
.rating-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
  margin-top: 8px;
}

.rating-row {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.rating-row:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

.rating-label-cell {
  padding: 10px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #E2E8F0;
  width: 40%;
}

.rating-score-cell {
  padding: 8px 16px;
  text-align: right;
}

.rating-scale-bubbles {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.bubble-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.18);
}

.bubble-btn input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.bubble-btn:hover {
  border-color: #0A84FF;
  color: #FFFFFF;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(10, 132, 255, 0.35);
}

.bubble-btn.active {
  background: linear-gradient(135deg, #0A84FF 0%, #5E5CE6 100%);
  border-color: #64D2FF;
  color: #FFFFFF;
  box-shadow: 0 4px 18px rgba(10, 132, 255, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.45);
  transform: scale(1.08);
}

/* Declaration Card */
.declaration-box {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.12);
}

.declaration-text {
  font-size: 0.87rem;
  color: #CBD5E1;
  line-height: 1.6;
}

.signature-preview {
  font-family: var(--font-signature);
  font-size: 2rem;
  color: #64D2FF;
  padding: 8px 12px;
  min-height: 48px;
  display: flex;
  align-items: center;
}

/* Submit Section */
.form-submit-footer {
  padding: 24px 32px 32px 32px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.submit-helper {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-submit-main {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 36px;
  font-family: var(--font-primary);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #FFFFFF;
  background: linear-gradient(135deg, #0A84FF 0%, #5E5CE6 100%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(10, 132, 255, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.4);
  transition: var(--transition);
}

.btn-submit-main:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(10, 132, 255, 0.65), inset 0 1px 1px rgba(255, 255, 255, 0.5);
  background: linear-gradient(135deg, #0071E3 0%, #4B48D6 100%);
}

.btn-submit-main:active {
  transform: scale(0.98);
}

.btn-submit-main:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Success Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.25s ease-out;
}

.modal-card {
  background: rgba(20, 26, 42, 0.78);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-xl);
  padding: 36px;
  max-width: 540px;
  width: 100%;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.7), inset 0 1px 1.5px rgba(255, 255, 255, 0.35);
  text-align: center;
  position: relative;
  animation: scaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.success-icon-badge {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(48, 209, 88, 0.16);
  border: 2px solid #30D158;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px auto;
  box-shadow: 0 0 28px rgba(48, 209, 88, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

.success-icon-badge svg {
  width: 36px;
  height: 36px;
  stroke: #30D158;
  stroke-width: 3;
}

.modal-title {
  font-family: var(--font-primary);
  font-size: 1.5rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 8px;
}

.modal-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

.app-receipt-box {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 24px;
  text-align: left;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.app-receipt-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
  font-size: 0.88rem;
}

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

.receipt-lbl {
  color: var(--text-muted);
}

.receipt-val {
  font-weight: 600;
  color: #FFFFFF;
}

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

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

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: rgba(20, 26, 42, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 14px 22px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.2);
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 1100;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Form Progress Tracker (Sticky at top) */
.progress-bar-track {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: rgba(10, 14, 26, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #0A84FF, #64D2FF, #30D158);
  box-shadow: 0 0 14px rgba(100, 210, 255, 0.8);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Category Pill Grid System */
.category-card-box {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.14);
  margin-bottom: 20px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.12);
}

.category-main-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  color: #FFFFFF;
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.category-pill-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.category-pill-grid .pill-option {
  width: 100%;
}

.category-pill-grid .pill-box {
  width: 100%;
  justify-content: center;
  padding: 11px 8px;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: center;
  border-radius: var(--radius-md);
  min-height: 44px;
}

/* Error Highlight Pulse */
@keyframes pulseField {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.8); border-color: #EF4444; }
  50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0.3); border-color: #EF4444; }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); border-color: var(--surface-input-border); }
}

.field-highlight-error {
  animation: pulseField 1.2s ease-out;
  border-color: #EF4444 !important;
}

/* ========================================================
   RESPONSIVE DESIGN (TABLETS & MOBILE PHONES)
   ======================================================== */

@media (max-width: 900px) {
  .category-pill-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  /* Prevent horizontal overflow and optimize layout padding */
  html, body {
    overflow-x: hidden;
  }

  .container {
    padding: 10px 8px 60px 8px;
    max-width: 100%;
  }

  /* Form header */
  .portal-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px 16px;
  }

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

  .brand-text h1 {
    font-size: 1.15rem;
  }

  .nav-actions {
    display: flex;
    gap: 8px;
    width: 100%;
  }

  .nav-actions .btn-nav {
    flex: 1;
    justify-content: center;
    padding: 9px 12px;
    font-size: 0.82rem;
  }

  .form-sheet-card {
    border-radius: var(--radius-lg);
  }

  .form-header-bar {
    padding: 20px 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .form-title-group h2 {
    font-size: 1.35rem;
    gap: 8px;
  }

  .form-title-group p {
    font-size: 0.82rem;
  }

  .app-no-badge {
    width: 100%;
    justify-content: space-between;
    padding: 9px 14px;
  }

  .form-section {
    padding: 20px 14px;
  }

  .section-title {
    padding: 8px 12px;
    margin-bottom: 18px;
  }

  .section-title h3 {
    font-size: 0.95rem;
  }

  /* Force single column for all grids on mobile */
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .form-group.col-span-2,
  .form-group.col-span-3,
  .form-group.col-span-full {
    grid-column: span 1;
  }

  /* Inputs: Crucial minimum 16px font size to PREVENT iOS Safari auto-zoom */
  input[type="text"],
  input[type="tel"],
  input[type="number"],
  input[type="date"],
  select,
  textarea {
    font-size: 16px !important;
    min-height: 48px;
    padding: 12px 14px;
  }

  textarea {
    min-height: 90px;
  }

  label {
    font-size: 0.88rem;
  }

  /* Experience Cards */
  .exp-toggle-group {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .exp-choice-box {
    padding: 14px;
    text-align: left;
  }

  /* Position Checkbox Cards */
  .position-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .check-card-content {
    padding: 13px 14px;
    font-size: 0.92rem;
    min-height: 48px;
    border-radius: var(--radius-sm);
  }

  .check-card:active .check-card-content {
    transform: scale(0.98);
  }

  .custom-checkbox-indicator {
    width: 20px;
    height: 20px;
  }

  /* Rating Table: Clean Mobile Card Transformation */
  .rating-table,
  .rating-table tbody,
  .rating-row {
    display: block;
    width: 100%;
  }

  .rating-table {
    border-spacing: 0;
  }

  .rating-row {
    padding: 12px 12px 14px 12px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--surface-input-border);
    border-radius: var(--radius-md);
  }

  .rating-label-cell {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100% !important;
    padding: 0 0 10px 0 !important;
    font-size: 0.92rem;
    font-weight: 600;
    color: #F8FAFC;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
  }

  .rating-score-cell {
    display: block;
    width: 100% !important;
    padding: 10px 0 0 0 !important;
  }

  .rating-scale-bubbles {
    display: flex;
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }

  .bubble-btn {
    flex: 1;
    height: 44px;
    border-radius: var(--radius-sm);
    font-size: 1.05rem;
    font-weight: 700;
    width: auto;
    background: rgba(255, 255, 255, 0.05);
  }

  .bubble-btn:active {
    transform: scale(0.95);
  }

  /* Declaration */
  .declaration-box {
    padding: 14px 12px;
    gap: 12px;
  }

  .declaration-text {
    font-size: 0.83rem;
  }

  .signature-preview {
    font-size: 1.7rem;
    min-height: 44px;
    word-break: break-all;
  }

  /* Submit Footer */
  .form-submit-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 18px 14px 28px 14px;
  }

  .submit-helper {
    justify-content: center;
    text-align: center;
    font-size: 0.82rem;
  }

  .btn-submit-main {
    width: 100%;
    justify-content: center;
    padding: 16px 20px;
    font-size: 1.1rem;
    min-height: 52px;
  }

  /* Modal on Mobile */
  .modal-overlay {
    padding: 12px;
    align-items: flex-end;
  }

  .modal-card {
    padding: 24px 16px;
    max-height: 92vh;
    overflow-y: auto;
    border-radius: var(--radius-xl) var(--radius-xl) var(--radius-md) var(--radius-md);
  }

  .modal-title {
    font-size: 1.35rem;
  }

  .modal-desc {
    font-size: 0.85rem;
    margin-bottom: 16px;
  }

  .app-receipt-box {
    padding: 12px;
    margin-bottom: 20px;
  }

  .app-receipt-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    padding: 7px 0;
  }

  .receipt-val {
    font-size: 0.95rem;
    word-break: break-word;
  }

  .modal-card .btn-nav {
    width: 100%;
    justify-content: center;
    padding: 12px;
    font-size: 0.92rem;
  }

  .modal-card > div:last-child {
    flex-direction: column;
    gap: 8px;
  }

  /* Toast Notification on Mobile */
  .toast {
    left: 12px;
    right: 12px;
    bottom: 16px;
    padding: 12px 16px;
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .category-pill-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .brand-text h1 {
    font-size: 1.05rem;
  }

  .form-title-group h2 {
    font-size: 1.2rem;
  }

  .bubble-btn {
    height: 42px;
    font-size: 0.95rem;
  }
}
