/* ============================================================
   SMJV Portal Theme - Core Variables & Base Styles
   ============================================================ */

:root {
  /* SMJV Cut Angle */
  --cut-angle: 14deg;

  /* Spacing Scale */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 24px;
  --space-2xl: 32px;
  --space-3xl: 40px;
  --space-4xl: 48px;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-2xl: 16px;
  --radius-full: 9999px;

  /* Font Sizes */
  --font-size-xs: 11px;
  --font-size-sm: 12px;
  --font-size-base: 14px;
  --font-size-md: 16px;
  --font-size-lg: 18px;
  --font-size-xl: 22px;
  --font-size-2xl: 28px;
  --font-size-3xl: 36px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.2s ease;
  --transition-slow: 0.3s ease;

  /* Brand Colors */
  --primary: #2C704F;
  --primary-dark: #1E5038;
  --accent: #FFA300;
  --teal: #009382;
  --highlight: #22D3C5;
  --accent-warm: #C8893C;

  /* Overlay/Gradient Colors - Dynamic per theme */
  --overlay-primary: rgba(44, 112, 79, 0.85);
  --overlay-primary-dark: rgba(30, 80, 56, 0.92);
  --gradient-accent: #1E5038;

  /* Hero overlay - full gradient definition (can be overridden per theme) */
  --hero-overlay: linear-gradient(135deg, var(--overlay-primary) 0%, var(--overlay-primary-dark) 100%);

  /* Stage/card header gradient (can be overridden per theme - solid for Surerus) */
  --stage-gradient: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);

  /* Text Colors */
  --text-primary: #1A1A1A;
  --text-secondary: #666666;
  --warm-grey: #888888;
  --cool-grey: #A0A0A0;
  --cool-grey-light: #E0E0E0;
  --border-subtle: #EBEBEB;

  /* Feedback Colors */
  --error: #D13438;
  --error-light: rgba(209, 52, 56, 0.08);
  --error-border: rgba(209, 52, 56, 0.3);
  --success: #2C704F;
  --success-border: rgba(44, 112, 79, 0.3);
  --success-dark: #1E5038;
  --warning: #C8893C;
  --info: #009382;

  /* Surface Colors */
  --background: #F8F9FA;
  --surface: #FFFFFF;
  --border: #E0E0E0;

  /* Background Overlays */
  --overlay-dark: rgba(0, 0, 0, 0.5);
  --overlay-dark-strong: rgba(0, 0, 0, 0.7);
  --overlay-white: rgba(255, 255, 255, 0.1);
  --overlay-white-strong: rgba(255, 255, 255, 0.2);
  --overlay-white-solid: rgba(255, 255, 255, 0.9);

  /* Feedback Backgrounds */
  --success-bg: #d1fae5;
  --error-bg: #fef2f2;
  --warning-bg: #fef7e6;
  --info-bg: rgba(0, 147, 130, 0.08);

  /* Accent Variants */
  --accent-hover: #E89300;
  --accent-light: rgba(255, 163, 0, 0.1);

  /* Teal Variants */
  --teal-dark: #007A6A;
  --teal-subtle: rgba(0, 147, 130, 0.03);
  --teal-light: rgba(0, 147, 130, 0.05);
  --teal-medium: rgba(0, 147, 130, 0.1);

  /* Common Gradients */
  --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  --gradient-primary-accent: linear-gradient(135deg, var(--primary), var(--accent));
  --gradient-primary-teal: linear-gradient(135deg, var(--primary), var(--teal));
  --gradient-teal-primary: linear-gradient(135deg, var(--teal), var(--primary));
  --gradient-accent-warm: linear-gradient(135deg, var(--accent), var(--accent-warm));
  --gradient-highlight-teal: linear-gradient(135deg, var(--highlight), var(--teal));
  --gradient-gold: linear-gradient(135deg, #FFC629, #FFD75E);
  --gradient-status: linear-gradient(135deg, var(--primary-focus-shadow), var(--accent-light));
  --gradient-subtle-blend: linear-gradient(135deg, var(--primary-hover-bg) 0%, var(--accent-subtle) 100%);
  --gradient-primary-surface: linear-gradient(135deg, var(--primary-hover-bg) 0%, var(--surface) 100%);
  --gradient-teal-surface: linear-gradient(135deg, var(--teal-subtle) 0%, var(--surface) 100%);

  /* Horizontal Feedback Gradients (90deg) */
  --gradient-success-h: linear-gradient(90deg, var(--primary-subtle) 0%, var(--surface) 100%);
  --gradient-error-h: linear-gradient(90deg, var(--error-light) 0%, var(--surface) 100%);
  --gradient-error-bg-h: linear-gradient(90deg, rgba(209, 52, 56, 0.06) 0%, var(--background) 100%);
  --gradient-warning-h: linear-gradient(90deg, var(--warning-bg) 0%, var(--surface) 100%);
  --gradient-info-h: linear-gradient(90deg, var(--info-bg) 0%, var(--surface) 100%);
  --gradient-progress-h: linear-gradient(90deg, var(--primary), var(--teal));

  /* Additional Gradients */
  --gradient-accent-button: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  --gradient-teal-dark: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
  --gradient-background-subtle: linear-gradient(135deg, #F8F9FA 0%, #E8F5F0 100%);
  --gradient-grid-pattern: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);

  /* Shadows */
  --shadow-2: 0 1px 2px rgba(0, 0, 0, 0.08);
  --shadow-4: 0 2px 4px rgba(0, 0, 0, 0.08);
  --shadow-8: 0 4px 8px rgba(0, 0, 0, 0.1);
  --shadow-16: 0 8px 16px rgba(0, 0, 0, 0.12);
  --shadow-28: 0 14px 28px rgba(0, 0, 0, 0.15);

  /* Layout */
  --header-height: 46px;
  --footer-height: 36px;
  --main-containersubtracted: 82px;
  --sidebar-width: 320px;
  --sidebar-collapsed-width: 60px;

  /* Typography */
  --font-family: 'Inter', Arial, sans-serif;
}

/* ==========================================================================
   Company Theme Overrides - Class-Based Theming
   Applied via Liquid in Header based on company ID
   ========================================================================== */

/* Default Theme (SMJV/Murphy) - Green/Orange */
body.theme-smjv {
  --primary: #2C704F;
  --primary-dark: #1E5038;
  --accent: #FFA300;
  --teal: #009382;
  --highlight: #22D3C5;
  --success: #2C704F;
  --info: #009382;
  --overlay-primary: rgba(44, 112, 79, 0.85);
  --overlay-primary-dark: rgba(30, 80, 56, 0.92);
  --gradient-accent: #1E5038;
  --hero-overlay: linear-gradient(135deg, rgba(44, 112, 79, 0.85) 0%, rgba(30, 80, 56, 0.92) 100%);
  --stage-gradient: linear-gradient(135deg, #2C704F 0%, #1E5038 100%);
  /* Opacity variants for hover/focus states */
  --primary-hover-bg: rgba(44, 112, 79, 0.05);
  --primary-subtle: rgba(44, 112, 79, 0.08);
  --primary-focus-shadow: rgba(44, 112, 79, 0.1);
  --primary-light: rgba(44, 112, 79, 0.15);
  --primary-focus-ring: rgba(44, 112, 79, 0.2);
  --primary-shadow: rgba(44, 112, 79, 0.3);
  --primary-shadow-strong: rgba(44, 112, 79, 0.4);
  --teal-light: rgba(0, 147, 130, 0.05);
  --accent-subtle: rgba(255, 163, 0, 0.04);
  --accent-light: rgba(255, 163, 0, 0.1);
  --accent-hover: #E89300;
  --gradient-primary: linear-gradient(135deg, #2C704F 0%, #1E5038 100%);
  --gradient-primary-accent: linear-gradient(135deg, #2C704F, #FFA300);
  --gradient-primary-teal: linear-gradient(135deg, #2C704F, #009382);
  --gradient-teal-primary: linear-gradient(135deg, #009382, #2C704F);
  --gradient-accent-warm: linear-gradient(135deg, #FFA300, #C8893C);
  --gradient-progress-h: linear-gradient(90deg, #2C704F, #009382);
}

/* WHC Theme - Navy/Red */
body.theme-whc {
  --primary: #221f5d;
  --primary-dark: #1a1847;
  --accent: #c2323c;
  --teal: #009382;
  --highlight: #1f4183;
  --success: #009382;
  --info: #1f4183;
  --overlay-primary: rgba(34, 31, 93, 0.85);
  --overlay-primary-dark: rgba(26, 24, 71, 0.92);
  --gradient-accent: #1a1847;
  --hero-overlay: linear-gradient(135deg, rgba(34, 31, 93, 0.85) 0%, rgba(26, 24, 71, 0.92) 100%);
  --stage-gradient: linear-gradient(135deg, #221f5d 0%, #1a1847 100%);
  /* Opacity variants for hover/focus states */
  --primary-hover-bg: rgba(34, 31, 93, 0.05);
  --primary-subtle: rgba(34, 31, 93, 0.08);
  --primary-focus-shadow: rgba(34, 31, 93, 0.1);
  --primary-light: rgba(34, 31, 93, 0.15);
  --primary-focus-ring: rgba(34, 31, 93, 0.2);
  --primary-shadow: rgba(34, 31, 93, 0.3);
  --primary-shadow-strong: rgba(34, 31, 93, 0.4);
  --teal-light: rgba(0, 147, 130, 0.05);
  --accent-subtle: rgba(194, 50, 60, 0.04);
  --accent-light: rgba(194, 50, 60, 0.1);
  --accent-hover: #a82832;
  --gradient-primary: linear-gradient(135deg, #221f5d 0%, #1a1847 100%);
  --gradient-primary-accent: linear-gradient(135deg, #221f5d, #c2323c);
  --gradient-primary-teal: linear-gradient(135deg, #221f5d, #009382);
  --gradient-teal-primary: linear-gradient(135deg, #009382, #221f5d);
  --gradient-accent-warm: linear-gradient(135deg, #c2323c, #a82832);
  --gradient-progress-h: linear-gradient(90deg, #221f5d, #009382);
}

/* Surerus Theme - Gold/Charcoal */
/* Note: Surerus uses hard color stops (no soft blends) for gradients */
/* Gold is primary (buttons), Charcoal in gradients/backgrounds */
body.theme-surerus {
  --primary: #FFA300;
  --primary-dark: #555559;
  --accent: #C8893C;
  --teal: #C8893C;
  --highlight: #C9A30D;
  --success: #2C704F;
  --info: #C9A30D;
  --text-primary: #1A1A1A;
  --overlay-primary: rgba(85, 85, 89, 0.88);
  --overlay-primary-dark: rgba(65, 65, 69, 0.92);
  --gradient-accent: #C9A30D;
  --hero-overlay: rgba(85, 85, 89, 0.88);
  --stage-gradient: linear-gradient(135deg, #555559 0%, #555559 75%, #C9A30D 75%, #C9A30D 100%);
  /* Opacity variants for hover/focus states - using charcoal for subtle backgrounds */
  --primary-hover-bg: rgba(85, 85, 89, 0.05);
  --primary-subtle: rgba(85, 85, 89, 0.08);
  --primary-focus-shadow: rgba(85, 85, 89, 0.1);
  --primary-light: rgba(85, 85, 89, 0.15);
  --primary-focus-ring: rgba(85, 85, 89, 0.2);
  --primary-shadow: rgba(85, 85, 89, 0.3);
  --primary-shadow-strong: rgba(85, 85, 89, 0.4);
  --teal-light: rgba(201, 163, 13, 0.05);
  --accent-subtle: rgba(201, 163, 13, 0.04);
  --accent-light: rgba(201, 163, 13, 0.1);
  --accent-hover: #B8940C;
  /* Hard color stop gradients (no soft blends) - charcoal takes 75%, gold takes 25% */
  --gradient-primary: linear-gradient(135deg, #555559 0%, #555559 75%, #C9A30D 75%, #C9A30D 100%);
  --gradient-primary-accent: linear-gradient(135deg, #555559 0%, #555559 75%, #C9A30D 75%, #C9A30D 100%);
  --gradient-primary-teal: linear-gradient(135deg, #555559 0%, #555559 75%, #D4A90E 75%, #D4A90E 100%);
  --gradient-teal-primary: linear-gradient(135deg, #D4A90E 0%, #D4A90E 75%, #555559 75%, #555559 100%);
  --gradient-accent-warm: linear-gradient(135deg, #C9A30D 0%, #C9A30D 25%, #555559 25%, #555559 100%);
  --gradient-status: linear-gradient(135deg, rgba(85, 85, 89, 0.1) 0%, rgba(85, 85, 89, 0.1) 75%, rgba(201, 163, 13, 0.1) 75%, rgba(201, 163, 13, 0.1) 100%);
  --gradient-progress-h: linear-gradient(90deg, #555559 0%, #555559 75%, #C9A30D 75%, #C9A30D 100%);
}

/* Surerus Radio Button Overrides */
body.theme-surerus .radio-input {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid #555559;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
  position: relative;
}

body.theme-surerus .radio-input:checked {
  border-color: var(--primary);
  background: var(--primary);
}

body.theme-surerus .radio-input:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: white;
}

body.theme-surerus .radio-input:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--primary-focus-ring);
}

/* Surerus Checkbox Overrides */
body.theme-surerus input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  min-width: 20px;
  height: 20px;
  min-height: 20px;
  border: 2px solid #555559;
  border-radius: 4px;
  background: #ffffff;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  margin: 0;
  vertical-align: middle;
}

body.theme-surerus input[type="checkbox"]:checked {
  border-color: var(--primary);
  background: var(--primary);
}

body.theme-surerus input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 6px;
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

body.theme-surerus input[type="checkbox"]:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--primary-focus-ring);
}

/* ==========================================================================
   End Company Theme Overrides
   ========================================================================== */

html {
  overflow: auto;
}

/* ============================================================
   Base Resets & Global Styles
   ============================================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.5;
  background: var(--background);
  color: var(--text-primary);
  min-height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

#privateModeText {
  display: none !important;
}

/* ============================================================
   Common Animations
   ============================================================ */

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    transform: scale(0);
  }

  to {
    transform: scale(1);
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-15px) rotate(5deg);
  }
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

/* ============================================================
   Header / Navbar
   ============================================================ */

header h1 {
  color: var(--primary-dark);
  margin: 0;
}

.login-btn {
  margin: 0 !important;
  color: white !important;
}

.header {
  background: var(--surface);
  padding: 8px 24px;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-4);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-image {
  height: 36px;
  width: auto;
}

.logo-css {
  display: flex;
  align-items: center;
  gap: 3px;
}

.logo-bar {
  width: 14px;
  height: 24px;
  transform: skewX(calc(-1 * var(--cut-angle)));
}

/* Semantic class names for dynamic theming */
.logo-bar.bar-secondary,
.logo-bar.orange {
  background: var(--accent);
}

.logo-bar.bar-primary,
.logo-bar.green {
  background: var(--primary);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 12px;
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 11px;
}

.header-left {
  display: flex;
  align-items: center;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.header-nav-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.header-nav-link:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.header-nav-link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.header-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
  margin: 0 6px;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-greeting {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.user-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.header-logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s ease;
}

.header-logout-btn:hover {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
}

.header-logout-btn svg {
  width: 16px;
  height: 16px;
}

.header-signin-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--primary);
  color: white;
  border-radius: 6px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.header-signin-btn:hover {
  background: var(--primary-dark);
  color: white;
}

.header-signin-btn svg {
  width: 16px;
  height: 16px;
}

/* Header responsive styles */
@media (max-width: 768px) {
  .header {
    padding: 8px 12px;
  }

  .header-nav-link span {
    display: none;
  }

  .header-nav-link {
    padding: 6px;
  }

  .user-greeting {
    display: none;
  }

  .header-divider {
    margin: 0 4px;
    height: 20px;
  }
}

@media (max-width: 480px) {
  .logo-image {
    height: 32px;
  }

  .header-nav {
    gap: 2px;
  }

  .header-signin-btn span {
    display: none;
  }

  .header-signin-btn {
    padding: 8px;
  }
}

/* ============================================================
   Main Container & Layout
   ============================================================ */

.main-container {
  height: calc(100vh - var(--main-containersubtracted)) !important;
  display: flex;
  padding: var(--space-lg) !important;
  margin-top: var(--header-height) !important;
  overflow: auto;
}

/* ============================================================
   Unanswered Agreements Banner
   ============================================================ */

.agreements-banner {
  background: var(--warning-bg);
  border: 1px solid var(--warning);
  border-radius: var(--radius-lg);
  padding: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-md);
}

.agreements-banner-content {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 14px;
  color: var(--text-primary);
  flex-wrap: wrap;
}

.agreements-banner-icon {
  color: var(--warning);
  flex-shrink: 0;
}

.agreements-banner-link {
  margin-left: auto;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
}

.agreements-banner-link:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .agreements-banner-content {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-xs);
  }

  .agreements-banner-link {
    margin-left: 0;
  }
}

/* ============================================================
   Progress Sidebar (Common to all onboarding pages)
   ============================================================ */

.progress-sidebar {
  width: var(--sidebar-width);
  background: var(--stage-gradient);
  padding: 28px 22px;
  position: fixed;
  left: 0;
  top: var(--header-height);
  bottom: var(--footer-height);
  overflow-y: auto;
  z-index: 101;
  display: flex;
  flex-direction: column;
  transition: width 0.3s ease, padding 0.3s ease;
  padding-bottom: 16px;
}

.progress-sidebar::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 60px;
  background: var(--accent);
  opacity: 0.15;
  transform: skewX(calc(-1 * var(--cut-angle)));
  transform-origin: top right;
  pointer-events: none;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.progress-title {
  color: white;
  font-size: 22px;
  font-weight: 700;
  margin: 0;
}

.progress-subtitle {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  margin-bottom: 0;
}

.progress-steps {
  position: relative;
  z-index: 1;
}

.progress-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 0;
  text-decoration: none !important;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.step-indicator {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  flex-shrink: 0;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

/* Connector line between steps — bridges from indicator to next step's indicator */
.progress-step::after {
  content: '';
  position: absolute;
  top: calc(12px + 28px);
  left: 14px;
  transform: translateX(-50%);
  width: 2px;
  bottom: -12px;
  background: rgb(160 160 160 / 20%);
  transition: left 0.3s ease;
}

.progress-step:last-child::after {
  display: none;
}

.progress-step:hover {
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  margin-left: -8px;
  margin-right: -8px;
  padding-left: 8px;
  padding-right: 8px;
}

.progress-step:hover::after {
  left: 22px; /* 14px + 8px padding-left to keep line centered under indicator */
}

.progress-step:hover .step-indicator {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.15);
}

.progress-step:hover .step-title {
  color: rgba(255, 255, 255, 0.8);
}

.progress-step.active .step-indicator {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  box-shadow: 0 0 20px rgba(255, 163, 0, 0.4);
}

.progress-step.completed .step-indicator {
  background: white;
  border-color: white;
  color: var(--primary);
}

.progress-step.completed::after {
  background: #fffffff7;
}

/* Step indicator icons vs checkmark */
.step-icon {
  display: block;
}

.step-check {
  display: none;
}

.progress-step.completed .step-icon {
  display: none;
}

.progress-step.completed .step-check {
  display: block;
}

.step-content {
  flex: 1;
  padding-top: 3px;
  overflow: hidden;
  transition: opacity 0.2s ease, width 0.2s ease;
}

.step-title {
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 0;
  transition: all 0.3s ease;
}

.progress-step.active .step-title,
.progress-step.completed .step-title {
  color: white;
}

.step-description {
  color: rgba(255, 255, 255, 0.3);
  font-size: 11px;
  transition: all 0.3s ease;
}

.progress-step.active .step-description {
  color: rgba(255, 255, 255, 0.6);
}

/* Sidebar Home Link */
.sidebar-home-link {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: var(--space-lg);
  padding: 12px 14px;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: var(--font-size-sm);
  font-weight: 500;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
}

.sidebar-home-link:hover {
  color: white;
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-home-link svg {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.sidebar-home-link:hover svg {
  transform: scale(1.1);
}

.sidebar-advisor {
  padding: 12px 14px;
  margin-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-advisor-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 3px;
}

.sidebar-advisor-name {
  font-weight: 600;
  font-size: 13px;
  color: white;
}

.sidebar-advisor-email {
  display: block;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  margin-top: 3px;
}

.sidebar-advisor-email:hover {
  color: white;
  text-decoration: underline;
}

/* Sidebar Collapse Toggle (desktop) */
.sidebar-collapse-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.5);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  transition: color 0.2s ease, background 0.2s ease;
  flex-shrink: 0;
}

.sidebar-collapse-toggle:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.sidebar-collapse-toggle svg {
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.progress-sidebar.collapsed .sidebar-collapse-toggle svg {
  transform: rotate(180deg);
}

/* Collapsed Sidebar State */
.progress-sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
  padding: 12px 10px;
}

.progress-sidebar.collapsed .progress-title,
.progress-sidebar.collapsed .progress-subtitle,
.progress-sidebar.collapsed .sidebar-advisor,
.progress-sidebar.collapsed .sidebar-home-link span {
  display: none;
}

.progress-sidebar.collapsed .sidebar-header {
  justify-content: center;
}

.progress-sidebar.collapsed .sidebar-home-link {
  justify-content: center;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  gap: 0;
}

.progress-sidebar.collapsed .step-content {
  display: none;
}

.progress-sidebar.collapsed .progress-steps {
  align-items: center;
}

.progress-sidebar.collapsed .progress-step {
  justify-content: center;
  gap: 0;
  padding: 10px 0;
}

.progress-sidebar.collapsed .progress-step::after {
  top: calc(10px + 28px);
  bottom: -10px;
  left: 50% !important;
  transform: translateX(-50%) !important;
}

.progress-sidebar.collapsed::after {
  display: none;
}

body.sidebar-collapsed .content-area {
  margin-left: var(--sidebar-collapsed-width);
  max-width: calc(100% - var(--sidebar-collapsed-width));
}

/* ============================================================
   Content Area
   ============================================================ */

.content-area {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 0;
  max-width: calc(100% - var(--sidebar-width));
  transition: margin-left 0.3s ease, max-width 0.3s ease;
}

.stage-container,
.page-container {
  margin: 0 auto;
  max-width: 1000px;
  padding-bottom: 70px;
}

/* ============================================================
   Common Card Styles
   ============================================================ */

.stage-card {
  background: var(--surface);
  border-radius: 12px;
  box-shadow: var(--shadow-8);
  animation: slideUp 0.5s ease;
}

.stage-header {
  background: var(--stage-gradient);
  padding: 20px;
  position: relative;
  overflow: hidden;
  border-radius: 12px 12px 0 0;
}

.stage-header::before {
  content: '';
  position: absolute;
  right: -50px;
  top: -50px;
  width: 200px;
  height: 200px;
  background: var(--accent);
  opacity: 0.1;
  border-radius: 50%;
}

.stage-header::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 0;
  width: 150px;
  height: 80px;
  background: var(--accent);
  opacity: 0.2;
  transform: skewX(calc(-1 * var(--cut-angle)));
  transform-origin: bottom right;
}

.stage-icon {
  width: 64px;
  height: 64px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  backdrop-filter: blur(10px);
}

.stage-icon svg {
  width: 32px;
  height: 32px;
  color: white;
}

.stage-number {
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stage-title {
  color: white;
  font-size: 28px;
  font-weight: 700;
  margin: 0 !important;
}

.stage-description {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  line-height: 1.6;
  max-width: 500px;
  margin: 0 !important;
}

.stage-body {
  padding: 20px 20px;
}

/* ============================================================
   Progress Bar in Content
   ============================================================ */

.content-progress {
  margin-bottom: var(--space-md);
}

.progress-bar-container {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--gradient-progress-h);
  border-radius: 4px;
  transition: width 0.5s ease;
}

.progress-text {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

/* ============================================================
   Common Form Elements
   ============================================================ */

.form-section {
  margin-bottom: 20px;
}

.form-section:last-child {
  margin-bottom: 0;
}

.section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title svg {
  width: 20px;
  height: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: clamp(12px, 2vw, 16px);
  margin-bottom: 0;
}

.form-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-label {
  font-size: 13px;
  font-weight: 500;
  margin: 0;
  color: var(--text-secondary);
}

.form-label .required {
  color: var(--error);
}

.hiddenInput {
  display: none !important;
}

/* Fluent UI v9 Style Inputs - Expanding bottom border on focus */
.form-input,
.form-select,
.form-textarea {
  padding: 10px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.1s ease;
  background: var(--surface);
  position: relative;
}

/* Wrapper for the expanding underline effect */
.form-group {
  position: relative;
}

/* Fluent v9 expanding underline - created via input wrapper */
/* Using a pseudo-element approach on each input type */
.form-input,
.form-select,
.form-textarea {
  background-image: linear-gradient(var(--primary), var(--primary));
  background-size: 0% 2px;
  background-repeat: no-repeat;
  background-position: center bottom;
  transition: border-color 0.1s ease, background-size 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  background-size: 100% 2px;
}

/* Error state underline */
.form-input.invalid,
.form-select.invalid,
.form-textarea.invalid {
  background-image: linear-gradient(var(--error), var(--error));
}

.form-input.invalid:focus,
.form-select.invalid:focus,
.form-textarea.invalid:focus {
  background-size: 100% 2px;
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover {
  border-color: var(--cool-grey-light);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: none;
  background-size: 100% 2px;
}

.form-input.valid {
  border-color: var(--primary);
}

/* Country selector buttons - Dynamics style focus */
.country-selector .country-option:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--primary);
}

.validation-message {
  font-size: 12px;
  color: #dc3545;
  margin-top: 4px;
  display: none;
}

.validation-message.visible {
  display: block;
}

.required-field-error {
  font-size: 12px;
  color: #dc3545;
  margin-top: 4px;
  display: block;
}

.validation-banner {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: #fdf0f0;
  border: 1px solid #dc3545;
  border-radius: var(--radius-lg);
  padding: 12px 18px;
  margin-bottom: var(--space-md);
  animation: validation-banner-in 0.3s ease;
}

.validation-banner-icon {
  flex-shrink: 0;
  color: #dc3545;
  font-size: 18px;
}

.validation-banner-text {
  font-size: 14px;
  font-weight: 600;
  color: #dc3545;
}

@keyframes validation-banner-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.form-textarea {
  min-height: 100px;
  resize: vertical;
}

.form-hint {
  font-size: 12px;
  color: var(--warm-grey);
  display: block;
  margin-top: 6px;
}

/* ============================================================
   Address Search Component
   ============================================================ */

.address-search-container {
  margin-bottom: 16px;
}

.address-search-input-wrapper {
  position: relative;
}

.address-search-input-wrapper .form-input {
  padding-right: 40px;
  width: 100%;
}

.address-search-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--cool-grey);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.address-search-icon svg {
  width: 100%;
  height: 100%;
}

.address-search-icon.loading svg {
  animation: spin 1s linear infinite;
}

.address-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: var(--shadow-16);
  max-height: 300px;
  overflow-y: auto;
  z-index: 100;
  display: none;
  margin-top: 4px;
}

.address-results.open {
  display: block;
}

.address-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s ease;
}

.address-result-item:last-child {
  border-bottom: none;
}

.address-result-item:hover {
  background: var(--primary-hover-bg);
}

.address-result-flag {
  width: 20px;
  height: 15px;
  flex-shrink: 0;
  border-radius: 2px;
  object-fit: cover;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.address-result-content {
  flex: 1;
  min-width: 0;
}

.address-result-main {
  font-weight: 500;
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.3;
}

.address-result-secondary {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.3;
}

.address-no-results {
  padding: 16px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 13px;
}

.address-fields-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 16px;
  background: var(--info-bg);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 12px;
}

.address-fields-note svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--info);
}

/* Make address search container position relative for dropdown */
.address-search-container {
  position: relative;
}

/* ============================================================
   Common Button Styles
   ============================================================ */

.button-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* ============================================================
   Dynamics 365 Model-Driven App Style Buttons
   ============================================================ */

.btn {
  padding: 6px 16px;
  border-radius: 2px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.1s ease, border-color 0.1s ease, box-shadow 0.1s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  font-family: inherit;
  min-height: 32px;
  text-decoration: none !important;
  position: relative;
  vertical-align: middle;
  white-space: nowrap;
}

.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Primary Button - Dynamics style filled button */
.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.btn-primary:hover:not(:disabled):not(.btn-disabled) {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-primary:active:not(:disabled):not(.btn-disabled) {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-primary:focus:not(:disabled):not(.btn-disabled) {
  background-color: var(--primary);
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--primary);
}

/* Disabled button via CSS class (allows click events for validation dialogs) */
.btn-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: auto;
}

/* Secondary Button - Dynamics style outline button */
.btn-secondary {
  background-color: var(--surface);
  border-color: var(--border);
  color: var(--text-primary);
}

.btn-secondary:hover:not(:disabled) {
  background-color: var(--background);
  border-color: var(--cool-grey);
  color: var(--text-primary);
}

.btn-secondary:active:not(:disabled) {
  background-color: var(--cool-grey-light);
  border-color: var(--cool-grey);
}

.btn-secondary:focus:not(:disabled) {
  background-color: var(--surface);
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--primary);
  color: var(--text-primary);
}

/* Accent Button */
.btn-accent {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #fff !important;
}

.btn-accent:hover:not(:disabled) {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-accent:focus:not(:disabled) {
  outline: none;
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent);
}

/* Disabled state */
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* Loading state - Dynamics style spinner */
.btn.loading {
  color: transparent !important;
  pointer-events: none;
  animation: none !important;
  transform: none !important;
}

.btn.loading svg {
  visibility: hidden;
  animation: none !important;
}

.btn.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  margin-left: -8px;
  border: 2px solid currentColor;
  border-color: rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.btn-secondary.loading::after,
.btn-save.loading::after {
  border-color: rgba(0, 0, 0, 0.15);
  border-top-color: var(--primary);
}

/* Save Status Indicator */
.save-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.save-status svg {
  width: 16px;
  height: 16px;
}

.save-status.saving {
  color: var(--text-secondary);
}

.save-status.saving svg {
  animation: spin 1s linear infinite;
}

.save-status.saved {
  color: var(--success);
}

.save-status.error {
  color: var(--error);
}

.save-status.hidden {
  opacity: 0;
  visibility: hidden;
}

/* Button group with save */
.button-group-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.button-group-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Continue Validation Helper Message */
.continue-validation-message {
  font-size: 13px;
  color: var(--warning);
  text-align: right;
  margin-top: 8px;
}

.continue-validation-message:empty {
  display: none;
}

.continue-validation-message .validation-item {
  display: inline;
}

@media (max-width: 768px) {
  .continue-validation-message {
    text-align: left;
  }
  .continue-validation-message .validation-item {
    display: block;
    padding: 2px 0;
  }
  .continue-validation-message .validation-sep {
    display: none;
  }
}

/* Save Button - Icon-only compact style */
.btn-save {
  background: transparent;
  border-color: var(--border);
  color: var(--text-secondary);
  font-weight: 500;
  padding: 6px 8px;
  min-width: 32px;
}

.btn-save:hover:not(:disabled) {
  background-color: var(--background);
  border-color: var(--border);
  color: var(--text-primary);
}

.btn-save:active:not(:disabled) {
  background-color: var(--background);
}

.btn-save:focus:not(:disabled) {
  background: transparent;
  outline: none;
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text-secondary);
}

/* Generic Secondary Button - works with any .btn.secondary combo */
.btn.secondary {
  background: transparent;
  border-color: var(--border);
  color: var(--text-secondary);
  font-weight: 500;
}

.btn.secondary:hover:not(:disabled) {
  background-color: var(--background);
  color: var(--text-primary);
}

/* ============================================================
   Shared Agreement Component Styles
   Used by: Agreements page, Payroll Info (subsistence)
   ============================================================ */

/* --- Section Heading (used above agreement list, contract card, etc.) --- */
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  margin-bottom: 12px;
  border-bottom: 2px solid var(--primary);
}

.section-heading-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.section-heading-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-heading-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.section-heading-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

.section-heading-tag.tag-count {
  background: var(--primary);
  color: #fff;
}

.section-heading-tag.tag-complete {
  background: var(--success-bg);
  color: var(--success);
}

/* --- Agreement List --- */
.agreement-list {
  margin-bottom: var(--space-lg);
}

.agreement-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, box-shadow 0.15s ease;
  margin-bottom: 8px;
}

.agreement-list-item:last-child {
  margin-bottom: 0;
}

.agreement-list-item:hover {
  background: var(--background);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.agreement-list-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.agreement-list-text {
  flex: 1;
  min-width: 0;
}

.agreement-list-name {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
}

.agreement-list-summary {
  display: block;
  font-size: 10px;
  color: var(--text-secondary);
  margin-top: 4px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  background: var(--background);
  padding: 2px 8px;
  border-radius: 4px;
}

.agreement-list-summary * {
  display: inline !important;
  font-size: 10px !important;
  margin: 0 !important;
  padding: 0 !important;
  font-family: inherit !important;
}

.agreement-list-date {
  font-size: 10px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.agreement-list-hint {
  font-size: 10px;
  font-style: italic;
  color: var(--text-secondary);
  white-space: nowrap;
}

.agreement-list-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.agreement-list-chevron {
  flex-shrink: 0;
  color: var(--text-secondary);
  transition: transform 0.15s ease;
}

.agreement-list-item:hover .agreement-list-chevron {
  transform: translateX(2px);
  color: var(--primary);
}

/* --- Agreement Modal --- */
.agreement-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.agreement-modal-overlay.visible {
  opacity: 1;
}

.agreement-modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 960px;
  max-height: 97vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: translateY(20px);
  transition: transform 0.25s ease;
  overflow: hidden;
}

.agreement-modal-overlay.visible .agreement-modal {
  transform: translateY(0);
}

.agreement-modal-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 20px 24px 14px;
  flex-shrink: 0;
}

.agreement-modal-header-text {
  flex: 1;
}

.agreement-modal-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.3;
}

.agreement-modal-subtitle {
  display: inline-block;
  color: var(--text-secondary);
  margin-top: 4px;
  background: var(--background);
  padding: 2px 10px;
  border-radius: 4px;
}

.agreement-modal-close {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 6px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
  margin-top: 2px;
}

.agreement-modal-close:hover {
  background: var(--background);
  color: var(--text-primary);
}

.agreement-modal-body {
  padding: 0 24px 0;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.agreement-modal-divider {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  padding: 8px 0 8px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 12px;
}

.agreement-modal-divider svg {
  color: var(--text-secondary);
  flex-shrink: 0;
}

.agreement-modal-body .agreement-content {
  flex: 1;
  overflow-y: auto;
  position: relative;
  border-radius: var(--radius-md);
}

/* Scroll-to-unlock notice */
.scroll-unlock-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 0;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  transition: opacity 0.3s ease;
}

.scroll-unlock-notice.unlocked {
  opacity: 0;
  pointer-events: none;
}

.scroll-unlock-notice svg {
  flex-shrink: 0;
}

/* Modal Bottom — 2-column panel (current response + history) */
.agreement-modal-bottom {
  display: flex;
  gap: 1px;
  background: var(--border-subtle);
  border-top: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.modal-bottom-col {
  flex: 1;
  padding: 14px 24px;
  background: var(--surface);
}

.modal-bottom-current {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.modal-bottom-history {
  flex: 1;
  max-height: 160px;
  overflow-y: auto;
}

.modal-bottom-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

/* Modal Footer */
.agreement-modal-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border-subtle);
  flex-shrink: 0;
  background: var(--surface);
}

.agreement-modal-footer .response-buttons {
  justify-content: flex-end;
}

.agreement-modal-footer .response-buttons.scroll-locked {
  opacity: 0.4;
  pointer-events: none;
}

/* Side arrow buttons beside agreement modal */
.modal-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 10;
}

.modal-arrow:hover {
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transform: translateY(-50%) scale(1.08);
}

.modal-arrow-prev {
  left: calc(50% - 480px - 56px);
}

.modal-arrow-next {
  right: calc(50% - 480px - 56px);
}

/* Footer nav buttons (mobile only — hidden on desktop) */
.modal-nav-footer {
  display: none;
  gap: 8px;
  padding: 10px 24px 14px;
  justify-content: center;
  flex-shrink: 0;
  background: var(--surface);
}

.modal-nav-footer .btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  cursor: pointer;
  background: var(--background);
  color: var(--text-secondary);
  font-family: inherit;
  transition: all var(--transition-base);
}

.modal-nav-footer .btn:hover {
  background: var(--surface);
  color: var(--text-primary);
}

/* --- Agreement Content + Rich Text Reset --- */
.agreement-content {
  overflow-y: auto;
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-primary);
  background: var(--background);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 0;
}

.agreement-content h1,
.agreement-content h2,
.agreement-content h3,
.agreement-content h4,
.agreement-content h5,
.agreement-content h6 {
  margin: 0 0 8px;
  line-height: 1.3;
}

.agreement-content p {
  margin: 0 0 12px;
}

.agreement-content p:last-child {
  margin-bottom: 0;
}

.agreement-content ul,
.agreement-content ol {
  padding-left: 24px;
  margin: 0 0 12px;
}

.agreement-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 12px;
}

.agreement-content table td,
.agreement-content table th {
  border: 1px solid var(--border-subtle);
  padding: 6px 10px;
  text-align: left;
}

.agreement-content img {
  max-width: 100%;
  height: auto;
}

.agreement-content a {
  color: var(--primary);
  text-decoration: underline;
}

.agreement-content blockquote {
  margin: 0 0 12px;
  padding: 8px 16px;
  border-left: 3px solid var(--border);
  color: var(--text-secondary);
}

.agreement-content pre {
  background: var(--surface);
  padding: 12px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin: 0 0 12px;
}

.agreement-content hr {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 16px 0;
}

.agreement-content li {
  margin-bottom: 6px;
}

/* --- Status Badges --- */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.status-badge::before {
  display: inline-block;
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.badge-signed::before,
.badge-accepted::before {
  content: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%2316a34a' stroke-width='3' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}

.badge-declined::before {
  content: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%23dc2626' stroke-width='3' xmlns='http://www.w3.org/2000/svg'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E");
}

.badge-pending::before {
  content: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%23d97706' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolyline points='12 6 12 12 16 14'/%3E%3C/svg%3E");
}

.badge-signed,
.badge-accepted {
  background: var(--success-bg);
  color: var(--success);
}

.badge-declined {
  background: var(--error-bg);
  color: var(--error);
}

.badge-pending {
  background: var(--warning-bg);
  color: var(--warning);
}

.badge-revoked::before {
  content: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%23666666' stroke-width='2.5' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 10h10a5 5 0 0 1 0 10h-1'/%3E%3Cpolyline points='7 6 3 10 7 14'/%3E%3C/svg%3E");
}

.badge-revoked {
  background: var(--background);
  color: var(--text-secondary);
}

/* --- Response Buttons --- */
.response-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn.btn-accept,
.btn.btn-decline {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
  border: 1.5px solid transparent;
}

.btn.btn-accept.loading,
.btn.btn-decline.loading {
  color: transparent !important;
  pointer-events: none;
}

.btn.btn-accept.loading svg,
.btn.btn-decline.loading svg {
  visibility: hidden;
}

.btn.btn-accept.loading::after,
.btn.btn-decline.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  margin-left: -8px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.btn.btn-decline.loading::after {
  border-color: rgba(220, 53, 69, 0.3);
  border-top-color: var(--error);
}

.btn.btn-accept {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}

.btn.btn-decline {
  background: transparent;
  color: var(--error);
  border-color: var(--error);
}

.btn.btn-accept:hover,
.btn.btn-accept:focus {
  background: var(--success-dark);
  border-color: var(--success-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: none;
}

.btn.btn-decline:hover,
.btn.btn-decline:focus {
  background: var(--error-light);
  border-color: var(--error);
  color: var(--error);
  transform: translateY(-1px);
  box-shadow: none;
}

.btn.btn-accept:disabled,
.btn.btn-decline:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* --- Response Status --- */
.response-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

/* --- Change Response Link --- */
.change-response-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  padding: 6px 14px;
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-md);
  background: transparent;
  text-decoration: none;
  margin-left: auto;
  transition: background 0.15s ease, color 0.15s ease;
}

.change-response-link:hover {
  background: var(--primary);
  color: #fff;
}

.change-response-link.loading {
  color: transparent;
  pointer-events: none;
  animation: none !important;
  transform: none !important;
}

.change-response-link.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  margin-left: -7px;
  border: 2px solid rgba(0, 0, 0, 0.15);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* --- Response History Toggle --- */
.response-history-toggle {
  width: 100%;
  text-align: right;
}

.history-toggle-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color 0.15s ease;
}

.history-toggle-link:hover {
  color: var(--primary);
}

.history-toggle-chevron {
  transition: transform 0.2s ease;
}

.history-toggle-link.expanded .history-toggle-chevron {
  transform: rotate(180deg);
}

.response-history-collapsible {
  width: 100%;
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}

/* --- Response History --- */
.response-history-list {
  display: flex;
  flex-direction: row-reverse;
  align-items: flex-start;
  gap: 0;
  overflow-x: auto;
  padding: 4px 0;
}

.response-history-entry {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0 12px;
  flex-shrink: 0;
}

.response-history-entry:not(:last-child) {
  border-left: 1px solid var(--border);
}

.response-history-entry .history-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.response-history-entry .history-badge.badge-accepted {
  background: var(--success-bg);
  color: var(--success);
}

.response-history-entry .history-badge.badge-declined {
  background: var(--error-bg);
  color: var(--error);
}

.response-history-entry .history-badge::before {
  display: inline-block;
  width: 10px;
  height: 10px;
  flex-shrink: 0;
}

.response-history-entry .history-badge.badge-accepted::before {
  content: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%2316a34a' stroke-width='3' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}

.response-history-entry .history-badge.badge-declined::before {
  content: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%23dc2626' stroke-width='3' xmlns='http://www.w3.org/2000/svg'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E");
}

.response-history-entry .history-badge.badge-revoked {
  background: var(--background);
  color: var(--text-secondary);
}

.response-history-entry .history-badge.badge-revoked::before {
  content: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%23666666' stroke-width='2.5' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 10h10a5 5 0 0 1 0 10h-1'/%3E%3Cpolyline points='7 6 3 10 7 14'/%3E%3C/svg%3E");
}

.history-date {
  color: var(--text-secondary);
  font-size: 10px;
  white-space: nowrap;
  text-align: center;
}

/* --- Agreement Component Responsive --- */
@media (max-width: 768px) {
  .agreement-content {
    padding: 16px;
  }

  .agreement-list-item {
    padding: 12px 14px;
    gap: 10px;
  }

  .agreement-list-name {
    font-size: 13px;
  }

  .agreement-modal {
    max-height: 95vh;
    max-width: 100%;
  }

  .agreement-modal-header {
    padding: 16px 18px 12px;
  }

  .agreement-modal-body {
    padding: 0 18px 14px;
  }

  .agreement-modal-bottom {
    flex-direction: column;
  }

  .modal-bottom-col {
    padding: 12px 18px;
  }

  .modal-bottom-current {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .modal-bottom-current .change-response-link {
    margin-left: 0;
  }

  .modal-bottom-current .response-history-toggle {
    text-align: left;
  }

  .agreement-modal-footer {
    padding: 12px 18px;
  }

  .agreement-modal-title {
    font-size: 17px;
  }

  .agreement-modal-footer .response-buttons {
    flex-direction: column;
  }

  .agreement-modal-footer .btn.btn-accept,
  .agreement-modal-footer .btn.btn-decline {
    width: 100%;
    justify-content: center;
  }

  .modal-arrow {
    display: none !important;
  }

  .modal-nav-footer {
    display: flex !important;
  }
}

/* ============================================================
   Common Info/Status Boxes
   ============================================================ */

.info-box {
  background: var(--info-bg);
  border-left: 4px solid var(--teal);
  padding: 16px 20px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 24px;
}

.info-box-title {
  font-weight: 600;
  color: var(--teal);
  margin-bottom: 4px;
  font-size: 14px;
}

.info-box-text {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

.status-message {
  background: var(--gradient-status);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.status-message-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.status-message-content {
  flex: 1;
}

.status-message-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.status-message-text {
  font-size: 13px;
  color: var(--text-secondary);
}

.status-message.success {
  background: var(--success-bg);
  border-color: #10b981;
}

.status-message.error {
  background: var(--error-bg);
  border: 1px solid #fecaca;
}

.status-message.error .status-message-title {
  color: var(--error);
}

.error-contact {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  font-size: 13px;
  color: var(--text-secondary);
}

.error-contact a {
  color: var(--primary);
  text-decoration: none;
}

.error-contact a:hover {
  text-decoration: underline;
}

.error-contact-info {
  margin-top: 12px;
  font-size: 14px;
  color: var(--text-secondary);
}

.error-contact-info a {
  color: var(--primary);
  text-decoration: none;
}

.error-contact-info a:hover {
  text-decoration: underline;
}

/* ============================================================
   Loading & Save Indicators
   ============================================================ */

.loading-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay-white-solid);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.loading-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.save-indicator {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-16);
  z-index: 1000;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.save-indicator.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   Responsive Breakpoints
   ============================================================ */

/* Mobile Sidebar Toggle Button */
.sidebar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.sidebar-toggle:hover {
  background: var(--background);
}

.sidebar-toggle svg {
  width: 24px;
  height: 24px;
  stroke: var(--text-primary);
}

/* Mobile Sidebar Overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  top: var(--header-height);
  background: var(--overlay-dark);
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-overlay.visible {
  opacity: 1;
  visibility: visible;
}

/* Mobile Sidebar Close Button */
.sidebar-close {
  display: none;
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.sidebar-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.sidebar-close svg {
  width: 18px;
  height: 18px;
  stroke: white;
}

@media (max-width: 1024px) {
  .sidebar-toggle {
    display: flex;
  }

  .sidebar-collapse-toggle {
    display: none;
  }

  .sidebar-overlay {
    display: block;
  }

  .sidebar-close {
    display: flex;
  }

  .progress-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 95;
    width: var(--sidebar-width);
    padding: 28px 22px;
    bottom: var(--footer-height);
  }

  .progress-sidebar.open {
    transform: translateX(0);
  }

  /* Reset collapsed state on mobile */
  .progress-sidebar.collapsed .step-content {
    display: block;
  }

  .progress-sidebar.collapsed .progress-title,
  .progress-sidebar.collapsed .progress-subtitle,
  .progress-sidebar.collapsed .sidebar-advisor,
  .progress-sidebar.collapsed .sidebar-home-link span {
    display: revert;
  }

  .progress-sidebar.collapsed .progress-step {
    justify-content: flex-start;
    gap: 14px;
  }

  .progress-sidebar.collapsed .sidebar-home-link {
    justify-content: flex-start;
    padding: 12px 14px;
    gap: 10px;
  }

  .progress-sidebar.collapsed::after {
    display: block;
  }

  .content-area,
  body.sidebar-collapsed .content-area {
    margin-left: 0;
    max-width: 100%;
    padding: 30px;
  }

  .main-container {
    padding: var(--space-xl);
  }
}

/* Tablet landscape - smoother transition */
@media (max-width: 900px) {
  .content-area {
    padding: 24px;
  }

  .stage-header {
    padding: 24px;
  }

  .stage-title {
    font-size: 24px;
  }

  .form-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

@media (max-width: 768px) {
  .main-container {
    padding: var(--space-lg);
  }

  .content-area {
    padding: 20px 16px;
  }

  .header {
    padding: 12px 16px;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: clamp(10px, 2vw, 12px);
  }

  .button-group {
    flex-direction: column-reverse;
    gap: 12px;
  }

  .button-group-left,
  .button-group-right {
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }

  .button-group-left {
    flex-direction: column-reverse;
  }

  .btn {
    width: 100%;
    justify-content: center;
    min-height: 40px;
    padding: 10px 16px;
  }

  .btn-save {
    width: auto;
    min-width: 32px;
    padding: 8px 10px;
  }

  .save-status {
    justify-content: center;
    width: 100%;
  }

  .stage-header {
    padding: 20px;
  }

  .stage-title {
    font-size: 22px;
  }
}

/* Tablet portrait - additional refinement */
@media (max-width: 600px) {
  .content-area {
    padding: 16px 12px;
  }

  .stage-container,
  .page-container {
    padding-bottom: 100px;
  }

  .stage-header {
    padding: 16px;
  }

  .form-section {
    margin-bottom: 16px;
  }

  .section-title {
    font-size: 15px;
    margin-bottom: 12px;
  }
}

@media (max-width: 380px) {
  .stage-title {
    font-size: 20px;
  }
}

/* Ensure touch targets are adequate on mobile */
@media (pointer: coarse) {
  .btn {
    min-height: 40px;
    padding: 10px 16px;
  }

  .form-input,
  .form-select,
  .form-textarea {
    min-height: 44px;
    padding: 12px;
  }
}

/* ============================================================
   Form-Specific Components CSS
   Used across Worker Details, Medical Declaration, etc.
   ============================================================ */

/* ============================================================
   Checkbox and Radio Styles
   ============================================================ */

.checkbox-group,
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.radio-group.horizontal {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 20px;
}

.checkbox-item,
.radio-item {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.checkbox-input,
.radio-input {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
}

.checkbox-label,
.radio-label {
  font-size: 14px;
  line-height: 1.5;
}

/* ============================================================
   Yes/No Toggle Group
   ============================================================ */

.yes-no-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.yes-no-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px;
  background: var(--background);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.yes-no-item.has-details {
  flex-direction: column;
  gap: 12px;
}

.yes-no-item.invalid,
.yes-no-item.invalid button {
  border-color: #dc3545;
}

.yes-no-question {
  flex: 1;
  font-size: 14px;
  line-height: 1.5;
}

.yes-no-question strong {
  color: var(--primary);
}

.yes-no-toggle {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.toggle-btn {
  padding: 6px 16px;
  border: 1px solid var(--border);
  background: white;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.toggle-btn:hover {
  border-color: var(--primary);
}

.toggle-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.toggle-btn.active-no {
  background: var(--cool-grey);
  border-color: var(--cool-grey);
  color: white;
}

.yes-no-details {
  width: 100%;
  margin-top: 8px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.2s ease, margin 0.3s ease;
}

.yes-no-details.visible {
  max-height: 200px;
  opacity: 1;
  margin-top: 12px;
}

.yes-no-details .form-input,
.yes-no-details .form-textarea {
  width: 100%;
}

/* Conditional section animations */
.conditional-section {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease, padding 0.3s ease;
  margin-top: 0;
}

.conditional-section.visible {
  max-height: 500px;
  opacity: 1;
  margin-top: 16px;
}

/* ============================================================
   Country Selector
   ============================================================ */

.country-selector {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.country-option {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.country-option:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.country-option.selected {
  border-color: var(--primary);
  background: var(--primary-hover-bg);
  color: var(--primary);
}

.country-option .country-flag {
  font-size: 24px;
  line-height: 1.2;
  margin-bottom: 4px;
  display: block;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Segoe UI Symbol", sans-serif;
}

.country-option .country-flag-img {
  width: 28px;
  height: 21px;
  margin-bottom: 6px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  border-radius: 3px;
  object-fit: cover;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.country-option .country-flag-svg {
  width: 24px;
  height: 24px;
  margin-bottom: 4px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  stroke: var(--text-secondary);
}

.country-option:hover .country-flag-svg,
.country-option.selected .country-flag-svg {
  stroke: var(--primary);
}

/* ============================================================
   Profile Photo Upload
   ============================================================ */

.photo-upload-container {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px;
  background: var(--background);
  border-radius: 12px;
  margin-bottom: 24px;
}

.photo-preview {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--gradient-primary-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 600;
  color: white;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}

.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-upload-content {
  flex: 1;
}

.photo-upload-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.photo-upload-hint {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.photo-upload-actions {
  display: flex;
  gap: 12px;
}

.photo-upload-btn {
  padding: 8px 16px;
  border-radius: 2px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-family: inherit;
}

.photo-upload-btn.primary {
  background: var(--primary);
  color: white;
}

.photo-upload-btn.primary:hover {
  background: var(--primary-dark);
}

.photo-upload-btn.secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.photo-upload-btn.secondary:hover {
  background: var(--background);
  color: var(--text-primary);
}

.photo-upload-input {
  display: none !important;
}

/* ============================================================
   Multi-Entry Cards (Emergency Contacts, Dependents)
   ============================================================ */

.entry-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.entry-card {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  position: relative;
}

.entry-card .form-grid {
  grid-template-columns: repeat(3, 1fr);
}

.entry-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.entry-card-title {
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.entry-card-number {
  width: 24px;
  height: 24px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

.remove-entry-btn {
  background: none;
  border: none;
  color: var(--error);
  cursor: pointer;
  padding: 4px 8px;
  font-size: 13px;
  border-radius: 4px;
  transition: all 0.2s ease;
  font-family: inherit;
}

.remove-entry-btn:hover {
  background: var(--error-light);
}

.remove-entry-btn.loading {
  background: var(--error-light);
  position: relative;
  min-width: 70px;
}

.remove-entry-btn.loading::after {
  border-color: rgba(220, 53, 69, 0.3);
  border-top-color: var(--error);
}

.add-entry-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  border: 2px dashed var(--border);
  border-radius: 8px;
  background: none;
  color: var(--primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  font-family: inherit;
}

.add-entry-btn:hover:not(:disabled) {
  border-color: var(--primary);
  background: var(--primary-hover-bg);
}

.add-entry-btn svg {
  width: 16px;
  height: 16px;
}

.add-entry-btn:disabled {
  border-color: var(--border);
  background: rgba(0, 0, 0, 0.05);
  color: rgba(44, 112, 79, 0.3);
  cursor: not-allowed;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.save-entry-btn {
  padding: 8px 20px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.save-entry-btn:hover:not(:disabled) {
  background: var(--primary-dark);
  color: white;
}

.save-entry-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  color: rgb(131, 124, 124);
}

/* ============================================================
   Searchable Dropdown / Lookup
   ============================================================ */

.search-wrapper {
  /* position: relative is set in Fluent v9 underline section */
  display: flex;
  align-items: center;
}

.search-wrapper .form-input {
  padding-right: calc(var(--space-4xl) + var(--space-xl));
  flex-grow: 1;
}

.search-wrapper .form-input.hiddenInput {
  display: none;
}

.search-wrapper .search-icon-btn {
  position: absolute;
  left: calc(100% - 36px);
  width: 36px;
  height: 36px;
  padding: 0;
  min-height: auto;
  border-radius: var(--radius-md);
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
}

.search-wrapper .search-icon-btn:hover {
  background: var(--background);
  color: var(--primary);
}

.search-wrapper .search-icon-btn svg {
  width: 18px;
  height: 18px;
}

.search-wrapper .loading-icon {
  position: absolute;
  right: var(--space-lg);
  color: var(--primary);
  display: none;
  align-items: center;
  justify-content: center;
}

.search-wrapper .loading-icon.visible {
  display: flex;
}

.search-wrapper .loading-icon svg {
  width: 18px;
  height: 18px;
  animation: spin 1s linear infinite;
}

.search-wrapper .clear-btn {
  position: absolute;
  right: calc(var(--space-sm) + 40px);
  width: 24px;
  height: 24px;
  padding: 0;
  min-height: auto;
  border-radius: var(--radius-full);
  background: var(--cool-grey-light);
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
  opacity: 0;
  pointer-events: none;
}

.search-wrapper .form-input.has-value~.clear-btn {
  opacity: 1;
  pointer-events: auto;
}

.search-wrapper .clear-btn:hover {
  background: var(--cool-grey);
  color: var(--surface);
}

.lookup-dropdown {
  position: fixed;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-16);
  max-height: 320px;
  overflow-y: auto;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all 0.15s ease;
}

.lookup-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  height: 400px;
}

.lookup-dropdown-item {
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.15s ease;
  border-bottom: 1px solid var(--border);
}

.lookup-dropdown-item:last-child {
  border-bottom: none;
}

.lookup-dropdown-item:hover,
.lookup-dropdown-item.highlighted {
  background: var(--primary-subtle);
}

.lookup-dropdown-item.highlighted {
  background: var(--primary-focus-shadow);
}

.lookup-dropdown-item .community-name {
  font-size: var(--font-size-base);
  color: var(--text-primary);
  font-weight: 500;
}

.lookup-dropdown-item.no-results {
  color: var(--text-secondary);
  font-style: italic;
  cursor: default;
  text-align: center;
  padding: var(--space-xl) var(--space-lg);
}

.lookup-dropdown-item.no-results:hover {
  background: transparent;
}

.lookup-dropdown-item.loadingItem {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  color: var(--primary);
  padding: var(--space-xl) var(--space-lg);
  cursor: default;
}

.lookup-dropdown-item.loadingItem:hover {
  background: transparent;
}

.lookup-dropdown-item.loadingItem svg {
  width: 18px;
  height: 18px;
  animation: spin 1s linear infinite;
}

/* ============================================================
   Mobile Responsive
   ============================================================ */

@media (max-width: 768px) {
  .photo-upload-container {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }

  .photo-preview {
    width: 80px;
    height: 80px;
    font-size: 28px;
  }

  .photo-upload-actions {
    justify-content: center;
  }

  .country-selector {
    flex-direction: column;
    gap: 8px;
  }

  .yes-no-item {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .yes-no-item>div:first-child {
    flex-direction: column;
    gap: 12px;
  }

  .yes-no-toggle {
    width: 100%;
  }

  .toggle-btn {
    flex: 1;
    padding: 10px 12px;
    min-width: 0;
    font-size: 13px;
  }

  .yes-no-question {
    font-size: 13px;
  }

  .entry-card {
    padding: 16px;
  }

  .entry-card .form-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .entry-card-header {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
}

@media (max-width: 600px) {
  .entry-card .form-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Modal and Upload Components CSS
   ============================================================ */

/* ============================================================
   Modal Overlay
   ============================================================ */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--overlay-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--surface);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-28);
  width: 90%;
  max-height: 90vh;
  overflow: hidden;
  transform: scale(0.9);
  margin: auto;
  transition: all var(--transition-base);
}

.modal-overlay.active .modal {
  transform: scale(1);
  display: block;
}

.saving-overlay-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.saving-overlay-content .loading-spinner {
  border-color: rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
}

.saving-overlay-text {
  color: #fff;
  font-size: 16px;
  font-weight: 500;
}

.modal-large {
  max-width: 800px;
}

.modal-header {
  background: var(--stage-gradient);
  padding: var(--space-2xl);
  color: white;
  position: relative;
}

.modal-header::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 0;
  width: 100px;
  height: 50px;
  background: var(--accent);
  opacity: 0.2;
  transform: skewX(calc(-1 * var(--cut-angle)));
  transform-origin: bottom right;
}

.modal-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
}

.modal-close {
  position: absolute;
  top: 6px;
  right: var(--space-lg);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: white;
  transition: all var(--transition-base);
  z-index: 99999;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.modal-close svg {
  width: 18px;
  height: 18px;
}

.modal-body {
  padding: var(--space-2xl);
}

.modal-footer {
  padding: var(--space-lg) var(--space-2xl) var(--space-2xl);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-md);
}

/* Validation Error Dialog */
.modal-validation {
  max-width: 500px;
  max-height: 50vh;
  display: flex;
  flex-direction: column;
}

.modal-validation .modal-header {
  padding: var(--space-lg);
}

.modal-validation .modal-body {
  padding: var(--space-lg);
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.modal-validation .modal-footer {
  padding: var(--space-md) var(--space-lg);
}

.validation-dialog-intro {
  margin: 0 0 var(--space-md);
  color: var(--text);
}

.validation-dialog-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.validation-dialog-list li {
  padding: var(--space-sm) var(--space-md);
  border-left: 3px solid var(--error);
  background: var(--surface-raised);
  margin-bottom: var(--space-sm);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
}

/* ============================================================
   Upload Zone
   ============================================================ */

.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-4xl) var(--space-2xl);
  text-align: center;
  transition: all var(--transition-base);
  cursor: pointer;
  position: relative;
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--teal);
  background: var(--teal-subtle);
}

.upload-zone.has-file {
  border-style: solid;
  border-color: var(--success-border);
  background: var(--success-bg);
  padding: var(--space-sm);
  margin-top: 8px;
}

.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.upload-zone.has-file input[type="file"] {
  display: none;
}

.upload-zone-icon {
  width: 64px;
  height: 64px;
  background: var(--teal-medium);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-lg);
  color: var(--teal);
}

.upload-zone-icon svg {
  width: 32px;
  height: 32px;
}

.upload-zone-text {
  font-size: var(--font-size-md);
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.upload-zone-hint {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

.upload-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
}

.upload-empty svg {
  width: 32px;
  height: 32px;
  opacity: 0.5;
}

.upload-empty span {
  font-size: 14px;
}

.upload-empty .upload-hint {
  font-size: 12px;
  opacity: 0.7;
}

/* ============================================================
   Uploaded File Display
   ============================================================ */

.uploaded-file {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background: var(--surface);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-lg);
}

.uploaded-file-icon {
  width: 40px;
  height: 40px;
  background: var(--teal);
  color: white;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.uploaded-file-icon svg {
  width: 20px;
  height: 20px;
}

.uploaded-file-info {
  flex: 1;
}

.uploaded-file-name {
  font-weight: 500;
  color: var(--text-primary);
  font-size: var(--font-size-base);
}

.uploaded-file-size {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

.uploaded-file-remove {
  background: none;
  border: none;
  color: var(--error);
  cursor: pointer;
  padding: var(--space-sm);
}

.uploaded-file-remove:hover {
  color: #b02a2d;
}

.uploaded-file-remove svg {
  width: 18px;
  height: 18px;
}

/* ============================================================
   Upload Notes
   ============================================================ */

.upload-notes {
  margin-top: 20px;
}

.upload-notes-label {
  display: block;
  font-size: var(--font-size-base);
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.upload-notes-label .optional {
  font-weight: 400;
  color: var(--warm-grey);
}

.upload-notes-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: var(--font-size-base);
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
  transition: all 0.2s ease;
  background: var(--surface);
}

.upload-notes-input:hover {
  border-color: var(--cool-grey);
}

.upload-notes-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(44, 112, 79, 0.1);
}

.upload-notes-input::placeholder {
  color: var(--warm-grey);
}

/* ============================================================
   Document Upload Items
   ============================================================ */

.document-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.document-upload-item,
.upload-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.document-upload-item.has-file,
.upload-item.has-file {
  border-color: var(--primary);
  background: var(--primary-hover-bg);
}

.document-upload-header,
.upload-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px 20px;
  gap: 16px;
}

.document-upload-info,
.upload-info {
  flex: 1;
}

.document-upload-title,
.upload-title {
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.document-upload-description,
.upload-description {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.document-upload-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.document-upload-status svg {
  width: 14px;
  height: 14px;
}

.document-upload-zone {
  margin: 0 20px 20px 20px;
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.document-upload-zone:hover {
  border-color: var(--primary);
  background: var(--primary-hover-bg);
}

.document-upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.document-upload-item.has-file .document-upload-zone input[type="file"] {
  display: none;
}

.document-upload-item.has-file .document-upload-zone {
  border-style: solid;
  border-color: var(--primary);
  background: var(--primary-hover-bg);
  padding: 16px;
}

.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
}

.upload-placeholder svg {
  width: 32px;
  height: 32px;
  opacity: 0.5;
}

.upload-placeholder span {
  font-size: 14px;
}

.upload-placeholder .upload-hint {
  font-size: 12px;
  opacity: 0.7;
}

.optional-badge,
.required-badge {
  font-size: 10px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid;
}

.optional-badge {
  background: var(--background);
  color: var(--text-secondary);
  border-color: var(--border);
}

.required-badge {
  background: var(--error);
  color: white;
  border-color: var(--error);
}

/* ============================================================
   Document Viewer Modal
   ============================================================ */

.document-viewer-body {
  padding: 24px;
  padding-bottom: 16px;
}

.document-viewer {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  height: 400px;
  position: relative;
  overflow: hidden;
}

.document-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: var(--background);
  z-index: 1;
}

.document-loading p {
  color: var(--text-secondary);
  font-size: var(--font-size-base);
}

.document-loading.hidden {
  display: none;
}

.document-frame {
  width: 100%;
  height: 100%;
  border: none;
  background: white;
}

.document-info {
  display: flex;
  gap: 24px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.document-info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.document-info-label {
  font-size: 12px;
  color: var(--warm-grey);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.document-info-value {
  font-size: var(--font-size-base);
  color: var(--text-primary);
  font-weight: 500;
}

.document-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--success);
}

/* ============================================================
   DocuSign Modal
   ============================================================ */

.docusign-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--overlay-dark-strong);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}

.docusign-modal-content {
  background: white;
  width: 90%;
  height: 90%;
  max-width: 1200px;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.docusign-modal-header {
  padding: 20px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.docusign-modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.close-modal {
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: #6b7280;
  line-height: 1;
  padding: 0;
  width: 32px;
  height: 32px;
}

.close-modal:hover {
  color: #111827;
}

.docusign-modal-body {
  flex: 1;
  overflow: hidden;
}

#docusignIframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ============================================================
   DocuSign Container
   ============================================================ */

.docusign-container {
  background: var(--background);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

.docusign-icon {
  width: 80px;
  height: 80px;
  background: var(--gradient-gold);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  box-shadow: var(--shadow-8);
}

.docusign-icon svg {
  width: 40px;
  height: 40px;
  color: #1A1A1A;
}

.docusign-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.docusign-description {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 24px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.docusign-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.docusign-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 163, 0, 0.4);
}

.docusign-btn svg {
  width: 20px;
  height: 20px;
}

.docusign-status {
  margin: 24px;
  padding: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 500;
}

.docusign-status.pending {
  background: var(--accent-light);
  color: var(--accent-warm);
}

.docusign-status.signed {
  background: var(--primary-focus-shadow);
  color: var(--primary);
}

.docusign-status svg {
  width: 20px;
  height: 20px;
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 768px) {
  .modal {
    width: 95%;
    max-height: 95vh;
  }

  .upload-zone {
    padding: 20px 16px;
  }

  .uploaded-file {
    flex-wrap: wrap;
    gap: 8px;
  }

  .uploaded-file-info {
    flex: 1;
    min-width: 150px;
  }

  .document-viewer {
    height: 300px;
  }

  .document-info {
    flex-direction: column;
    gap: 12px;
  }

  .document-upload-header,
  .upload-header {
    flex-direction: column;
    gap: 12px;
  }

  .document-upload-status {
    align-self: flex-start;
  }

  .document-upload-zone {
    padding: 20px 16px;
  }

  .docusign-container {
    padding: 24px 20px;
  }

  .docusign-icon {
    width: 48px;
    height: 48px;
  }

  .docusign-title {
    font-size: 18px;
  }
}


#content {
  margin-top: var(--header-height);
}

/* ============================================================
   LOGIN PAGE STYLES (Anonymous/Unauthenticated Users)
   All styles scoped under .loginpage
   ============================================================ */

.loginpage .logo-text {
  display: flex;
  flex-direction: column;
}

.loginpage .logo-text h1 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.loginpage .logo-text span {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.5px;
}

.loginpage .header-signin {
  padding: 10px 24px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.loginpage .header-signin:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-8);
}

/* ============================================================
   HERO SECTION
   ============================================================ */

.loginpage .hero {
  min-height: calc(100vh - var(--space-lg));
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.loginpage .hero-background {
  position: absolute;
  inset: 0;
  background: var(--stage-gradient);
}

/* Video Background */
.loginpage .hero-video-wrapper {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.loginpage .hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.loginpage .hero-video-overlay {
  position: absolute;
  inset: 0;
  background: var(--hero-overlay);
  pointer-events: none;
}

/* Decorative cut-angle elements */
.loginpage .hero-decoration-1 {
  position: absolute;
  right: -100px;
  top: -100px;
  width: 500px;
  height: 500px;
  background: var(--accent);
  opacity: 0.15;
  transform: skewX(calc(-1 * var(--cut-angle))) rotate(-15deg);
  animation: float-hero 20s ease-in-out infinite;
  z-index: 1;
}

.loginpage .hero-decoration-2 {
  position: absolute;
  right: 10%;
  bottom: -150px;
  width: 400px;
  height: 400px;
  background: var(--accent);
  opacity: 0.18;
  transform: skewX(calc(-1 * var(--cut-angle)));
  animation: float-hero 25s ease-in-out infinite reverse;
  z-index: 1;
}

.loginpage .hero-decoration-3 {
  position: absolute;
  left: -200px;
  bottom: 20%;
  width: 300px;
  height: 600px;
  background: white;
  opacity: 0.05;
  transform: skewX(calc(-1 * var(--cut-angle)));
  z-index: 1;
}

/* Subtle grid pattern */
.loginpage .hero-pattern {
  position: absolute;
  inset: 0;
  background-image: var(--gradient-grid-pattern);
  background-size: 60px 60px;
  z-index: 1;
}

@keyframes float-hero {

  0%,
  100% {
    transform: skewX(calc(-1 * var(--cut-angle))) translateY(0px) rotate(-15deg);
  }

  50% {
    transform: skewX(calc(-1 * var(--cut-angle))) translateY(30px) rotate(-15deg);
  }
}

.loginpage .hero-content {
  position: relative;
  z-index: 1;
  margin: 0 auto;
  padding: 60px 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.loginpage .hero-text {
  animation: slideUp 0.8s ease;
}

.loginpage .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  padding: 8px 16px;
  border-radius: 50px;
  margin-bottom: 24px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.loginpage .hero-badge-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.6;
    transform: scale(1.2);
  }
}

.loginpage .hero-badge span {
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 500;
}

.loginpage .hero-title {
  font-size: 52px;
  font-weight: 700;
  color: white;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -1.5px;
}

.loginpage .hero-title .highlight {
  color: var(--accent);
}

.loginpage .hero-subtitle {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  margin-bottom: 40px;
  max-width: 480px;
}

.loginpage .hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Login page specific button overrides */
.loginpage .btn-primary {
  padding: 16px 36px;
  font-size: 16px;
}

.loginpage .btn-primary:hover svg {
  transform: translateX(4px);
}

.loginpage .btn-secondary {
  padding: 16px 28px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  font-size: 16px;
}

.loginpage .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.4);
}

/* ============================================================
   HERO CARD
   ============================================================ */

.loginpage .hero-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 40px;
  box-shadow: var(--shadow-28);
  position: relative;
  overflow: hidden;
  animation: slideUp 0.8s ease 0.2s both;
}

.loginpage .hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 120px;
  height: 120px;
  background: var(--accent);
  opacity: 0.08;
  transform: skewX(calc(-1 * var(--cut-angle)));
  transform-origin: top right;
}

.loginpage .card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.loginpage .card-icon {
  width: 56px;
  height: 56px;
  background: var(--stage-gradient);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loginpage .card-icon svg {
  width: 28px;
  height: 28px;
  color: white;
}

.loginpage .card-header-text h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.loginpage .card-header-text p {
  font-size: 14px;
  color: var(--text-secondary);
}

.loginpage .feature-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.loginpage .feature-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  background: var(--background);
  border-radius: 10px;
  transition: all 0.2s ease;
}

.loginpage .feature-item:hover {
  background: #F0F0F0;
}

.loginpage .feature-check {
  width: 24px;
  height: 24px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.loginpage .feature-check svg {
  width: 14px;
  height: 14px;
  color: white;
}

.loginpage .feature-text {
  flex: 1;
}

.loginpage .feature-text strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.loginpage .feature-text span {
  font-size: 13px;
  color: var(--text-secondary);
}

.loginpage .card-signin {
  width: 100%;
  padding: 18px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.loginpage .card-signin:hover {
  color: white;
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 163, 0, 0.35);
}

.loginpage .card-signin svg {
  width: 20px;
  height: 20px;
}

.loginpage .card-help {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-secondary);
}

.loginpage .card-help a {
  color: var(--teal);
  text-decoration: none;
  font-weight: 500;
}

.loginpage .card-help a:hover {
  text-decoration: underline;
}

/* ============================================================
   VALUES SECTION
   ============================================================ */

.loginpage .values-section {
  background: var(--surface);
  padding: 80px 40px;
}

.loginpage .values-container {
  max-width: 1200px;
  margin: 0 auto;
}

.loginpage .values-header {
  text-align: center;
  margin-bottom: 56px;
}

.loginpage .values-header h2 {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.loginpage .values-header p {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
}

.loginpage .values-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.loginpage .value-card {
  background: var(--background);
  border-radius: 12px;
  padding: 28px 24px;
  text-align: center;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.loginpage .value-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 60px;
  height: 40px;
  background: var(--primary);
  opacity: 0;
  transform: skewX(calc(-1 * var(--cut-angle)));
  transition: all 0.3s ease;
}

.loginpage .value-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-8);
  transform: translateY(-4px);
}

.loginpage .value-card:hover::after {
  opacity: 0.1;
}

.loginpage .value-emoji {
  font-size: 36px;
  margin-bottom: 16px;
  display: block;
}

.loginpage .value-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 8px;
}

.loginpage .value-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
  .loginpage .header-signin {
    padding: 8px 16px;
    font-size: 13px;
  }

  .loginpage .btn-primary,
  .loginpage .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  .loginpage .hero-card {
    padding: 28px;
  }

  .loginpage .values-section {
    padding: 60px 20px;
  }

  .loginpage .values-grid {
    grid-template-columns: 1fr;
  }

}

/* ============================================================
   SHARED TASK STYLES
   Used by Tasks page and All My Tasks page
   ============================================================ */

/* Page Hero */
.page-hero {
  background: var(--stage-gradient);
  border-radius: var(--radius-2xl);
  padding: var(--space-2xl);
  margin-bottom: var(--space-2xl);
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-xl);
  align-items: center;
  box-shadow: var(--shadow-16);
  animation: slideUp 0.5s ease;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  background: var(--accent);
  opacity: 0.1;
  border-radius: 50%;
}

.page-hero::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 0;
  width: 180px;
  height: 100px;
  background: var(--accent);
  opacity: 0.15;
  transform: skewX(calc(-1 * var(--cut-angle)));
  transform-origin: bottom right;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-icon {
  font-size: 32px;
  margin-bottom: 8px;
  display: inline-block;
  animation: bounce 2s ease infinite;
}

.hero-title {
  color: white;
  font-size: var(--font-size-2xl);
  font-weight: 700;
  margin-bottom: 8px;
}

.hero-subtitle {
  color: rgba(255, 255, 255, 0.8);
  font-size: 15px;
  line-height: 1.6;
  max-width: 500px;
}

/* Progress Dial in Hero */
.hero-progress-container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.hero-progress-dial {
  position: relative;
  width: 160px;
  height: 160px;
}

.hero-progress-dial svg {
  transform: rotate(-90deg);
  width: 160px;
  height: 160px;
}

.hero-dial-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.15);
  stroke-width: 12;
}

.hero-dial-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 12;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s ease;
}

.hero-dial-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero-dial-percent {
  font-size: 36px;
  font-weight: 700;
  color: white;
  line-height: 1;
}

.hero-dial-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero-progress-stats {
  display: flex;
  gap: 20px;
}

.hero-stat {
  text-align: center;
}

.hero-stat-value {
  font-size: 18px;
  font-weight: 700;
  color: white;
}

.hero-stat-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Filter Toolbar */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  animation: slideUp 0.5s ease 0.1s backwards;
}

.filter-tabs {
  display: flex;
  gap: 8px;
  background: var(--surface);
  padding: 6px;
  border-radius: 10px;
  box-shadow: var(--shadow-4);
}

.filter-tab {
  padding: 10px 20px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: var(--font-size-base);
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
}

.filter-tab:hover {
  background: var(--background);
  color: var(--text-primary);
}

.filter-tab.active {
  background: var(--primary);
  color: white;
}

.filter-tab .badge {
  background: rgba(0, 0, 0, 0.15);
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.filter-tab.active .badge {
  background: rgba(255, 255, 255, 0.25);
}

.status-filters {
  display: flex;
  gap: 12px;
  align-items: center;
}

.status-filter {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.status-filter:hover {
  border-color: var(--primary);
}

.status-filter.active {
  border-color: var(--primary);
  background: var(--primary-hover-bg);
  color: var(--primary);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-dot.todo {
  background: var(--accent);
}

.status-dot.completed {
  background: var(--success);
}

.status-dot.overdue {
  background: var(--error);
}

.search-box {
  position: relative;
}

.search-box input {
  padding: 10px 16px 10px 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: var(--font-size-base);
  width: 240px;
  background: var(--surface);
  transition: all 0.2s ease;
  font-family: inherit;
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(44, 112, 79, 0.1);
}

.search-box svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--warm-grey);
}

/* Tasks Container */
.tasks-container {
  display: grid;
  gap: 16px;
  animation: slideUp 0.5s ease 0.2s backwards;
}

/* Task Card */
.task-card-new {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px 24px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.task-card-new::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--border);
  transition: all 0.25s ease;
}

.task-card-new:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-8);
  transform: translateY(-2px);
}

.task-card-new:hover::before {
  background: var(--primary);
}

.task-card-new.completed {
  opacity: 0.7;
  background: rgba(44, 112, 79, 0.02);
}

.task-card-new.completed::before {
  background: var(--success);
}

.task-card-new.overdue::before {
  background: var(--error);
}

.task-card-new.overdue {
  border-color: rgba(209, 52, 56, 0.3);
}

/* Task Type Icon */
.task-type-icon-new {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.task-type-icon-new svg {
  width: 26px;
  height: 26px;
  color: white;
}

.task-type-icon-new.document {
  background: var(--gradient-teal-primary);
}

.task-type-icon-new.signature {
  background: var(--gradient-accent-warm);
}

.task-type-icon-new.form {
  background: var(--gradient-highlight-teal);
}

/* Task Info */
.task-info-new {
  min-width: 0;
}

.task-header-new {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.task-title-new {
  font-size: var(--font-size-md);
  font-weight: 600;
  color: var(--text-primary);
}

.task-card-new.completed .task-title-new {
  text-decoration: line-through;
  color: var(--text-secondary);
}

.task-badge-new {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.task-badge-new.general {
  background: var(--teal-medium);
  color: var(--teal);
}

.task-badge-new.overdue {
  background: var(--error-light);
  color: var(--error);
}

.task-description-new {
  font-size: var(--font-size-base);
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 8px;
}

.task-meta-new {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--warm-grey);
}

.task-meta-item-new {
  display: flex;
  align-items: center;
  gap: 5px;
}

.task-meta-item-new svg {
  width: 14px;
  height: 14px;
}

.task-meta-item-new.overdue {
  color: var(--error);
  font-weight: 500;
}

/* Task Actions */
.task-actions-new {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Empty State */
.empty-state-new {
  text-align: center;
  padding: 64px 32px;
  background: var(--surface);
  border-radius: var(--radius-2xl);
  border: 2px dashed var(--border);
}

.empty-state-icon-new {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  background: var(--gradient-primary-teal);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-state-icon-new svg {
  width: 40px;
  height: 40px;
  color: white;
}

.empty-state-title-new {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.empty-state-text-new {
  font-size: var(--font-size-base);
  color: var(--text-secondary);
  max-width: 400px;
  margin: 0 auto;
}

/* Complete Journey Section */
.complete-journey-section {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 2px solid var(--border);
}

.complete-journey-card {
  background: var(--gradient-subtle-blend);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: var(--space-lg) var(--space-xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.complete-journey-icon {
  font-size: 36px;
  margin-bottom: 8px;
}

.complete-journey-title {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.complete-journey-text {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* Complete Journey Button - Large CTA variant */
.btn-complete-journey {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 32px;
  background-color: var(--accent);
  border: 1px solid var(--accent);
  color: white;
  border-radius: 2px;
  font-size: var(--font-size-md);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.1s ease, border-color 0.1s ease;
  font-family: inherit;
  position: relative;
  z-index: 1;
}

.btn-complete-journey:hover:not(:disabled) {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-complete-journey:focus:not(:disabled) {
  outline: none;
  box-shadow: 0 0 0 2px var(--background), 0 0 0 4px var(--accent);
}

.btn-complete-journey:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-complete-journey svg {
  width: 20px;
  height: 20px;
}

.btn-complete-journey.loading {
  color: transparent !important;
  pointer-events: none;
  position: relative;
  animation: none !important;
  transform: none !important;
}

.btn-complete-journey.loading svg {
  visibility: hidden;
}

.btn-complete-journey.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 16px 20px;
  box-shadow: var(--shadow-16);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 300px;
  max-width: 400px;
  transform: translateX(120%);
  transition: transform 0.3s ease;
  border-left: 4px solid var(--primary);
}

.toast.visible {
  transform: translateX(0);
}

.toast.success {
  border-left-color: var(--success);
}

.toast.error {
  border-left-color: var(--error);
}

.toast.warning {
  border-left-color: var(--warning);
}

.toast-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.toast.success .toast-icon {
  color: var(--success);
}

.toast.error .toast-icon {
  color: var(--error);
}

.toast.warning .toast-icon {
  color: var(--warning);
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.toast-message {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Shared Task Responsive Styles */
@media (max-width: 1200px) {
  .page-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-subtitle {
    margin: 0 auto;
  }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .search-box input {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .task-card-new {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 20px;
  }

  .task-type-icon-new {
    width: 44px;
    height: 44px;
  }

  .task-type-icon-new svg {
    width: 22px;
    height: 22px;
  }

  .task-actions-new {
    width: 100%;
  }

  .task-actions-new .btn {
    flex: 1;
    justify-content: center;
  }

  .hero-progress-dial {
    width: 130px;
    height: 130px;
  }

  .hero-progress-dial svg {
    width: 130px;
    height: 130px;
  }

  .hero-dial-percent {
    font-size: 28px;
  }

  .status-filters {
    flex-wrap: wrap;
  }
}

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
  background: var(--stage-gradient);
  position: fixed;
  bottom: 0;
  width: 100%;
  overflow: hidden;
  height: 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  transition: height 0.3s ease, opacity 0.3s ease;
}

.footer.footer-shrunk {
  height: 24px;
  opacity: 0.85;
}

.footer.footer-shrunk .footer-logo .logo-bar {
  height: 14px;
  width: 8px;
}

.footer.footer-shrunk .footer-brand-text strong {
  font-size: 10px;
}

.footer.footer-shrunk .footer-tagline {
  display: none;
}

.footer-decoration {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 200px;
  background: var(--accent);
  opacity: 0.1;
  transform: skewX(calc(-1 * var(--cut-angle)));
  transform-origin: bottom right;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 1;
  width: 100%;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 3px;
}

.footer-logo .logo-bar {
  width: 12px;
  height: 20px;
  transition: width 0.3s ease, height 0.3s ease;
}

.footer-brand-text {
  color: white;
}

.footer-brand-text strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
  transition: font-size 0.3s ease;
}

.footer-brand-text span {
  font-size: 10px;
  opacity: 0.7;
}

.footer-tagline {
  color: rgba(255, 255, 255, 0.8);
  font-size: 11px;
  font-style: italic;
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 32px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 11px;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: white;
}

@media (max-width: 600px) {
  .footer {
    height: auto;
    padding: 12px 0;
  }

  .footer-content {
    flex-direction: column;
    gap: 12px;
    padding: 8px 20px;
    text-align: center;
  }

  .footer-brand {
    justify-content: center;
  }

  .footer-links {
    gap: 16px;
    justify-content: center;
  }

  .footer-tagline {
    display: none;
  }
}

/* ============================================================
   SHARED COMPONENTS - Consolidated from page-specific CSS
   ============================================================ */

/* Additional Animation Keyframes */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes confettiFall {
  0% {
    opacity: 1;
    transform: translateY(-10vh) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translateY(100vh) rotate(720deg);
  }
}

/* ============================================================
   Photo Upload Component (Worker Details)
   ============================================================ */

.photo-upload-container {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-lg);
  background: var(--gradient-teal-surface);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-lg);
}

.photo-preview {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  border: 3px solid var(--border);
}

.photo-preview.has-photo {
  background: transparent;
  border-color: var(--primary);
}

.photo-preview.no-photo {
  background: var(--background-alt);
  color: var(--border);
  border-color: var(--border);
}

.photo-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.photo-preview.loading {
  position: relative;
}

.photo-preview.loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  border-radius: inherit;
}

.photo-upload-content {
  flex: 1;
}

.photo-upload-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.photo-upload-hint {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.photo-upload-actions {
  display: flex;
  gap: var(--space-sm);
}

.photo-upload-input {
  display: none;
}

.photo-upload-btn.loading,
.photo-remove-btn.loading {
  pointer-events: none;
  opacity: 0.8;
}

.photo-upload-btn .btn-loader {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.photo-upload-btn .spinner {
  width: 16px;
  height: 16px;
  animation: spin 1s linear infinite;
}

/* ============================================================
   Redirect Overlay (Tasks Page)
   ============================================================ */

.redirect-overlay {
  position: fixed;
  inset: 0;
  background: var(--hero-overlay);
  z-index: 9999;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
  padding: 40px;
}

.redirect-overlay.visible {
  display: flex;
}

.redirect-spinner-large {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 24px;
}

.redirect-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  animation: fadeInUp 0.5s ease 0.2s both;
}

.redirect-message {
  font-size: 16px;
  opacity: 0.9;
  animation: fadeInUp 0.5s ease 0.4s both;
}

.redirect-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  color: var(--text-secondary);
  font-size: 13px;
}

.redirect-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* ============================================================
   Completion/Success Overlay (Completed Page)
   ============================================================ */

.completion-video-wrapper {
  position: fixed;
  inset: 0;
  z-index: 999;
  overflow: hidden;
}

.completion-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.completion-video-overlay {
  position: absolute;
  inset: 0;
  background: var(--hero-overlay);
  pointer-events: none;
}

.completion-overlay {
  position: fixed;
  inset: 0;
  background: transparent;
  z-index: 1000;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  padding: 40px 20px;
  text-align: center;
}

.completion-overlay.visible {
  display: flex;
}

.completion-icon {
  width: 120px;
  height: 120px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
  animation: scaleIn 0.6s ease 0.3s both;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.completion-icon svg {
  width: 60px;
  height: 60px;
  color: var(--primary);
}

.completion-title {
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 16px;
  animation: fadeInUp 0.8s ease 0.5s both;
}

.completion-subtitle {
  font-size: 20px;
  opacity: 0.9;
  margin-bottom: 12px;
  animation: fadeInUp 0.8s ease 0.7s both;
}

.completion-message {
  font-size: 16px;
  opacity: 0.8;
  max-width: 500px;
  line-height: 1.7;
  margin-bottom: 40px;
  animation: fadeInUp 0.8s ease 0.9s both;
}

.completion-next-steps {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 24px 32px;
  max-width: 500px;
  width: 100%;
  animation: fadeInUp 0.8s ease 1.1s both;
  backdrop-filter: blur(10px);
}

.completion-next-title {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.8;
  margin-bottom: 16px;
}

.completion-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
}

.completion-step:last-child {
  border-bottom: none;
}

.completion-step-icon {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.completion-step-text {
  font-size: 14px;
  opacity: 0.9;
}

.completion-home-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  background: var(--accent);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(255, 163, 0, 0.3);
}

.completion-home-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 163, 0, 0.4);
  color: white;
  text-decoration: none;
}

.completion-footer {
  position: absolute;
  bottom: 40px;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  animation: fadeInUp 0.8s ease 1.3s both;
}

.completion-logo {
  display: flex;
  align-items: center;
  gap: 4px;
}

.completion-logo-bar {
  width: 40px;
  height: 56px;
  transform: skewX(calc(-1 * var(--cut-angle)));
}

.completion-logo-bar.orange,
.completion-logo-bar.bar-secondary {
  background: var(--accent);
}

.completion-logo-bar.green,
.completion-logo-bar.bar-primary {
  background: var(--primary);
}

/* Success State */
.success-state {
  text-align: center;
  padding: 60px 40px;
}

.success-icon {
  width: 100px;
  height: 100px;
  background: var(--gradient-primary-teal);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  animation: scaleIn 0.5s ease;
}

.success-icon svg {
  width: 50px;
  height: 50px;
  color: white;
}

.success-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
}

.success-message {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.6;
  max-width: 500px;
  margin: 0 auto;
}

/* State Container */
.state-container {
  text-align: center;
  padding: 64px 32px;
  background: var(--surface);
  border-radius: var(--radius-2xl);
}

.error-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  background: rgba(209, 52, 56, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--error);
}

.error-icon svg {
  width: 40px;
  height: 40px;
}

.state-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.state-message {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 400px;
  margin: 0 auto 24px;
}

/* Confetti */
.confetti-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1001;
}

.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  top: -20px;
}

/* ============================================================
   Completion/Success Responsive
   ============================================================ */

@media (max-width: 768px) {
  .photo-upload-container {
    flex-direction: column;
    text-align: center;
  }

  .photo-upload-actions {
    justify-content: center;
  }

  .completion-overlay {
    padding: 20px;
    padding-bottom: 120px;
  }

  .completion-icon {
    width: 90px;
    height: 90px;
    margin-bottom: 24px;
  }

  .completion-icon svg {
    width: 45px;
    height: 45px;
  }

  .completion-title {
    font-size: 28px;
  }

  .completion-subtitle {
    font-size: 16px;
  }

  .completion-message {
    font-size: 14px;
    margin-bottom: 28px;
  }

  .completion-next-steps {
    padding: 20px;
  }

  .completion-footer {
    bottom: 24px;
    gap: 16px;
  }

  .completion-logo-bar {
    width: 32px;
    height: 44px;
  }

  .completion-home-btn {
    padding: 12px 24px;
    font-size: 14px;
  }

  .success-state {
    padding: 40px 20px;
  }

  .success-icon {
    width: 80px;
    height: 80px;
  }

  .success-title {
    font-size: 24px;
  }

  .success-message {
    font-size: 14px;
  }
}

/* ============================================================
   Custom Date Picker (.wh-dp-*)
   Month/year dropdown picker for date-of-birth fields
   ============================================================ */

.wh-dp-wrap {
  position: relative;
  display: inline-block;
  width: 100%;
}

.wh-dp-wrap input[type="date"] {
  cursor: pointer;
  width: 100%;
}

/* Hide native calendar icon */
.wh-dp-wrap input[type="date"]::-webkit-calendar-picker-indicator {
  display: none;
  -webkit-appearance: none;
}

.wh-dp-panel {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 9999;
  width: 320px;
  max-width: calc(100vw - 24px);
  margin-top: 4px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  box-shadow: var(--shadow-16);
  padding: 12px;
  display: none;
  font-family: 'Segoe UI', system-ui, sans-serif;
}

.wh-dp-panel.open {
  display: block;
}

/* Header row: arrows + month/year selects */
.wh-dp-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.wh-dp-header button {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  padding: 0;
  transition: background 0.15s;
}

.wh-dp-header button:hover {
  background: var(--primary);
  color: #fff;
}

.wh-dp-header select {
  flex: 1;
  height: 32px;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-primary);
  font-size: 13px;
  padding: 0 4px;
  cursor: pointer;
}

.wh-dp-header select:focus {
  outline: 2px solid var(--primary);
  outline-offset: -1px;
}

/* Day-of-week labels */
.wh-dp-dow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
  user-select: none;
}

/* Day grid */
.wh-dp-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.wh-dp-day {
  width: 100%;
  aspect-ratio: 1;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-primary);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s;
  padding: 0;
}

.wh-dp-day:hover:not(.selected):not(.disabled) {
  background: var(--primary);
  color: #fff;
  opacity: 0.7;
}

.wh-dp-day.selected {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}

.wh-dp-day.today:not(.selected) {
  border: 2px solid var(--primary);
}

.wh-dp-day.disabled {
  color: var(--text-secondary);
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.wh-dp-day.other-month {
  visibility: hidden;
}

/* Footer row: Today / Clear */
.wh-dp-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  gap: 8px;
}

.wh-dp-footer button {
  flex: 1;
  height: 30px;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.wh-dp-footer button:hover {
  background: var(--primary);
  color: #fff;
}

/* ============================================================
   Accessibility - Reduced Motion Support
   Respects user's system preference for reduced motion
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .stage-card,
  .task-card,
  .entry-card,
  .modal {
    animation: none !important;
  }

  .progress-sidebar,
  .sidebar-overlay {
    transition: none !important;
  }

  .loading-spinner {
    animation: none !important;
  }
}

/* ============================================================
   Guidance Banner — Shared across all onboarding pages
   ============================================================ */
.guidance-banner {
  display: none; /* Temporarily disabled */
  /* display: flex; */
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--info-bg);
  border: 1px solid var(--primary);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-lg);
  position: relative;
  transition: opacity 0.3s ease, max-height 0.3s ease;
}

.guidance-banner.hiding {
  opacity: 0;
  max-height: 0;
  margin-bottom: 0;
  padding: 0;
  overflow: hidden;
}

.guidance-banner-icon {
  flex-shrink: 0;
  color: var(--primary);
  margin-top: 2px;
}

.guidance-banner-content {
  flex: 1;
  min-width: 0;
}

.guidance-banner-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.guidance-banner-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.guidance-steps-list {
  margin: 8px 0 0;
  padding-left: 20px;
  font-size: 13px;
  color: var(--text-secondary);
}

.guidance-steps-list li {
  margin-bottom: 4px;
}

.guidance-steps-list li:last-child {
  margin-bottom: 0;
}

.guidance-banner-dismiss {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 4px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.guidance-banner-dismiss:hover {
  background: var(--background);
  color: var(--text-primary);
}

@media (max-width: 768px) {
  .guidance-banner {
    padding: 14px;
    gap: 10px;
  }

  .guidance-banner-title {
    font-size: 14px;
  }
}

.guidance-toggle {
  display: none;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 6px 12px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  margin: 0;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.guidance-toggle.visible {
  display: inline-flex;
}

.guidance-toggle:hover {
  background: var(--background);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.guidance-toggle svg {
  flex-shrink: 0;
}