/* ============================================================
   APOLLODORUS GROUP DESIGN SYSTEM - FRIENDLY & REFINED PALETTE
   Native System Typography (Zero External Network Font Dependencies)
   ============================================================ */
:root {
  color-scheme:     light;
  --surface:        #FFFFFF;
  --marble:         #FAF8F5;
  --marble-dark:    #F2ECE2;
  --stone:          #221F1B;
  --stone-soft:     #686052;
  --stone-dark:     #141210;
  --charcoal:       #1A1815;
  --stone-50:       #FAF8F5;
  --verdigris:      #2F7464;
  --verdigris-dark: #235B4E;
  --gold:           #A37C32;
  --gold-light:     #BC9242;
  --gold-subtle:    #F8F3E8;
  --pompeii:        #A3382B;
  --wine:           #A3382B;
  --line:           #E5DEC9;
  --card-bg:        #FFFFFF;
  --bg-card:        #FFFFFF;
  --card-border:    #E5DEC9;
  --card-shadow:    0 4px 20px -2px rgba(34, 31, 27, 0.05), 0 2px 6px -1px rgba(34, 31, 27, 0.02);
  --card-shadow-lg: 0 12px 32px -4px rgba(34, 31, 27, 0.08), 0 4px 12px -2px rgba(34, 31, 27, 0.03);
  --gold-glow:      0 0 20px rgba(163, 124, 50, 0.18);
  --radius-xs:      6px;
  --radius-sm:      10px;
  --radius-md:      16px;
  --radius-lg:      22px;
  --radius-full:    9999px;
  --font-roman:     system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif:     "Georgia", "Baskerville", "Palatino Linotype", serif;
  --font-sans:      system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Dark mode theme matching Apollodorus Group */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme:     dark;
    --surface:        #1D1B17;
    --marble:         #151412;
    --marble-dark:    #1C1B18;
    --stone:          #F3EFE8;
    --stone-soft:     #ABA191;
    --stone-dark:     #FAF8F5;
    --charcoal:       #FAF8F5;
    --stone-50:       #24211C;
    --verdigris:      #4EAA95;
    --verdigris-dark: #3E8B7A;
    --gold:           #DEB34A;
    --gold-light:     #E8C66D;
    --gold-subtle:    #26221A;
    --pompeii:        #DE5E4D;
    --wine:           #DE5E4D;
    --line:           #2C2822;
    --card-bg:        #1D1B17;
    --bg-card:        #1D1B17;
    --card-border:    #302C24;
    --card-shadow:    0 4px 20px rgba(0, 0, 0, 0.35);
    --card-shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.55);
    --gold-glow:      0 0 24px rgba(222, 179, 74, 0.20);
  }
}

:root[data-theme="dark"] {
  color-scheme:     dark;
  --surface:        #1D1B17;
  --marble:         #151412;
  --marble-dark:    #1C1B18;
  --stone:          #F3EFE8;
  --stone-soft:     #ABA191;
  --stone-dark:     #FAF8F5;
  --charcoal:       #FAF8F5;
  --stone-50:       #24211C;
  --verdigris:      #4EAA95;
  --verdigris-dark: #3E8B7A;
  --gold:           #DEB34A;
  --gold-light:     #E8C66D;
  --gold-subtle:    #26221A;
  --pompeii:        #DE5E4D;
  --wine:           #DE5E4D;
  --line:           #2C2822;
  --card-bg:        #1D1B17;
  --bg-card:        #1D1B17;
  --card-border:    #302C24;
  --card-shadow:    0 4px 20px rgba(0, 0, 0, 0.35);
  --card-shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.55);
  --gold-glow:      0 0 24px rgba(222, 179, 74, 0.20);
}

:root[data-theme="light"] {
  color-scheme:     light;
  --surface:        #FFFFFF;
  --marble:         #FAF8F5;
  --marble-dark:    #F2ECE2;
  --stone:          #221F1B;
  --stone-soft:     #686052;
  --stone-dark:     #141210;
  --charcoal:       #1A1815;
  --stone-50:       #FAF8F5;
  --verdigris:      #2F7464;
  --verdigris-dark: #235B4E;
  --gold:           #A37C32;
  --gold-light:     #BC9242;
  --gold-subtle:    #F8F3E8;
  --pompeii:        #A3382B;
  --wine:           #A3382B;
  --line:           #E5DEC9;
  --card-bg:        #FFFFFF;
  --bg-card:        #FFFFFF;
  --card-border:    #E5DEC9;
  --card-shadow:    0 4px 20px -2px rgba(34, 31, 27, 0.05), 0 2px 6px -1px rgba(34, 31, 27, 0.02);
  --card-shadow-lg: 0 12px 32px -4px rgba(34, 31, 27, 0.08), 0 4px 12px -2px rgba(34, 31, 27, 0.03);
  --gold-glow:      0 0 20px rgba(163, 124, 50, 0.18);
}

input, textarea, select, button {
  color-scheme: inherit;
}

/* ============================================================
   BASE & RESET WITH SMOOTH FLUIDITY
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  transition: background-color 0.22s ease, border-color 0.22s ease, color 0.15s ease, box-shadow 0.22s ease;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--marble);
  color: var(--stone);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Classical Marble Texture Veining */
.marble-bg {
  background-color: var(--marble);
  background-image:
    radial-gradient(ellipse at 20% 30%, rgba(158, 123, 49, 0.035) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 70%, rgba(158, 123, 49, 0.035) 0%, transparent 60%);
}

h1, h2, h3, h4, .font-roman {
  font-family: var(--font-roman);
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--stone);
  line-height: 1.28;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}

a:hover {
  color: var(--stone);
  text-decoration: underline;
}

/* ============================================================
   HEADER & NAVIGATION (Apollodorus Standard - Smart Sticky Header)
   ============================================================ */
.navbar,
.legal-navbar {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 1000;
  background: color-mix(in srgb, var(--marble) 92%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, background-color 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
  will-change: transform;
}

.navbar.navbar--hidden,
.legal-navbar.navbar--hidden,
header.navbar-hidden {
  transform: translateY(-100%) !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.nav-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-roman);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--stone);
  text-decoration: none;
}

.brand-logo:hover {
  text-decoration: none;
}

.brand-by {
  font-size: 0.78rem;
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--stone-soft);
  margin-left: 0.25rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  font-size: 0.95rem;
  margin-left: auto;
  margin-right: 1.35rem;
}

.nav-links a:not(.btn) {
  color: var(--stone-soft);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: normal;
  text-transform: none;
  transition: color 0.2s ease;
}

.nav-links a:not(.btn):hover {
  color: var(--gold);
  text-decoration: none;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
}

.hamburger {
  display: none;
}

.nav-link-home {
  display: none;
}


/* ============================================================
   BUTTONS (FRIENDLY, MODERN & REFINED)
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: none;
  padding: 0.7rem 1.45rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  line-height: 1.35;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1.5px);
}

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

.btn-solid {
  background-color: var(--stone);
  color: var(--marble);
  border-color: var(--stone);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.btn-solid:hover {
  background-color: var(--gold);
  border-color: var(--gold);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(163, 124, 50, 0.32);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--stone);
}

.btn-ghost:hover {
  background: var(--marble-dark);
  border-color: var(--stone-soft);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: #FFFFFF;
  border-color: var(--gold);
  box-shadow: 0 3px 12px rgba(163, 124, 50, 0.28);
}

.btn-gold:hover {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
  box-shadow: 0 6px 18px rgba(163, 124, 50, 0.38);
}

.btn-verdigris {
  background-color: var(--verdigris);
  color: #FFFFFF;
  border-color: var(--verdigris);
  box-shadow: 0 2px 10px rgba(47, 116, 100, 0.25);
}

.btn-verdigris:hover {
  background-color: var(--verdigris-dark);
  border-color: var(--verdigris-dark);
  box-shadow: 0 4px 14px rgba(47, 116, 100, 0.35);
}

.btn-block {
  width: 100%;
}

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

/* ============================================================
   LAYOUT CONTAINERS & CARDS
   ============================================================ */
.wrap, .container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  flex: 1;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 2.25rem;
  box-shadow: var(--card-shadow);
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

/* Classical Architectural Column Accents with Soft Radii */
.card-classical {
  border-top: 3px solid var(--gold);
}

/* Pills & Badges */
.roman-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  background: var(--gold-subtle);
  color: var(--gold);
  border: 1px solid var(--gold);
  padding: 0.35rem 0.95rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.25rem;
}

.classical-divider {
  text-align: center;
  margin: 2.5rem 0;
  position: relative;
}

.classical-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line);
}

.classical-divider span {
  position: relative;
  background: var(--marble);
  padding: 0 1.25rem;
  color: var(--gold);
  font-size: 1.25rem;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  text-align: center;
  max-width: 840px;
  margin: 2.5rem auto 4rem;
}

.hero h1 {
  font-size: 3.1rem;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  letter-spacing: -0.025em;
  font-weight: 800;
}

.hero h1 .gold-accent {
  color: var(--gold);
  font-style: italic;
  font-family: var(--font-serif);
}

.hero p {
  font-size: 1.22rem;
  color: var(--stone-soft);
  line-height: 1.65;
  margin-bottom: 2.25rem;
}

/* ============================================================
   PRICING GRIDS (BRONZE, SILVER, GOLD TIERS)
   ============================================================ */
.pricing-header {
  text-align: center;
  margin-bottom: 2rem;
}

.pricing-header h2 {
  font-size: 2.25rem;
  margin-bottom: 0.65rem;
  letter-spacing: -0.02em;
}

/* Explanatory Banner / Solapa: 14-Day Free Trial (Apollodorus Group Style) */
.reservare-trial-banner {
  background: linear-gradient(180deg, var(--gold-subtle) 0%, var(--card-bg) 100%);
  border: 1.5px solid var(--gold);
  border-top: 3.5px solid var(--gold);
  border-radius: var(--radius-md);
  padding: 1.85rem 2rem;
  margin: 0 auto 2.25rem;
  text-align: center;
  box-shadow: var(--gold-glow), var(--card-shadow);
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.trial-banner-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--gold);
  color: #FFFFFF;
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.32rem 0.9rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.85rem;
  box-shadow: 0 2px 8px rgba(163, 124, 50, 0.25);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .trial-banner-badge {
    color: #151412;
  }
}

:root[data-theme="dark"] .trial-banner-badge {
  color: #151412;
}

.trial-banner-badge svg {
  flex-shrink: 0;
}

.trial-banner-title {
  font-family: var(--font-roman);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--stone);
  margin-bottom: 0.6rem;
  letter-spacing: -0.015em;
}

.trial-banner-desc {
  font-size: 0.98rem;
  color: var(--stone-soft);
  max-width: 780px;
  margin: 0 auto 1.35rem;
  line-height: 1.6;
}

.trial-banner-desc strong {
  color: var(--stone);
  font-weight: 600;
}

.trial-banner-highlights {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.75rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}

.trial-highlight-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--stone);
  text-align: left;
}

.trial-highlight-item svg {
  flex-shrink: 0;
  color: var(--verdigris);
}

.plan-card-footnote {
  display: block;
  text-align: center;
  font-size: 0.8rem;
  color: var(--stone-soft);
  margin-top: 0.65rem;
  line-height: 1.4;
}

@media (max-width: 768px) {
  .reservare-trial-banner {
    padding: 1.4rem 1.15rem;
    margin-bottom: 1.85rem;
  }

  .trial-banner-title {
    font-size: 1.22rem;
  }

  .trial-banner-desc {
    font-size: 0.92rem;
    margin-bottom: 1.1rem;
  }

  .trial-banner-highlights {
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
  }
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin-bottom: 3.5rem;
  align-items: stretch;
  width: 100%;
}

@media (max-width: 960px) {
  .pricing-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.plan-card {
  background: var(--card-bg);
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 2.25rem 2rem;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  cursor: pointer;
  box-shadow: var(--card-shadow);
}

.plan-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-lg);
  border-color: var(--gold);
}

/* Bronze Plan Styling */
.plan-card[data-code="bronze"] {
  border-top: 3.5px solid #A07248;
}

/* Silver Plan Styling (Featured / Most Popular) */
.plan-card.popular, .plan-card[data-code="silver"] {
  border-top: 3.5px solid var(--gold);
}

.plan-card.popular {
  border-color: var(--gold);
  box-shadow: var(--gold-glow);
}

/* Gold Plan Styling */
.plan-card[data-code="gold"] {
  border-top: 3.5px solid var(--gold);
  background: linear-gradient(180deg, var(--card-bg) 0%, rgba(169, 135, 63, 0.03) 100%);
}

.plan-card.selected {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px var(--gold), var(--gold-glow);
}

.plan-badge {
  position: absolute;
  top: -12px;
  right: 20px;
  background: var(--gold);
  color: #FFFFFF;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 8px rgba(163, 124, 50, 0.28);
}

.plan-badge.subtle {
  background: var(--marble-dark);
  color: var(--stone);
  border: 1px solid var(--line);
  box-shadow: none;
}

.plan-name {
  font-family: var(--font-sans);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.45rem;
}

.plan-desc {
  font-size: 0.95rem;
  color: var(--stone-soft);
  margin-bottom: 1.75rem;
  min-height: 52px;
  line-height: 1.55;
}

.plan-price-box {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.25rem;
}

.plan-currency {
  font-family: var(--font-sans);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--stone);
}

.plan-price {
  font-family: var(--font-sans);
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--stone);
  line-height: 1;
}

.plan-interval {
  font-size: 0.92rem;
  color: var(--stone-soft);
}

.plan-features {
  list-style: none;
  margin-bottom: 2rem;
  flex: 1;
}

.plan-features li {
  font-size: 0.95rem;
  color: var(--stone-soft);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.plan-features li svg {
  flex-shrink: 0;
  color: var(--verdigris);
}

/* ============================================================
   FORMS & INPUTS (FRIENDLY, CLEAN & ACCESSIBLE)
   ============================================================ */
.form-group {
  margin-bottom: 1.35rem;
}

.form-label {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: normal;
  text-transform: none;
  margin-bottom: 0.45rem;
  color: var(--stone);
}

.form-input {
  width: 100%;
  padding: 0.78rem 1.05rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background-color: var(--marble);
  color: var(--stone);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--gold);
  background-color: var(--card-bg);
  box-shadow: 0 0 0 3px rgba(163, 124, 50, 0.16);
}

.form-helper {
  font-size: 0.82rem;
  color: var(--stone-soft);
  margin-top: 0.35rem;
  font-style: normal;
}

/* Password Input Wrapper & Visibility Toggle */
.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-input-wrapper .form-input,
.password-input-wrapper .form-control {
  width: 100%;
  padding-right: 2.75rem !important;
}

.password-toggle-btn {
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--stone-soft);
  border-radius: var(--radius-xs, 4px);
  transition: color 0.15s ease, opacity 0.15s ease;
  user-select: none;
  z-index: 2;
  line-height: 0;
}

.password-toggle-btn:hover {
  color: var(--stone);
}

.password-toggle-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

/* Checkbox */
.form-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.92rem;
  color: var(--stone-soft);
  cursor: pointer;
  line-height: 1.45;
}

.form-checkbox-label input[type="checkbox"] {
  margin-top: 0.2rem;
  accent-color: var(--gold);
  width: 17px;
  height: 17px;
  cursor: pointer;
}

/* Alerts */
.alert {
  padding: 0.95rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  border: 1px solid transparent;
}

.alert-danger {
  background-color: #FDF3F2;
  color: var(--pompeii);
  border-color: #F4C7C2;
}

.alert-success {
  background-color: #F0F7F5;
  color: var(--verdigris-dark);
  border-color: #C0DCD4;
}

/* Sign-Up Two-Column Layout */
.signup-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2.25rem;
  align-items: start;
}

@media (max-width: 960px) {
  .signup-layout {
    grid-template-columns: 1fr;
  }
}

.plan-selection-summary {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--card-shadow);
}

/* ============================================================
   DASHBOARD SPECIFIC
   ============================================================ */
.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  gap: 1.25rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.75rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr));
  gap: 1.75rem;
  margin-bottom: 2.5rem;
}

.integration-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 1.85rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  box-shadow: var(--card-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.integration-card:hover {
  box-shadow: var(--card-shadow-lg);
}

.integration-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.integration-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-sans);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.status-badge {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: normal;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  text-transform: none;
}

.status-badge.disconnected {
  background: #FDF3F2;
  color: var(--pompeii);
  border: 1px solid #F4C7C2;
}

.status-badge.connected {
  background: #F0F7F5;
  color: var(--verdigris-dark);
  border: 1px solid #C0DCD4;
}

/* Dashboard loading skeleton for smooth initial render */
.loading-placeholder:empty {
  display: inline-block;
  min-width: 140px;
  height: 1.1em;
  vertical-align: middle;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, rgba(169, 135, 63, 0.08) 25%, rgba(169, 135, 63, 0.22) 50%, rgba(169, 135, 63, 0.08) 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.4s ease-in-out infinite;
}

@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================================
   LEGAL PAGES & DOCUMENTATION
   ============================================================ */
.legal-card {
  border-top: 3.5px solid var(--gold);
  border-radius: var(--radius-md);
  background: var(--card-bg);
}

.legal-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.legal-header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.65rem;
  letter-spacing: -0.02em;
}

.legal-updated {
  font-size: 0.95rem;
  color: var(--stone-soft);
  font-style: italic;
}

.legal-content h2 {
  font-size: 1.35rem;
  margin: 2rem 0 0.85rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.35rem;
  letter-spacing: -0.01em;
}

.legal-content p {
  margin-bottom: 1.15rem;
  line-height: 1.7;
}

.legal-content ul {
  margin: 0.75rem 0 1.25rem 1.75rem;
  color: var(--stone-soft);
}

.legal-content ul li {
  margin-bottom: 0.5rem;
}

.legal-address {
  font-style: normal;
  background: var(--marble);
  border-left: 3px solid var(--gold);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-sm);
  margin-top: 1rem;
}

/* ============================================================
   FOOTER (MATCHING APOLLODORUS GROUP ARCHITECTURAL AESTHETIC)
   ============================================================ */
.footer {
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--marble-dark) 40%, var(--marble));
  padding: 2.25rem 0;
  margin-top: auto;
  width: 100%;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem 2rem;
  font-size: 0.88rem;
  color: var(--stone-soft);
  line-height: 1.5;
}

.footer-copy {
  display: inline-flex;
  align-items: center;
  font-size: 0.85rem;
  color: var(--stone-soft);
  line-height: 1.5;
}

.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
}

.footer-links a {
  color: var(--stone-soft);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: normal;
  text-transform: none;
  display: inline-flex;
  align-items: center;
  line-height: 1.3;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.footer-links a:hover {
  color: var(--gold);
  text-decoration: none;
}

/* ARCA / AFIP Formulario 960/D Data Fiscal */
.data-fiscal-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  vertical-align: middle;
}

.data-fiscal-badge:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.data-fiscal-badge img {
  height: 36px;
  width: auto;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  display: block;
}

.data-fiscal-fallback-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 6px;
  background: rgba(58, 125, 114, 0.1);
  border: 1.5px solid var(--verdigris);
  color: var(--verdigris);
  line-height: 1;
}

/* ============================================================
   ACCESSIBILITY & WCAG 2.1 AA ENHANCEMENTS
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

@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;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   RESPONSIVE DESIGN SYSTEM & FORM UTILITIES
   ============================================================ */
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.15rem;
  }
  
  .hero p {
    font-size: 1.05rem;
  }
  
  .form-row-2,
  .form-row-3 {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .nav-container {
    padding: 0.85rem 1rem;
    gap: 0.75rem;
  }

  .brand-logo {
    font-size: 1.25rem;
  }

  .brand-by {
    display: none;
  }

  .card {
    padding: 1.5rem 1.15rem;
  }

  .legal-header h1 {
    font-size: 1.85rem;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
    align-items: center;
    gap: 1.25rem;
  }

  .footer-links {
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.85rem 1rem;
  }
}

@media (max-width: 480px) {
  .wrap, .container {
    padding: 1.5rem 1rem;
  }

  .plan-card {
    padding: 1.75rem 1.25rem;
  }

  .plan-price {
    font-size: 2.25rem;
  }

  .btn {
    padding: 0.65rem 1rem;
    font-size: 0.8rem;
  }
}

/* ============================================================
   THEME TOGGLE (Apollodorus Pattern)
   ============================================================ */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 0;
  color: var(--stone);
  flex-shrink: 0;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}

.theme-toggle:hover {
  border-color: var(--line);
  background: rgba(0, 0, 0, 0.04);
}

:root[data-theme="dark"] .theme-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
}

.theme-icon {
  display: none;
  flex-shrink: 0;
}

/* Light mode (default): show moon -> clicking switches to dark */
.theme-icon-moon {
  display: block;
}

/* Dark mode forced manually via data-theme="dark": show sun -> clicking switches to light */
:root[data-theme="dark"] .theme-icon-sun {
  display: block;
}
:root[data-theme="dark"] .theme-icon-moon {
  display: none;
}

/* Dark mode by OS preference (unless forced light) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-icon-sun {
    display: block;
  }
  :root:not([data-theme="light"]) .theme-icon-moon {
    display: none;
  }
}

/* ============================================================
   LANGUAGE SWITCHER (Apollodorus Pattern)
   ============================================================ */
.lang-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.lang-switch::after {
  content: "▾";
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  line-height: 1;
  color: var(--stone-soft);
  opacity: 0.7;
  pointer-events: none;
}

.lang-switch:hover::after {
  opacity: 1;
}

.lang-switch select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: var(--surface, var(--card-bg));
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--stone);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 26px 6px 12px;
  cursor: pointer;
  outline: none;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.lang-switch select:hover {
  border-color: var(--gold);
  background: rgba(0, 0, 0, 0.03);
}

:root[data-theme="dark"] .lang-switch select:hover {
  background: rgba(255, 255, 255, 0.05);
}

.lang-switch select:focus {
  outline: none;
  border-color: var(--gold);
}

.lang-switch select option {
  background-color: var(--card-bg, #FFFFFF);
  color: var(--stone, #221F1B);
}

:root[data-theme="dark"] .lang-switch select {
  color-scheme: dark;
}

:root[data-theme="dark"] .lang-switch select option {
  background-color: #1D1B17;
  color: #F3EFE8;
}

:root[data-theme="light"] .lang-switch select {
  color-scheme: light;
}

:root[data-theme="light"] .lang-switch select option {
  background-color: #FFFFFF;
  color: #221F1B;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .lang-switch select {
    color-scheme: dark;
  }
  :root:not([data-theme="light"]) .lang-switch select option {
    background-color: #1D1B17;
    color: #F3EFE8;
  }
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ============================================================
   LEGAL MODALS (Terms & Privacy Dialogs - Apollodorus Standard)
   ============================================================ */
.legal-modal {
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 0;
  width: 90%;
  max-width: 720px;
  max-height: 82vh;
  background: var(--card-bg);
  color: var(--stone);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.3);
}

.legal-modal[open] {
  position: fixed;
  inset: 0;
  margin: auto;
  display: flex;
  flex-direction: column;
  z-index: 1000;
}

.legal-modal::backdrop {
  background: rgba(43, 39, 31, 0.65);
  backdrop-filter: blur(3px);
}

:root[data-theme="dark"] .legal-modal::backdrop {
  background: rgba(10, 9, 8, 0.8);
  backdrop-filter: blur(4px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .legal-modal::backdrop {
    background: rgba(10, 9, 8, 0.8);
    backdrop-filter: blur(4px);
  }
}

.legal-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--marble);
  flex-shrink: 0;
}

.legal-modal-header h2 {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--stone);
}

.legal-modal-close {
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  color: var(--stone-soft);
  padding: 2px 8px;
  flex-shrink: 0;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}

.legal-modal-close:hover {
  color: var(--stone);
  border-color: var(--line);
  background: rgba(0, 0, 0, 0.05);
}

.legal-modal-body {
  padding: 24px 28px;
  overflow-y: auto;
  font-size: 15px;
  line-height: 1.7;
  background: var(--card-bg);
}

.legal-modal-body h3 {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: 1.35rem;
  margin-bottom: 0.45rem;
  color: var(--stone);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.25rem;
}

.legal-modal-body p {
  margin-bottom: 12px;
}

.legal-modal-body p:last-child {
  margin-bottom: 0;
}

.legal-modal-body ul {
  margin-left: 20px;
  margin-bottom: 14px;
}

.legal-modal-body li {
  margin-bottom: 6px;
}

.legal-modal-body .legal-updated {
  font-size: 0.85rem;
  color: var(--stone-soft);
  font-style: italic;
  margin-bottom: 16px;
}

.legal-modal-body a {
  color: var(--verdigris);
  text-decoration: underline;
}

.legal-modal-body a:hover {
  color: var(--gold);
}

html.modal-open {
  overflow: hidden;
}

@media (max-width: 600px) {
  .legal-modal {
    width: 95%;
    max-height: 90vh;
  }
  .legal-modal-header {
    padding: 14px 18px;
  }
  .legal-modal-body {
    padding: 18px;
    font-size: 14px;
  }
}

/* ============================================================
   INTEGRATION MODALS & DIALOGS
   ============================================================ */
.app-dialog {
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  color: var(--stone);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  max-width: 580px;
  width: 92%;
  padding: 0;
  margin: auto;
  overflow: hidden;
}

.app-dialog::backdrop {
  background: rgba(14, 20, 27, 0.7);
  backdrop-filter: blur(4px);
}

.app-dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--line);
  background: var(--marble);
}

.app-dialog-header h3 {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--stone);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.app-dialog-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--stone-soft);
  line-height: 1;
}

.app-dialog-close:hover {
  color: var(--gold);
}

.app-dialog-body {
  padding: 1.5rem;
  max-height: 75vh;
  overflow-y: auto;
}

.form-group {
  margin-bottom: 1.15rem;
}

.form-group label {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: normal;
  text-transform: none;
  color: var(--stone);
  margin-bottom: 0.35rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--marble);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--stone);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--gold);
  background-color: var(--card-bg);
  box-shadow: 0 0 0 3px rgba(163, 124, 50, 0.16);
}

/* ============================================================
   APPOINTMENTS & SERVICES CARDS & TABLES
   ============================================================ */
.classical-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.classical-table th {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
  color: var(--stone-soft);
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 1.5px solid var(--line);
}

.classical-table td {
  padding: 0.95rem 1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.classical-table tr:hover td {
  background: rgba(197, 168, 128, 0.05);
}

.services-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 1.15rem;
  margin-top: 1rem;
}

.service-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-left: 3.5px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: var(--card-shadow);
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.service-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--card-shadow-lg);
}

.service-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.service-title {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--stone);
}

.service-price {
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--gold);
  font-size: 0.98rem;
}

.service-duration {
  font-size: 0.82rem;
  color: var(--stone-soft);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}

/* ============================================================
   WHATSAPP BOT SIMULATOR PLAYGROUND
   ============================================================ */
.chat-simulator-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--card-shadow);
}

.chat-sim-header {
  background: #075E54;
  color: #FFFFFF;
  padding: 0.95rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-sim-contact {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chat-sim-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #128C7E;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: #fff;
}

.chat-sim-name {
  font-size: 0.95rem;
  font-weight: 600;
}

.chat-sim-sub {
  font-size: 0.75rem;
  opacity: 0.85;
}

.chat-sim-messages {
  background: #ECE5DD;
  padding: 1.25rem;
  height: 340px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

[data-theme="dark"] .chat-sim-messages {
  background: #0b141a;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .chat-sim-messages {
    background: #0b141a;
  }
}

.chat-bubble {
  max-width: 82%;
  padding: 0.7rem 0.95rem;
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.48;
  white-space: pre-wrap;
  position: relative;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.chat-bubble.bot {
  align-self: flex-start;
  background: #FFFFFF;
  color: #111B21;
}

[data-theme="dark"] .chat-bubble.bot {
  background: #202c33;
  color: #e9edef;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .chat-bubble.bot {
    background: #202c33;
    color: #e9edef;
  }
}

.chat-bubble.user {
  align-self: flex-end;
  background: #E7FFDB;
  color: #111B21;
}

[data-theme="dark"] .chat-bubble.user {
  background: #005c4b;
  color: #e9edef;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .chat-bubble.user {
    background: #005c4b;
    color: #e9edef;
  }
}

.chat-sim-input-bar {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--card-bg);
  border-top: 1px solid var(--line);
}

.chat-sim-input {
  flex: 1;
  padding: 0.65rem 1rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--marble);
  color: var(--stone);
  font-size: 0.9rem;
}

.chat-sim-input:focus {
  outline: none;
  border-color: #25D366;
}

.chat-sim-send {
  background: #25D366;
  color: white;
  border: none;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.chat-sim-send:hover {
  background: #1eb956;
}

.chat-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  background: var(--marble);
  border-top: 1px solid var(--line);
}

.quick-chip {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  padding: 0.3rem 0.75rem;
  font-size: 0.76rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--stone);
  transition: all 0.2s ease;
}

.quick-chip:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-subtle);
}

.schedule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.schedule-day-box {
  background: var(--marble);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.85rem 0.75rem;
  text-align: center;
}

.schedule-day-name {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--stone);
}

.schedule-day-hours {
  font-size: 0.75rem;
  color: var(--stone-soft);
}

/* ============================================================
   OPERATING HOURS & STAFF SCHEDULE CARDS (MODAL EDITORS)
   ============================================================ */
.day-schedule-card,
.staff-day-schedule-card {
  background: var(--marble);
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  transition: border-color 0.2s ease, opacity 0.2s ease, background-color 0.2s ease;
}

.day-schedule-card.is-closed,
.staff-day-schedule-card.is-closed {
  opacity: 0.85;
}

.day-schedule-header,
.staff-day-schedule-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  gap: 0.5rem;
}

.day-schedule-header .day-name,
.staff-day-schedule-header .day-name {
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--charcoal);
  margin: 0;
}

.staff-day-business-hours {
  font-size: 0.72rem;
  color: var(--stone-soft);
  margin-top: 0.15rem;
}

.day-toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--stone);
  margin: 0;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.day-toggle-label input[type="checkbox"] {
  cursor: pointer;
  width: 16px;
  height: 16px;
  margin: 0;
  flex-shrink: 0;
}

.day-intervals-container,
.staff-day-intervals-container {
  margin-top: 0.55rem;
  width: 100%;
  box-sizing: border-box;
}

.day-interval-row,
.staff-interval-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.35rem;
  width: 100%;
  box-sizing: border-box;
}

.day-interval-row:last-child,
.staff-interval-row:last-child {
  margin-bottom: 0;
}

.day-interval-row .interval-time-input,
.staff-interval-row .interval-time-input {
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
  padding: 0.35rem 0.6rem;
  font-size: 0.88rem;
}

.day-interval-row .interval-separator,
.staff-interval-row .interval-separator {
  font-size: 0.82rem;
  color: var(--stone-soft);
  flex-shrink: 0;
  padding: 0 0.2rem;
  user-select: none;
}

.day-interval-row .btn-remove-interval,
.staff-interval-row .btn-remove-interval {
  padding: 0.2rem 0.5rem;
  font-size: 0.85rem;
  color: #e57373;
  flex-shrink: 0;
  background: transparent;
  border: none;
  cursor: pointer;
}

.day-schedule-footer,
.staff-day-schedule-footer {
  text-align: right;
  margin-top: 0.35rem;
  width: 100%;
  box-sizing: border-box;
}

.btn-add-interval,
.btn-add-staff-interval {
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  color: var(--verdigris);
  font-weight: 600;
  background: transparent;
  border: none;
  cursor: pointer;
}

.badge-synced {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(76, 122, 109, 0.15);
  color: var(--verdigris);
  border-radius: var(--radius-full);
}

/* ============================================================
   MASTER CALENDAR & SCHEDULE VIEW PANEL (AT BOTTOM OF DASHBOARD)
   ============================================================ */
.calendar-panel-section {
  width: 100%;
  max-width: 100%;
  margin-top: 3.5rem;
  box-sizing: border-box;
  clear: both;
}

.calendar-panel-card {
  width: 100%;
  box-sizing: border-box;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-top: 3.5px solid var(--gold);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--card-shadow);
}

.calendar-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.calendar-panel-title h2 {
  font-size: 1.4rem;
  margin: 0 0 0.35rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.015em;
}

.calendar-panel-title p {
  margin: 0;
  color: var(--stone-soft);
  font-size: 0.9rem;
}

.calendar-nav-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.calendar-week-label {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--stone);
  min-width: 200px;
  text-align: center;
}

.calendar-legend-bar {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1rem;
  font-size: 0.82rem;
  color: var(--stone-soft);
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-dot.open {
  background: var(--verdigris);
}

.legend-dot.closed {
  background: #888888;
}

.legend-dot.booked {
  background: var(--gold);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.18rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
}

.app-icon-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.6rem;
  line-height: 1;
}

.app-icon-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  vertical-align: middle;
  border-radius: 8px;
  display: inline-block;
}

.app-icon-svg {
  width: 32px;
  height: 32px;
}

.calendar-week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(130px, 1fr));
  gap: 0.35rem; /* Columnas más juntas y estilizadas */
  width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
  padding-bottom: 0.75rem;
}

.calendar-day-column {
  background: var(--marble);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  min-height: 380px;
  transition: border-color 0.2s, box-shadow 0.2s;
  overflow: hidden;
}

.calendar-day-column.today {
  border: 2px solid var(--gold);
  box-shadow: 0 0 14px rgba(163, 124, 50, 0.22);
}

.calendar-day-column.closed {
  opacity: 0.65;
  background: rgba(0, 0, 0, 0.03);
}

[data-theme="dark"] .calendar-day-column.closed {
  background: rgba(255, 255, 255, 0.02);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .calendar-day-column.closed {
    background: rgba(255, 255, 255, 0.02);
  }
}

.calendar-day-header {
  padding: 0.55rem 0.45rem;
  border-bottom: 1px solid var(--line);
  background: var(--card-bg);
  border-top-left-radius: var(--radius-sm);
  border-top-right-radius: var(--radius-sm);
  text-align: center;
}

.cal-day-title {
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--stone-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cal-day-date {
  font-size: 1rem;
  font-weight: 700;
  margin: 0.1rem 0 0.3rem 0;
  color: var(--stone);
}

.cal-day-status-badge {
  font-size: 0.65rem;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  display: inline-block;
}

.cal-day-status-badge.open {
  background: rgba(76, 122, 109, 0.15);
  color: var(--verdigris);
  border: 1px solid rgba(76, 122, 109, 0.3);
}

.cal-day-status-badge.closed {
  background: rgba(120, 120, 120, 0.15);
  color: var(--stone-soft);
  border: 1px solid rgba(120, 120, 120, 0.25);
}

.calendar-day-body {
  padding: 0.45rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  overflow-y: auto;
  max-height: 480px;
}

/* Reservas reducidas y clickeables (Pills / Chips) */
.cal-appt-pill {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-xs);
  padding: 0.4rem 0.5rem;
  font-size: 0.78rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  user-select: none;
}

.cal-appt-pill:hover {
  transform: translateY(-1.5px);
  border-color: var(--gold);
  background: var(--marble);
  box-shadow: 0 3px 10px rgba(163, 124, 50, 0.18);
}

.cal-appt-pill-left {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  flex: 1;
}

.cal-appt-pill-time {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--gold);
  white-space: nowrap;
}

.cal-appt-pill-name {
  font-weight: 600;
  color: var(--stone);
  font-size: 0.76rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-appt-pill-badges {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex-shrink: 0;
}

.cal-appt-pill-tag {
  font-size: 0.65rem;
  line-height: 1;
}

/* Modal de Detalles de Reserva */
.appt-detail-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.appt-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 0.6rem;
  border-bottom: 1px dashed var(--line);
  gap: 1rem;
}

.appt-detail-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.appt-detail-label {
  color: var(--stone-soft);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.appt-detail-value {
  color: var(--stone);
  font-weight: 600;
  text-align: right;
  word-break: break-word;
}

.cal-appt-card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-xs);
  padding: 0.75rem;
  font-size: 0.82rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  transition: transform 0.15s, box-shadow 0.15s;
}

.cal-appt-card:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
}

.cal-appt-time {
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.cal-appt-service {
  font-weight: 600;
  color: var(--stone);
  margin-bottom: 0.2rem;
  line-height: 1.25;
}

.cal-appt-customer {
  color: var(--stone-soft);
  font-size: 0.75rem;
  margin-bottom: 0.35rem;
}

.cal-appt-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px dashed var(--line);
}

.cal-appt-cancel-btn {
  background: transparent;
  border: none;
  color: #e57373;
  font-size: 0.74rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-xs);
  transition: background 0.15s ease;
}

.cal-appt-cancel-btn:hover {
  background: rgba(229, 115, 115, 0.12);
  text-decoration: none;
}

.cal-no-appts {
  color: var(--stone-soft);
  font-size: 0.78rem;
  text-align: center;
  padding: 1.5rem 0.5rem;
  font-style: normal;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.conflict-alert-box {
  background: rgba(229, 115, 115, 0.12);
  border: 1px solid #e57373;
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  color: var(--stone);
}

.conflict-list {
  margin: 0.5rem 0 0 1.25rem;
  padding: 0;
}

.conflict-list li {
  margin-bottom: 0.35rem;
  font-size: 0.82rem;
}




/* ============================================================
   COMPREHENSIVE HELP CENTER MODAL & TABS (APOLLODORUS)
   ============================================================ */
dialog.help-dialog:not([open]),
.help-dialog:not([open]) {
  display: none !important;
}

dialog.help-dialog[open],
.help-dialog[open] {
  display: flex !important;
  flex-direction: column !important;
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  margin: auto !important;
  z-index: 9999 !important;
  max-width: 980px !important;
  width: 94vw !important;
  height: 85vh !important;
  max-height: 850px !important;
}

dialog.help-dialog,
.help-dialog {
  border-radius: var(--radius-md, 16px) !important;
  border: 1.5px solid var(--card-border, #E5DEC9) !important;
  background: var(--card-bg, #FFFFFF) !important;
  color: var(--stone, #221F1B) !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45) !important;
  padding: 0 !important;
  margin: auto !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

dialog.help-dialog::backdrop,
.help-dialog::backdrop {
  background: rgba(14, 20, 27, 0.75) !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
}

.help-dialog-header {
  padding: 1.25rem 1.75rem;
  background: var(--marble, #FAF8F5);
  border-bottom: 1.5px solid var(--line, #E5DEC9);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.help-dialog-header h3 {
  margin: 0;
  font-family: var(--font-sans, system-ui, -apple-system, sans-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--stone, #221F1B);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.help-tabs-bar {
  display: flex;
  background: var(--marble-dark, #F2ECE2);
  border-bottom: 1.5px solid var(--line, #E5DEC9);
  overflow-x: auto;
  scrollbar-width: thin;
  padding: 0.5rem 1.25rem 0;
  gap: 0.35rem;
  flex-shrink: 0;
}

.help-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 0.75rem 1.15rem;
  font-family: var(--font-sans, system-ui, -apple-system, sans-serif);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--stone-soft, #686052);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: var(--radius-xs, 6px) var(--radius-xs, 6px) 0 0;
}

.help-tab-btn:hover {
  color: var(--gold, #A37C32);
  background: rgba(163, 124, 50, 0.08);
}

.help-tab-btn.active {
  color: var(--gold, #A37C32);
  border-bottom-color: var(--gold, #A37C32);
  background: var(--card-bg, #FFFFFF);
  font-weight: 700;
}

.help-dialog-body {
  padding: 1.75rem;
  overflow-y: auto;
  flex: 1;
  background: var(--card-bg, #FFFFFF);
}

.help-tab-pane {
  display: none;
}

.help-tab-pane.active {
  display: block;
  animation: fadeInHelp 0.2s ease-out;
}

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

.help-section-card {
  background: var(--marble, #FAF8F5);
  border: 1px solid var(--line, #E5DEC9);
  border-radius: var(--radius-sm, 10px);
  padding: 1.35rem 1.5rem;
  margin-bottom: 1.25rem;
}

.help-section-card h4 {
  margin-top: 0;
  margin-bottom: 0.65rem;
  font-family: var(--font-sans, system-ui, -apple-system, sans-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gold, #A37C32);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.help-section-card p {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--stone, #221F1B);
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.help-section-card ul,
.help-section-card ol {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--stone, #221F1B);
  margin-top: 0.4rem;
  margin-bottom: 0.75rem;
  padding-left: 1.4rem;
}

.help-section-card li {
  margin-bottom: 0.45rem;
}

.help-step-list {
  list-style: none !important;
  padding-left: 0 !important;
  margin: 0.85rem 0 !important;
}

.help-step-list li {
  position: relative;
  padding-left: 2.2rem;
  margin-bottom: 0.85rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--stone, #221F1B);
}

.help-step-badge {
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--gold, #A37C32);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.help-tip-alert {
  background: rgba(47, 116, 100, 0.08);
  border-left: 4px solid var(--verdigris, #2F7464);
  border-radius: var(--radius-xs, 6px);
  padding: 0.85rem 1.1rem;
  margin: 0.85rem 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--stone, #221F1B);
}

.help-warning-alert {
  background: rgba(163, 56, 43, 0.08);
  border-left: 4px solid var(--pompeii, #A3382B);
  border-radius: var(--radius-xs, 6px);
  padding: 0.85rem 1.1rem;
  margin: 0.85rem 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--stone, #221F1B);
}

details.help-qa-box,
.help-qa-box {
  border: 1px solid var(--line, #E5DEC9);
  border-radius: var(--radius-xs, 6px);
  background: var(--card-bg, #FFFFFF);
  margin-bottom: 0.85rem;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

details.help-qa-box[open] {
  border-color: var(--gold, #A37C32);
  box-shadow: 0 2px 8px rgba(163, 124, 50, 0.1);
}

summary.help-qa-question,
.help-qa-question {
  padding: 0.95rem 1.25rem;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--stone, #221F1B);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  background: var(--marble, #FAF8F5);
  transition: background 0.15s ease, color 0.15s ease;
  list-style: none !important;
  outline: none;
}

summary.help-qa-question::-webkit-details-marker,
summary.help-qa-question::marker {
  display: none !important;
}

summary.help-qa-question:hover,
.help-qa-question:hover {
  background: rgba(163, 124, 50, 0.08);
}

details.help-qa-box[open] > summary.help-qa-question {
  border-bottom: 1px solid var(--line, #E5DEC9);
  background: var(--marble-dark, #F2ECE2);
  color: var(--gold, #A37C32);
}

details.help-qa-box[open] > summary.help-qa-question .qa-arrow {
  transform: rotate(180deg);
}

.qa-arrow {
  display: inline-block;
  transition: transform 0.25s ease;
  font-size: 0.8rem;
  color: var(--stone-soft, #686052);
  user-select: none;
}

.help-qa-answer {
  padding: 1.15rem 1.35rem;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--stone-soft, #686052);
  background: var(--card-bg, #FFFFFF);
  border-top: 1px solid var(--line, #E5DEC9);
}

details.help-qa-box > .help-qa-answer {
  border-top: none;
}

/* Dark mode theme overrides */
:root[data-theme="dark"] .help-dialog-header {
  background: var(--marble);
  border-color: var(--line);
}

:root[data-theme="dark"] .help-tabs-bar {
  background: var(--marble-dark);
  border-color: var(--line);
}

:root[data-theme="dark"] .help-tab-btn.active {
  background: var(--card-bg);
}

:root[data-theme="dark"] .help-section-card {
  background: var(--marble);
  border-color: var(--line);
}

:root[data-theme="dark"] details.help-qa-box,
:root[data-theme="dark"] .help-qa-box {
  border-color: var(--line);
  background: var(--card-bg);
}

:root[data-theme="dark"] summary.help-qa-question,
:root[data-theme="dark"] .help-qa-question {
  background: var(--marble);
  color: var(--stone);
}

:root[data-theme="dark"] details.help-qa-box[open] > summary.help-qa-question {
  background: var(--marble-dark);
  color: var(--gold);
}

:root[data-theme="dark"] .help-qa-answer {
  background: var(--card-bg);
  color: var(--stone-soft);
}

:root[data-theme="dark"] .help-dialog::backdrop,
:root[data-theme="dark"] dialog.help-dialog::backdrop {
  background: rgba(10, 9, 8, 0.85) !important;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .help-dialog-header {
    background: var(--marble);
    border-color: var(--line);
  }
  :root:not([data-theme="light"]) .help-tabs-bar {
    background: var(--marble-dark);
    border-color: var(--line);
  }
  :root:not([data-theme="light"]) .help-tab-btn.active {
    background: var(--card-bg);
  }
  :root:not([data-theme="light"]) .help-section-card {
    background: var(--marble);
    border-color: var(--line);
  }
  :root:not([data-theme="light"]) details.help-qa-box,
  :root:not([data-theme="light"]) .help-qa-box {
    border-color: var(--line);
    background: var(--card-bg);
  }
  :root:not([data-theme="light"]) summary.help-qa-question,
  :root:not([data-theme="light"]) .help-qa-question {
    background: var(--marble);
    color: var(--stone);
  }
  :root:not([data-theme="light"]) details.help-qa-box[open] > summary.help-qa-question {
    background: var(--marble-dark);
    color: var(--gold);
  }
  :root:not([data-theme="light"]) .help-qa-answer {
    background: var(--card-bg);
    color: var(--stone-soft);
  }
  :root:not([data-theme="light"]) .help-dialog::backdrop,
  :root:not([data-theme="light"]) dialog.help-dialog::backdrop {
    background: rgba(10, 9, 8, 0.85) !important;
  }
}

@media (max-width: 680px) {
  dialog.help-dialog[open],
  .help-dialog[open] {
    width: 96vw !important;
    height: 92vh !important;
    max-height: 94vh !important;
  }
  .help-dialog-header {
    padding: 1rem 1.25rem;
  }
  .help-dialog-body {
    padding: 1.25rem;
  }
  .help-tabs-bar {
    padding: 0.35rem 0.75rem 0;
  }
  .help-tab-btn {
    padding: 0.6rem 0.85rem;
    font-size: 0.8rem;
  }
}

/* ============================================================
   DASHBOARD VISUAL CLARITY & RESPONSIVE REFINEMENTS
   ============================================================ */
.dashboard-greeting-block {
  flex: 1;
  min-width: 260px;
}

.dashboard-greeting-title {
  font-size: 1.85rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  letter-spacing: -0.02em;
  color: var(--stone);
}

.dashboard-account-meta {
  color: var(--stone-soft);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

/* Subscription Status Box */
.subscription-status-box {
  background: var(--card-bg);
  padding: 1.15rem 1.4rem;
  border: 1px solid var(--card-border);
  border-top: 3.5px solid var(--gold);
  border-radius: var(--radius-md);
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 300px;
  max-width: 480px;
}

.sub-status-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.sub-status-caption {
  font-size: 0.76rem;
  font-family: var(--font-roman);
  letter-spacing: 0.06em;
  color: var(--stone-soft);
  text-transform: uppercase;
  font-weight: 600;
}

.sub-plan-name {
  font-family: var(--font-roman);
  font-weight: 700;
  color: var(--gold);
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.sub-trial-pill {
  font-size: 0.82rem;
  color: var(--stone-soft);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.sub-action-buttons {
  margin-top: 0.25rem;
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  align-items: center;
}

.btn-gold-sm {
  padding: 0.38rem 0.8rem;
  font-size: 0.78rem;
  color: var(--gold);
  background: rgba(163, 124, 50, 0.08);
  border: 1px solid var(--gold);
  border-radius: var(--radius-xs);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-gold-sm:hover {
  background: var(--gold);
  color: #FFFFFF;
}

.btn-outline-sm {
  padding: 0.38rem 0.8rem;
  font-size: 0.78rem;
  color: var(--stone);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-outline-sm:hover {
  border-color: var(--stone-soft);
  background: var(--marble);
}

.btn-danger-ghost-sm {
  padding: 0.38rem 0.75rem;
  font-size: 0.76rem;
  color: #dc2626;
  background: transparent;
  border: 1px solid rgba(220, 38, 38, 0.25);
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-danger-ghost-sm:hover {
  background: rgba(220, 38, 38, 0.08);
  border-color: #dc2626;
}

.btn-baja-sm {
  padding: 0.38rem 0.75rem;
  font-size: 0.76rem;
  color: #b91c1c;
  background: rgba(220, 38, 38, 0.06);
  border: 1.5px solid #dc2626;
  border-radius: var(--radius-xs);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-baja-sm:hover {
  background: #dc2626;
  color: #FFFFFF;
}

.btn-verdigris-sm {
  padding: 0.38rem 0.8rem;
  font-size: 0.78rem;
  color: var(--verdigris);
  background: rgba(47, 116, 100, 0.08);
  border: 1px solid var(--verdigris);
  border-radius: var(--radius-xs);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-verdigris-sm:hover {
  background: var(--verdigris);
  color: #FFFFFF;
}

/* Priority WhatsApp Support Elements (Apollodorus Design System) */
.btn-priority-support {
  background-color: var(--verdigris);
  color: #FFFFFF !important;
  border: 1px solid var(--verdigris);
  font-weight: 600;
  padding: 0.42rem 0.9rem;
  font-size: 0.8rem;
  border-radius: var(--radius-xs);
  display: none;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(47, 116, 100, 0.22);
  transition: all 0.2s ease;
  cursor: pointer;
  line-height: 1.4;
}

.btn-priority-support:hover {
  background-color: var(--verdigris-dark);
  border-color: var(--verdigris-dark);
  color: #FFFFFF !important;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(47, 116, 100, 0.32);
  transform: translateY(-1.5px);
}

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

.priority-support-card {
  display: none;
  background: rgba(47, 116, 100, 0.05);
  border: 1px solid var(--verdigris);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1rem;
  margin-top: 1.25rem;
  text-align: center;
}

.priority-support-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  color: var(--verdigris);
  font-weight: 600;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

/* Activation Banner Card */
.activation-banner-section {
  margin-bottom: 2.25rem;
}

.activation-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-md);
  padding: 1.35rem 1.6rem;
  box-shadow: var(--card-shadow);
}

.activation-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.activation-info-group {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  flex: 1;
  min-width: 260px;
}

.activation-icon-badge {
  font-size: 1.5rem;
  line-height: 1;
  padding: 0.55rem;
  background: var(--marble);
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
}

.activation-light {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-block;
  transition: all 0.3s ease;
}

.activation-light.green {
  background: #22c55e;
  border: 1.5px solid #16a34a;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.7), inset 0 0 4px #86efac;
}

.activation-light.yellow {
  background: #eab308;
  border: 1.5px solid #ca8a04;
  box-shadow: 0 0 10px rgba(234, 179, 8, 0.7), inset 0 0 4px #fde047;
}

.activation-light.red {
  background: #ef4444;
  border: 1.5px solid #dc2626;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.7), inset 0 0 4px #fca5a5;
}

.activation-title-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.activation-title {
  margin: 0;
  font-size: 1.15rem;
  font-family: var(--font-roman);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--stone);
}

.activation-pill {
  font-size: 0.74rem;
  background: rgba(229, 115, 115, 0.15);
  color: #e57373;
  border: 1px solid #e57373;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
}

.activation-desc {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  color: var(--stone-soft);
  line-height: 1.45;
}

.activation-counter-badge {
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0.4rem 0.95rem;
  border-radius: var(--radius-full);
  background: var(--marble);
  border: 1px solid var(--line);
  color: var(--stone);
  white-space: nowrap;
}

.activation-checklist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.85rem;
  margin-top: 1.15rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--line);
}

.activation-checklist-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--marble);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  gap: 0.75rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.activation-checklist-item:hover {
  border-color: var(--gold);
}

.chk-item-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.chk-icon {
  font-size: 0.95rem;
  line-height: 1;
}

.chk-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--stone);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-chk {
  padding: 0.32rem 0.75rem;
  font-size: 0.76rem;
  font-weight: 600;
  flex-shrink: 0;
}

/* Dashboard Section Headers */
.dashboard-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 3.25rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.75rem;
}

.dashboard-section-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--stone);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dashboard-section-desc {
  color: var(--stone-soft);
  font-size: 0.88rem;
  margin-top: 0.25rem;
  margin-bottom: 0;
  line-height: 1.4;
}

.btn-action-add {
  font-size: 0.82rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  font-weight: 600;
  color: var(--stone);
  background: var(--card-bg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-action-add:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--marble);
}

/* Dashboard Two-Column Work Grid */
.dashboard-work-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 2rem;
  margin-top: 3.25rem;
  align-items: start;
}

/* Badges Wrap for Service Cards */
.service-badges-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.4rem 0;
}

.service-badges-wrap > div {
  margin-top: 0 !important;
}

/* ============================================================
   GLOBAL OVERFLOW PROTECTION & FULL APPLICATION RESPONSIVE RULES
   ============================================================ */
html,
body {
  overflow-x: clip;
  max-width: 100%;
}

.card,
.integration-card,
.service-card,
.plan-card,
.activation-card,
.calendar-panel-card,
.chat-simulator-card {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.dashboard-work-grid > *,
.signup-layout > * {
  min-width: 0;
  max-width: 100%;
}

#gcal-connected-info,
#wa-connected-info {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

#gcal-id-display {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

.gcal-calendar-item {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.dashboard-account-meta {
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* ============================================================
   RESPONSIVE DESIGN SYSTEM & MOBILE EXPERIENCE OVERHAUL
   Complete Cross-Device Fluid Adaptability (320px to 4K)
   ============================================================ */

/* Global input styling for mobile to prevent unwanted iOS Safari auto-zoom */
@media (max-width: 768px) {
  input,
  select,
  textarea,
  .form-input,
  .form-control {
    font-size: 16px !important;
  }
}

/* Master Breakpoint: <= 1080px (Laptops & Horizontal Tablets) */
@media (max-width: 1080px) {
  .dashboard-work-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* Master Breakpoint: <= 960px (Standard Tablets & Small Screens) */
@media (max-width: 960px) {
  .pricing-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .signup-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .simulator-workspace-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Master Breakpoint: <= 900px (Tablets Portrait) */
@media (max-width: 900px) {
  .dashboard-header {
    flex-direction: column;
    align-items: stretch;
    gap: 1.25rem;
  }

  .dashboard-greeting-block {
    min-width: 0;
    width: 100%;
  }

  .subscription-status-box {
    min-width: 0;
    max-width: 100%;
    width: 100%;
  }

  .sub-status-header {
    justify-content: space-between;
  }

  .sub-action-buttons {
    justify-content: flex-start;
  }

  .calendar-week-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    overflow-x: visible;
  }

  .calendar-day-column {
    min-height: 240px;
  }
}

/* Master Breakpoint: <= 860px (Tablets & Brand Subtitle) */
@media (max-width: 860px) {
  /* Brand Logo: Hide the secondary subtitle to keep logo compact & elegant */
  .brand-by {
    display: none !important;
  }
}

/* ============================================================
   MASTER RESPONSIVE DESIGN SYSTEM (<= 768px: PHONES & TABLETS)
   Unified Header Architecture & Complete Fluid Layouts
   ============================================================ */
@media (max-width: 768px) {

  /* ------------------------------------------------------------
     1. UNIFIED RESPONSIVE HEADER (ALL PAGES: INDEX, DASHBOARD, AUTH, LEGAL)
     Clean single row, 56px height, brand logo left, controls right
     ------------------------------------------------------------ */
  .navbar,
  .navbar-landing,
  .navbar-dashboard,
  .navbar-auth,
  header.legal-navbar,
  header[style*="border-bottom"],
  body:has(.legal-standalone-container) > header {
    height: 56px !important;
    min-height: 56px !important;
    max-height: 56px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    background: color-mix(in srgb, var(--marble) 94%, transparent) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid var(--line) !important;
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, background-color 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease !important;
    will-change: transform;
  }

  .nav-container,
  .navbar .nav-container,
  .navbar-landing .nav-container,
  .navbar-dashboard .nav-container,
  .navbar:has(#logout-btn) .nav-container,
  .navbar-auth .nav-container,
  body:has(#login-form) .nav-container,
  body:has(#signup-form) .nav-container,
  header.legal-navbar .wrap,
  header[style*="border-bottom"] .wrap,
  body:has(.legal-standalone-container) > header .wrap {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    padding: 0 1rem !important;
    box-sizing: border-box !important;
    position: static !important;
    gap: 0.5rem !important;
  }

  /* Brand Logo: Clean, compact, prominent icon + title */
  .brand-logo,
  .navbar-dashboard .brand-logo,
  .navbar-landing .brand-logo,
  .navbar-auth .brand-logo,
  .navbar:has(#logout-btn) .brand-logo {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.45rem !important;
    font-size: 1.15rem !important;
    font-family: var(--font-roman) !important;
    font-weight: 700 !important;
    color: var(--stone) !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    min-width: 0 !important;
    height: auto !important;
    align-self: center !important;
  }

  .brand-logo .app-icon-slot {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 26px !important;
    height: 26px !important;
    flex-shrink: 0 !important;
  }

  .brand-logo .app-icon-img,
  .brand-logo .app-icon-svg {
    width: 24px !important;
    height: 24px !important;
    display: block !important;
  }

  /* Subtitle text is cleanly hidden on responsive to keep logo compact & clear */
  .brand-by {
    display: none !important;
  }

  /* Right Tools / CTA Toolbar: Single-row, zero wrapping */
  .nav-cta,
  header.legal-navbar .wrap > div:last-child {
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 0.45rem !important;
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
    position: static !important;
    flex-shrink: 0 !important;
  }

  /* Hamburger Toggle Button (Apollodorus Standard) */
  .hamburger {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 5px !important;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    background: var(--surface) !important;
    border: 1px solid var(--line) !important;
    border-radius: var(--radius-sm, 6px) !important;
    cursor: pointer !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
    transition: background-color 0.2s ease, border-color 0.2s ease !important;
  }

  .hamburger:hover,
  .hamburger:focus-visible {
    border-color: var(--gold) !important;
    outline: none !important;
  }

  .hamburger span {
    display: block !important;
    width: 17px !important;
    height: 2px !important;
    background: var(--stone) !important;
    border-radius: 2px !important;
    transition: transform 0.25s ease, opacity 0.25s ease, background-color 0.2s ease !important;
  }

  .hamburger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg) !important;
  }
  .hamburger.open span:nth-child(2) {
    opacity: 0 !important;
  }
  .hamburger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg) !important;
  }

  /* Language Switcher: Compact & pristine */
  .lang-switch {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
  }

  .lang-switch::after {
    position: absolute !important;
    right: 8px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-size: 9px !important;
    line-height: 1 !important;
    color: var(--stone-soft) !important;
    pointer-events: none !important;
  }

  .lang-switch select {
    height: 32px !important;
    line-height: 30px !important;
    padding: 0 22px 0 10px !important;
    font-size: 0.78rem !important;
    font-weight: 500 !important;
    border-radius: var(--radius-full) !important;
    border: 1px solid var(--line) !important;
    background-color: var(--surface, var(--card-bg)) !important;
    color: var(--stone) !important;
    cursor: pointer !important;
    outline: none !important;
    min-width: 0 !important;
    text-align: left !important;
    vertical-align: middle !important;
  }

  /* Theme Toggle Button: Sleek 32x32 circle */
  .theme-toggle {
    position: static !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    padding: 0 !important;
    border-radius: var(--radius-full) !important;
    border: 1px solid var(--line) !important;
    background: var(--surface) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--stone) !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
  }

  .theme-toggle svg {
    width: 15px !important;
    height: 15px !important;
  }

  /* ------------------------------------------------------------
     DROPDOWN DRAWER (Apollodorus Mobile Pattern: Index, Dashboard, Auth)
     ------------------------------------------------------------ */
  .nav-links,
  .navbar .nav-links,
  .navbar-landing .nav-links,
  .navbar-dashboard .nav-links,
  .navbar-dashboard .dashboard-header-tools,
  .navbar-auth .nav-links {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-height: 0 !important;
    overflow: hidden !important;
    padding: 0 1.25rem !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    background: color-mix(in srgb, var(--marble) 98%, transparent) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: none !important;
    border-bottom: 1px solid transparent !important;
    box-shadow: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1), padding 0.3s ease, border-color 0.3s ease, opacity 0.25s ease, visibility 0.3s ease !important;
    z-index: 9999 !important;
    margin: 0 !important;
  }

  .nav-links.open,
  .navbar .nav-links.open,
  .navbar-landing .nav-links.open,
  .navbar-dashboard .nav-links.open,
  .navbar-dashboard .dashboard-header-tools.open,
  .navbar-auth .nav-links.open {
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    max-height: 420px !important;
    padding: 0.65rem 1.25rem 1.25rem 1.25rem !important;
    border-bottom: 1px solid var(--line) !important;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22) !important;
  }

  /* Coexistence rule: Prevent login/signup and profile buttons from coexisting on mobile or anywhere */
  body.has-user-profile #nav-login-btn,
  body.has-user-profile #nav-signup-btn,
  #nav-login-btn[hidden],
  #nav-signup-btn[hidden],
  #nav-login-btn[style*="display: none"],
  #nav-signup-btn[style*="display: none"] {
    display: none !important;
  }

  body:not(.has-user-profile) #nav-profile-btn,
  #nav-profile-btn[hidden],
  #nav-profile-btn[style*="display: none"] {
    display: none !important;
  }

  /* Item styling inside the dropdown drawer (Apollodorus standard: clean, sleek rows) */
  .nav-links > a,
  .nav-links > button,
  .dashboard-header-tools > a,
  .dashboard-header-tools > button {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    padding: 0.85rem 0.25rem !important;
    font-family: var(--font-sans) !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    color: var(--stone) !important;
    text-decoration: none !important;
    border: none !important;
    border-bottom: 1px solid var(--line) !important;
    background: transparent !important;
    border-radius: 0 !important;
    text-align: left !important;
    justify-content: flex-start !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
    transition: color 0.18s ease, padding-left 0.18s ease !important;
    box-shadow: none !important;
  }

  .nav-links > a:last-child,
  .nav-links > button:last-child,
  .dashboard-header-tools > a:last-child,
  .dashboard-header-tools > button:last-child {
    border-bottom: none !important;
  }

  .nav-links > a:hover,
  .nav-links > button:hover,
  .dashboard-header-tools > a:hover,
  .dashboard-header-tools > button:hover {
    color: var(--gold) !important;
    padding-left: 0.35rem !important;
    text-decoration: none !important;
  }

  /* Home Link inside dropdown drawer */
  .nav-link-home {
    display: flex !important;
    font-weight: 600 !important;
  }

  /* Standout Call-to-Action Buttons (Sign up / Profile / Auth page actions) */
  .nav-links #nav-signup-btn,
  .nav-links #nav-profile-btn,
  .navbar-auth .nav-links a.btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    margin-top: 0.85rem !important;
    margin-bottom: 0.25rem !important;
    padding: 0.65rem 1rem !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    border-radius: var(--radius-sm, 6px) !important;
    background: var(--gold) !important;
    color: #111827 !important;
    border: none !important;
    box-shadow: none !important;
    text-align: center !important;
    text-decoration: none !important;
    border-bottom: none !important;
  }

  .nav-links #nav-signup-btn:hover,
  .nav-links #nav-profile-btn:hover,
  .navbar-auth .nav-links a.btn:hover {
    padding-left: 1rem !important;
    opacity: 0.92 !important;
    color: #111827 !important;
    transform: none !important;
  }

  .nav-links #nav-login-btn {
    border-bottom: 1px solid var(--line) !important;
    font-weight: 500 !important;
  }

  /* Dashboard tools inside dropdown drawer */
  /* Hide Plan Oro badge in mobile drawer (redundant as user noted) */
  #client-plan-badge,
  .navbar-dashboard #client-plan-badge {
    display: none !important;
  }

  #header-priority-support-btn,
  .navbar-dashboard #header-priority-support-btn {
    display: flex !important;
    align-items: center !important;
    gap: 0.55rem !important;
    color: #10b981 !important;
    font-weight: 500 !important;
    border-bottom: 1px solid var(--line) !important;
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0.85rem 0.25rem !important;
  }

  #header-priority-support-btn svg {
    width: 16px !important;
    height: 16px !important;
    fill: currentColor !important;
    flex-shrink: 0 !important;
  }

  #help-btn,
  .navbar-dashboard #help-btn {
    display: flex !important;
    width: 100% !important;
    border-bottom: 1px solid var(--line) !important;
  }

  #logout-btn,
  .navbar-dashboard #logout-btn,
  .navbar:has(#logout-btn) #logout-btn {
    display: flex !important;
    width: 100% !important;
    color: #ef4444 !important;
    font-weight: 500 !important;
    margin-top: 0.25rem !important;
    border-bottom: none !important;
    padding-top: 0.95rem !important;
  }

  #logout-btn:hover {
    color: #dc2626 !important;
  }

  /* Auth prompt caption in login/signup drawer */
  .auth-switch-prompt,
  .nav-links .auth-switch-prompt {
    display: block !important;
    font-size: 0.82rem !important;
    color: var(--stone-soft) !important;
    padding-top: 0.75rem !important;
    padding-bottom: 0.15rem !important;
    border-bottom: none !important;
  }

  /* Legal Navbar (Terms & Privacy): Hide Volver button */
  header.legal-navbar a.btn,
  header[style*="border-bottom"] a.btn,
  body:has(.legal-standalone-container) > header a.btn {
    display: none !important;
  }


  /* ------------------------------------------------------------
     2. GLOBAL CONTAINERS & FLUID PADDING
     ------------------------------------------------------------ */
  .container {
    padding: 1.25rem 1rem !important;
    margin-top: 1rem !important;
    margin-bottom: 2.5rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .wrap {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* ------------------------------------------------------------
     3. TAREA 1: CASO INDEX
     ------------------------------------------------------------ */
  /* Hide carousel & duplicate divider on mobile as requested */
  .showcase-section,
  #showcase,
  .showcase-container,
  .showcase-carousel-viewport,
  .showcase-lightbox-dialog {
    display: none !important;
  }

  #showcase + .classical-divider,
  .showcase-section + .classical-divider {
    display: none !important;
  }

  .hero {
    margin: 1.5rem auto 2.5rem !important;
    padding: 1.5rem 0.5rem 1rem !important;
  }

  .hero h1 {
    font-size: clamp(1.85rem, 6.5vw, 2.6rem) !important;
    line-height: 1.18 !important;
    word-break: break-word !important;
  }

  .hero p {
    font-size: clamp(0.95rem, 2.8vw, 1.12rem) !important;
    line-height: 1.55 !important;
    max-width: 640px !important;
    margin: 0 auto 1.5rem !important;
  }

  .hero-actions,
  #hero-actions-container {
    flex-direction: column !important;
    width: 100% !important;
    gap: 0.75rem !important;
  }

  .hero-actions .btn,
  #hero-actions-container .btn {
    width: 100% !important;
    box-sizing: border-box !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 0.85rem 1.25rem !important;
  }

  /* Classical Dividers */
  .classical-divider {
    margin: 1.75rem 0 !important;
  }

  /* Plans Section */
  #plans {
    margin-top: 1.5rem !important;
  }

  .pricing-header h2 {
    font-size: clamp(1.5rem, 5vw, 2.1rem) !important;
  }

  .pricing-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
    width: 100% !important;
  }

  .plan-card {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 1.75rem 1.25rem !important;
    transform: none !important;
  }

  .plan-card:hover {
    transform: none !important;
  }

  .plan-price {
    font-size: clamp(2rem, 6vw, 2.35rem) !important;
  }

  .plan-features {
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
  }

  .plan-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.92rem;
    line-height: 1.45;
  }

  .plan-features li svg {
    flex-shrink: 0;
    margin-top: 2px;
  }

  .plan-card .btn-block {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0.85rem !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    justify-content: center !important;
    text-align: center !important;
  }

  /* Footer Links */
  .footer-inner {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 1.25rem !important;
    padding: 1.5rem 1rem !important;
  }

  .footer-links {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    gap: 0.75rem !important;
  }

  .footer-links a[data-modal-target="cancellation-modal"] {
    width: 100% !important;
    max-width: 360px !important;
    box-sizing: border-box !important;
    text-align: center !important;
    justify-content: center !important;
  }

  /* ------------------------------------------------------------
     4. TAREA 2: CASO DASHBOARD
     ------------------------------------------------------------ */
  .dashboard-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 1rem !important;
  }

  .dashboard-greeting-block {
    min-width: 0 !important;
    width: 100% !important;
  }

  .dashboard-greeting-title {
    font-size: clamp(1.35rem, 5vw, 1.85rem) !important;
  }

  .dashboard-account-meta {
    font-size: 0.86rem !important;
    word-break: break-word !important;
  }

  .subscription-status-box {
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0.85rem 1rem !important;
  }

  .sub-status-header {
    justify-content: space-between !important;
  }

  .sub-action-buttons {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 0.5rem !important;
  }

  .sub-action-buttons button {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 0.65rem 1rem !important;
    font-size: 0.84rem !important;
  }

  #email-verification-banner {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.85rem !important;
    padding: 1rem !important;
  }

  #btn-resend-verification {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
  }

  .dashboard-main-tabs {
    flex-direction: column !important;
    gap: 0.45rem !important;
    padding: 0.35rem !important;
    width: 100% !important;
    border-radius: var(--radius-md) !important;
  }

  .dashboard-main-tab {
    width: 100% !important;
    flex: 1 1 100% !important;
    justify-content: flex-start !important;
    padding: 0.75rem 1rem !important;
    font-size: 0.88rem !important;
    box-sizing: border-box !important;
  }

  .channels-status-summary-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
    text-align: center !important;
    padding: 1rem !important;
  }

  #summary-wa-pill,
  #summary-gcal-pill {
    width: 100% !important;
    justify-content: center !important;
    padding: 0.5rem !important;
  }

  /* Calendar Section */
  .calendar-panel-card {
    padding: 1rem 0.75rem !important;
  }

  .calendar-panel-title h2 {
    font-size: clamp(1.15rem, 4vw, 1.4rem) !important;
  }

  .calendar-panel-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.85rem !important;
  }

  #master-calendar-branch-filter-container,
  #master-calendar-staff-filter-container {
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    gap: 0.35rem !important;
  }

  #calendar-branch-filter,
  #calendar-staff-filter {
    min-width: 0 !important;
    width: 100% !important;
    flex: 1 1 100% !important;
  }

  .calendar-nav-toolbar {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.5rem !important;
    width: 100% !important;
  }

  .calendar-nav-toolbar .calendar-week-label {
    grid-column: 1 / -1 !important;
    order: -1 !important;
    text-align: center !important;
    font-weight: 700 !important;
    padding: 0.25rem 0 !important;
    font-size: 0.88rem !important;
  }

  .calendar-nav-toolbar button {
    width: 100% !important;
    justify-content: center !important;
    padding: 0.45rem 0.5rem !important;
    font-size: 0.8rem !important;
  }

  .calendar-nav-toolbar button[onclick*="navigateCalendarToday"] {
    grid-column: 1 / -1 !important;
    width: 100% !important;
  }

  .calendar-legend-bar {
    flex-wrap: wrap !important;
    gap: 0.5rem 1rem !important;
    justify-content: center !important;
    font-size: 0.75rem !important;
  }

  .calendar-week-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
    overflow-x: visible !important;
  }

  .calendar-day-column {
    min-height: auto !important;
  }

  .dashboard-section-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.75rem !important;
    margin-top: 2rem !important;
  }

  .dashboard-section-header > div:last-child {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 0.5rem !important;
  }

  .btn-action-add,
  #btn-export-appointments-csv {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 0.65rem !important;
  }

  .services-list-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
    width: 100% !important;
  }

  .service-card {
    padding: 1rem !important;
  }

  .service-card-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.5rem !important;
  }

  .service-card-actions {
    display: flex !important;
    width: 100% !important;
    gap: 0.5rem !important;
    margin-top: 0.5rem !important;
  }

  .service-card-actions .btn {
    flex: 1 1 50% !important;
    justify-content: center !important;
    text-align: center !important;
  }

  .schedule-grid {
    grid-template-columns: 1fr !important;
    gap: 0.5rem !important;
  }

  #schedule-branch-selector-container {
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
  }

  #schedule-branch-select {
    width: 100% !important;
    min-width: 0 !important;
  }

  /* Channels Tab */
  .dashboard-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
    width: 100% !important;
  }

  .integration-card {
    padding: 1.25rem 1rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .integration-card button {
    width: 100% !important;
    justify-content: center !important;
  }

  #wa-connected-info,
  #gcal-connected-info {
    padding: 0.65rem !important;
    font-size: 0.82rem !important;
  }

  #gcal-rename-container input,
  #gcal-rename-container select {
    width: 100% !important;
    min-width: 0 !important;
  }

  /* Simulator Tab */
  .simulator-workspace-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
    width: 100% !important;
  }

  .sim-scenario-grid {
    grid-template-columns: 1fr !important;
    gap: 0.5rem !important;
  }

  .chat-simulator-card {
    height: 460px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .chat-quick-actions {
    flex-wrap: wrap !important;
    gap: 0.35rem !important;
    padding: 0.45rem !important;
  }

  .quick-chip {
    font-size: 0.72rem !important;
    padding: 0.25rem 0.55rem !important;
  }

  /* App Dialogs & Modals */
  .app-dialog,
  dialog {
    width: 95vw !important;
    max-width: 95vw !important;
    max-height: 90vh !important;
    margin: auto !important;
    border-radius: var(--radius-md) !important;
  }

  .app-dialog-header {
    padding: 1rem 1.15rem !important;
  }

  .app-dialog-body {
    padding: 1rem !important;
    max-height: 75vh !important;
    overflow-y: auto !important;
  }

  .form-row-2,
  .form-row-3 {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }

  #service-color-select,
  #staff-color-select,
  #new-gcal-color-select {
    min-width: 0 !important;
    width: 100% !important;
    flex: 1 1 100% !important;
  }

  /* Operating Hours & Staff Schedule Modal Cards Mobile Overhaul */
  .day-schedule-card,
  .staff-day-schedule-card {
    padding: 0.65rem 0.75rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .day-schedule-header,
  .staff-day-schedule-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    min-height: 28px !important;
    box-sizing: border-box !important;
    gap: 0.4rem !important;
  }

  .day-schedule-header .day-name,
  .staff-day-schedule-header .day-name {
    font-size: 0.9rem !important;
    font-weight: 700 !important;
  }

  .day-toggle-label {
    font-size: 0.8rem !important;
    gap: 0.35rem !important;
  }

  .day-toggle-label input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
  }

  .day-intervals-container,
  .staff-day-intervals-container {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin-top: 0.55rem !important;
  }

  .day-interval-row,
  .staff-interval-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.35rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin-bottom: 0.4rem !important;
  }

  .day-interval-row input[type="time"],
  .staff-interval-row input[type="time"],
  .day-interval-row .interval-time-input,
  .staff-interval-row .interval-time-input,
  .fixed-interval-row input[type="time"] {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    width: 100% !important;
    max-width: none !important;
    padding: 0.35rem 0.25rem !important;
    height: 38px !important;
    font-size: 15px !important;
    text-align: center !important;
    box-sizing: border-box !important;
    border-radius: var(--radius-xs) !important;
  }

  .day-interval-row .interval-separator,
  .staff-interval-row .interval-separator {
    flex-shrink: 0 !important;
    width: auto !important;
    padding: 0 0.15rem !important;
    font-size: 0.85rem !important;
    color: var(--stone-soft) !important;
    text-align: center !important;
  }

  .day-interval-row .btn-remove-interval,
  .staff-interval-row .btn-remove-interval {
    flex-shrink: 0 !important;
    width: 32px !important;
    height: 38px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.95rem !important;
    line-height: 1 !important;
    color: #e57373 !important;
    background: transparent !important;
    border: none !important;
  }

  .day-schedule-footer,
  .staff-day-schedule-footer {
    width: 100% !important;
    text-align: right !important;
    margin-top: 0.35rem !important;
    box-sizing: border-box !important;
  }

  .btn-add-interval,
  .btn-add-staff-interval {
    font-size: 0.76rem !important;
    padding: 0.3rem 0.55rem !important;
    color: var(--verdigris) !important;
    white-space: nowrap !important;
  }

  /* ------------------------------------------------------------
     5. TAREA 3: CASO SIGNUP
     ------------------------------------------------------------ */
  .signup-layout {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
    width: 100% !important;
  }

  .plan-selection-summary {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 1.25rem 1rem !important;
  }

  #signup-submit-btn {
    width: 100% !important;
    padding: 0.95rem !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
  }

  .form-checkbox-label {
    display: flex !important;
    align-items: flex-start !important;
    gap: 0.65rem !important;
    font-size: 0.88rem !important;
    line-height: 1.45 !important;
  }

  .form-checkbox-label input[type="checkbox"] {
    margin-top: 3px !important;
    flex-shrink: 0 !important;
    min-width: 18px !important;
    min-height: 18px !important;
  }

  /* ------------------------------------------------------------
     6. TAREA 4: CASO LOGIN
     ------------------------------------------------------------ */
  #login-submit-btn {
    width: 100% !important;
    padding: 0.85rem !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
  }

  /* Toast Notifications */
  .toast-container {
    left: 0.75rem !important;
    right: 0.75rem !important;
    bottom: 0.75rem !important;
    max-width: none !important;
  }

  .card.card-classical {
    padding: 1.5rem 1.15rem !important;
  }
}

/* ============================================================
   COLLAPSIBLE SUBSCRIPTION STATUS & DASHBOARD TABS (OPTION A)
   ============================================================ */
.subscription-status-box {
  padding: 0.85rem 1.25rem;
  gap: 0.45rem;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.sub-status-summary-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  cursor: pointer;
  user-select: none;
  width: 100%;
}

.sub-status-summary-left {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.sub-status-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gold);
  background: rgba(163, 124, 50, 0.1);
  border: 1px solid rgba(163, 124, 50, 0.35);
  border-radius: var(--radius-full);
  white-space: nowrap;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.sub-status-summary-toggle:hover .sub-status-toggle-btn {
  background: var(--gold);
  color: #FFFFFF;
}

.sub-toggle-chevron {
  display: inline-block;
  transition: transform 0.22s ease;
  font-size: 0.7rem;
}

.subscription-status-box.expanded .sub-toggle-chevron {
  transform: rotate(180deg);
}

.subscription-status-box:not(.expanded) .sub-action-buttons {
  display: none !important;
}

.subscription-status-box.expanded .sub-action-buttons {
  margin-top: 0.65rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--line);
}

/* Main Dashboard Navigation Tabs (Option A) */
.dashboard-main-tabs {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.75rem 0 2rem;
  padding: 0.45rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  box-shadow: var(--card-shadow);
  flex-wrap: wrap;
}

.dashboard-main-tab {
  flex: 1 1 240px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.25rem;
  font-family: var(--font-roman);
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--stone-soft);
  background: transparent;
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.dashboard-main-tab:hover {
  color: var(--stone);
  background: var(--marble);
}

.dashboard-main-tab.active {
  color: var(--stone);
  background: rgba(163, 124, 50, 0.12);
  border-color: var(--gold);
  box-shadow: 0 2px 8px rgba(163, 124, 50, 0.12);
}

.tab-sandbox-pill {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  background: rgba(58, 125, 114, 0.15);
  color: var(--verdigris);
  border: 1px solid rgba(58, 125, 114, 0.35);
}

/* Simulator Dedicated Tab Workspace */
.simulator-workspace-grid {
  display: grid;
  grid-template-columns: minmax(340px, 520px) minmax(300px, 1fr);
  gap: 2.25rem;
  align-items: start;
  margin-top: 1.25rem;
}

.simulator-guide-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-left: 4px solid var(--verdigris);
  border-radius: var(--radius-md);
  padding: 1.6rem;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.sim-scenario-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.sim-scenario-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--stone);
  background: var(--marble);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}

.sim-scenario-btn:hover {
  border-color: var(--verdigris);
  color: var(--verdigris);
  background: rgba(58, 125, 114, 0.08);
}

@media (max-width: 960px) {
  .simulator-workspace-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 600px) {
  .sim-scenario-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-main-tab {
    flex: 1 1 100%;
    padding: 0.7rem 0.85rem;
    font-size: 0.88rem;
  }
}

/* Unified Integration Channels Header (Option 1) */
.channels-status-header {
  margin-top: 1.5rem;
  margin-bottom: 1.25rem;
}

#channels-global-badge {
  transition: all 0.25s ease;
  user-select: none;
}

#channels-global-dot {
  transition: all 0.25s ease;
}

/* ============================================================
   SHOWCASE CAROUSEL & LIGHTBOX (Infinite Marquee + Drag & Zoom)
   ============================================================ */
.showcase-section {
  position: relative;
  width: 100%;
  padding: 2rem 0 3rem;
  overflow: hidden;
  background: transparent;
  border-top: none;
  border-bottom: none;
}

.showcase-header {
  text-align: center;
  max-width: 860px;
  margin: 0 auto 2.25rem;
  padding: 0 1.5rem;
}

.showcase-header .roman-pill {
  margin-bottom: 0.75rem;
}

.showcase-header h2 {
  font-family: var(--font-roman);
  font-size: 2.25rem;
  font-weight: 700;
  margin: 0.4rem 0 0.8rem;
  letter-spacing: -0.015em;
  color: var(--stone);
}

.showcase-header p {
  color: var(--stone-soft);
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0 auto;
}

/* Outer viewport with edge fading & blur masks */
.showcase-carousel-viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
  padding: 1rem 0;
  touch-action: pan-y;
}

.showcase-carousel-viewport.is-dragging {
  cursor: grabbing;
}

.showcase-carousel-viewport::before,
.showcase-carousel-viewport::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: clamp(60px, 12vw, 160px);
  z-index: 4;
  pointer-events: none;
}

.showcase-carousel-viewport::before {
  left: 0;
  background: linear-gradient(to right, var(--marble) 15%, transparent 100%);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  mask-image: linear-gradient(to right, black 30%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, black 30%, transparent 100%);
}

.showcase-carousel-viewport::after {
  right: 0;
  background: linear-gradient(to left, var(--marble) 15%, transparent 100%);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  mask-image: linear-gradient(to left, black 30%, transparent 100%);
  -webkit-mask-image: linear-gradient(to left, black 30%, transparent 100%);
}

@supports (mask-image: linear-gradient(to right, transparent, black)) {
  .showcase-carousel-viewport {
    mask-image: linear-gradient(to right, transparent 0%, black clamp(45px, 8vw, 120px), black calc(100% - clamp(45px, 8vw, 120px)), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black clamp(45px, 8vw, 120px), black calc(100% - clamp(45px, 8vw, 120px)), transparent 100%);
  }
}

/* The track holding slides */
.showcase-track {
  display: flex;
  gap: 1.75rem;
  width: max-content;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Slide Card */
.showcase-card {
  flex: 0 0 auto;
  width: clamp(300px, 32vw, 440px);
  background: var(--card-bg);
  border: 1px solid var(--card-border, var(--line));
  border-radius: var(--radius-md);
  padding: 0.85rem;
  cursor: pointer;
  transition: transform 0.28s cubic-bezier(0.2, 0, 0, 1), border-color 0.28s ease, box-shadow 0.28s ease;
  box-shadow: var(--card-shadow);
  position: relative;
  overflow: hidden;
}

.showcase-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold);
  box-shadow: var(--card-shadow-lg);
}

.showcase-card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--marble-dark);
  border: 1px solid var(--line);
}

.showcase-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.showcase-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(14, 18, 22, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.showcase-card:hover .showcase-card-overlay {
  opacity: 1;
}

.showcase-card-zoom-btn {
  background: var(--gold);
  color: #111111;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.5rem 0.95rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  border: none;
  cursor: pointer;
  transform: scale(0.92);
  transition: transform 0.2s ease, background 0.2s ease;
}

.showcase-card:hover .showcase-card-zoom-btn {
  transform: scale(1);
}

.showcase-card-info {
  margin-top: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.showcase-card-badge-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.showcase-card-badge {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gold);
  background: var(--gold-subtle, rgba(197, 160, 89, 0.12));
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(197, 160, 89, 0.3);
  display: inline-block;
}

.showcase-card-title {
  font-family: var(--font-roman);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--stone);
  margin: 0;
}

.showcase-card-desc {
  font-size: 0.85rem;
  color: var(--stone-soft);
  margin: 0;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Lightbox Dialog (Theme-Aware, Perfectly Centered & High-Legibility) */
dialog.showcase-lightbox-dialog:not([open]),
.showcase-lightbox-dialog:not([open]) {
  display: none !important;
}

dialog.showcase-lightbox-dialog[open],
.showcase-lightbox-dialog[open] {
  display: flex !important;
  flex-direction: column !important;
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  margin: auto !important;
  max-width: min(1280px, 96vw) !important;
  width: 96vw !important;
  max-height: 94vh !important;
  padding: 0 !important;
  border: 1px solid var(--card-border, var(--line)) !important;
  border-radius: var(--radius-md, 16px) !important;
  background: var(--card-bg) !important;
  color: var(--stone) !important;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--card-border, var(--line)) !important;
  overflow: hidden !important;
  z-index: 99999 !important;
}

.showcase-lightbox-dialog::backdrop {
  background: rgba(43, 39, 31, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

:root[data-theme="dark"] .showcase-lightbox-dialog::backdrop {
  background: rgba(10, 9, 8, 0.85);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .showcase-lightbox-dialog::backdrop {
    background: rgba(10, 9, 8, 0.85);
  }
}

.showcase-lightbox-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  max-height: 94vh;
  background: var(--card-bg);
}

/* Modal Header */
.showcase-lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  background: var(--card-bg);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.showcase-lightbox-header-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.showcase-lightbox-title {
  font-family: var(--font-roman);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--stone);
  margin: 0;
  letter-spacing: -0.01em;
}

/* Modal Close Button */
.showcase-lightbox-close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--marble-dark);
  border: 1px solid var(--line);
  color: var(--stone);
  font-size: 1.35rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.showcase-lightbox-close:hover {
  background: var(--gold);
  color: #111111;
  border-color: var(--gold);
  transform: scale(1.05);
}

/* Modal Body / Image Stage */
.showcase-lightbox-body {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.25rem;
  background: var(--marble);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
  min-height: 280px;
}

.showcase-lightbox-img-wrapper {
  position: relative;
  width: 100%;
  max-width: 1140px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--marble-dark);
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
  cursor: zoom-in;
  transition: max-width 0.25s ease;
}

.showcase-lightbox-img-wrapper.is-zoomed {
  cursor: zoom-out;
  max-width: none;
}

.showcase-lightbox-img-wrapper img {
  width: 100%;
  height: auto;
  max-height: calc(88vh - 130px);
  object-fit: contain;
  display: block;
  transition: transform 0.25s ease;
}

.showcase-lightbox-img-wrapper.is-zoomed img {
  max-height: none;
  width: 135%;
  max-width: none;
}

/* Modal Navigation Arrows */
.showcase-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--card-bg);
  border: 1px solid var(--line);
  color: var(--stone);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 6;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.showcase-lightbox-nav:hover {
  background: var(--gold);
  color: #111111;
  border-color: var(--gold);
  transform: translateY(-50%) scale(1.08);
}

.showcase-lightbox-prev {
  left: 0.85rem;
}

.showcase-lightbox-next {
  right: 0.85rem;
}

/* Modal Footer / Detailed Caption */
.showcase-lightbox-footer {
  padding: 0.75rem 1.25rem 0.9rem;
  background: var(--card-bg);
  border-top: 1px solid var(--line);
  flex-shrink: 0;
}

.showcase-lightbox-desc {
  color: var(--stone-soft);
  font-size: 0.92rem;
  line-height: 1.5;
  margin: 0;
}

@media (max-width: 768px) {
  dialog.showcase-lightbox-dialog[open],
  .showcase-lightbox-dialog[open] {
    display: none !important;
  }
}

/* ============================================================
   BACK TO TOP BUTTON (Apollodorus Standard - Legal Documents)
   ============================================================ */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 90;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background-color: var(--surface, var(--card-bg));
  color: var(--stone);
  border: 1px solid var(--line);
  box-shadow: var(--card-shadow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.28s ease, visibility 0.28s ease, transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.back-to-top:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-2px);
  box-shadow: var(--card-shadow-lg);
}

.back-to-top:active {
  transform: translateY(0);
}

.back-to-top:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.back-to-top.is-visible {
  opacity: 0.95;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top.is-visible:hover {
  opacity: 1;
}

@media (max-width: 768px) {
  .back-to-top {
    bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
    right: 1.25rem;
    width: 38px;
    height: 38px;
  }
}




