/* =====================================================
   CSS base + resets
   Tokens de paleta + estructuras de diseño + estilos de componentes
   ===================================================== */

/* Anulaciones de Bootstrap: asigna tokens de Bootstrap a la paleta de Sesvia */
:root {
  --bs-primary:          #9c6644;
  --bs-primary-rgb:      156, 102, 68;
  --bs-secondary:        #b08968;
  --bs-secondary-rgb:    176, 137, 104;
  --bs-body-color:       #7f5539;
  --bs-body-bg:          #ede0d4;
  --bs-border-color:     rgba(127, 85, 57, 0.25);
  --bs-card-bg:          #ffffff;
  --bs-card-border-color: rgba(176, 137, 104, 0.2);
  --bs-link-color:       #9c6644;
  --bs-link-hover-color: #7f5539;
  --bs-btn-font-family:  inherit;
  --bs-font-sans-serif:  inherit;
}

:root {
  --sesvia-1: #ede0d4;
  --sesvia-2: #e6ccb2;
  --sesvia-3: #ddb892;
  --sesvia-4: #b08968;
  --sesvia-5: #7f5539;
  --sesvia-6: #9c6644;

  --bg: var(--sesvia-1);
  --text: var(--sesvia-5);
  --card: #ffffff;
  --muted: #6e5a4b;
  --border: rgba(127, 85, 57, 0.25);
  --danger: #d4183d;
  --success-bg: rgba(216, 238, 224, 0.55);
  --success-border: rgba(52, 129, 81, 0.25);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg);
}

/* =====================================================
   APP SHELL — contenedor neutral
   ===================================================== */

.app-shell {
  min-height: 100vh;
}

/* =====================================================
   LAYOUT — AUTH (centrado, fondo degradado)
   ===================================================== */

.layout-auth {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  gap: 20px;
  background: radial-gradient(circle at top, #f4ece4 0%, var(--bg) 55%, #e9dacc 100%);
}

.auth-topbar {
  width: min(100%, 440px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.auth-brand {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.auth-brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}

.auth-brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.auth-brand h1 {
  margin: 0;
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--sesvia-6);
}

.auth-brand p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.auth-card {
  background: var(--card);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.09);
  width: 100%;
  max-width: 440px;
}

.auth-topbar-register {
  width: min(100%, 560px);
}

.auth-card-register {
  max-width: 560px;
}

.auth-card h2 {
  margin: 0 0 6px;
  font-size: 1.6rem;
  color: var(--sesvia-5);
}

.auth-card .subtitle {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 0.93rem;
}

.auth-entry-shell {
  width: 100%;
  gap: 16px;
  justify-content: space-between;
  padding-block: 20px 28px;
}

.auth-entry-topbar {
  width: min(100%, 560px);
}

.auth-entry-main {
  width: 100%;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.auth-entry-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.auth-entry-brand img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.auth-entry-brand h1 {
  margin: 0;
  font-size: 2rem;
  color: var(--sesvia-6);
}

.auth-entry-brand p {
  margin: 0;
  color: var(--muted);
}

.auth-entry-card {
  max-width: 560px;
  background: rgba(255, 255, 255, 0.94);
}

.role-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.role-choice-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(176, 137, 104, 0.25);
  background: linear-gradient(135deg, rgba(237, 224, 212, 0.65), rgba(255, 255, 255, 0.98));
  color: var(--sesvia-5);
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.role-choice-card:hover {
  transform: translateY(-1px);
  border-color: rgba(156, 102, 68, 0.4);
  box-shadow: 0 10px 20px rgba(127, 85, 57, 0.08);
}

.role-choice-card strong {
  font-size: 1rem;
}

.role-choice-card span {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.35;
}

.auth-footer {
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
}

.auth-entry-footer-note {
  margin-top: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .auth-entry-brand {
    animation: sesvia-splash-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .auth-entry-shell.is-exiting .auth-entry-brand {
    animation: sesvia-splash-out 0.2s ease-in both;
  }
}

@keyframes sesvia-splash-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes sesvia-splash-out {
  0%   { opacity: 1; transform: scale(1); }
  35%  { opacity: 1; transform: scale(1.04); }
  100% { opacity: 0; transform: scale(1.08); }
}

/* =====================================================
   LAYOUT — PRO (barra lateral fija + área principal)
   ===================================================== */

.layout-pro,
.layout-client-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
  position: relative;
  isolation: isolate;
}

/* --- Barra lateral --- */
.sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--sesvia-2);
  border-right: 1px solid rgba(176, 137, 104, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  z-index: 30;
}

.sidebar-header {
  padding: 18px 20px 16px;
  border-bottom: 1px solid rgba(176, 137, 104, 0.3);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.sidebar-brand img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.sidebar-brand:hover .sidebar-header-title {
  color: var(--sesvia-6);
}

.sidebar-header-title {
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--sesvia-5);
}

.sidebar-nav {
  flex: 1;
  padding: 10px 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: rgba(127, 85, 57, 0.65);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: background 0.15s, color 0.15s;
  line-height: 1.2;
}

.sidebar-nav-item:hover {
  background: rgba(176, 137, 104, 0.2);
  color: var(--sesvia-5);
}

.sidebar-nav-item.active {
  background: var(--sesvia-3);
  color: var(--sesvia-5);
  font-weight: 600;
}

.sidebar-nav-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  stroke: currentColor;
}

.sidebar-nav-label {
  min-width: 0;
}

.sidebar-nav-badge {
  margin-left: auto;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 10px;
  border-top: 1px solid rgba(176, 137, 104, 0.3);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
}

.sidebar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--sesvia-4);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}

.sidebar-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user-info .u-name {
  font-weight: 600;
  font-size: 0.83rem;
  color: var(--sesvia-5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-info .u-email {
  font-size: 0.73rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* --- Área principal --- */
.main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--sesvia-1);
  position: relative;
  z-index: 10;
  min-width: 0;
}

.main-header {
  height: 62px;
  border-bottom: 1px solid rgba(176, 137, 104, 0.2);
  background: #fff;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  gap: 16px;
}

.main-header h1 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--sesvia-6);
}

.main-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px 24px 88px;
}

@media (prefers-reduced-motion: no-preference) {
  .main-content:not(.no-animate) {
    animation: sesvia-page-rise 0.22s ease-out both;
  }
}

@keyframes sesvia-page-rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =====================================================
   LAYOUT — CLIENT (navegación superior + contenido)
   ===================================================== */

.layout-client {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.layout-guest {
  background: radial-gradient(circle at top, #f6ede5 0%, var(--bg) 48%, #e7d6c7 100%);
}

.guest-topnav {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
}

.guest-topnav-right {
  gap: 12px;
}

.guest-auth-link {
  white-space: nowrap;
}

.guest-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.guest-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 28px;
  border-radius: 18px;
  border: 1px solid rgba(176, 137, 104, 0.2);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(237, 224, 212, 0.72));
  box-shadow: 0 10px 28px rgba(127, 85, 57, 0.08);
}

.guest-hero h1 {
  margin: 10px 0 8px;
  font-size: clamp(1.8rem, 2.5vw, 2.5rem);
  color: var(--sesvia-5);
}

.guest-hero .subtitle {
  margin: 0;
  max-width: 720px;
  color: var(--muted);
}

.guest-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.guest-browse-section {
  background: rgba(255, 255, 255, 0.88);
}

.guest-search-field {
  margin: 8px 0 18px;
}

.guest-search-field input {
  background: rgba(255, 255, 255, 0.96);
}

.browse-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 8px 0 18px;
}

.browse-filter-grid .field {
  margin: 0;
}

.browse-filter-grid .field input,
.browse-filter-grid .field select {
  min-height: 42px;
}

.browse-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.browse-card-head,
.browse-profile-header,
.browse-service-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.browse-service-head {
  justify-content: space-between;
}

.service-image-placeholder {
  position: relative;
  isolation: isolate;
  min-height: 118px;
  margin-bottom: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, #9f6b43 0%, #d4a071 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.service-image-placeholder::before {
  content: "";
  position: absolute;
  inset: auto -24px -58px auto;
  width: 150px;
  height: 150px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  z-index: -1;
}

.service-image-placeholder::after {
  content: "";
  position: absolute;
  inset: -40px auto auto -38px;
  width: 120px;
  height: 120px;
  border-radius: 38px;
  rotate: 18deg;
  background: rgba(255, 255, 255, 0.12);
  z-index: -1;
}

.service-image-placeholder--online {
  background: linear-gradient(135deg, #3f6f75 0%, #77a6a4 100%);
}

.service-image-placeholder--in-person {
  background: linear-gradient(135deg, #9f6b43 0%, #d4a071 100%);
}

.service-image-placeholder--hybrid {
  background: linear-gradient(135deg, #6c5d4b 0%, #b98f63 52%, #6f9a92 100%);
}

.service-image-orbit {
  position: absolute;
  inset: 16px 18px auto auto;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
}

.service-image-orbit::after {
  content: "";
  position: absolute;
  inset: 11px;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.35);
}

.service-image-mark {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-shadow: 0 6px 18px rgba(45, 33, 25, 0.22);
}

.service-image-mode {
  width: max-content;
  max-width: 100%;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  font-size: 0.76rem;
  font-weight: 700;
}

.service-policy-note,
.booking-policy-note {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(176, 137, 104, 0.18);
  background: rgba(230, 204, 178, 0.18);
  color: var(--sesvia-5);
  font-size: 0.84rem;
  line-height: 1.45;
}

.service-policy-note strong,
.booking-policy-note strong {
  color: var(--sesvia-6);
}

.browse-card-main,
.browse-profile-copy {
  min-width: 0;
}

.browse-card-avatar,
.browse-profile-avatar {
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(221, 184, 146, 0.45);
  color: var(--sesvia-6);
  font-weight: 700;
  border: 1px solid rgba(176, 137, 104, 0.24);
  position: relative;
}

.browse-card-avatar {
  width: 56px;
  height: 56px;
  font-size: 1rem;
}

.browse-profile-avatar {
  width: 84px;
  height: 84px;
  font-size: 1.4rem;
}

.browse-card-avatar img,
.browse-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
}

.browse-card-location,
.browse-profile-location {
  margin: 4px 0 0;
  color: var(--muted);
}

.browse-card-bio {
  margin: 0;
  color: var(--sesvia-5);
}

.public-description p {
  margin: 0 0 8px;
}

.public-description p:last-child {
  margin-bottom: 0;
}

.browse-profile-header {
  margin-bottom: 14px;
}

.browse-profile-copy h3,
.browse-service-head h3 {
  margin: 0;
}

.browse-service-price {
  color: var(--sesvia-5);
  font-weight: 800;
}

.info-chip-row {
  display: flex;
  flex-wrap: wrap;
  column-gap: 8px;
  row-gap: 10px;
  margin-top: 8px;
}

.info-chip-row + .info-chip-row {
  margin-top: 10px;
}

.info-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(237, 224, 212, 0.92);
  color: var(--sesvia-6);
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid rgba(176, 137, 104, 0.18);
}

.info-chip-mode {
  background: rgba(230, 204, 178, 0.72);
}

.checkbox-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.checkbox-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(237, 224, 212, 0.76);
  border: 1px solid rgba(176, 137, 104, 0.18);
  color: var(--sesvia-6);
}

.checkbox-chip-list .checkbox-chip {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.checkbox-chip input {
  margin: 0;
  flex-shrink: 0;
  align-self: center;
}

/* .field label establece display:block — anulación para las etiquetas de chip dentro de un .field */
.field .checkbox-chip {
  display: inline-flex;
  align-items: center;
}

.settings-avatar-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(176, 137, 104, 0.18);
  background: rgba(255, 255, 255, 0.82);
}

.settings-avatar-badge {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(221, 184, 146, 0.45);
  color: var(--sesvia-6);
  font-weight: 700;
  border: 1px solid rgba(176, 137, 104, 0.24);
  position: relative;
}

.settings-avatar-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
}

.avatar-fallback-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  line-height: 1;
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.settings-avatar-preview .subtitle {
  min-width: 0;
  word-break: break-word;
}

.topnav {
  height: 56px;
  background: #fff;
  border-bottom: 1px solid rgba(176, 137, 104, 0.2);
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.topnav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--sesvia-5);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: 8px;
}

.topnav-brand img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.topnav-links {
  display: flex;
  gap: 2px;
  flex: 1;
}

.topnav-link {
  background: none;
  border: none;
  padding: 6px 11px;
  border-radius: 6px;
  font-size: 0.87rem;
  color: var(--muted);
  cursor: pointer;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.topnav-link:hover {
  color: var(--sesvia-6);
  background: rgba(176, 137, 104, 0.1);
}

.topnav-link.active {
  color: var(--sesvia-6);
  font-weight: 600;
}

.topnav-link svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
}

.topnav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.client-content {
  flex: 1;
  padding: 28px 24px;
  background: var(--sesvia-1);
}

.client-footer {
  text-align: center;
  padding: 14px;
  font-size: 0.8rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.5);
  border-top: 1px solid rgba(176, 137, 104, 0.15);
}

.app-footer {
  border-top: 1px solid rgba(176, 137, 104, 0.2);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(3px);
  position: relative;
  z-index: 20;
}

.app-footer-toggle {
  display: none;
}

.app-footer-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 0.82rem;
  color: var(--muted);
}

.app-footer-item {
  color: var(--sesvia-6);
  text-decoration: none;
  font-weight: 500;
}

.app-footer-sep {
  color: rgba(127, 85, 57, 0.4);
}

.app-footer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 208;
  visibility: hidden;
  pointer-events: none;
}

.app-footer-panel {
  display: none;
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(760px, calc(100% - 28px));
  max-height: 80vh;
  overflow-y: auto;
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2);
  background: #fff;
  border: 1px solid rgba(176, 137, 104, 0.25);
  padding: 16px 18px;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--muted);
  z-index: 209;
  visibility: hidden;
  pointer-events: none;
}

.app-footer-head {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  color: var(--sesvia-5);
}

.app-footer-close {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--sesvia-5);
  border-radius: 999px;
  width: 30px;
  height: 30px;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  position: relative;
}

.app-footer-close::before,
.app-footer-close::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: 14px;
  border-top: 2px solid currentColor;
}

.app-footer-close::before {
  transform: rotate(45deg);
}

.app-footer-close::after {
  transform: rotate(-45deg);
}

.app-footer-rights,
.app-footer-contact,
.app-footer-support {
  margin: 0;
}

.app-footer-contact a,
.app-footer-links a {
  color: var(--sesvia-6);
  text-decoration: none;
}

.app-footer-link-btn {
  border: none;
  background: transparent;
  color: var(--sesvia-6);
  text-decoration: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
}

.app-footer-contact a:hover,
.app-footer-links a:hover,
.app-footer-link-btn:hover {
  text-decoration: underline;
}

.app-footer.is-open .app-footer-backdrop {
  display: block;
  visibility: visible;
  pointer-events: auto;
}

.app-footer.is-open .app-footer-panel {
  display: flex;
  visibility: visible;
  pointer-events: auto;
}

.legal-copy {
  margin-top: 10px;
}

.legal-copy h4 {
  margin: 0 0 8px;
  color: var(--sesvia-5);
}

.legal-copy p {
  margin: 0 0 8px;
  color: var(--muted);
}

.legal-copy a {
  color: var(--sesvia-6);
  text-decoration: underline;
}

.legal-copy a:hover {
  color: var(--sesvia-7);
}

.consent-gate {
  position: fixed;
  inset: 0;
  z-index: 420;
  background: rgba(56, 36, 23, 0.45);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.consent-card {
  width: min(760px, 100%);
  max-height: min(90vh, 860px);
  overflow-y: auto;
  background: #fff;
  border-radius: 18px;
  padding: 24px;
  border: 1px solid rgba(176, 137, 104, 0.22);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

.consent-card h2 {
  margin: 12px 0 8px;
  color: var(--sesvia-5);
}

.consent-card .subtitle {
  margin: 0 0 16px;
  color: var(--muted);
}

.consent-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.consent-snippet {
  border: 1px solid rgba(176, 137, 104, 0.2);
  border-radius: 12px;
  padding: 14px;
  background: rgba(237, 224, 212, 0.28);
}

.consent-snippet h3 {
  margin: 0 0 8px;
  font-size: 0.98rem;
  color: var(--sesvia-5);
}

.consent-snippet p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.consent-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 10px;
  font-size: 0.92rem;
  color: var(--sesvia-5);
}

.consent-check input {
  margin-top: 3px;
  accent-color: var(--sesvia-6);
}

.consent-check.is-missing {
  color: #b4233c;
}

.consent-check.is-missing input {
  outline: 2px solid rgba(180, 35, 60, 0.35);
  outline-offset: 2px;
}

/* =====================================================
   BARRA LATERAL PARA DISPOSITIVOS MÓVILES (icono de hamburguesa en el encabezado principal)
   ===================================================== */

.sidebar-toggle-btn {
  display: none; /* Se muestra únicamente en el CSS responsivo a continuación */
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin-right: 8px;
}
.sidebar-toggle-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--sesvia-5);
  border-radius: 2px;
}

.sidebar-toggle-label {
  display: none;
}

/* Capa de fondo detrás de la barra lateral cuando está abierta en dispositivos móviles */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 199;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}
.layout-pro.sidebar-open .sidebar-overlay,
.layout-client-shell.sidebar-open .sidebar-overlay {
  display: block;
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}
.layout-pro.sidebar-open .sidebar,
.layout-client-shell.sidebar-open .sidebar {
  transform: translateX(0);
}

/* =====================================================
   NAVEGACIÓN SUPERIOR (cliente móvil)
   ===================================================== */

.topnav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin-right: 4px;
}
.topnav-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--sesvia-5);
  border-radius: 2px;
}

/* =====================================================
   SIDEBAR PROFILE MENU (bottom-left dropdown)
   ===================================================== */

.sidebar-profile-wrap {
  position: relative;
}

.sidebar-user.sidebar-profile-toggle {
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
}
.sidebar-user.sidebar-profile-toggle:hover {
  background: rgba(176,137,104,0.15);
}

.sidebar-caret {
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  color: var(--muted);
  flex: 0 0 auto;
  margin-left: auto;
  transform: rotate(-135deg);
  transition: transform 0.2s ease;
}

.sidebar-profile-wrap:has(.sidebar-profile-menu:not([hidden])) .sidebar-caret {
  transform: rotate(45deg);
}

.sidebar-profile-menu {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(93, 63, 38, 0.16);
  overflow: hidden;
  z-index: 300;
  pointer-events: none;
  padding: 10px;
}

.sidebar-profile-menu:not([hidden]) {
  pointer-events: auto;
}

.sidebar-profile-popout {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-profile-preview {
  width: 100%;
  border: 1px solid rgba(176, 137, 104, 0.18);
  border-radius: 12px;
  padding: 12px;
  background: linear-gradient(135deg, rgba(237, 224, 212, 0.7), rgba(255, 255, 255, 0.94));
  color: var(--sesvia-5);
  text-align: left;
  cursor: pointer;
}

.sidebar-profile-preview:hover {
  background: linear-gradient(135deg, rgba(230, 204, 178, 0.75), rgba(255, 255, 255, 0.98));
}

.sidebar-profile-preview-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-profile-preview-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.sidebar-profile-preview-copy strong {
  color: var(--sesvia-5);
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-profile-preview-copy span {
  color: var(--muted);
  font-size: 0.75rem;
}

.sidebar-profile-preview-bio {
  margin: 10px 0 0;
  color: var(--sesvia-5);
  font-size: 0.8rem;
  line-height: 1.35;
}

.sidebar-profile-actions {
  display: flex;
  flex-direction: column;
}

.sidebar-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  background: none;
  border: none;
  font-size: 0.85rem;
  color: var(--text-main);
  cursor: pointer;
  text-align: left;
}
.sidebar-menu-item:hover {
  background: rgba(176,137,104,0.15);
}
.sidebar-menu-item svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  flex-shrink: 0;
}
.sidebar-menu-logout {
  border-top: 1px solid var(--border);
  color: var(--danger);
}

/* =====================================================
   MENÚ DE PERFIL EN LA NAVEGACIÓN SUPERIOR (cliente, esquina superior derecha)
   ===================================================== */

.topnav-profile-wrap {
  position: relative;
}

.topnav-profile-toggle {
  display: flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 8px;
}
.topnav-profile-toggle:hover {
  background: rgba(176,137,104,0.12);
}

.topnav-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--sesvia-4);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.topnav-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.topnav-caret {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.topnav-profile-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.12);
  overflow: hidden;
  z-index: 300;
  pointer-events: none;
}

.topnav-profile-menu:not([hidden]) {
  pointer-events: auto;
}

.topnav-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  background: none;
  border: none;
  font-size: 0.85rem;
  color: var(--text-main);
  cursor: pointer;
  text-align: left;
}
.topnav-menu-item:hover {
  background: rgba(176,137,104,0.15);
}
.topnav-menu-item svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  flex-shrink: 0;
}
.topnav-menu-logout {
  border-top: 1px solid var(--border);
  color: var(--danger);
}

/* =====================================================
   TARJETAS DE SECCIÓN (usadas dentro de main-content / client-content)
   ===================================================== */

.sc {
  background: #fff;
  border: 1px solid rgba(176, 137, 104, 0.18);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.sc-title {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--sesvia-5);
}

.sc-desc {
  margin: 0 0 16px;
  font-size: 0.85rem;
  color: var(--muted);
}

.sc-footer {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(176, 137, 104, 0.15);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  align-items: center;
}

/* =====================================================
   INSIGNIAS DE ESTADO
   ===================================================== */

.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-default {
  background: rgba(176, 137, 104, 0.18);
  color: var(--sesvia-6);
}

.badge-confirmed {
  background: var(--sesvia-6);
  color: #fff !important;
}

.badge-pending {
  background: var(--sesvia-3);
  color: var(--sesvia-5);
}

.badge-cancelled {
  background: var(--danger);
  color: #fff !important;
}

.badge-completed {
  background: rgba(25, 135, 84, 0.15);
  color: #1d6b45;
}

.badge-paid {
  background: rgba(25, 135, 84, 0.15);
  color: #1d6b45;
}

.badge-refunded {
  background: rgba(127, 85, 57, 0.14);
  color: var(--sesvia-5);
  border: 1px solid rgba(127, 85, 57, 0.22);
}

.badge-failed {
  background: rgba(255, 193, 7, 0.18);
  color: #7c5100;
}

.badge-client {
  background: rgba(176, 137, 104, 0.18);
  color: var(--sesvia-5);
}

.badge-professional {
  background: rgba(156, 102, 68, 0.16);
  color: var(--sesvia-6);
  border: 1px solid rgba(156, 102, 68, 0.25);
}

.badge-admin {
  background: rgba(127, 85, 57, 0.14);
  color: var(--sesvia-5);
  border: 1px solid rgba(127, 85, 57, 0.22);
}

.badge-self {
  background: rgba(176, 137, 104, 0.10);
  color: var(--muted);
  border: 1px dashed rgba(176, 137, 104, 0.35);
  font-style: italic;
}

/* =====================================================
   PÍLDORAS DE ESTADO (tickets de soporte — existentes)
   ===================================================== */

.status-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.status-pill.is-open { background: rgba(220, 53, 69, 0.12); color: #8a1c28; }
.status-pill.is-progress { background: rgba(13, 110, 253, 0.14); color: #1c4fa3; }
.status-pill.is-resolved { background: rgba(25, 135, 84, 0.14); color: #1d6b45; }
.status-pill.is-closed { background: rgba(108, 117, 125, 0.18); color: #4a5057; }
.status-pill.is-default { background: rgba(127, 85, 57, 0.12); color: var(--sesvia-6); }

/* =====================================================
   BOTONES
   ===================================================== */

.btn {
  border: 0;
  border-radius: 8px;
  padding: 9px 14px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.15s, background 0.15s;
}

.btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
}

.btn-primary {
  background: var(--sesvia-6);
  color: #fff;
}

.btn-primary:hover {
  background: var(--sesvia-5);
}

.btn-secondary {
  background: rgba(156, 102, 68, 0.1);
  color: var(--sesvia-6);
  border: 1px solid rgba(156, 102, 68, 0.28);
}

.btn-secondary:hover {
  background: rgba(156, 102, 68, 0.18);
}

.btn-confirm-action {
  background: var(--sesvia-6);
  color: var(--sesvia-1);
  border: 1px solid rgba(127, 85, 57, 0.22);
}

.btn-confirm-action:hover {
  background: var(--sesvia-5);
  color: #f8f1ea;
}

.btn-danger {
  background: rgba(212, 24, 61, 0.1);
  color: var(--danger);
  border: 1px solid rgba(212, 24, 61, 0.25);
}

.btn-danger:hover {
  background: rgba(212, 24, 61, 0.18);
}

.btn-link {
  background: transparent;
  color: var(--sesvia-6);
  padding: 4px 6px;
  font-weight: 600;
}

.btn-link:hover {
  text-decoration: underline;
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
}

.btn-ghost:hover {
  background: rgba(176, 137, 104, 0.12);
  color: var(--sesvia-5);
}

.btn-dashed {
  background: transparent;
  color: var(--muted);
  border: 1.5px dashed rgba(176, 137, 104, 0.45);
  border-radius: 10px;
}

.btn-dashed:hover {
  border-color: var(--sesvia-6);
  color: var(--sesvia-6);
}

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

.btn-sm {
  padding: 6px 10px;
  font-size: 0.82rem;
}

.btn-icon {
  padding: 6px;
  border-radius: 6px;
}

/* =====================================================
   FORMULARIOS
   ===================================================== */

.field {
  margin-bottom: 14px;
}

.field label,
.field-label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--sesvia-6);
}

.field-label-icon {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--sesvia-6);
}

.field label.field-label-icon {
  display: flex;
}

.field-label-icon svg,
.auth-field-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid rgba(127, 85, 57, 0.25);
  font-size: 0.92rem;
  color: var(--text);
  background: #fff;
  font-family: inherit;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--sesvia-6);
  box-shadow: 0 0 0 3px rgba(156, 102, 68, 0.12);
}

.field input[type="checkbox"],
.field input[type="radio"],
input[type="checkbox"],
input[type="radio"] {
  width: auto;
  min-width: 0;
  height: auto;
  padding: 0;
  accent-color: var(--sesvia-6);
}

.field label:has(input[type="checkbox"]),
.field label:has(input[type="radio"]) {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
}

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

.grid-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.grid-three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.input-with-icon {
  position: relative;
}

.input-with-icon input {
  padding-right: 40px;
}

.input-with-icon input[type="password"]::-ms-reveal,
.input-with-icon input[type="password"]::-ms-clear {
  display: none;
}

.toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--muted);
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.toggle-password:hover { color: var(--sesvia-6); }

.toggle-password svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
}

.forgot-link {
  text-align: right;
  margin: -6px 0 14px;
}

.forgot-link a,
.forgot-link button {
  background: none;
  border: none;
  color: var(--sesvia-6);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
}

.forgot-link button:hover { text-decoration: underline; }

.auth-switch {
  text-align: center;
  margin-top: 18px;
  font-size: 0.88rem;
  color: var(--muted);
}

.auth-switch button {
  background: none;
  border: none;
  color: var(--sesvia-6);
  font-weight: 700;
  cursor: pointer;
  font-size: inherit;
  padding: 0;
}

.auth-switch button:hover { text-decoration: underline; }

.help {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.83rem;
}

.error {
  margin: 6px 0 0;
  color: var(--danger);
  font-size: 0.85rem;
}

.field-error {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--danger);
  min-height: 1.1rem;
}

.input-error {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 1px rgba(212, 24, 61, 0.15);
}

.phone-input-row {
  display: flex;
  gap: 0.5rem;
}

.phone-input-row select {
  flex: 0 0 auto;
  width: 110px;
}

.notice {
  border-radius: 8px;
  border: 1px solid rgba(156, 102, 68, 0.28);
  background: rgba(230, 204, 178, 0.36);
  padding: 10px 12px;
  margin: 0 0 12px;
  font-size: 0.9rem;
}

.actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.auth-provider-actions,
.auth-submit-actions,
.auth-recovery-actions {
  justify-content: center;
}

.auth-provider-actions {
  margin-top: 10px;
}

.auth-submit-actions {
  flex-direction: column;
  align-items: center;
}

.auth-submit-actions .btn-primary,
.auth-provider-actions .btn-google-auth {
  min-width: 198px;
  justify-content: center;
}

.btn-google-auth {
  align-items: center;
  gap: 10px;
}

/* =====================================================
   SELECCIÓN DE ROL (registro)
   ===================================================== */

.role-picker {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.role-option {
  border: 2px solid rgba(127, 85, 57, 0.2);
  border-radius: 10px;
  padding: 12px;
  cursor: pointer;
  background: transparent;
  text-align: center;
}

.role-option.active {
  border-color: var(--sesvia-6);
  background: rgba(156, 102, 68, 0.07);
}

.role-option-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-bottom: 6px;
  color: var(--sesvia-6);
}

.role-option-icon .auth-field-icon {
  width: 22px;
  height: 22px;
  flex-basis: 22px;
}

.role-option h4 { margin: 0; font-size: 0.92rem; color: var(--sesvia-5); }

.role-option p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

/* =====================================================
   CALENDARIO (selección de fecha)
   ===================================================== */

.calendar-panel { margin-top: 8px; }

.calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.calendar-month-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.calendar-month-nav .btn {
  padding: 5px 10px;
}

.calendar-month-label {
  min-width: 160px;
  text-align: center;
  font-weight: 700;
  color: var(--sesvia-6);
  text-transform: capitalize;
  font-size: 0.95rem;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 4px;
}

.calendar-weekdays span {
  text-align: center;
  font-size: 0.77rem;
  color: var(--muted);
  font-weight: 600;
  padding: 4px 0;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.calendar-day {
  border: 1px solid rgba(127, 85, 57, 0.18);
  border-radius: 6px;
  min-height: 36px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.83rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.calendar-day:hover:not(:disabled) {
  border-color: var(--sesvia-6);
  color: var(--sesvia-6);
}

.calendar-day.is-selected {
  background: var(--sesvia-6);
  border-color: var(--sesvia-6);
  color: #fff;
}

.calendar-day.is-today {
  box-shadow: inset 0 0 0 1.5px rgba(156, 102, 68, 0.5);
}

.calendar-day.has-events::after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--sesvia-6);
  position: absolute;
  bottom: 4px;
  right: 4px;
}

.calendar-day.has-holiday {
  background:
    linear-gradient(135deg, rgba(244, 221, 180, 0.28), rgba(255, 255, 255, 0.96)),
    rgba(255, 255, 255, 0.9);
  border-color: rgba(204, 137, 77, 0.35);
}

.calendar-day.has-holiday:not(.is-selected)::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 5px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #d07b2f;
}

.calendar-day.has-events.is-selected::after {
  background: rgba(255, 255, 255, 0.7);
}

.calendar-day:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.calendar-day-pad {
  visibility: hidden;
  pointer-events: none;
  border: none;
}

/* CALENDARIO PROFESIONAL (dentro de main-content (contenido principal)) */
.pro-calendar-grid .calendar-day {
  min-height: 72px;
  align-items: flex-start;
  padding: 6px;
  font-size: 0.85rem;
  border-radius: 0;
  border-color: rgba(176, 137, 104, 0.15);
  border-right: 0;
  border-bottom: 0;
}

.pro-calendar-grid .calendar-day:last-child { border-right: 1px solid rgba(176, 137, 104, 0.15); }

.pro-calendar-grid {
  border: 1px solid rgba(176, 137, 104, 0.15);
  border-radius: 8px;
  overflow: hidden;
}

.pro-calendar-event-pill {
  font-size: 0.72rem;
  background: rgba(156, 102, 68, 0.12);
  color: var(--sesvia-6);
  border-radius: 4px;
  padding: 1px 5px;
  margin-top: 4px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* =====================================================
   DISEÑO DE AGENDA PROFESIONAL (calendario + panel día)
   ===================================================== */

.agenda-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(320px, 0.95fr);
  gap: 20px;
  align-items: start;
}

.agenda-layout > div {
  min-width: 0;
}

.agenda-day-title {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--sesvia-5);
}

.agenda-day-subtitle {
  margin: 0 0 14px;
  font-size: 0.83rem;
  color: var(--muted);
}

.agenda-apt-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.agenda-apt-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 11px 12px;
  border-radius: 8px;
  border: 1px solid rgba(176, 137, 104, 0.18);
  background: #fff;
}

.agenda-apt-time {
  font-family: monospace;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  min-width: 38px;
  padding-top: 2px;
  flex-shrink: 0;
}

.agenda-apt-info { flex: 1; }

.agenda-apt-name {
  font-weight: 600;
  font-size: 0.88rem;
  margin: 0 0 2px;
  color: var(--sesvia-5);
}

.agenda-apt-type {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0 0 5px;
}

.agenda-panel,
.agenda-side-card {
  border: 1px solid rgba(176, 137, 104, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  padding: 18px;
  box-shadow: 0 10px 24px rgba(127, 85, 57, 0.06);
}

.agenda-panel {
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

.agenda-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.agenda-toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.agenda-period-static {
  min-width: 0;
}

.agenda-view-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.agenda-status-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.agenda-search-box {
  border: 1px solid rgba(176, 137, 104, 0.16);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(250, 245, 240, 0.86));
  padding: 14px;
  margin: 14px 0 18px;
}

.agenda-search-label {
  display: block;
  margin-bottom: 8px;
  color: var(--sesvia-5);
  font-weight: 700;
  font-size: 0.9rem;
}

.agenda-search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.agenda-search-input {
  flex: 1 1 260px;
  min-width: 0;
  border: 1px solid rgba(176, 137, 104, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  padding: 10px 14px;
  font: inherit;
}

.agenda-search-input:focus {
  outline: 2px solid rgba(127, 85, 57, 0.18);
  border-color: rgba(127, 85, 57, 0.46);
}

.agenda-search-count {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.agenda-status-filter {
  border: 1px solid rgba(176, 137, 104, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--sesvia-5);
  font: inherit;
  font-size: 0.8rem;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.agenda-status-filter:hover {
  border-color: rgba(127, 85, 57, 0.45);
  background: rgba(237, 224, 212, 0.45);
}

.agenda-status-filter.is-active {
  border-color: rgba(127, 85, 57, 0.42);
  background: rgba(237, 224, 212, 0.72);
}

.agenda-status-check {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(176, 137, 104, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: transparent;
  background: rgba(255, 255, 255, 0.92);
}

.agenda-status-filter.is-active .agenda-status-check {
  border-color: var(--sesvia-6);
  background: var(--sesvia-6);
  color: #fff;
}

.agenda-status-filter.is-active .agenda-status-check::after {
  content: "";
  width: 8px;
  height: 4px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
}

.agenda-month-grid,
.agenda-panel .calendar-weekdays {
  min-width: 760px;
}

.agenda-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.agenda-month-day {
  border: 1px solid rgba(176, 137, 104, 0.18);
  border-radius: 16px;
  min-height: 126px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  padding: 10px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.agenda-month-day:hover {
  border-color: rgba(127, 85, 57, 0.45);
}

.agenda-month-day.has-blocks {
  border-color: rgba(179, 82, 82, 0.3);
  background: linear-gradient(180deg, rgba(255, 252, 252, 0.98), rgba(255, 243, 243, 0.98));
}


.agenda-month-day.has-pending {
  box-shadow: 0 0 0 3px rgba(221, 184, 146, 0.85), 0 2px 8px 0 rgba(221, 184, 146, 0.18);
  border: 2.5px solid #ddb892;
  background: linear-gradient(180deg, #fff7ed 80%, #ffe7c2 100%);
  position: relative;
}

.agenda-month-day.has-pending::after {
  content: "!";
  position: absolute;
  top: 6px;
  right: 8px;
  background: #ddb892;
  color: #fff;
  font-weight: bold;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: 0 1px 4px 0 rgba(221, 184, 146, 0.18);
  z-index: 2;
}

.agenda-month-day.is-selected {
  border-color: var(--sesvia-6);
  box-shadow: inset 0 0 0 1px rgba(127, 85, 57, 0.28);
}

.agenda-month-day.is-today {
  background: rgba(237, 224, 212, 0.68);
}

.agenda-month-day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.agenda-month-day-meta {
  display: flex;
  align-items: center;
  gap: 4px;
}

.agenda-month-day-number {
  font-weight: 700;
  color: var(--sesvia-6);
}

.agenda-day-count {
  min-width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(127, 85, 57, 0.1);
  color: var(--sesvia-6);
  font-size: 0.78rem;
  font-weight: 700;
}

.agenda-day-block-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(179, 82, 82, 0.12);
  color: #a84343;
  font-size: 0.72rem;
  font-weight: 700;
}

.agenda-month-day-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.agenda-month-chip,
.agenda-month-more {
  display: block;
  border-radius: 10px;
  padding: 6px 8px;
  font-size: 0.77rem;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agenda-month-chip {
  background: rgba(176, 137, 104, 0.12);
  color: var(--sesvia-6);
  border: 1px solid transparent;
}

.agenda-month-chip--pending {
  background: rgba(221, 184, 146, 0.24);
  color: var(--sesvia-5);
  border-color: rgba(221, 184, 146, 0.7);
}

.agenda-month-chip--confirmed {
  background: rgba(176, 137, 104, 0.14);
  color: var(--sesvia-6);
  border-color: rgba(176, 137, 104, 0.28);
}

.agenda-month-chip--completed {
  background: rgba(25, 135, 84, 0.1);
  color: #1d6b45;
  border-color: rgba(25, 135, 84, 0.22);
}

.agenda-month-chip--cancelled {
  background: rgba(212, 24, 61, 0.08);
  color: var(--danger);
  border-color: rgba(212, 24, 61, 0.2);
}

.agenda-month-chip--blocked,
.agenda-day-freechip--blocked {
  background: rgba(179, 82, 82, 0.12);
  color: #a84343;
}

.agenda-month-more {
  color: var(--muted);
  border: 1px dashed rgba(176, 137, 104, 0.35);
}

.agenda-week-grid {
  min-width: 1120px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
}

.agenda-week-column {
  border: 1px solid rgba(176, 137, 104, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  min-height: 360px;
  display: flex;
  flex-direction: column;
}

.agenda-week-column.is-selected {
  border-color: var(--sesvia-6);
}

.agenda-week-column.is-today {
  background: rgba(237, 224, 212, 0.55);
}

.agenda-week-date {
  border: 0;
  border-bottom: 1px solid rgba(176, 137, 104, 0.16);
  background: transparent;
  color: var(--sesvia-6);
  font-weight: 700;
  padding: 12px;
  text-align: left;
}

.agenda-week-items,
.agenda-day-main {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.agenda-week-items {
  padding: 12px;
  flex: 1;
}

.agenda-week-blocks {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.agenda-day-main {
  min-height: 220px;
}

.agenda-day-main--timeline {
  min-height: 0;
}

.agenda-day-freebar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.agenda-day-freebar strong {
  color: var(--sesvia-6);
}

.agenda-day-window-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.agenda-day-freechip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(237, 224, 212, 0.72);
  color: var(--sesvia-6);
  font-size: 0.8rem;
  font-weight: 600;
}

.agenda-panel--day {
  overflow-x: hidden;
}

.agenda-day-timeline-scroll {
  overflow-x: hidden;
  overflow-y: visible;
  padding-top: 2px;
}

.agenda-day-timeline-shell {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.agenda-day-time-column {
  position: relative;
  overflow: visible;
}

.agenda-day-time-label {
  position: absolute;
  right: 8px;
  transform: translateY(-50%);
  font-size: 0.76rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.agenda-day-time-label.is-first {
  transform: translateY(0);
}

.agenda-day-time-label.is-last {
  transform: translateY(-100%);
}

.agenda-day-timeline {
  position: relative;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 245, 240, 0.96));
  border: 1px solid rgba(176, 137, 104, 0.18);
  overflow: hidden;
}

.agenda-day-line {
  position: absolute;
  inset-inline: 0;
  border-top: 1px solid rgba(176, 137, 104, 0.16);
  z-index: 0;
}

.agenda-day-schedule-block {
  position: absolute;
  left: 12px;
  right: 12px;
  border-radius: 12px;
  background: rgba(162, 214, 180, 0.18);
  border: 1px dashed rgba(76, 126, 94, 0.26);
  z-index: 0;
}

.agenda-day-blocked-block {
  position: absolute;
  left: 12px;
  right: 12px;
  border-radius: 12px;
  background: repeating-linear-gradient(
    -45deg,
    rgba(179, 82, 82, 0.14),
    rgba(179, 82, 82, 0.14) 8px,
    rgba(179, 82, 82, 0.08) 8px,
    rgba(179, 82, 82, 0.08) 16px
  );
  border: 1px solid rgba(179, 82, 82, 0.24);
  z-index: 1;
}

.agenda-day-now {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 2px solid #d9534f;
  z-index: 3;
}

.agenda-day-now span {
  position: absolute;
  top: -11px;
  left: 10px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #d9534f;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
}

.agenda-timeline-event {
  position: absolute;
  left: 14px;
  right: 14px;
  width: auto;
  border: 1px solid rgba(176, 137, 104, 0.22);
  border-left: 4px solid var(--sesvia-6);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 236, 228, 0.98));
  color: var(--text);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  z-index: 2;
  box-shadow: 0 8px 16px rgba(127, 85, 57, 0.08);
}

.agenda-timeline-event:hover {
  border-color: rgba(127, 85, 57, 0.4);
  box-shadow: 0 10px 20px rgba(127, 85, 57, 0.12);
}

.agenda-timeline-event.is-selected {
  background: rgba(237, 224, 212, 0.98);
  border-color: var(--sesvia-6);
}

.agenda-timeline-event.is-compact {
  gap: 2px;
  padding-block: 6px;
}

.agenda-timeline-event-time {
  font-family: monospace;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--sesvia-6);
}

.agenda-timeline-event strong {
  color: var(--sesvia-5);
  font-size: 0.9rem;
  line-height: 1.2;
}

.agenda-timeline-event-meta,
.agenda-timeline-event-status {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.3;
}

.agenda-empty-state--timeline {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  z-index: 1;
}

.agenda-booking-button {
  width: 100%;
  border: 1px solid rgba(176, 137, 104, 0.18);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  font: inherit;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  cursor: pointer;
}

.agenda-booking-button:hover {
  border-color: rgba(127, 85, 57, 0.4);
  transform: translateY(-1px);
}

.agenda-booking-button.is-selected {
  border-color: var(--sesvia-6);
  background: rgba(237, 224, 212, 0.65);
}

.agenda-booking-button.is-compact {
  padding: 10px;
  gap: 8px;
}

.agenda-booking-button.is-compact .agenda-booking-head {
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  width: 100%;
}

.agenda-booking-button.is-compact .agenda-booking-title {
  font-size: 0.94rem;
  line-height: 1.25;
  margin-bottom: 0;
  word-break: break-word;
}

.agenda-booking-button.is-compact .agenda-booking-meta {
  font-size: 0.78rem;
  word-break: break-word;
}

.agenda-booking-button.is-compact .badge {
  align-self: flex-start;
  flex-shrink: 0;
  padding: 2px 8px;
  font-size: 0.69rem;
  margin-inline: 0;
  margin-top: 2px;
  max-width: 100%;
}

.agenda-side-card .agenda-booking-button.is-compact {
  align-items: stretch;
  gap: 8px;
}

.agenda-side-card .agenda-booking-button.is-compact .agenda-booking-body,
.agenda-side-card .agenda-booking-button.is-compact .agenda-booking-head {
  width: 100%;
}

.agenda-booking-time {
  font-family: monospace;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--sesvia-6);
  padding-top: 0;
}

.agenda-booking-time.is-stacked {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.agenda-booking-body {
  flex: 1;
  min-width: 0;
}

.agenda-booking-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  width: 100%;
}

.agenda-booking-copy {
  width: 100%;
  min-width: 0;
}

.agenda-booking-title {
  font-weight: 700;
  color: var(--sesvia-5);
  margin-bottom: 4px;
}

.agenda-booking-meta {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.agenda-side-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 100%;
}

.agenda-side-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.agenda-detail-list,
.agenda-notes-card,
.agenda-context-card {
  border: 1px solid rgba(176, 137, 104, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  padding: 14px;
}

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

.agenda-detail-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: baseline;
  font-size: 0.9rem;
}

.agenda-detail-item span {
  color: var(--muted);
}

.agenda-detail-item strong {
  color: var(--sesvia-5);
  text-align: right;
}

.agenda-inline-link {
  border: 0;
  background: transparent;
  color: var(--sesvia-5);
  font: inherit;
  font-weight: 700;
  text-align: right;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.agenda-inline-link:hover {
  color: var(--sesvia-6);
}

.agenda-notes-card h4,
.agenda-context-card h4 {
  margin: 0 0 10px;
  font-size: 0.95rem;
  color: var(--sesvia-5);
}

.agenda-notes-card p {
  margin: 0;
  color: var(--text);
  line-height: 1.55;
}

.agenda-side-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.agenda-form-note {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
}

.agenda-manual-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.agenda-manual-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.agenda-block-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.agenda-block-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(179, 82, 82, 0.2);
  background: rgba(255, 247, 247, 0.96);
}

.agenda-block-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.agenda-block-copy strong {
  color: #a84343;
  font-size: 0.86rem;
}

.agenda-block-copy span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.agenda-client-bookings {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.agenda-client-booking {
  width: 100%;
  border: 1px solid rgba(176, 137, 104, 0.18);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  text-align: left;
  padding: 12px;
  font: inherit;
  cursor: pointer;
}

.agenda-client-booking:hover {
  border-color: rgba(127, 85, 57, 0.38);
}

.agenda-client-booking.is-selected {
  border-color: var(--sesvia-6);
  background: rgba(237, 224, 212, 0.55);
}

.agenda-client-booking-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.agenda-client-booking-copy strong {
  color: var(--sesvia-5);
  font-size: 0.9rem;
}

.agenda-client-booking-copy span {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.agenda-thread-subject {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.agenda-thread-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

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

.agenda-thread-message {
  max-width: 88%;
  margin-right: auto;
  border-radius: 16px;
  background: rgba(237, 224, 212, 0.78);
  border: 1px solid rgba(176, 137, 104, 0.22);
  border-left: 4px solid rgba(176, 137, 104, 0.46);
  box-shadow: 0 8px 18px rgba(127, 85, 57, 0.06);
  padding: 12px 14px;
}

.agenda-thread-message.is-own {
  margin-left: auto;
  margin-right: 0;
  background: rgba(230, 204, 178, 0.78);
  border-color: rgba(127, 85, 57, 0.24);
  border-left-color: rgba(127, 85, 57, 0.24);
  border-right: 4px solid rgba(156, 102, 68, 0.54);
}

.agenda-thread-message.is-admin {
  background: rgba(200, 220, 245, 0.72);
  border-color: rgba(60, 120, 200, 0.24);
  border-left-color: rgba(60, 120, 200, 0.45);
}

.agenda-thread-message.is-own.is-admin {
  border-right-color: rgba(60, 120, 200, 0.45);
}

.agenda-thread-message.is-admin .agenda-thread-message-head strong {
  color: #315f9c;
}

.support-replies-heading {
  margin: 0 0 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--sesvia-5);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.agenda-thread-message-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.75rem;
}

.agenda-thread-message-head strong {
  color: var(--sesvia-5);
  font-size: 0.82rem;
}

.agenda-thread-message.is-own .agenda-thread-message-head {
  flex-direction: row-reverse;
  text-align: right;
}

.agenda-thread-message p {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.55;
}

.agenda-thread-message.is-own p {
  text-align: right;
}

.agenda-thread-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.agenda-empty-state,
.agenda-empty-inline {
  border-radius: 14px;
  border: 1px dashed rgba(176, 137, 104, 0.32);
  color: var(--muted);
  background: rgba(237, 224, 212, 0.35);
  text-align: center;
}

.agenda-empty-state {
  padding: 18px;
}

.agenda-empty-inline {
  padding: 12px;
  font-size: 0.82rem;
}

/* =====================================================
   DASHBOARD (pro + cliente compartido)
   ===================================================== */

.dash-root {
  padding: 4px 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* BANNERS DE ALERTA */
.dash-alerts { display: flex; flex-direction: column; gap: 8px; }

.dash-alert {
  padding: 12px 15px;
  border-radius: 14px;
  font-size: 0.88rem;
  border: 1px solid rgba(176, 137, 104, 0.16);
  border-left: 4px solid transparent;
  box-shadow: 0 10px 24px rgba(127, 85, 57, 0.08);
}

.dash-alert-warning {
  background: #fef9ec;
  border-left-color: #e6a817;
  color: #7a5200;
}

.dash-alert-info {
  background: #f0f4ff;
  border-left-color: var(--sesvia-4);
  color: var(--sesvia-5);
}

.dash-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.dash-metric-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dash-metric-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 244, 238, 0.96));
  border: 1px solid rgba(176, 137, 104, 0.2);
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: 0 16px 30px rgba(127, 85, 57, 0.1);
  min-height: 118px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.dash-metric-card--action {
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  appearance: none;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.dash-metric-card--action:hover,
.dash-metric-card--action:focus-visible {
  border-color: rgba(127, 85, 57, 0.34);
  box-shadow: 0 20px 36px rgba(127, 85, 57, 0.14);
  transform: translateY(-1px);
}

.dash-metric-card::after {
  content: "";
  position: absolute;
  inset: auto -24px -38px auto;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  background: rgba(221, 184, 146, 0.16);
}

.dash-metric-card--warm {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(243, 230, 216, 0.95));
}

.dash-metric-card--soft {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(247, 241, 235, 0.95));
}

.dash-metric-card--success {
  border-color: rgba(52, 129, 81, 0.22);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.99), rgba(232, 246, 237, 0.94));
}

.dash-metric-card--alert {
  border-color: rgba(212, 24, 61, 0.22);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.99), rgba(255, 241, 241, 0.95));
}

.dash-metric-label {
  position: relative;
  z-index: 1;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.dash-metric-value {
  position: relative;
  z-index: 1;
  font-size: clamp(1.6rem, 2vw, 2.2rem);
  line-height: 1;
  color: var(--sesvia-6);
}

.dash-metric-hint {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--muted);
}

.dash-metric-hint svg {
  width: 14px;
  height: 14px;
}

/* TARJETAS */
.dash-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(250, 244, 238, 0.97));
  border: 1px solid rgba(176, 137, 104, 0.18);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 18px 36px rgba(127, 85, 57, 0.09);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.dash-card:hover {
  border-color: rgba(127, 85, 57, 0.28);
  box-shadow: 0 24px 46px rgba(127, 85, 57, 0.13);
  transform: translateY(-2px);
}

.dash-card-hero {
  border-color: rgba(176, 137, 104, 0.24);
  box-shadow: 0 22px 40px rgba(127, 85, 57, 0.12);
}

.dash-card-soft {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 243, 237, 0.96));
}

.dash-card-actions {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.99), rgba(239, 227, 216, 0.95));
}

.dash-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(176, 137, 104, 0.12);
  background: linear-gradient(180deg, rgba(237, 224, 212, 0.32), rgba(255, 255, 255, 0));
}

.dash-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--sesvia-5);
  letter-spacing: 0.015em;
}

.dash-card-body {
  padding: 18px;
}

.dash-card-footer {
  padding: 10px 18px;
  border-top: 1px solid rgba(176, 137, 104, 0.10);
  background: rgba(237, 224, 212, 0.18);
}

/* TARJETA PERFIL */
.dash-card-profile {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.99), rgba(239, 227, 216, 0.92));
}

.dash-profile-summary {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.dash-profile-avatar {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sesvia-4), var(--sesvia-6));
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(127, 85, 57, 0.2);
}

.dash-profile-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.dash-profile-name {
  font-size: 0.95rem;
  color: var(--sesvia-5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-profile-email {
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-profile-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}

/* FILAS DE CITAS */
.dash-apt-list { display: flex; flex-direction: column; gap: 10px; }

.dash-apt-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(176, 137, 104, 0.14);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.dash-apt-row--button {
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  appearance: none;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.dash-apt-row--button:hover,
.dash-apt-row--button:focus-visible {
  border-color: rgba(127, 85, 57, 0.3);
  box-shadow: 0 14px 28px rgba(127, 85, 57, 0.08);
  transform: translateY(-1px);
}

.dash-apt-row--split {
  align-items: stretch;
}

.dash-apt-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  appearance: none;
  cursor: pointer;
  padding: 0;
  border-radius: 10px;
}

.dash-apt-main:hover,
.dash-apt-main:focus-visible {
  background: rgba(237, 224, 212, 0.4);
  outline: none;
}

.dash-apt-time {
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--sesvia-6);
  min-width: 84px;
  flex-shrink: 0;
}

.dash-apt-time--stacked {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dash-apt-info { flex: 1; min-width: 0; }

.dash-apt-name {
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--sesvia-5);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-apt-meta {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
}

.dash-apt-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* BLOQUES DE DISPONIBILIDAD */
.dash-avail-block {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(221, 184, 146, 0.25);
  border: 1px solid rgba(176, 137, 104, 0.2);
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--sesvia-5);
  margin: 2px 4px 2px 0;
}

/* FILAS DE RESUMEN (Estado de cobros) */
.dash-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 0;
  font-size: 0.88rem;
  border-bottom: 1px solid rgba(176, 137, 104, 0.08);
}
.dash-summary-row:last-child { border-bottom: none; }

/* DESTACADO DE LA PRÓXIMA CITA DEL CLIENTE */
.dash-next-apt {
  border: 1px solid rgba(176, 137, 104, 0.14);
  border-left: 4px solid var(--sesvia-6);
  border-radius: 16px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(243, 230, 216, 0.64));
}
.dash-next-apt-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 6px;
}
.dash-next-apt-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.dash-card-actions .btn {
  border-radius: 14px;
  padding-top: 10px;
  padding-bottom: 10px;
  font-weight: 600;
}

/* UTILIDADES */
.dash-muted { color: var(--muted); }
.dash-sm    { font-size: 0.85rem; margin: 0; }

/* =====================================================
   GRID DE SERVICIOS
   ===================================================== */

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.service-card {
  background: #fff;
  border: 1px solid rgba(176, 137, 104, 0.18);
  border-radius: 10px;
  padding: 18px;
  position: relative;
}

.service-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 4px;
}

.service-card-title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--sesvia-5);
}

.service-card-meta {
  margin: 0 0 8px;
  font-size: 0.83rem;
  color: var(--muted);
}

.service-card-desc {
  margin: 0;
  font-size: 0.87rem;
  color: var(--sesvia-5);
  opacity: 0.8;
}

.services-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.service-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.service-card-action {
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 14px;
  justify-content: center;
}

.service-card-action svg {
  width: 18px;
  height: 18px;
}

.service-card-action.btn-secondary {
  background: rgba(221, 184, 146, 0.45);
  color: var(--sesvia-6);
  border-color: transparent;
}

.service-card-action.btn-secondary:hover {
  background: rgba(221, 184, 146, 0.72);
}

.service-card-action.btn-danger {
  background: #d4183d;
  color: #fff;
  border-color: transparent;
}

.service-card-action.btn-danger:hover {
  background: #b61435;
}

.service-editor-card {
  max-width: 980px;
}

.service-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.service-editor-title {
  margin: 0 0 6px;
  font-size: 1.05rem;
  color: var(--sesvia-6);
}

.service-editor-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.service-editor-actions {
  gap: 10px;
  flex-wrap: wrap;
}

.services-empty-card h4 {
  margin: 0 0 8px;
  color: var(--sesvia-6);
}

.services-empty-card p {
  margin: 0;
  color: var(--muted);
}

.service-card-new {
  border-style: dashed;
  border-width: 2px;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 140px;
  cursor: pointer;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 10px;
  border-color: rgba(176, 137, 104, 0.35);
  transition: border-color 0.15s, color 0.15s;
}

.service-card-new:hover {
  border-color: var(--sesvia-6);
  color: var(--sesvia-6);
}

.service-card-new svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  opacity: 0.6;
}

/* =====================================================
   FILAS DE DISPONIBILIDAD
   ===================================================== */

.availability-shell {
  display: flex;
  justify-content: center;
}

.availability-card {
  width: min(100%, 1220px);
  background: #fff;
  border: 1px solid rgba(176, 137, 104, 0.35);
  border-radius: 24px;
  box-shadow: 0 12px 30px rgba(127, 85, 57, 0.07);
}

.availability-card-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 28px 32px;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
}

.availability-card-toggle h3 {
  margin: 0 0 6px;
  color: var(--sesvia-6);
  font-size: 1.7rem;
}

.availability-card-toggle .subtitle {
  margin: 0;
  color: var(--sesvia-5);
  font-size: 0.98rem;
}

.availability-block-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  padding: 0;
}

.availability-block-toggle h4 {
  margin: 0 0 6px;
  color: var(--sesvia-6);
}

.availability-block-toggle .subtitle {
  margin: 0;
  color: var(--sesvia-5);
  font-size: 0.95rem;
}

.availability-block-list-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  background: none;
  border: none;
  border-top: 1px solid rgba(176, 137, 104, 0.2);
  text-align: left;
  cursor: pointer;
  padding: 10px 0 0;
  margin-top: 14px;
  font-size: 0.9rem;
  color: var(--sesvia-5);
  font-weight: 600;
}

.collapsible-chevron {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--muted);
  transition: transform 0.2s;
}

.collapsible-chevron.is-open {
  transform: rotate(180deg);
}

.availability-card-body {
  padding: 0 32px 28px;
}

.availability-card-body h3 {
  margin: 0 0 8px;
  color: var(--sesvia-6);
  font-size: 1.7rem;
}

.availability-card-body .subtitle {
  margin: 0;
  color: var(--sesvia-5);
  font-size: 0.98rem;
}

.weekly-availability-grid {
  margin-top: 26px;
}

.weekly-availability-row {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 24px 0;
  border-bottom: 1px solid rgba(176, 137, 104, 0.2);
}

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

.avail-day-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--sesvia-6);
}

.avail-day-label.inactive {
  color: var(--sesvia-6);
}

.weekly-availability-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 28px;
}

.weekly-availability-range {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hint-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin-left: 4px;
  cursor: help;
}

.hint-wrap svg {
  width: 15px;
  height: 15px;
  color: var(--muted);
  flex-shrink: 0;
}

.hint-bubble {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--sesvia-6);
  color: #fff;
  font-size: 0.8rem;
  line-height: 1.45;
  padding: 9px 13px;
  border-radius: 10px;
  width: 240px;
  white-space: normal;
  z-index: 200;
  pointer-events: none;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}

.hint-wrap:hover .hint-bubble,
.hint-wrap:focus .hint-bubble {
  display: block;
}

.weekly-availability-time-group {
  position: relative;
  max-width: 180px;
  min-width: 160px;
}

.weekly-availability-time-group select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 100%;
  padding: 11px 46px 11px 16px;
  border: 1px solid rgba(230, 204, 178, 0.95);
  border-radius: 14px;
  font-size: 1rem;
  background: rgba(237, 224, 212, 0.55);
  color: var(--sesvia-6);
  cursor: pointer;
  font-family: inherit;
}

.weekly-availability-time-group select:hover {
  border-color: rgba(176, 137, 104, 0.75);
}

.weekly-availability-time-group select:focus {
  outline: none;
  border-color: var(--sesvia-6);
  box-shadow: 0 0 0 3px rgba(156, 102, 68, 0.12);
  background: rgba(230, 204, 178, 0.75);
}

.weekly-availability-time-group select option {
  background: var(--sesvia-1);
  color: var(--sesvia-5);
}

.weekly-availability-time-group select option:checked {
  background: var(--sesvia-2);
  color: var(--sesvia-5);
}

.weekly-availability-time-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--sesvia-5);
  pointer-events: none;
}

.weekly-availability-time-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.weekly-availability-separator {
  color: var(--sesvia-6);
  font-weight: 700;
}

.weekly-availability-remove {
  margin-left: auto;
  color: var(--sesvia-6);
}

.weekly-availability-remove:hover {
  color: var(--sesvia-5);
}

.avail-inactive-label {
  color: var(--sesvia-6);
  font-style: italic;
  font-size: 0.94rem;
}

.availability-card-footer {
  display: flex;
  justify-content: flex-end;
  padding: 22px 32px 28px;
  margin-top: 18px;
  border-top: 1px solid rgba(176, 137, 104, 0.18);
}

.availability-card-footer .btn {
  min-width: 168px;
  justify-content: center;
}

.availability-block-shell {
  margin: 18px 32px 28px;
  padding: 20px;
  border: 1px dashed rgba(176, 137, 104, 0.45);
  border-radius: 16px;
  background: rgba(255, 250, 245, 0.55);
}

.availability-block-shell h4 {
  margin: 0 0 8px;
  color: var(--sesvia-6);
}

.availability-block-form {
  margin-top: 12px;
}

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

.availability-block-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(176, 137, 104, 0.25);
  background: #fff;
}

.availability-block-item p {
  margin: 4px 0 0;
  color: var(--sesvia-5);
  font-size: 0.9rem;
}

.availability-block-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.availability-block-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--sesvia-7);
  background: rgba(237, 224, 212, 0.7);
  border: 1px solid rgba(176, 137, 104, 0.28);
}

.availability-block-badge.is-muted {
  color: #8d5b31;
  background: rgba(249, 231, 198, 0.78);
  border-color: rgba(208, 123, 47, 0.24);
}

/* INTERRUPTOR DE PALANCA */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 21px;
  flex-shrink: 0;
}

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

.toggle-track {
  position: absolute;
  inset: 0;
  background: rgba(176, 137, 104, 0.3);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s;
}

.toggle-track::after {
  content: "";
  position: absolute;
  width: 15px;
  height: 15px;
  border-radius: 999px;
  background: #fff;
  top: 3px;
  left: 3px;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.toggle-switch input:checked ~ .toggle-track {
  background: var(--sesvia-6);
}

.toggle-switch input:checked ~ .toggle-track::after {
  transform: translateX(17px);
}

/* =====================================================
   FACTURACIÓN / BILLING
   ===================================================== */

.billing-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

/* TABLA DE USUARIOS DEL PANEL ADMIN */
.admin-users-table {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.admin-users-header,
.admin-users-row {
  display: grid;
  grid-template-columns: 1fr 1fr 168px;
  gap: 12px;
  align-items: start;
  padding: 12px 16px;
}

.admin-users-header {
  align-items: center;
  background: rgba(237, 224, 212, 0.5);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.admin-users-row {
  border-top: 1px solid var(--border);
}

.admin-users-row:first-of-type {
  border-top: none;
}

.admin-user-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.admin-user-info strong,
.admin-user-info span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-user-badges {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.admin-user-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.admin-user-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.admin-user-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: max-content;
}

@media (max-width: 600px) {
  .admin-users-header {
    display: none;
  }

  .admin-users-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 14px 16px;
  }

  .admin-user-badges {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
  }

  .admin-user-actions {
    justify-content: flex-start;
  }
}

.admin-readonly-shell {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-readonly-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.admin-readonly-section h4,
.admin-readonly-grid h4 {
  margin: 0 0 12px;
  font-size: 1rem;
  color: var(--sesvia-5);
}

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

.admin-readonly-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 14px;
  border: 1px solid rgba(176, 137, 104, 0.15);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
}

.admin-readonly-row strong {
  color: var(--sesvia-5);
}

/* REGISTRO DE ACTIVIDAD DEL PANEL ADMIN */
.admin-dashboard-shell {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(250, 244, 238, 0.42));
}

.admin-dashboard-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.admin-dashboard-copy h3 {
  margin: 4px 0 6px;
  font-size: 1.45rem;
}

.admin-kicker {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(221, 184, 146, 0.34);
  color: var(--sesvia-6);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin-dashboard-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.admin-stat-card {
  min-height: 128px;
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid rgba(176, 137, 104, 0.18);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 236, 228, 0.96));
  box-shadow: 0 16px 28px rgba(127, 85, 57, 0.1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.admin-stat-card--alert {
  border-color: rgba(212, 24, 61, 0.22);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(255, 241, 241, 0.96));
}

.admin-stat-card--action {
  cursor: pointer;
  appearance: none;
  font: inherit;
  color: inherit;
  text-align: left;
  width: 100%;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.admin-stat-card--action:hover,
.admin-stat-card--action:focus-visible {
  border-color: rgba(127, 85, 57, 0.34);
  box-shadow: 0 20px 36px rgba(127, 85, 57, 0.16);
  transform: translateY(-2px);
}

.admin-stat-label {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
}

.admin-stat-value {
  font-size: clamp(1.7rem, 2vw, 2.3rem);
  color: var(--sesvia-6);
  line-height: 1;
}

.admin-activity-section {
  margin-top: 8px;
}

.admin-activity-section h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.admin-activity-log {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.82);
}

.admin-activity-row {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
}

.admin-activity-row:first-child {
  border-top: none;
}

.admin-activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}

.admin-activity-payment_failed .admin-activity-dot,
.admin-activity-booking_cancelled .admin-activity-dot {
  background: var(--danger);
}

.admin-activity-pro_active .admin-activity-dot,
.admin-activity-invoice_issued .admin-activity-dot {
  background: var(--success, #22c55e);
}

.admin-activity-user_registered .admin-activity-dot {
  background: var(--sesvia-4);
}

.admin-activity-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.admin-activity-label {
  font-size: 0.92rem;
  font-weight: 600;
}

.admin-activity-detail {
  font-size: 0.81rem;
  color: var(--text-muted);
}

.admin-activity-time {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.billing-stat-box {
  background: rgba(230, 204, 178, 0.25);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.billing-stat-box .big-num {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--sesvia-6);
  margin: 4px 0 0;
}

.billing-stat-box .label {
  font-size: 0.8rem;
  color: var(--muted);
}

.billing-stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.billing-mini-stat .label { font-size: 0.8rem; color: var(--muted); margin: 0; }
.billing-mini-stat .value { font-size: 1.1rem; font-weight: 600; margin: 2px 0 0; }

.billing-issue-box {
  margin-bottom: 20px;
}

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

.billing-issue-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(176, 137, 104, 0.15);
  border-radius: 10px;
  background: #fff;
}

.billing-issue-row-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.billing-issue-row-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.billing-issue-row-amount {
  font-weight: 700;
  color: var(--sesvia-6);
  white-space: nowrap;
}

.payment-setup-card {
  margin-top: 20px;
}

.payment-setup-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.payment-setup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.payment-setup-meta {
  padding: 14px 16px;
  border: 1px solid rgba(176, 137, 104, 0.15);
  border-radius: 12px;
  background: #fff;
}

.payment-setup-meta .label {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0;
}

.payment-setup-meta strong {
  display: block;
  margin-top: 4px;
  color: var(--sesvia-6);
  word-break: break-word;
}

.payment-setup-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.payment-setup-flag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(176, 137, 104, 0.08);
  color: var(--muted);
  font-size: 0.82rem;
}

.payment-setup-flag-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 1px solid currentColor;
  flex: 0 0 auto;
}

.payment-setup-flag.is-active {
  background: rgba(176, 137, 104, 0.18);
  color: var(--sesvia-6);
  font-weight: 600;
}

.payment-setup-flag.is-active .payment-setup-flag-dot {
  background: currentColor;
}

.payment-provider-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.payment-provider-option {
  display: grid;
  grid-template-columns: 92px 1fr;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 78px;
  padding: 14px;
  border: 1px solid rgba(176, 137, 104, 0.24);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.payment-provider-option:hover,
.payment-provider-option:focus-visible {
  border-color: rgba(127, 85, 57, 0.45);
  box-shadow: 0 8px 20px rgba(127, 85, 57, 0.12);
  transform: translateY(-1px);
  outline: none;
}

.payment-provider-option:disabled {
  opacity: 0.62;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.payment-provider-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  height: 40px;
  border-radius: 8px;
  background: rgba(245, 241, 237, 0.88);
}

.paypal-wordmark {
  font-weight: 800;
  letter-spacing: 0;
  color: #003087;
}

.paypal-wordmark::first-letter {
  color: #009cde;
}

.card-checkout-logo svg {
  width: 22px;
  height: 22px;
  color: var(--sesvia-6);
}

.payment-provider-copy {
  display: grid;
  gap: 4px;
}

.payment-provider-copy strong {
  color: var(--sesvia-6);
}

.payment-provider-copy small {
  color: var(--muted);
  line-height: 1.35;
}

/* LISTA DE FACTURAS */
.invoice-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.invoice-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(176, 137, 104, 0.15);
  border-radius: 8px;
  background: #fff;
  appearance: none;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: background 0.12s;
}

.invoice-row:hover { background: rgba(237, 224, 212, 0.3); }
.invoice-row:focus-visible {
  outline: 2px solid rgba(176, 137, 104, 0.45);
  outline-offset: 2px;
}

.invoice-row-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.invoice-row-left svg {
  width: 18px;
  height: 18px;
  stroke: var(--muted);
  flex-shrink: 0;
}

.invoice-num {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--sesvia-5);
}

.invoice-meta {
  font-size: 0.78rem;
  color: var(--muted);
}

.invoice-row-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.invoice-amount {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--sesvia-5);
}

.invoice-detail-shell .flow-header-row {
  align-items: flex-start;
  gap: 12px;
}

.invoice-detail-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.invoice-detail-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.invoice-detail-actions .btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.invoice-preview-card {
  background: #fff;
  border: 1px solid rgba(176, 137, 104, 0.16);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 10px 30px rgba(176, 137, 104, 0.08);
}

.invoice-preview-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 18px;
}

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

.invoice-brand-avatar {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  object-fit: cover;
  flex-shrink: 0;
}

.invoice-logo-preview {
  margin-top: 12px;
}

.invoice-logo-preview .subtitle {
  margin: 4px 0 0;
  word-break: break-all;
}

.invoice-brand-mark {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--sesvia-5), var(--sesvia-4));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  flex-shrink: 0;
}

.invoice-preview-eyebrow {
  margin: 0 0 4px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.invoice-brand-lockup h4,
.invoice-preview-section h5 {
  margin: 0;
}

.invoice-brand-legal {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.invoice-head-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.invoice-preview-number {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--sesvia-5);
}

.invoice-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.invoice-preview-section {
  border: 1px solid rgba(176, 137, 104, 0.14);
  border-radius: 12px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.7);
}

.invoice-preview-section p {
  margin: 4px 0 0;
}

.invoice-preview-strong {
  font-weight: 600;
  color: var(--sesvia-5);
}

.invoice-meta-list {
  display: grid;
  gap: 10px;
  margin: 10px 0 0;
}

.invoice-meta-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.invoice-meta-list dt,
.invoice-meta-list dd {
  margin: 0;
}

.invoice-meta-list dt {
  color: var(--muted);
}

.invoice-meta-list dd {
  text-align: right;
  font-weight: 600;
  color: var(--sesvia-5);
}

.invoice-preview-service {
  border: 1px solid rgba(176, 137, 104, 0.14);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 18px;
}

.invoice-preview-service-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.invoice-preview-service-head h5 {
  margin-top: 2px;
}

.invoice-line-total {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--sesvia-5);
}

.invoice-service-meta,
.invoice-service-description,
.muted-text {
  color: var(--muted);
}

.invoice-service-meta,
.invoice-service-description {
  margin: 8px 0 0;
}

.invoice-preview-totals {
  margin-left: auto;
  width: min(100%, 360px);
  display: grid;
  gap: 8px;
}

.invoice-preview-totals div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  border: 1px solid rgba(176, 137, 104, 0.14);
  border-radius: 10px;
}

.invoice-total-row {
  background: rgba(176, 137, 104, 0.08);
}

.invoice-total-row strong {
  font-size: 1.05rem;
}

@media (max-width: 1080px) {
  .invoice-detail-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .invoice-preview-card {
    padding: 18px;
  }

  .invoice-preview-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .invoice-head-meta {
    align-items: flex-start;
  }

  .invoice-preview-grid {
    grid-template-columns: 1fr;
  }

  .invoice-preview-service-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .invoice-preview-totals {
    width: 100%;
    margin-left: 0;
  }
}

@media (max-width: 720px) {
  .invoice-brand-lockup {
    flex-direction: column;
    align-items: flex-start;
  }

  .invoice-brand-mark {
    width: 52px;
    height: 52px;
    border-radius: 14px;
  }

  .settings-meta-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .settings-meta-row strong {
    text-align: left;
  }

  .settings-section-summary {
    align-items: flex-start;
  }

  .own-profile-content {
    padding: 0 16px 16px;
  }

  .own-profile-content .browse-profile-header {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* =====================================================
   PANEL DE CONFIGURACIÓN
   ===================================================== */

.settings-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: min(1120px, 100%);
  margin: 0 auto;
}

.settings-sections-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: start;
}

.settings-hero-card {
  background: linear-gradient(135deg, rgba(237, 224, 212, 0.9), rgba(255, 255, 255, 0.96));
  border: 1px solid rgba(176, 137, 104, 0.18);
  max-width: 980px;
  width: 100%;
  margin: 0 auto;
}

.settings-hero-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.settings-avatar-preview--hero {
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.72);
}

.settings-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.settings-role-switcher {
  align-items: center;
}

.settings-role-chip {
  border: 1px solid rgba(176, 137, 104, 0.35);
  background: rgba(237, 224, 212, 0.82);
  color: var(--sesvia-6);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.settings-role-chip:hover {
  background: rgba(221, 184, 146, 0.45);
  border-color: rgba(156, 102, 68, 0.4);
}

.settings-role-chip.is-active {
  background: var(--sesvia-6);
  color: var(--sesvia-1);
  border-color: var(--sesvia-6);
}

.settings-hero-identity {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
}

.settings-hero-identity strong {
  color: var(--sesvia-5);
  font-size: 1rem;
}

.settings-hero-identity span {
  color: var(--muted);
  font-size: 0.82rem;
}

.settings-summary-grid {
  align-items: stretch;
}

.settings-meta-card h4,
.settings-form-card h4 {
  margin-bottom: 12px;
}

.settings-meta-list {
  display: grid;
  gap: 10px;
}

.settings-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(176, 137, 104, 0.16);
  background: rgba(237, 224, 212, 0.36);
}

.settings-meta-row span {
  color: var(--muted);
  font-size: 0.9rem;
}

.settings-meta-row strong {
  color: var(--sesvia-5);
  text-align: right;
}

.settings-quick-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.settings-section {
  padding: 0;
  overflow: hidden;
  height: auto;
  align-self: stretch;
  border-radius: 8px;
}

.settings-section-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 74px;
  padding: 14px 18px;
  cursor: pointer;
}

.settings-section-summary::-webkit-details-marker {
  display: none;
}

.settings-section-summary h4 {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.2;
}

.settings-section-summary .subtitle {
  margin: 4px 0 0;
  font-size: 0.88rem;
  line-height: 1.35;
}

.settings-section-caret {
  width: 12px;
  height: 12px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  color: var(--muted);
  flex: 0 0 auto;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.settings-section[open] .settings-section-caret {
  transform: rotate(225deg);
}

.settings-section-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0 18px 18px;
  border-top: 1px solid rgba(176, 137, 104, 0.12);
}

.settings-public-preview {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(176, 137, 104, 0.18);
  background: linear-gradient(135deg, rgba(237, 224, 212, 0.38), rgba(255, 255, 255, 0.92));
}

.settings-public-preview .browse-profile-header {
  margin-bottom: 0;
}

.settings-status-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.settings-form-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.settings-note-card {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(176, 137, 104, 0.16);
  background: rgba(255, 255, 255, 0.8);
}

.settings-note-card h5 {
  margin: 0 0 6px;
  color: var(--sesvia-5);
}

.settings-note-card p {
  margin: 0;
  color: var(--sesvia-5);
}

.settings-note-card .badge {
  margin-top: 10px;
}

.settings-note-card .actions {
  margin-top: 12px;
  justify-content: flex-start;
}

.settings-note-card.is-active {
  border-color: rgba(176, 137, 104, 0.5);
  box-shadow: 0 0 0 2px rgba(176, 137, 104, 0.15);
}

.settings-inline-notice {
  max-width: 980px;
  width: 100%;
  margin: 0 auto;
}

@media (min-width: 900px) {
  .settings-hero-main {
    grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
    align-items: start;
  }
}

.settings-account-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.settings-field-hint {
  margin-top: 8px;
}

.settings-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid rgba(176, 137, 104, 0.12);
}

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

.settings-toggle-info .s-label {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--sesvia-5);
}

.settings-toggle-info .s-hint {
  font-size: 0.81rem;
  color: var(--muted);
  margin-top: 2px;
}

/* =====================================================
   PANEL DE PERFIL
   ===================================================== */

.profile-layout {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 20px;
  align-items: start;
}

.profile-avatar-card {
  background: #fff;
  border-radius: 10px;
  border: 1px solid rgba(176, 137, 104, 0.18);
  padding: 24px 16px;
  text-align: center;
}

.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 999px;
  background: var(--sesvia-4);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0 auto 12px;
  overflow: hidden;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--sesvia-5);
}

.profile-avatar-title {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 2px;
}

.own-profile-card {
  max-width: 760px;
  margin: 0 auto;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(176, 137, 104, 0.2);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 244, 238, 0.98));
  color: var(--sesvia-5);
  box-shadow: 0 16px 32px rgba(127, 85, 57, 0.12);
}

.own-profile-banner {
  height: 116px;
  background: linear-gradient(135deg, rgba(221, 184, 146, 0.92), rgba(176, 137, 104, 0.88));
}

.own-profile-content {
  padding: 0 20px 20px;
  margin-top: -34px;
}

.own-profile-content .browse-profile-header {
  align-items: flex-end;
  margin-bottom: 12px;
}

.own-profile-content .browse-profile-avatar {
  width: 96px;
  height: 96px;
  border: 4px solid rgba(255, 255, 255, 0.98);
  box-shadow: 0 8px 18px rgba(127, 85, 57, 0.16);
}

.own-profile-content .browse-profile-copy h3,
.own-profile-content .browse-profile-copy p,
.own-profile-meta strong,
.own-profile-about h4,
.own-profile-about p {
  color: var(--sesvia-5);
}

.own-profile-content .browse-profile-location {
  color: var(--muted);
}

.own-profile-about {
  margin-top: 14px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(176, 137, 104, 0.14);
  background: rgba(237, 224, 212, 0.34);
}

.own-profile-about h4 {
  margin: 0 0 8px;
}

.own-profile-about p {
  margin: 0;
}

.own-profile-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.own-profile-meta {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(176, 137, 104, 0.14);
}

.own-profile-meta span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.82rem;
}

/* =====================================================
   CLIENTE: perfil profesional público
   ===================================================== */

.public-prof-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(176, 137, 104, 0.18);
  overflow: hidden;
  max-width: 680px;
  margin: 0 auto;
}

.public-prof-banner {
  height: 90px;
  background: linear-gradient(135deg, var(--sesvia-2), var(--sesvia-3));
}

.public-prof-body {
  padding: 14px 24px 24px;
}

.public-prof-service-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid rgba(176, 137, 104, 0.18);
  border-radius: 8px;
  background: rgba(237, 224, 212, 0.18);
  margin-bottom: 8px;
}

.public-prof-service-row:hover {
  background: rgba(230, 204, 178, 0.35);
}

.slot-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  min-width: 0;
}

.browse-slots-layout {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-top: 12px;
}

.browse-slots-layout > * {
  min-width: 0;
}

.browse-calendar-card,
.browse-day-card {
  border: 1px solid rgba(176, 137, 104, 0.18);
  border-radius: 10px;
  background: #fff;
  padding: 14px;
  overflow: hidden;
  min-width: 0;
}

.browse-day-card {
  position: relative;
  z-index: 1;
}

.browse-calendar-card .calendar-head {
  margin-bottom: 12px;
}

.browse-calendar-grid {
  margin-bottom: 12px;
}

.browse-day-eyebrow {
  margin: 0 0 4px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 700;
}

.browse-day-card h4 {
  margin: 0 0 8px;
}

.browse-holiday-note {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(249, 231, 198, 0.45);
  border: 1px solid rgba(208, 123, 47, 0.18);
}

.browse-selected-slot {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(230, 204, 178, 0.24);
  border: 1px solid rgba(176, 137, 104, 0.2);
  color: var(--sesvia-7);
  font-size: 0.92rem;
}

.slot-choice {
  min-height: 68px;
  justify-content: center;
  text-align: left;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.slot-choice.is-selected,
.slot-choice.active-tab {
  border-color: var(--sesvia-6);
  background: rgba(156, 102, 68, 0.12);
  color: var(--sesvia-7);
}

.slot-choice-time {
  font-weight: 700;
  font-size: 0.96rem;
}

.slot-choice-meta {
  font-size: 0.8rem;
  color: var(--muted);
}

.slot-choice.is-selected .slot-choice-meta,
.slot-choice.active-tab .slot-choice-meta {
  color: rgba(255, 255, 255, 0.86);
  font-weight: 700;
}

.browse-calendar-actions {
  justify-content: space-between;
}

.browse-closures {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(176, 137, 104, 0.16);
}

.browse-closures-title {
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--sesvia-6);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.browse-closure-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.browse-closure-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(237, 224, 212, 0.62);
  border: 1px solid rgba(176, 137, 104, 0.2);
  color: var(--sesvia-7);
  font-size: 0.82rem;
  font-weight: 600;
}

/* =====================================================
   TARJETAS DE FLUJO (asistente de reservas)
   ===================================================== */

.flow-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.booking-summary {
  background: rgba(230, 204, 178, 0.25);
  border: 1px solid rgba(176, 137, 104, 0.2);
  border-radius: 8px;
  padding: 14px 16px;
  margin: 12px 0;
}

.booking-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  margin-bottom: 4px;
}

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

/* =====================================================
   TARJETAS DE DASHBOARD
   ===================================================== */

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.dashboard-card {
  background: #fff;
  border: 1px solid rgba(176, 137, 104, 0.18);
  border-radius: 10px;
  padding: 16px;
}

@media (prefers-reduced-motion: no-preference) {
  .dashboard-grid > .dashboard-card,
  .onboarding-box > .dashboard-grid .dashboard-card {
    animation: sesvia-card-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: 0.06s;
  }

  .dashboard-grid > .dashboard-card:nth-child(2),
  .onboarding-box > .dashboard-grid .dashboard-card:nth-child(2) {
    animation-delay: 0.13s;
  }

  .dashboard-grid > .dashboard-card:nth-child(3),
  .onboarding-box > .dashboard-grid .dashboard-card:nth-child(3) {
    animation-delay: 0.20s;
  }

  .dashboard-grid > .dashboard-card:nth-child(4),
  .onboarding-box > .dashboard-grid .dashboard-card:nth-child(4) {
    animation-delay: 0.27s;
  }

  .dashboard-grid > .dashboard-card:nth-child(n+5),
  .onboarding-box > .dashboard-grid .dashboard-card:nth-child(n+5) {
    animation-delay: 0.32s;
  }
}

@keyframes sesvia-card-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}


.dashboard-card h3 {
  margin: 0 0 6px;
  font-size: 0.97rem;
  color: var(--sesvia-6);
}

.dashboard-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

/* =====================================================
   MISC: incorporación, depuración, estado
   ===================================================== */

.onboarding-box {
  padding: 18px;
  border: 1px solid rgba(127, 85, 57, 0.2);
  border-radius: 10px;
  background: rgba(237, 224, 212, 0.28);
}

.onboarding-box h3 {
  margin: 0 0 6px;
  color: var(--sesvia-6);
}

.onboarding-box h4 {
  margin: 14px 0 8px;
  color: var(--sesvia-6);
}

.warning-box {
  border: 1px solid rgba(176, 137, 104, 0.4);
  border-radius: 10px;
  background: rgba(230, 204, 178, 0.3);
  padding: 12px 14px;
  margin-bottom: 16px;
}

.warning-title {
  margin: 0 0 6px;
  font-weight: 700;
  color: var(--sesvia-6);
}

.debug-panel {
  margin: 0 0 16px;
  padding: 12px;
  border-radius: 10px;
  border: 1px dashed rgba(156, 102, 68, 0.45);
  background: rgba(237, 224, 212, 0.38);
}

.debug-title { margin: 0 0 6px; font-weight: 700; color: var(--sesvia-6); }
.debug-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0; }

.debug-code {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(127, 85, 57, 0.16);
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.8rem;
  word-break: break-all;
}

.checklist {
  margin: 10px 0 14px;
  padding-left: 18px;
}

.checklist li { margin-bottom: 5px; }

.status-message {
  margin: 8px 0;
  font-size: 0.88rem;
  border-radius: 8px;
  padding: 10px 12px;
}

.status-message.is-info {
  color: var(--sesvia-6);
  background: rgba(230, 204, 178, 0.36);
  border: 1px solid rgba(156, 102, 68, 0.22);
}

.status-message.is-success {
  color: #20543f;
  background: rgba(218, 246, 228, 0.7);
  border: 1px solid rgba(53, 122, 84, 0.22);
}

.status-message.is-warning {
  color: #805b14;
  background: rgba(255, 244, 204, 0.82);
  border: 1px solid rgba(195, 151, 41, 0.24);
}

.appointment-flow-card {
  margin-bottom: 12px;
}

.status-card { text-align: center; }

.status-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
  padding: 24px 18px;
  border-radius: 12px;
  border: 1px solid rgba(127, 85, 57, 0.16);
  background: rgba(237, 224, 212, 0.3);
}

.status-panel.is-success {
  background: var(--success-bg);
  border-color: var(--success-border);
}

.status-panel.is-error {
  background: rgba(255, 236, 236, 0.7);
  border-color: rgba(191, 63, 63, 0.25);
}

/* =====================================================
   SPINNER
   ===================================================== */

.spinner {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 3px solid rgba(156, 102, 68, 0.18);
  border-top-color: var(--sesvia-6);
  animation: spin 0.85s linear infinite;
}

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

/* =====================================================
   CAMBIO DE IDIOMA
   ===================================================== */

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid rgba(176, 137, 104, 0.25);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  font-size: 0.82rem;
}

.lang-switch select {
  border: 0;
  background: transparent;
  color: var(--sesvia-6);
  font-weight: 600;
  cursor: pointer;
  font-size: 0.82rem;
}

.topbar {
  display: flex;
  justify-content: flex-end;
}

/* =====================================================
   LEGADO / COMPAT
   Mantenido para que los renderizadores de secciones existentes no se rompan
   ===================================================== */

/* Usado por las páginas de autenticación aún envueltas en .card  */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.07);
}

.card h2 { margin: 0; font-size: 1.5rem; color: var(--sesvia-6); }
.card .subtitle { margin-top: 5px; margin-bottom: 16px; color: var(--muted); }

.page {
  width: 100%;
  max-width: 860px;
}

.brand { text-align: center; margin-bottom: 20px; }
.brand img { width: 68px; height: 68px; object-fit: contain; }
.brand h1 { margin: 8px 0 4px; font-size: 1.9rem; color: var(--sesvia-6); font-weight: 700; }
.brand p { margin: 0; color: var(--muted); }

.view-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 4px;
  flex-wrap: wrap;
}

.view-meta { font-size: 0.88rem; color: var(--muted); }

.section-tabs {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.section-tabs .btn-outline-primary {
  color: var(--sesvia-5);
  border-color: var(--sesvia-4);
  background: transparent;
}

.section-tabs .btn-outline-primary:hover,
.section-tabs .btn-outline-primary:focus {
  color: var(--sesvia-7);
  border-color: var(--sesvia-6);
  background: rgba(156, 102, 68, 0.08);
  box-shadow: none;
}

.active-tab {
  background: var(--sesvia-6) !important;
  color: #fff !important;
  border-color: var(--sesvia-6) !important;
}

.footer-note {
  margin-top: 16px;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

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

@media (max-width: 1480px) {

  .agenda-panel,
  .agenda-side-card {
    padding: 16px;
  }

  .agenda-week-grid {
    min-width: 0;
  }

  .agenda-month-grid {
    min-width: 760px;
    gap: 6px;
  }

  .agenda-panel .calendar-weekdays {
    min-width: 760px;
  }

  .agenda-month-day {
    min-height: 112px;
    padding: 8px;
    gap: 6px;
  }

  .agenda-week-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .agenda-week-column {
    min-height: 0;
  }

  .agenda-week-items {
    padding: 10px;
  }
}

@media (max-width: 900px) {
  .dash-metric-grid,
  .dash-metric-grid--3,
  .admin-stat-grid,
  .admin-readonly-grid,
  .agenda-layout,
  .billing-summary-grid,
  .profile-layout,
  .consent-columns {
    grid-template-columns: 1fr;
  }

  .agenda-toolbar,
  .agenda-side-header,
  .agenda-detail-item {
    flex-direction: column;
    align-items: stretch;
  }

  .agenda-toolbar-right,
  .agenda-side-actions {
    justify-content: flex-start;
  }

  .agenda-search-row {
    align-items: stretch;
  }

  .agenda-search-input {
    flex-basis: 100%;
  }

  .agenda-inline-link,
  .agenda-client-booking,
  .agenda-thread-message-head {
    text-align: left;
  }

  .agenda-client-booking,
  .agenda-thread-message-head {
    flex-direction: column;
    align-items: stretch;
  }

  .invoice-row,
  .invoice-row-left,
  .invoice-row-right {
    flex-direction: column;
    align-items: flex-start;
  }

  .billing-issue-row,
  .billing-issue-row-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-dashboard-hero,
  .dash-card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-dashboard-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 1120px) {
  .agenda-panel {
    overflow-x: hidden;
  }

  .agenda-month-grid,
  .agenda-panel .calendar-weekdays {
    min-width: 0 !important;
    width: 100%;
  }

  .agenda-month-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
  }

  .agenda-month-day {
    min-height: clamp(72px, 8.2vw, 96px);
    padding: 7px;
    gap: 4px;
    border-radius: 12px;
  }

  .agenda-month-day.has-pending::after {
    display: none;
  }

  .agenda-month-day-head {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
  }

  .agenda-month-day-meta {
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
    min-height: 18px;
  }

  .agenda-month-day-number {
    font-size: clamp(0.95rem, 2vw, 1.08rem);
  }

  .agenda-day-count {
    min-width: 19px;
    height: 19px;
    font-size: 0.68rem;
  }

  .agenda-day-block-indicator {
    position: relative;
    min-width: 18px;
    width: 18px;
    height: 18px;
    padding: 0;
    overflow: hidden;
    color: transparent;
    text-indent: -999px;
  }

  .agenda-day-block-indicator::after {
    content: "";
    position: absolute;
    inset: 5px;
    border-radius: 999px;
    background: #a84343;
  }

  .agenda-month-day-list {
    display: none;
  }
}

@media (max-width: 768px) {
  .main-header {
    padding: 0 12px;
    gap: 8px;
  }

  .main-header h1 {
    font-size: 1rem;
    min-width: 0;
  }

  .main-header-actions {
    gap: 6px;
    min-width: 0;
  }

  .main-header-actions .lang-switch > span {
    display: none;
  }

  .main-header-actions .lang-switch {
    padding: 5px 8px;
  }

  .main-header-actions .lang-switch select {
    max-width: 118px;
  }

  .dash-apt-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .dash-apt-time {
    min-width: 0;
  }

  .dash-apt-main {
    width: 100%;
  }

  .dash-apt-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .dash-card-body {
    padding: 16px;
  }

  /* Barra lateral Pro: fuera de lienzo, se desliza hacia adentro */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    z-index: 200;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
  }

  .layout-pro.sidebar-open .sidebar-overlay,
  .layout-client-shell.sidebar-open .sidebar-overlay {
    display: block;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }

  /* Mostrar hamburguesa en el encabezado principal en dispositivos móviles */
  .sidebar-toggle-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    border: 1px solid rgba(176, 137, 104, 0.45);
    border-radius: 8px;
    padding: 6px 9px;
    background: rgba(255, 255, 255, 0.92);
  }

  .sidebar-toggle-label {
    display: inline;
    color: var(--sesvia-5);
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1;
  }

  /* Hamburguesa de la barra de navegación del cliente */
  .topnav-hamburger {
    display: flex;
  }

  /* Enlaces de navegación del cliente: ocultos hasta que se abren */
  .topnav-links {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    z-index: 150;
    padding: 8px 0;
  }
  .topnav-links.topnav-links-open {
    display: flex;
  }
  .topnav-link {
    border-radius: 0;
    padding: 12px 20px;
    justify-content: flex-start;
  }

  /* Colapsa la cuadrícula */
  .grid-two,
  .grid-three,
  .browse-filter-grid,
  .role-picker,
  .dashboard-grid,
  .slot-grid,
  .billing-stats-row {
    grid-template-columns: 1fr;
  }

  .browse-card-head,
  .browse-profile-header,
  .browse-service-head {
    flex-direction: column;
  }

  .calendar-month-label {
    min-width: 120px;
    font-size: 0.88rem;
  }

  .agenda-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .agenda-panel,
  .agenda-side-card {
    padding: 14px;
    border-radius: 16px;
  }

  .agenda-panel {
    overflow-x: hidden;
  }

  .agenda-day-timeline-shell {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 8px;
  }

  .agenda-day-time-label {
    right: 4px;
    font-size: 0.72rem;
  }

  .agenda-timeline-event {
    left: 8px;
    right: 8px;
  }

  .agenda-week-grid {
    min-width: 0;
  }

  .agenda-month-grid,
  .agenda-panel .calendar-weekdays {
    min-width: 0 !important;
    width: 100%;
  }

  .agenda-toolbar {
    gap: 12px;
    margin-bottom: 12px;
  }

  .agenda-toolbar-right {
    width: 100%;
    gap: 8px;
  }

  .agenda-status-filters {
    width: 100%;
  }

  .agenda-status-filter {
    flex: 1 1 calc(50% - 8px);
    justify-content: center;
  }

  .agenda-view-switch {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .agenda-view-switch .btn {
    width: 100%;
  }

  .agenda-month-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
  }

  .calendar-weekdays span {
    font-size: 0.69rem;
    padding: 2px 0;
  }

  .agenda-month-day {
    min-height: clamp(44px, 10vw, 58px);
    padding: 4px 5px;
    gap: 2px;
    border-radius: 9px;
    aspect-ratio: unset;
  }

  .agenda-month-day-head {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 2px;
  }

  .agenda-month-day-meta {
    gap: 2px;
    min-height: 0;
    justify-content: flex-end;
  }

  .agenda-month-day-number {
    font-size: clamp(0.8rem, 2.7vw, 0.95rem);
  }

  .agenda-day-count {
    min-width: 16px;
    height: 16px;
    font-size: 0.6rem;
  }

  .agenda-day-block-indicator {
    min-width: 11px;
    width: 11px;
    height: 11px;
    padding: 0;
    border-radius: 999px;
    font-size: 0;
  }

  .agenda-day-block-indicator::after {
    inset: 3px;
  }

  .agenda-week-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .agenda-week-column {
    min-height: 0;
  }

  .agenda-week-items {
    padding: 10px;
  }

  .agenda-booking-button {
    padding: 10px;
  }

  .agenda-booking-head {
    flex-direction: column;
    align-items: stretch;
  }

  .main-content,
  .client-content {
    padding: 16px;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .services-toolbar,
  .service-editor-head,
  .service-card-head {
    flex-direction: column;
    align-items: stretch;
  }

  .service-card-actions {
    justify-content: flex-end;
  }

  .weekly-availability-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .weekly-availability-range {
    flex-wrap: wrap;
  }

  .weekly-availability-remove {
    margin-left: 0;
  }

  .availability-card-body,
  .availability-card-footer {
    padding-left: 18px;
    padding-right: 18px;
  }

  .availability-block-shell {
    margin-left: 18px;
    margin-right: 18px;
  }

  /* la barra de navegación necesita posición relativa para el menú desplegable */
  .topnav {
    position: relative;
  }

  .guest-topnav {
    height: auto;
    padding: 12px 16px;
    flex-wrap: wrap;
  }

  .guest-topnav-right {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .guest-hero {
    padding: 20px;
    align-items: flex-start;
    flex-direction: column;
  }

  .guest-hero-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .auth-topbar {
    width: 100%;
    max-width: 440px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .consent-gate {
    padding: 12px;
    align-items: flex-end;
  }

  .consent-card {
    width: 100%;
    max-height: 88vh;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    padding: 20px 16px;
  }

  .app-footer {
    padding: 10px 14px;
    position: sticky;
    bottom: 0;
  }

  .app-footer-bar {
    justify-content: flex-start;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: thin;
  }

  .app-footer-panel {
    left: 0;
    right: 0;
    top: auto;
    bottom: -120%;
    transform: none;
    width: auto;
    z-index: 209;
    background: #fff;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border: none;
    box-shadow: 0 -12px 28px rgba(0, 0, 0, 0.2);
    padding: 16px;
    display: grid;
    gap: 10px;
    transition: bottom 0.22s ease;
    max-height: 78vh;
    overflow-y: auto;
  }

  .app-footer.is-open .app-footer-backdrop {
    display: block;
    visibility: visible;
    pointer-events: auto;
  }

  .app-footer.is-open .app-footer-panel {
    display: grid;
    visibility: visible;
    pointer-events: auto;
    bottom: 0;
  }
}

/* ── Modales propios (reemplazo de window.confirm/prompt) ──────────────────── */

.sesvia-modal-overlay {
  z-index: 1055;
}

.sesvia-modal-overlay .modal-content {
  border-radius: 16px;
  border: 1px solid rgba(176, 137, 104, 0.25);
  box-shadow: 0 8px 32px rgba(127, 85, 57, 0.18);
}

.sesvia-modal-overlay .modal-header {
  border-bottom: 1px solid rgba(176, 137, 104, 0.18);
  padding: 1rem 1.25rem 0.75rem;
}

.sesvia-modal-overlay .modal-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--sesvia-5);
}

.sesvia-modal-overlay .modal-body {
  padding: 1.25rem;
}

.sesvia-modal-overlay .modal-footer {
  border-top: 1px solid rgba(176, 137, 104, 0.18);
  padding: 0.75rem 1.25rem;
  gap: 0.5rem;
}

.sesvia-modal-backdrop {
  z-index: 1054;
}

@media (prefers-reduced-motion: reduce) {
  .main-content,
  .dashboard-grid > .dashboard-card,
  .onboarding-box > .dashboard-grid .dashboard-card {
    animation: none;
  }

  .sesvia-modal-overlay,
  .sesvia-modal-backdrop {
    transition: none;
  }
}

@media (max-width: 520px) {
  .payment-provider-option {
    grid-template-columns: 1fr;
  }

  .payment-provider-logo {
    width: 100%;
  }
}
