/* ==================== CSS VARIABLES ==================== */
:root {
  /* Colors - Palette Verde Salvia */
  --bg-primary: linear-gradient(135deg, #e8f1ed 0%, #d7e5df 100%);
  --bg-solid: #f2f7f4;
  --bg-secondary: #dfe9e4;
  --brand: #1f6f63;
  --brand-light: #2c8b7a;
  --brand-dark: #165248;
  --accent: #1f6f63;
  --accent-rgb: 31, 111, 99;
  --text-primary: #1f2d2a;
  --text-muted: #5a6b66;
  --card-bg: #ffffff;
  --card-shadow: rgba(12, 37, 31, 0.08);
  --ring: rgba(31, 111, 99, 0.25);
  --border: rgba(31, 111, 99, 0.12);
  --border-hover: rgba(31, 111, 99, 0.35);
  
  /* Spacing */
  --spacing-xs: 6px;
  --spacing-sm: 8px;
  --spacing-md: 12px;
  --spacing-lg: 16px;
  --spacing-xl: 24px;
  
  /* Border Radius */
  --radius-sm: 7px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 18px;
  --radius-full: 999px;
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 350ms ease;
}

/* ==================== RESET & BASE ==================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-primary);
  line-height: 1.7;
  background: var(--bg-primary);
  background-attachment: fixed;
  min-height: 100vh;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
}

/* ==================== NAVIGATION ==================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  gap: var(--spacing-xl);
  align-items: center;
  padding: var(--spacing-md) var(--spacing-lg);
  background: var(--brand);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  cursor: pointer;
}

.logotype {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: 'Montserrat', sans-serif;
  background: transparent;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
}

.logotype-main {
  display: inline-flex;
  align-items: center;
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: none;
  color: #ffffff;
}

.logotype-sub {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  color: rgba(255, 255, 255, 0.9);
}



.nav-brand:focus-visible {
  outline: 3px solid rgba(31, 111, 99, 0.4);
  outline-offset: 4px;
}

.spacer {
  flex: 1;
}

.nav-toggle {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: #ffffff;
  border-radius: var(--radius-full);
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: var(--spacing-lg);
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  padding: var(--spacing-lg);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  min-width: 240px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  transition: all var(--transition-normal);
  z-index: 110;
}

.nav-menu.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-menu-link {
  appearance: none;
  border: none;
  border-radius: var(--radius-md);
  padding: var(--spacing-sm) var(--spacing-md);
  font-weight: 600;
  font-size: 0.9rem;
  text-align: left;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

/* Nav menu link quando la navbar è verde salvia */
.nav .nav-menu-link {
  color: var(--text-primary);
}

.nav-menu-link:hover,
.nav-menu-link:focus-visible {
  background: rgba(var(--accent-rgb), 0.1);
  transform: translateX(3px);
}

body.nav-menu-open::after {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  z-index: 90;
}

body.nav-menu-open {
  overflow: hidden;
}

/* ==================== LAYOUT ==================== */
.page {
  padding: var(--spacing-xl) 0 var(--spacing-xxl);
  display: none;
  position: relative;
  min-height: 100vh;
}

#page-wizard {
  background:
    radial-gradient(circle at 20% 20%, rgba(160, 192, 236, 0.18), transparent 55%),
    radial-gradient(circle at 80% 10%, rgba(133, 187, 255, 0.15), transparent 50%),
    linear-gradient(180deg, #f0f7ff 0%, #e6f2ff 60%, #f5f9ff 100%);
}

.page[hidden] {
  display: none !important;
}

.page.active {
  display: block;
  animation: fadeInPage 0.4s ease-out;
  min-height: calc(100vh - 200px);
  padding-bottom: var(--spacing-xl);
}

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

/* Background patterns for each page */
#page-wizard,
#page-pro,
#page-professional,
#page-admin,
#privacy-policy {
  background: #eaf4fb;
}

#page-wizard .container {
  position: relative;
  z-index: 1;
}

#page-pro {
  background:
    linear-gradient(135deg, rgba(248, 249, 250, 0.95), rgba(233, 236, 239, 0.9)),
    radial-gradient(circle at 30% 50%, rgba(var(--accent-rgb), 0.06) 0%, transparent 60%),
    radial-gradient(circle at 70% 80%, rgba(var(--accent-rgb), 0.05) 0%, transparent 60%);
  background-attachment: fixed;
}

#page-pro::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    repeating-linear-gradient(
      135deg,
      transparent,
      transparent 40px,
      rgba(var(--accent-rgb), 0.012) 40px,
      rgba(var(--accent-rgb), 0.012) 80px
    );
  pointer-events: none;
  z-index: 0;
}

#page-pro .container {
  position: relative;
  z-index: 1;
}

#page-professional {
  background:
    linear-gradient(135deg, rgba(248, 249, 250, 0.95), rgba(233, 236, 239, 0.9)),
    radial-gradient(circle at 40% 60%, rgba(var(--accent-rgb), 0.05) 0%, transparent 50%);
  background-attachment: fixed;
}

#page-professional .container {
  position: relative;
  z-index: 1;
}

#page-admin {
  background:
    linear-gradient(135deg, rgba(248, 249, 250, 0.95), rgba(233, 236, 239, 0.9)),
    radial-gradient(circle at 60% 40%, rgba(var(--accent-rgb), 0.05) 0%, transparent 50%);
  background-attachment: fixed;
}

#page-admin .container {
  position: relative;
  z-index: 1;
}

#privacy-policy {
  background:
    linear-gradient(135deg, rgba(248, 249, 250, 0.95), rgba(233, 236, 239, 0.9)),
    radial-gradient(circle at 50% 50%, rgba(var(--accent-rgb), 0.04) 0%, transparent 60%);
  background-attachment: fixed;
}

#privacy-policy .container {
  position: relative;
  z-index: 1;
  max-width: 900px;
}

.privacy-content {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(248, 249, 250, 0.9));
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  margin-top: var(--spacing-xl);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.privacy-content section {
  margin-bottom: var(--spacing-xl);
}

.privacy-content section:last-child {
  margin-bottom: 0;
}

.privacy-content h2 {
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
  border-bottom: 2px solid var(--accent);
}

.privacy-content p {
  line-height: 1.8;
  margin-bottom: var(--spacing-md);
  color: var(--text-primary);
}

.privacy-content ul {
  margin: var(--spacing-md) 0;
  padding-left: var(--spacing-xl);
}

.privacy-content li {
  margin-bottom: var(--spacing-sm);
  line-height: 1.7;
}

.privacy-content strong {
  color: var(--accent);
  font-weight: 600;
}

.last-updated {
  text-align: right;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: var(--spacing-xl);
  padding-bottom: var(--spacing-lg);
  border-bottom: 1px solid var(--border);
}

.back-btn {
  appearance: none;
  border: 2px solid var(--accent);
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: var(--spacing-sm) var(--spacing-lg);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.back-btn:hover {
  background: var(--accent);
  color: white;
  transform: translateX(-2px);
}

/* Footer Styles */
.site-footer {
  background: linear-gradient(135deg, rgba(248, 249, 250, 0.95), rgba(233, 236, 239, 0.9));
  border-top: 1px solid var(--border);
  padding: var(--spacing-xl) 0;
  margin-top: var(--spacing-xl);
  position: relative;
  z-index: 1;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-lg);
}

.footer-section h3,
.footer-section h4 {
  color: var(--text-primary);
  font-weight: 700;
  margin-bottom: var(--spacing-md);
  font-size: 1.125rem;
}

.footer-section p {
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section li {
  margin-bottom: var(--spacing-sm);
}

.footer-section a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
  display: inline-block;
}

.footer-section a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.professionals-link-footer {
  display: inline-block;
  margin-top: var(--spacing-md);
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: all var(--transition-fast);
  padding: var(--spacing-xs) 0;
}

.professionals-link-footer:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

.professionals-table-wrapper {
  margin-top: var(--spacing-lg);
  overflow-x: auto;
}

.professionals-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card-bg);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.professionals-table thead {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white;
}

.professionals-table th {
  padding: var(--spacing-md);
  text-align: left;
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.professionals-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background-color var(--transition-fast);
}

.professionals-table tbody tr:hover {
  background-color: rgba(var(--accent-rgb), 0.05);
}

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

.professionals-table td {
  padding: var(--spacing-md);
  color: var(--text-primary);
  font-size: 0.95rem;
}

.professionals-table td:last-child {
  word-break: break-word;
}

.footer-bottom {
  text-align: center;
  padding-top: var(--spacing-lg);
  border-top: 1px solid var(--border);
  margin-top: var(--spacing-xl);
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin: 0;
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
  
  .professionals-table-wrapper {
    overflow-x: scroll;
    -webkit-overflow-scrolling: touch;
  }
  
  .professionals-table {
    min-width: 600px;
  }
  
  .professionals-table th,
  .professionals-table td {
    padding: var(--spacing-sm);
    font-size: 0.875rem;
  }
  
  .privacy-content {
    padding: var(--spacing-lg);
  }
}

.container {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: var(--spacing-xl) 5%;
  position: relative;
}

#page-wizard > .container {
  background: transparent;
  box-shadow: none;
  border: none;
  padding: var(--spacing-xl) 5%;
}

.page-content .card,
.page-content > section {
  max-width: 1180px;
  margin: 0 auto;
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  padding: var(--spacing-xl);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  opacity: 0.6;
}

/* ==================== TYPOGRAPHY ==================== */
h1 {
  margin: 0 0 var(--spacing-xs);
  font-size: clamp(1.5rem, 4vw, 2rem);
  line-height: 1.3;
}

h2.question {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  margin: 0 0 var(--spacing-md);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

h3 {
  margin: 0;
  font-size: 1.125rem;
}

.lead {
  color: var(--text-muted);
  margin: 0 0 var(--spacing-lg);
}

.subtle {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin: 0 0 var(--spacing-lg);
  line-height: 1.7;
}

/* Tag dei debiti nella sezione subtle dello Step 2 */
#step2 .subtle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--spacing-sm);
}

#step2 .subtle #chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  align-items: center;
}

/* ==================== PROCESS CTA ==================== */
.process-cta-inline {
  margin-top: 2cm;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-sm);
}

.start-flow-btn {
  font-size: 1.1rem;
  padding: 14px 32px;
  border-radius: var(--radius-full);
  background: linear-gradient(120deg, var(--brand), var(--brand-light));
  border: none;
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.start-flow-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(22, 82, 72, 0.35);
}

.cta-hint {
  margin: var(--spacing-sm) 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ==================== HERO FULL WIDTH ==================== */
.wizard-hero {
  width: 100%;
  background: linear-gradient(135deg, #1bb79a, #1788b1);
  color: #fff;
  padding: clamp(32px, 6vw, 78px) 0 clamp(40px, 6vw, 90px);
}

.hero-inner {
  width: min(1200px, 92%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(24px, 5vw, 70px);
  align-items: stretch;
}

.hero-left h1 {
  color: #fff;
  font-size: clamp(2.2rem, 4vw, 3rem);
  margin-top: 0;
}

.hero-left .lead {
  color: rgba(255,255,255,0.9);
  max-width: 620px;
}

.hero-chip-row {
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
  margin-bottom: var(--spacing-md);
}

.hero-chip-row .chip {
  background: rgba(255,255,255,0.16);
  border: none;
  color: #fff;
  font-weight: 600;
}

.hero-chip-row .chip.active {
  background: rgba(0,0,0,0.15);
}

.hero-search-block {
  margin: var(--spacing-lg) 0;
  background: rgba(255,255,255,0.12);
  border-radius: 24px;
  padding: clamp(20px, 4vw, 34px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.2);
}

.hero-toggle {
  display: inline-flex;
  padding: 4px;
  background: rgba(255,255,255,0.16);
  border-radius: var(--radius-full);
  margin-bottom: var(--spacing-lg);
}

.toggle-btn {
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.8);
  font-weight: 600;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.toggle-btn.active {
  background: #fff;
  color: var(--text-primary);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.hero-search-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: var(--spacing-md);
  align-items: end;
}

.hero-search-fields .field label {
  color: rgba(255,255,255,0.85);
}

.hero-search-fields input {
  border-radius: 18px;
  border: none;
  padding: 12px 16px;
  font-size: 1rem;
}

.hero-search-btn {
  width: 100%;
  border-radius: 18px;
}

.hero-process {
  background: rgba(255,255,255,0.08);
  box-shadow: none;
  border: 1px solid rgba(255,255,255,0.18);
}

.hero-process .process-step {
  background: rgba(255,255,255,0.14);
  color: #fff;
  box-shadow: none;
}

.hero-right {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-figure {
  width: 100%;
  max-width: 380px;
}

.hero-card {
  background: rgba(255,255,255,0.15);
  border-radius: 20px;
  padding: clamp(16px, 3vw, 28px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
  margin-bottom: var(--spacing-lg);
  color: #fff;
}

.hero-card strong {
  font-size: clamp(1.8rem, 4vw, 3rem);
  display: block;
}

.hero-card.inline {
  display: flex;
  justify-content: space-between;
  gap: var(--spacing-md);
}

.hero-avatars {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
}

.hero-avatars .avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  color: var(--accent);
  font-weight: 700;
  display: grid;
  place-items: center;
}

.hero-illustration {
  height: 190px;
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(255,255,255,0.3), rgba(255,255,255,0.05));
  box-shadow: inset 0 0 35px rgba(0,0,0,0.18);
}

@media (max-width: 900px) {
  .hero-search-fields {
    grid-template-columns: 1fr;
  }
  
  .hero-card.inline {
    flex-direction: column;
  }
}

/* ==================== COOKIE BANNER ==================== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--spacing-lg);
  background: rgba(15, 23, 42, 0.85);
  color: #fff;
  z-index: 200;
  backdrop-filter: blur(6px);
  animation: slideUp 0.4s ease-out;
}

.cookie-banner__content {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-md);
  align-items: center;
  justify-content: space-between;
}

.cookie-banner__content h3 {
  margin: 0 0 var(--spacing-xs);
  color: #fff;
}

.cookie-banner__content p {
  margin: 0 0 var(--spacing-xs);
  color: rgba(255, 255, 255, 0.85);
}

.cookie-banner__content a {
  color: #a0d2ff;
  text-decoration: underline;
}

.cookie-banner__actions {
  display: flex;
  gap: var(--spacing-sm);
}

.cookie-banner .btn {
  white-space: nowrap;
}

.cookie-banner .btn.ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #fff;
}

@media (max-width: 640px) {
  .cookie-banner__actions {
    width: 100%;
    justify-content: flex-end;
  }
  
  .cookie-banner {
    padding-bottom: calc(var(--spacing-xl) + env(safe-area-inset-bottom));
  }
}

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

/* ==================== CARD ==================== */
.card {
  animation: fadeInSlide 0.4s ease-out;
}

.process-card {
  margin-top: var(--spacing-xl);
  padding: clamp(18px, 3vw, 32px);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(12, 37, 31, 0.08);
  border: 1px solid rgba(31, 111, 99, 0.12);
}

.process-title {
  margin: 0;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  color: var(--text-primary);
}

.process-subtitle {
  margin: var(--spacing-sm) 0 var(--spacing-lg);
  color: var(--text-muted);
  font-size: 1rem;
}

.process-grid {
  display: grid;
  gap: var(--spacing-md);
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.process-step {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(16px, 2vw, 22px);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
  position: relative;
  min-height: 180px;
}

.process-number {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin-bottom: var(--spacing-md);
  font-size: 0.95rem;
}

.process-step h3 {
  margin: 0 0 var(--spacing-sm);
  font-size: 1rem;
}

.process-step p {
  margin: 0;
  color: var(--text-muted);
}

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

.card[hidden] {
  display: none;
}

.card.slide-out {
  animation: fadeOutSlide 0.3s ease-in forwards;
}

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

.card {
  margin-top: var(--spacing-xl);
  background: transparent;
  padding: var(--spacing-xl) 0;
}

/* Evidenziazione delle card del wizard */
#step1.card,
#step2.card,
#step3.card {
  background: #ffffff;
  border-radius: var(--radius-xl);
  padding: clamp(28px, 4vw, 44px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(31, 111, 99, 0.12);
  margin-top: var(--spacing-xl);
  position: relative;
  z-index: 1;
}

/* Sezioni separate nella review */
#step3 .review > ul:first-child {
  background: rgba(248, 249, 250, 0.6);
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
  border: 1px solid rgba(0, 0, 0, 0.06);
  margin-bottom: var(--spacing-lg);
}

#step3 .review h3 {
  color: var(--text-primary);
  font-size: 1.125rem;
  font-weight: 700;
  margin-top: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
  border-bottom: 2px solid var(--accent);
}

/* ==================== OPTIONS (Step 1) ==================== */
.options {
  display: grid;
  gap: clamp(16px, 2vw, 24px);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: stretch;
}

@media (min-width: 1100px) {
  .options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.opt-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-xl);
  padding: var(--spacing-sm);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
  border: 1px solid rgba(var(--accent-rgb), 0.08);
}

.debt-details {
  padding: var(--spacing-lg);
  margin-top: var(--spacing-md);
  background: rgba(var(--accent-rgb), 0.03);
  border-radius: var(--radius-lg);
  border: 2px solid rgba(var(--accent-rgb), 0.15);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.debt-items {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.debt-item {
  padding: var(--spacing-xs) 0;
}

.debt-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--spacing-sm);
}

.subcategory-select {
  flex: 1 1 220px;
  padding: var(--spacing-sm) var(--spacing-md);
  padding-right: calc(var(--spacing-xl) * 1.2);
  border-radius: var(--radius-md);
  border: 2px solid #e2e8f0;
  background: white;
  color: var(--text-primary);
  font-size: 0.9375rem;
  transition: all var(--transition-fast);
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, rgba(var(--accent-rgb), 0.5) 50%), linear-gradient(135deg, rgba(var(--accent-rgb), 0.5) 50%, transparent 50%);
  background-position: calc(100% - 20px) calc(50% - 2px), calc(100% - 14px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.subcategory-select:focus {
  border-color: rgba(var(--accent-rgb), 0.6);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.15);
  outline: none;
}

.subcategory-select:invalid {
  color: rgba(44, 62, 80, 0.5);
}

.creditor-input,
.amount-input-field {
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-md);
  border: 2px solid #e2e8f0;
  background: white;
  color: var(--text-primary);
  font-size: 0.9375rem;
  transition: all var(--transition-fast);
}

.creditor-input {
  flex: 1 1 220px;
}

.amount-input-field {
  flex: 0 0 140px;
}

.creditor-input:focus,
.amount-input-field:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--ring);
  border-color: var(--accent);
}

.amount-input-field {
  text-align: right;
  font-weight: 600;
}

.btn-add-creditor {
  appearance: none;
  border: 1px dashed var(--accent);
  background: transparent;
  color: var(--accent);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  width: fit-content;
  margin-top: var(--spacing-xs);
  align-self: flex-start;
}

.btn-add-creditor:hover {
  background: rgba(var(--accent-rgb), 0.1);
  border-style: solid;
}

.btn-remove-creditor {
  appearance: none;
  border: none;
  background: transparent;
  color: #e53e3e;
  font-size: 1.25rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0 var(--spacing-xs);
  line-height: 1;
  transition: all var(--transition-fast);
  opacity: 0.7;
  flex: 0 0 auto;
}

.btn-remove-creditor:hover {
  opacity: 1;
  transform: scale(1.1);
}

.opt .label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  flex: 1;
}

.opt .label small {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.4;
  min-height: 2.2rem;
}

@media (max-width: 699px) {
  .debt-row {
    flex-direction: column;
    align-items: stretch;
    gap: var(--spacing-xs);
  }
  
  .subcategory-select,
  .creditor-input,
  .amount-input-field {
    flex: 1 1 100%;
  }
  
  .btn-remove-creditor {
    align-self: flex-end;
    margin-top: var(--spacing-xs);
  }
}

.opt {
  appearance: none;
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #ffffff, #f8f9fa);
  border: 2px solid rgba(0, 0, 0, 0.06);
  cursor: pointer;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  align-items: flex-start;
  color: var(--text-primary);
  font-size: 1rem;
  text-align: left;
  transition: all var(--transition-normal);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  position: relative;
}

.opt:hover {
  background: linear-gradient(135deg, #f5fbf8, #eef6f2);
  border-color: rgba(var(--accent-rgb), 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(22, 82, 72, 0.15);
}

.opt:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.opt .check {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #cbd5e0;
  display: grid;
  place-items: center;
  font-size: 14px;
  color: transparent;
  transition: all var(--transition-fast);
  background: white;
}

.opt.selected {
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.07), rgba(var(--accent-rgb), 0.12));
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(22, 82, 72, 0.2);
}

.opt-step-badge {
  position: absolute;
  top: var(--spacing-sm);
  right: var(--spacing-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.97);
  color: var(--text-primary);
  font-size: 1.15rem;
  font-weight: 700;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.2);
}

.opt.selected .check {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.label {
  font-weight: 700;
  line-height: 1.25;
}

/* ==================== FORM ==================== */
form {
  display: grid;
  gap: var(--spacing-lg);
  margin-top: var(--spacing-sm);
}

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

@media (min-width: 700px) {
  .row {
    grid-template-columns: 1fr 1fr;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

label {
  font-weight: 700;
  font-size: 0.875rem;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

input {
  width: 100%;
  padding: var(--spacing-md);
  padding-right: 40px;
  border-radius: var(--radius-md);
  border: 2px solid #e2e8f0;
  background: white;
  color: var(--text-primary);
  font-size: 1rem;
  transition: all var(--transition-fast);
}

input::placeholder {
  color: #a0aec0;
}

input:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--ring);
  border-color: var(--accent);
}

input.valid {
  border-color: #48bb78;
  background-color: #f0fff4;
}

input.invalid {
  border-color: #f56565;
  background-color: #fff5f5;
}

input.invalid:focus {
  box-shadow: 0 0 0 3px rgba(245, 101, 101, 0.2);
}

select {
  width: 100%;
  padding: var(--spacing-md);
  padding-right: 40px;
  border-radius: var(--radius-md);
  border: 2px solid #e2e8f0;
  background: #fff;
  font-size: 1rem;
  color: var(--text-primary);
  font-family: inherit;
  appearance: none;
}

select:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--ring);
  border-color: var(--accent);
}

.field-icon {
  position: absolute;
  right: var(--spacing-md);
  font-size: 1.125rem;
  opacity: 0;
  transform: scale(0.8);
  transition: all var(--transition-fast);
  pointer-events: none;
}

.field-icon.valid {
  opacity: 1;
  transform: scale(1);
  color: #48bb78;
}

.field-icon.invalid {
  opacity: 1;
  transform: scale(1);
  color: #f56565;
}

.field-icon.valid::before {
  content: '✓';
}

.field-icon.invalid::before {
  content: '✗';
}

.error-text {
  color: #f56565;
  font-size: 0.8125rem;
  display: none;
  margin-top: 4px;
  line-height: 1.4;
}

.error-text.show {
  display: block;
  animation: slideDown 0.3s ease;
}

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

.two-columns,
.three-columns {
  display: grid;
  gap: var(--spacing-md);
}

@media (min-width: 700px) {
  .two-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .three-columns {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.btn.full {
  width: 100%;
}

/* ==================== PILLS & TAGS ==================== */
.pill {
  display: inline-block;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  border: 1px solid rgba(var(--accent-rgb), 0.4);
  font-size: 0.875rem;
  font-weight: 600;
  color: #ffffff;
  margin-right: var(--spacing-sm);
  margin-bottom: var(--spacing-sm);
  box-shadow: 0 2px 6px rgba(22, 82, 72, 0.25);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(22, 82, 72, 0.35);
}

.tag {
  display: inline-block;
  font-size: 0.75rem;
  padding: 4px var(--spacing-sm);
  border-radius: var(--radius-full);
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--brand-dark);
  margin-right: var(--spacing-xs);
  margin-bottom: 4px;
  font-weight: 600;
}

/* ==================== BUTTONS ==================== */
.actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--spacing-md);
  margin-top: var(--spacing-lg);
  flex-wrap: wrap;
}

.btn {
  appearance: none;
  border: none;
  border-radius: var(--radius-lg);
  padding: var(--spacing-md) var(--spacing-xl);
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--brand-light));
  color: white;
  font-size: 1rem;
  transition: all var(--transition-fast);
  box-shadow: 0 6px 16px rgba(22, 82, 72, 0.3);
  letter-spacing: 0.02em;
}

.btn:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--brand-light), var(--brand));
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(22, 82, 72, 0.4);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #cbd5e0;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.ghost {
  background: #f8f9fa;
  color: var(--text-primary);
  border: 2px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.ghost:hover:not(:disabled) {
  background: #e9ecef;
  border-color: rgba(var(--accent-rgb), 0.3);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

/* ==================== REVIEW ==================== */
.review {
  font-size: 0.875rem;
  color: var(--text-muted);
  background: rgba(248, 249, 250, 0.8);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  border: 1px solid rgba(0, 0, 0, 0.06);
  margin-top: var(--spacing-lg);
}

.review ul {
  padding-left: 20px;
  margin: 0;
}

.review li {
  margin-bottom: var(--spacing-sm);
  line-height: 1.6;
}

.review b {
  color: var(--text-primary);
  font-weight: 700;
}

/* Tag dei debiti nella review */
.review .pill {
  display: inline-block;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  border: 1px solid rgba(var(--accent-rgb), 0.4);
  font-size: 0.875rem;
  font-weight: 600;
  color: #ffffff;
  margin-right: var(--spacing-sm);
  margin-bottom: var(--spacing-sm);
  box-shadow: 0 2px 6px rgba(22, 82, 72, 0.25);
}

.success {
  margin-top: var(--spacing-lg);
  padding: var(--spacing-md);
  border-radius: var(--radius-lg);
  border: 1px solid var(--accent);
  background: rgba(255, 255, 255, 0.07);
  display: none;
  font-weight: 600;
}

.sending {
  margin-top: var(--spacing-lg);
  padding: var(--spacing-lg) var(--spacing-xl);
  border-radius: var(--radius-xl);
  border: 2px solid var(--accent);
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.1) 0%, rgba(var(--accent-rgb), 0.2) 100%);
  display: none;
  font-weight: 600;
  color: var(--accent);
  box-shadow: 0 4px 12px rgba(22, 82, 72, 0.2);
  animation: pulse 2s ease-in-out infinite;
  text-align: center;
  font-size: 1rem;
  letter-spacing: 0.3px;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.01);
  }
}

.email-error {
  margin-top: var(--spacing-lg);
  padding: var(--spacing-md);
  border-radius: var(--radius-lg);
  border: 1px solid #ef4444;
  background: rgba(239, 68, 68, 0.1);
  display: none;
  font-weight: 600;
  color: #fecdd3;
}

.privacy-body {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  color: var(--text-muted);
}

.privacy-note {
  font-size: 0.85rem;
  color: #a855f7;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
}

.privacy-option {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: border var(--transition-fast), background var(--transition-fast);
}

.privacy-option input {
  width: 22px;
  height: 22px;
  cursor: pointer;
}

.privacy-option:hover {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.08);
}

/* ==================== JOIN PROFESSIONAL SECTION ==================== */
.join-pro-section {
  padding: var(--spacing-xl) var(--spacing-lg);
  background: linear-gradient(135deg, rgba(90, 144, 202, 0.07), rgba(72, 187, 120, 0.07));
}

.join-pro-card {
  background: #fff;
  border-radius: 32px;
  box-shadow: 0 25px 70px rgba(15, 23, 42, 0.12);
}

.join-pro-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(20px, 4vw, 48px);
  padding: clamp(20px, 4vw, 48px);
}

.join-pro-text {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.join-pro-text h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1.2;
}

.join-pro-text .eyebrow {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--accent);
  margin: 0;
}

.join-pro-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.join-pro-list li {
  position: relative;
  padding-left: 20px;
  font-weight: 600;
  color: var(--text-primary);
}

.join-pro-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 1.5rem;
  line-height: 1;
}

.join-pro-details {
  background: rgba(248, 249, 250, 0.9);
  border-radius: 24px;
  padding: var(--spacing-lg);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.join-pro-details summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: var(--spacing-md);
  outline: none;
}

.join-pro-details summary::-webkit-details-marker {
  display: none;
}

.join-pro-form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.join-pro-form textarea {
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  font-family: inherit;
  min-height: 120px;
}

.join-pro-form textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--ring);
  border-color: var(--accent);
}

.join-pro-form input[type="file"] {
  border: 1px dashed var(--border);
  padding: var(--spacing-sm);
  border-radius: var(--radius-md);
  background: #fff;
}

/* ==================== REVIEW PAGE ==================== */
.review-card {
  background: #fff;
  border-radius: 24px;
  padding: clamp(20px, 4vw, 40px);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.review-details {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
  background: rgba(248, 249, 250, 0.7);
  line-height: 1.6;
}

.review-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
}

.review-options {
  display: flex;
  gap: var(--spacing-lg);
  flex-wrap: wrap;
}

.review-options label {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-weight: 600;
  cursor: pointer;
}

.review-status {
  display: none;
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  font-weight: 600;
}

.review-status.success {
  display: block;
  background: rgba(56, 178, 172, 0.15);
  color: #0f766e;
}

.review-status.error {
  display: block;
  background: rgba(245, 101, 101, 0.1);
  color: #c53030;
}

.review-status.loading {
  display: block;
  background: rgba(66, 153, 225, 0.12);
  color: #2b6cb0;
}

.review-actions {
  display: flex;
  justify-content: flex-end;
}

.review-list {
  margin-top: var(--spacing-xl);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.review-list-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  background: #fff;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-pill.in_review {
  background: rgba(251, 191, 36, 0.15);
  color: #b7791f;
}

.status-pill.approved {
  background: rgba(16, 185, 129, 0.15);
  color: #047857;
}

.status-pill.needs_info,
.status-pill.rejected {
  background: rgba(248, 113, 113, 0.15);
  color: #b91c1c;
}

.form-status {
  display: none;
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
}

.form-status.success {
  display: block;
  background: rgba(56, 178, 172, 0.15);
  color: #0f766e;
  border: 1px solid rgba(56, 178, 172, 0.4);
}

.form-status.error {
  display: block;
  background: rgba(245, 101, 101, 0.12);
  color: #c53030;
  border: 1px solid rgba(245, 101, 101, 0.4);
}

.form-status.loading {
  display: block;
  background: rgba(66, 153, 225, 0.12);
  color: #2b6cb0;
  border: 1px solid rgba(66, 153, 225, 0.4);
}

/* ==================== PROFESSIONALS SECTION ==================== */
.toolbar {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  margin: var(--spacing-md) 0 var(--spacing-lg);
}

.toolbar-top {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

.toolbar-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.search {
  flex: 1;
  min-width: 240px;
}

.search input {
  width: 100%;
}

.sorter {
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sorter label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}

.sorter select {
  padding: var(--spacing-sm);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  font-weight: 600;
}

.sort-hint {
  margin-top: -var(--spacing-sm);
  margin-bottom: var(--spacing-lg);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.chip {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-full);
  cursor: pointer;
  font-size: 0.8125rem;
  color: var(--text-primary);
  font-weight: 600;
  transition: all var(--transition-fast);
}

.chip:hover {
  background: rgba(255, 255, 255, 0.1);
}

.chip.active {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.12);
  color: var(--accent);
}

.chip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.grid {
  display: grid;
  gap: var(--spacing-lg);
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.pro-card {
  background: #fff;
  color: #222;
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
  transition: all var(--transition-normal);
}

.pro-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.pro-title {
  font-weight: 800;
  color: #111;
  line-height: 1.3;
}

.pro-sub {
  color: #555;
  font-size: 0.9rem;
}

.pro-price {
  color: #0b5;
  font-weight: 800;
  font-size: 1.125rem;
}

.pro-location {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pro-desc {
  color: #555;
  font-size: 0.9rem;
  flex: 1;
  line-height: 1.5;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.pro-cta {
  margin-top: var(--spacing-xs);
  align-self: flex-start;
  background: #0b5;
  color: #fff;
  border: none;
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-weight: 800;
  font-size: 0.9375rem;
  transition: all var(--transition-fast);
}

.pro-cta:hover {
  background: #0a0;
  transform: translateY(-1px);
}

.pro-cta:focus-visible {
  outline: 2px solid #0b5;
  outline-offset: 2px;
}

/* ==================== AVAILABILITY PREVIEW ==================== */
.availability-preview {
  margin: var(--spacing-md) 0;
  padding: var(--spacing-md);
  background: #f7fafc;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
}

.avail-header {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--spacing-xs);
  font-size: 0.875rem;
}

.avail-day {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-xs) 0;
  border-bottom: 1px solid #e2e8f0;
}

.avail-day:last-child {
  border-bottom: none;
}

.avail-date {
  font-weight: 600;
  color: var(--text-primary);
}

.avail-times {
  color: var(--accent);
  font-weight: 600;
}

/* ==================== PROFESSIONAL MODAL ==================== */
.pro-modal {
  width: min(900px, 95%);
  max-height: 90vh;
  background: white;
  border-radius: var(--radius-xl);
  padding: var(--spacing-xl);
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.appointment-modal {
  width: min(500px, 96%);
  background: var(--card-bg);
  color: var(--text-primary);
  border-radius: var(--radius-xl);
  padding: var(--spacing-xl);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  position: relative;
  animation: slideUp 0.3s ease;
}

.appointment-modal label[style*="border"]:has(input[type="radio"]:checked) {
  border-color: var(--accent) !important;
  background-color: rgba(var(--accent-rgb), 0.08) !important;
}

.appointment-modal label[style*="border"]:hover {
  border-color: var(--border-hover);
  transition: all var(--transition-normal);
}

.modal-close {
  position: absolute;
  top: var(--spacing-lg);
  right: var(--spacing-lg);
  background: transparent;
  border: none;
  font-size: 2rem;
  color: var(--text-muted);
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: #f7fafc;
  color: var(--text-primary);
}

.pro-modal-content {
  padding-top: var(--spacing-lg);
}

.pro-modal-header {
  text-align: center;
  margin-bottom: var(--spacing-xl);
  padding-bottom: var(--spacing-lg);
  border-bottom: 2px solid #e2e8f0;
}

.pro-modal-header h2 {
  margin: 0 0 var(--spacing-sm);
  color: var(--text-primary);
  font-size: 1.75rem;
}

.pro-modal-specialty {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: var(--spacing-xs);
}

.pro-modal-price {
  color: var(--accent);
  font-size: 1.25rem;
  font-weight: 800;
}

.pro-modal-location {
  margin-top: var(--spacing-sm);
  color: var(--text-muted);
  font-weight: 600;
}

.pro-modal-section {
  margin-bottom: var(--spacing-xl);
}

.pro-modal-section h3 {
  color: var(--text-primary);
  font-size: 1.125rem;
  margin: 0 0 var(--spacing-md);
  font-weight: 700;
}

.pro-modal-section p {
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0;
}

.strengths-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.strengths-list li {
  padding: var(--spacing-xs) 0;
  color: var(--text-primary);
  font-size: 0.9375rem;
}

/* ==================== CALENDAR ==================== */
.calendar-container {
  display: grid;
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
}

.calendar-day {
  padding: var(--spacing-md);
  background: #f7fafc;
  border-radius: var(--radius-md);
  border: 1px solid #e2e8f0;
}

.cal-date-header {
  margin-bottom: var(--spacing-sm);
  color: var(--text-primary);
  font-size: 0.9375rem;
}

.cal-times {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.time-slot {
  padding: var(--spacing-sm) var(--spacing-md);
  background: white;
  border: 2px solid var(--accent);
  border-radius: var(--radius-md);
  color: var(--accent);
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 0.875rem;
}

.time-slot:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(22, 82, 72, 0.3);
}

.time-slot:active {
  transform: translateY(0);
}

/* ==================== MODAL BACKDROP (Professional) ==================== */
.modal-backdrop.show {
  display: flex;
  animation: fadeIn 0.2s ease;
}

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

.pro-modal {
  animation: slideUp 0.3s ease;
}

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

@media (max-width: 768px) {
  .pro-modal {
    width: 95%;
    padding: var(--spacing-lg);
    max-height: 95vh;
  }
  
  .calendar-container {
    gap: var(--spacing-sm);
  }
  
  .cal-times {
    gap: var(--spacing-xs);
  }
  
  .time-slot {
    font-size: 0.8125rem;
    padding: var(--spacing-xs) var(--spacing-sm);
  }
}

/* ==================== MODAL ==================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-backdrop.show {
  display: flex;
}

.modal {
  width: min(720px, 96%);
  background: #fff;
  color: #111;
  border-radius: var(--spacing-lg);
  padding: var(--spacing-xl);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  max-height: 90vh;
  overflow: auto;
}

.modal h3 {
  margin: var(--spacing-xs) 0 var(--spacing-md);
  color: #0b5;
}

.modal .body {
  max-height: 48vh;
  overflow: auto;
  color: #333;
  font-size: 0.875rem;
  line-height: 1.6;
}

.modal .actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--spacing-md);
  margin-top: var(--spacing-lg);
}

.consent-label {
  margin-right: auto;
  display: flex;
  gap: var(--spacing-sm);
  align-items: center;
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
}

.consent-label input[type="checkbox"] {
  width: auto;
  cursor: pointer;
}

.m-btn {
  padding: var(--spacing-md) var(--spacing-lg);
  border: none;
  border-radius: var(--radius-md);
  font-weight: 800;
  cursor: pointer;
  font-size: 0.9375rem;
  transition: all var(--transition-fast);
}

.m-btn:focus-visible {
  outline: 2px solid #0b5;
  outline-offset: 2px;
}

.m-ghost {
  background: #eee;
  color: #333;
}

.m-ghost:hover {
  background: #ddd;
}

.m-primary {
  background: #0b5;
  color: #fff;
}

.m-primary:hover:not(:disabled) {
  background: #0a0;
}

.m-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ==================== GLOBAL BACK BUTTON ==================== */
.global-back-btn {
  position: fixed;
  bottom: var(--spacing-xl);
  left: var(--spacing-xl);
  z-index: 50;
  padding: var(--spacing-md) var(--spacing-lg);
  background: var(--card-bg);
  border: 2px solid var(--accent);
  border-radius: var(--radius-lg);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9375rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all var(--transition-fast);
  display: none;
  align-items: center;
  gap: var(--spacing-xs);
}

.global-back-btn:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(93, 173, 226, 0.3);
}

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

/* ==================== DASHBOARD STYLES ==================== */
.professional-dashboard,
.admin-dashboard {
  margin-top: var(--spacing-xl);
}

.dashboard-section {
  margin-bottom: var(--spacing-xl);
  padding: var(--spacing-xl);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.5), rgba(248, 249, 250, 0.8));
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.dashboard-section h2 {
  margin: 0 0 var(--spacing-lg);
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 700;
  border-bottom: 2px solid var(--accent);
  padding-bottom: var(--spacing-sm);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-lg);
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.info-item label {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-item input[readonly] {
  background: #f8f9fa;
  cursor: not-allowed;
  opacity: 0.7;
}

.info-item textarea {
  width: 100%;
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  border: 2px solid #e2e8f0;
  background: white;
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-family: inherit;
  resize: vertical;
  transition: all var(--transition-fast);
}

.info-item textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--ring);
  border-color: var(--accent);
}

.dashboard-actions {
  display: flex;
  gap: var(--spacing-md);
  margin-top: var(--spacing-xl);
  padding-top: var(--spacing-xl);
  border-top: 2px solid rgba(0, 0, 0, 0.06);
}

.dashboard-tabs {
  display: flex;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-xl);
  border-bottom: 2px solid rgba(0, 0, 0, 0.06);
}

.tab-btn {
  appearance: none;
  border: none;
  background: transparent;
  padding: var(--spacing-md) var(--spacing-lg);
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  color: var(--text-muted);
  border-bottom: 3px solid transparent;
  transition: all var(--transition-fast);
  margin-bottom: -2px;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: rgba(93, 173, 226, 0.05);
}

.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeInPage 0.3s ease-out;
}

.data-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.data-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(248, 249, 250, 0.9));
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  transition: all var(--transition-fast);
}

.data-card:hover {
  box-shadow: 0 4px 16px rgba(93, 173, 226, 0.15);
  transform: translateY(-2px);
}

.data-card-header {
  padding: var(--spacing-lg);
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.1), rgba(var(--accent-rgb), 0.05));
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.data-card-header h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.125rem;
}

.data-date {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

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

.data-row {
  margin-bottom: var(--spacing-md);
  line-height: 1.6;
}

.data-row:last-child {
  margin-bottom: 0;
}

.data-row strong {
  color: var(--text-primary);
  margin-right: var(--spacing-sm);
}

/* Statistics Styles */
.statistics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-xl);
  margin-top: var(--spacing-lg);
}

.stat-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 249, 250, 0.95));
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  text-align: center;
  transition: all var(--transition-fast);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(93, 173, 226, 0.15);
}

.stat-icon {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-md);
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: var(--spacing-sm);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-card-wide {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 249, 250, 0.95));
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.stat-bar-item {
  margin-bottom: var(--spacing-lg);
}

.stat-bar-item:last-child {
  margin-bottom: 0;
}

.stat-bar-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-xs);
  font-size: 0.9375rem;
  color: var(--text-primary);
}

.stat-bar-count {
  font-weight: 600;
  color: var(--accent);
}

.stat-bar-container {
  width: 100%;
  height: 24px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.stat-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--brand));
  border-radius: var(--radius-full);
  transition: width var(--transition-slow);
  box-shadow: 0 2px 4px rgba(93, 173, 226, 0.3);
}

.stat-bar-fill-secondary {
  background: linear-gradient(90deg, var(--brand-light), var(--accent));
}

@media (max-width: 768px) {
  .statistics-grid {
    grid-template-columns: 1fr;
  }
  
  .stat-card-wide {
    grid-column: 1;
  }
}

/* Documents Upload Styles */
.documents-upload-area {
  margin-top: var(--spacing-lg);
}

.documents-list {
  margin-top: var(--spacing-lg);
}

.document-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-lg);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 249, 250, 0.95));
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 0, 0, 0.08);
  margin-bottom: var(--spacing-md);
  transition: all var(--transition-fast);
}

.document-item:hover {
  box-shadow: 0 2px 8px rgba(93, 173, 226, 0.15);
  transform: translateY(-1px);
}

.document-item:last-child {
  margin-bottom: 0;
}

.document-info {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  flex: 1;
}

.document-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.document-details {
  flex: 1;
  min-width: 0;
}

.document-name {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--spacing-xs);
  word-break: break-word;
}

.document-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.document-actions {
  display: flex;
  gap: var(--spacing-sm);
  flex-shrink: 0;
}

.btn-icon {
  appearance: none;
  border: none;
  background: transparent;
  padding: var(--spacing-sm);
  font-size: 1.125rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
}

.btn-icon:hover {
  background: rgba(93, 173, 226, 0.1);
  transform: scale(1.1);
}

.btn-icon-danger:hover {
  background: rgba(245, 101, 101, 0.1);
}

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

@media (max-width: 768px) {
  .document-item {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-md);
  }
  
  .document-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

.data-row pre {
  background: rgba(0, 0, 0, 0.03);
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  margin: 0;
}

@media (max-width: 899px) {
  .nav {
    flex-wrap: wrap;
    gap: var(--spacing-md);
  }

  .logotype-main {
    font-size: 1.95rem;
    letter-spacing: 0.055em;
  }
  
  .logotype-sub {
    font-size: 0.82rem;
    letter-spacing: 0.24em;
  }
  
  .logotype-tagline {
    font-size: 0.82rem;
  }

}

@media (max-width: 699px) {
  .nav {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .nav-brand {
    width: 100%;
  }
  
  .logotype {
    flex: 1;
    gap: 5px;
  }
  
  .logotype-main {
    font-size: 1.7rem;
    letter-spacing: 0.06em;
  }
  
  .logotype-tagline {
    font-size: 0.8rem;
  }
  
  .logotype-sub {
    letter-spacing: 0.2em;
  }
  
  .nav-actions {
    flex-direction: column;
    gap: var(--spacing-xs);
    width: 100%;
    align-items: stretch;
  }
  
  .nav-btn {
    font-size: 0.8125rem;
    padding: var(--spacing-xs) var(--spacing-sm);
    width: 100%;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }
  
  .dashboard-tabs {
    flex-direction: column;
    gap: 0;
  }
  
  .tab-btn {
    width: 100%;
    text-align: left;
    border-bottom: none;
    border-left: 3px solid transparent;
  }
  
  .tab-btn.active {
    border-left-color: var(--accent);
    border-bottom-color: transparent;
  }
}

/* ==================== RESPONSIVE ADJUSTMENTS ==================== */
@media (max-width: 699px) {
  .container {
    padding: var(--spacing-lg);
  }
  
  .actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  
  .global-back-btn {
    bottom: var(--spacing-md);
    left: var(--spacing-md);
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 0.875rem;
  }
  
  .actions .subtle {
    order: -1;
    text-align: center;
  }
  
  .btn {
    width: 100%;
  }
}

