:root {
  --ink: #102044;
  --muted: #60708c;
  --paper: #f3f6fb;
  --card: #ffffff;
  --line: #dbe4f2;
  --teal: #0759d9;
  --teal-soft: #e8f1ff;
  --mint: #20a4ff;
  --coral: #0874ed;
  --coral-soft: #e9f3ff;
  --gold: #d7a94c;
  --navy: #071c52;
  --blue: #0759d9;
  --sky: #20a4ff;
  --ink-soft: #60708c;
  --surface-soft: #f8fbff;
  --shadow: 0 18px 50px rgba(7, 45, 115, 0.10);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 0%, rgba(32, 164, 255, 0.14), transparent 30rem),
    radial-gradient(circle at 96% 24%, rgba(7, 89, 217, 0.08), transparent 26rem),
    var(--paper);
}

a { color: inherit; }

button, input, select { font: inherit; }

.page-shell {
  width: min(1180px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.topbar {
  min-height: 106px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid rgba(7, 89, 217, 0.15);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  text-decoration: none;
}

.portal-brand-logo {
  width: 210px;
  height: auto;
  max-width: min(210px, 30vw);
  max-height: 44px;
  flex: 0 1 auto;
  display: block;
  object-fit: contain;
  object-position: left center;
}

.portal-business-logo {
  width: 76px;
  height: 76px;
  flex: 0 0 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(32, 164, 255, 0.35);
  border-radius: 18px;
  box-shadow: 0 8px 22px rgba(7, 89, 217, 0.22);
}

.brand-logo {
  position: absolute;
  top: 0;
  left: -25%;
  width: 150%;
  height: auto;
  display: block;
  max-width: none;
  max-height: none;
  border: 0;
  box-shadow: none;
}

.business-widget {
  position: relative;
  z-index: 20;
}
.business-widget summary { list-style: none; }
.business-widget summary::-webkit-details-marker { display: none; }
.business-widget-summary {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 205px;
  max-width: 255px;
  gap: 9px;
  padding: 8px 10px 8px 11px;
  color: var(--ink);
  background: linear-gradient(135deg, #fff 0%, #fff 88%, #dbe8f8 88%, #dbe8f8 100%);
  border: 1px solid #cbd9ed;
  border-radius: 11px 11px 4px 11px;
  box-shadow: 0 5px 14px rgba(16, 32, 68, .07);
  cursor: pointer;
}
.business-widget-summary::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-left: 10px solid transparent;
  border-right: 0 solid transparent;
  border-bottom: 0 solid transparent;
}
.business-widget-summary:hover,
.business-widget[open] .business-widget-summary {
  border-color: rgba(7, 89, 217, .38);
  box-shadow: 0 8px 20px rgba(7, 89, 217, .12);
}
.business-widget-semaphore {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  display: inline-block;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .82), 0 0 0 4px rgba(16, 32, 68, .07);
}
.semaphore-green { background: #1ca66c; }
.semaphore-yellow { background: #e1aa16; }
.semaphore-red { background: #df4545; }
.business-widget-summary-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
  text-align: left;
}
.business-widget-summary-copy strong,
.business-widget-summary-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.business-widget-summary-copy strong { color: var(--navy); font-size: 12px; }
.business-widget-summary-copy small { color: var(--muted); font-size: 10px; }
.business-widget-chevron { margin-left: auto; color: var(--muted); font-size: 17px; line-height: 1; }
.business-widget-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 252px;
  padding: 15px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px 13px 4px 13px;
  box-shadow: 0 18px 42px rgba(16, 32, 68, .16);
}
.business-widget-kicker {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.business-widget-name {
  display: block;
  margin-bottom: 12px;
  color: var(--navy);
  font-size: 15px;
  line-height: 1.25;
}
.business-widget-details { display: grid; gap: 9px; }
.business-widget-details > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-top: 9px;
  border-top: 1px solid #edf1f7;
}
.business-widget-details span { color: var(--muted); font-size: 11px; }
.business-widget-details > div > strong { color: var(--ink); font-size: 11px; text-align: right; }
.business-widget-status { display: inline-flex; align-items: center; gap: 6px; }
.business-widget-status.status-green { color: #08734a !important; }
.business-widget-status.status-yellow { color: #876313 !important; }
.business-widget-status.status-red { color: #ad3434 !important; }
.profile-control {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
}
.profile-avatar {
  position: relative;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--navy);
  background: linear-gradient(145deg, #e8f1ff, #c8dcff);
  border: 1px solid rgba(7, 89, 217, .22);
  border-radius: 50%;
  cursor: pointer;
}
.profile-avatar:hover { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(7, 89, 217, .10); }
.profile-avatar input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.profile-initial { font-size: 14px; font-weight: 850; }
.profile-avatar-image { position: absolute; inset: 0; width: 100%; height: 100%; display: none; object-fit: cover; }
.profile-avatar-image[src] { display: block; }
.profile-avatar-superadmin {
  color: #6c4800;
  background: linear-gradient(145deg, #fff5c7, #f2c65d);
  border-color: #d7a94c;
  cursor: default;
  box-shadow: 0 0 0 3px rgba(215, 169, 76, .14);
}
.profile-avatar-superadmin:hover { border-color: #d7a94c; box-shadow: 0 0 0 3px rgba(215, 169, 76, .14); }
.profile-crown { font-size: 22px; line-height: 1; transform: translateY(-1px); }
.profile-control .user-badge {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  line-height: 1.2;
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
}
.profile-control .user-badge strong { max-width: 110px; overflow: hidden; color: var(--ink); font-size: 11px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.profile-control .user-badge small { color: var(--muted); font-size: 10px; font-weight: 500; text-transform: capitalize; }
.account-logout { min-height: 32px !important; padding: 6px 10px !important; border-radius: 8px !important; font-size: 12px !important; }

.notification-center { position: relative; z-index: 30; margin-left: auto; }
.notification-bell {
  position: relative;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--navy);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(16, 32, 68, .08);
}
.notification-bell:hover,
.notification-center.is-open .notification-bell {
  border-color: rgba(7, 89, 217, .45);
  box-shadow: 0 8px 20px rgba(7, 89, 217, .14);
}
.notification-bell-icon { font-size: 20px; line-height: 1; }
.notification-count {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  color: #fff;
  background: #d93636;
  border: 2px solid var(--paper);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
}
.notification-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(360px, calc(100vw - 32px));
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: 0 20px 50px rgba(16, 32, 68, .18);
}
.notification-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.notification-panel-header strong { color: var(--navy); font-size: 14px; }
.notification-mark-all {
  padding: 0;
  color: var(--teal);
  background: transparent;
  border: 0;
  font-size: 11px;
  cursor: pointer;
}
.notification-list { max-height: 360px; overflow-y: auto; }
.notification-item {
  display: block;
  width: 100%;
  padding: 13px 16px;
  color: var(--ink);
  text-align: left;
  background: #fff;
  border: 0;
  border-bottom: 1px solid #edf1f7;
  cursor: pointer;
}
.notification-item:hover { background: var(--surface-soft); }
.notification-item.unread { background: #eef6ff; }
.notification-item strong { display: block; margin-bottom: 4px; font-size: 12px; }
.notification-item p { margin: 0 0 5px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.notification-item time { color: var(--muted); font-size: 10px; }
.notification-empty { margin: 0; padding: 24px 16px; color: var(--muted); font-size: 12px; text-align: center; }

@media (max-width: 720px) {
  .notification-center { position: static; }
  .notification-panel {
    position: fixed;
    z-index: 2000;
    top: 68px;
    right: 10px;
    left: 10px;
    width: auto;
    max-height: min(320px, calc(100vh - 84px));
    border-radius: 12px;
  }
  .notification-panel-header { padding: 10px 12px; }
  .notification-panel-header strong { font-size: 13px; }
  .notification-list { max-height: min(260px, calc(100vh - 132px)); }
  .notification-item { padding: 10px 12px; }
  .notification-item strong { margin-bottom: 3px; font-size: 11px; }
  .notification-item p {
    display: -webkit-box;
    margin-bottom: 4px;
    overflow: hidden;
    font-size: 10px;
    line-height: 1.3;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
  .notification-item time { font-size: 9px; }
}

.account {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
}

.account form { margin: 0; }

.dashboard-hero {
  align-items: center;
  gap: 18px;
  margin-bottom: 14px !important;
}
.dashboard-hero > div:first-child { min-width: 0; flex: 1 1 auto; }
.dashboard-business-widget {
  width: min(330px, 42%);
  flex: 0 0 auto;
  padding: 12px 14px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid var(--line);
  border-radius: 13px 13px 4px 13px;
  box-shadow: 0 8px 22px rgba(16, 32, 68, .07);
}
.business-widget-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dashboard-business-widget .business-widget-kicker { margin-bottom: 3px; }
.dashboard-business-widget .business-widget-name { max-width: 245px; margin: 0; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-business-widget .business-widget-semaphore { width: 10px; height: 10px; flex-basis: 10px; }
.dashboard-business-widget .business-widget-details { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-top: 11px; }
.dashboard-business-widget .business-widget-details > div { display: block; min-width: 0; padding: 0; border: 0; }
.dashboard-business-widget .business-widget-details span { display: block; margin-bottom: 3px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.dashboard-business-widget .business-widget-details > div > strong { display: block; overflow: hidden; color: var(--ink); font-size: 10px; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.home-main .metrics { margin-bottom: 14px; }
.home-main .grid-two { margin-top: 0; }

.business-strip {
  margin-top: 18px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(7, 89, 217, 0.14);
  border-radius: 17px;
  box-shadow: 0 10px 30px rgba(7, 45, 115, 0.07);
}
.business-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}
.business-identity strong,
.business-identity span { display: block; }
.business-identity strong { margin-bottom: 4px; color: var(--navy); }
.business-identity div > span {
  max-width: 560px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.license-summary {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  text-align: right;
}
.license-summary small {
  margin-top: 5px;
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.license-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}
.license-badge i {
  width: 10px;
  height: 10px;
  display: block;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.72);
}
.license-green { color: #07583e; background: #e4f7ef; }
.license-green i { background: #19a46b; }
.license-yellow { color: #765600; background: #fff3cc; }
.license-yellow i { background: #e7ad12; }
.license-red { color: #9b2f2f; background: #feeaea; }
.license-red i { background: #df3f3f; }

main { flex: 1; padding: 54px 0 72px; }

footer {
  padding: 24px 0 36px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 14px;
}

h1, h2, p { margin-top: 0; }
h1 {
  margin-bottom: 14px;
  max-width: 780px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.04em;
}
h2 { font-size: 25px; letter-spacing: -0.02em; }

.eyebrow, .step {
  margin-bottom: 10px;
  color: var(--coral);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.lead {
  max-width: 680px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.muted { color: var(--muted); line-height: 1.55; }

.hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 36px;
}

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

.hero-compact h1 { font-size: clamp(34px, 5vw, 54px); }

.button {
  min-height: 44px;
  padding: 11px 17px;
  border: 1px solid transparent;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 750;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.button:hover { transform: translateY(-1px); }
.button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid rgba(32, 164, 255, 0.28);
  outline-offset: 2px;
}
.button-primary {
  color: white;
  background: linear-gradient(135deg, var(--sky), var(--blue) 52%, var(--navy));
  box-shadow: 0 12px 26px rgba(7, 89, 217, 0.22);
}
.button-secondary { color: var(--teal); background: var(--teal-soft); }
.button-danger { color: #8f3324; background: var(--coral-soft); }
.button-quiet { color: var(--teal); border-color: var(--line); background: white; }
.button-small { min-height: 36px; padding: 8px 12px; border-radius: 9px; font-size: 13px; }
.button-full { width: 100%; }

.card {
  background: var(--card);
  border: 1px solid rgba(7, 89, 217, 0.12);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.settings-card {
  margin-top: 24px;
  overflow: hidden;
}
.settings-card-header {
  padding: 26px 28px 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, #ffffff, #f6f9ff);
}
.settings-card-header h2 { margin-bottom: 7px; }
.settings-card-header p:last-child { margin-bottom: 0; color: var(--muted); }

.booking-block-card {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}
.booking-block-card h2 { margin: 0 0 6px; }
.booking-block-card p { margin-bottom: 0; }
.booking-block-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.booking-block-actions form { margin: 0; }
.booking-light {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 4px rgba(148, 163, 184, .16);
}
.booking-light-off { background: #22c55e; }
.booking-light-on { background: #ef4444; box-shadow: 0 0 0 4px rgba(239, 68, 68, .16); }
.booking-policy-card { margin-bottom: 24px; padding: 18px 20px 20px; }
.booking-policy-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.booking-policy-heading h2 { margin: 0; }
.booking-policy-heading p { margin: 4px 0 0; font-size: 13px; }
.booking-policy-form { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto; align-items: start; gap: 16px; }
.booking-policy-form label { display: grid; align-content: start; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 800; line-height: 1.25; }
.booking-policy-form label > span { display: block; min-height: 15px; }
.booking-policy-form select, .booking-policy-form input { width: 100%; min-height: 42px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--ink); font: inherit; }
.booking-policy-form small { color: var(--muted); font-weight: 500; }
.booking-policy-form > .button { margin-top: 22px; }
.schedule-weekly-list { display: grid; grid-template-columns: 1fr; gap: 10px; }
.schedule-day-compact { padding: 16px 20px; }
.schedule-day-compact .schedule-day-header { margin-bottom: 10px; }
.schedule-day-compact .schedule-day-header h2 { font-size: 18px; }
.schedule-day-compact .schedule-intervals { gap: 8px; }
.schedule-day-compact .schedule-interval { width: min(100%, 520px); padding: 8px 10px; grid-template-columns: 1fr 16px 1fr 36px; align-items: end; gap: 8px; }
.schedule-day-compact .schedule-interval input[type="time"] { min-height: 38px; }
.schedule-time-separator { align-self: center; padding-top: 17px; color: var(--muted); font-size: 12px; text-align: center; }
.schedule-address-card { margin-top: 24px; overflow: hidden; }
.schedule-panel-heading { padding: 16px 20px 13px; border-bottom: 1px solid var(--line); background: #fff; }
.schedule-panel-heading h2 { margin: 0 0 3px; font-size: 18px; }
.schedule-panel-heading p:last-child { margin: 0; color: var(--muted); font-size: 12px; }
.schedule-address-form { padding: 16px 20px 18px; gap: 12px; }
.schedule-address-form textarea { min-height: 72px; }
.schedule-address-form .settings-actions { grid-column: 1 / -1; }
.schedule-page { font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
.schedule-page h1,
.schedule-page h2,
.schedule-page h3 { font-family: inherit; color: var(--navy); }
.page-shell:not(.va-shell) .schedule-page-header h1 { margin: 0 0 4px; font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif !important; font-size: clamp(25px, 3vw, 34px) !important; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
.schedule-page-header p { margin: 0; color: var(--muted); font-size: 14px; }
.schedule-page .eyebrow { color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: .1em; }
.schedule-address-form label { display: grid; gap: 7px; min-width: 0; }
.schedule-address-form label > span { color: var(--ink); font-size: 13px; font-weight: 800; }
.schedule-address-form input,
.schedule-address-form textarea { width: 100%; box-sizing: border-box; min-width: 0; padding: 11px 13px; color: var(--ink); background: #fbfdff; border: 1px solid var(--line); border-radius: 10px; font: inherit; }
.schedule-address-form textarea { min-height: 78px; resize: vertical; }
.schedule-address-form input:focus,
.schedule-address-form textarea:focus,
.booking-policy-form select:focus,
.booking-policy-form input:focus { outline: 3px solid rgba(7, 89, 217, .12); border-color: var(--sky); background: #fff; }
@media (max-width: 720px) {
  .booking-block-card { align-items: flex-start; flex-direction: column; }
  .booking-block-actions { justify-content: flex-start; }
  .booking-policy-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
  .booking-policy-form { grid-template-columns: 1fr; }
  .booking-policy-form > .button { margin-top: 0; }
}
.settings-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--sky), var(--blue) 58%, var(--navy));
  border-radius: 13px;
  box-shadow: 0 8px 20px rgba(7, 89, 217, 0.22);
  font-size: 20px;
  font-weight: 800;
}
.settings-form {
  display: grid;
  gap: 18px;
  padding: 24px 28px 28px;
}
.settings-form label {
  display: grid;
  gap: 7px;
  min-width: 0;
}
.settings-form label > span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}
.settings-form input,
.settings-form textarea,
.settings-form select {
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
  padding: 13px 14px;
  color: var(--ink);
  background: #fbfdff;
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
}
.settings-form textarea {
  min-height: 110px;
  resize: vertical;
}
.settings-form input:focus,
.settings-form textarea:focus,
.settings-form select:focus {
  background: white;
  border-color: var(--sky);
}
.location-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.settings-full-width { grid-column: 1 / -1; }
.settings-actions {
  display: flex;
  justify-content: flex-end;
}
.closure-settings-form {
  max-width: 600px;
  margin: 0 auto;
  gap: 16px;
}
.closure-section {
  display: grid;
  gap: 10px;
  padding: 0;
}
.closure-section + .closure-section {
  padding-top: 2px;
  border-top: 1px solid rgba(7, 89, 217, 0.10);
}
.closure-section-title {
  margin: 0;
  color: var(--navy);
  font-size: 17px;
  letter-spacing: -0.02em;
}
.closure-payment-grid,
.closure-policy-grid,
.closure-survey-grid {
  display: grid;
  gap: 10px;
}
.closure-payment-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.closure-payment-row,
.closure-toggle-row,
.closure-number-row,
.closure-textarea-field {
  width: 100%;
  min-width: 0;
}
.closure-payment-row,
.closure-toggle-row,
.closure-number-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 12px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}
.closure-payment-row,
.closure-toggle-row {
  min-height: 40px;
  cursor: pointer;
}
.closure-number-row {
  grid-template-columns: minmax(0, 1fr) auto;
  max-width: 280px;
}
.closure-row-copy {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}
.closure-textarea-field {
  display: grid;
  gap: 8px;
}
.payment-settings input[type="checkbox"] {
  appearance: auto;
  -webkit-appearance: checkbox;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  max-width: 18px !important;
  max-height: 18px !important;
  padding: 0 !important;
  margin: 0 !important;
  transform: none !important;
  zoom: 1 !important;
  flex: 0 0 18px !important;
  box-sizing: border-box;
  justify-self: end;
  align-self: center;
  accent-color: var(--sky);
  cursor: pointer;
}
.payment-settings input[type="checkbox"]::before,
.payment-settings input[type="checkbox"]::after,
.payment-settings .form-check-input::before,
.payment-settings .form-check-input::after {
  content: none !important;
  display: none !important;
}
.payment-settings input[type="number"] {
  width: 100%;
  max-width: 120px;
  min-height: 44px;
  padding: 10px 12px;
  text-align: center;
}
.payment-settings textarea {
  min-height: 120px;
}
.payment-settings input[type="checkbox"]:focus-visible,
.payment-settings input[type="number"]:focus-visible,
.payment-settings textarea:focus-visible {
  outline: 3px solid rgba(32, 164, 255, 0.28);
  outline-offset: 2px;
}
.schedule-save-row {
  margin: 4px 0 34px;
  display: flex;
  justify-content: flex-end;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}

.metrics-wide { grid-template-columns: repeat(4, 1fr); }
.metrics-agenda { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.metric {
  min-height: 124px;
  padding: 23px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.metric span, .metric strong { display: block; }
.metric span { color: var(--muted); font-size: 14px; }
.metric strong {
  margin-top: 13px;
  font-family: Georgia, serif;
  font-size: 38px;
  line-height: 1;
}
.metric small { display: block; margin-top: 8px; color: var(--muted); }
.metric-accent { border-top: 4px solid var(--coral); }
.metric-positive { border-top: 4px solid var(--mint); }
.metric-warning { border-top: 4px solid var(--gold); }
.metric-danger { border-top: 4px solid #dc2626; }
.metric-soft { border-top: 4px solid #88a7cb; }

.finance-hero { align-items: center; }
.finance-hero-side { display: grid; gap: 12px; min-width: 250px; }
.year-filter {
  padding: 14px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 15px;
}
.year-filter label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.year-filter div { display: flex; gap: 8px; }
.year-filter select {
  flex: 1;
  padding: 9px 11px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
}
.finance-badge {
  min-width: 230px;
  padding: 22px 25px;
  color: white;
  background: linear-gradient(135deg, var(--sky), var(--blue) 52%, var(--navy));
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.finance-badge span, .finance-badge strong, .finance-badge small { display: block; }
.finance-badge span { font-size: 24px; }
.finance-badge strong { margin: 7px 0; font: 700 34px Georgia, serif; }
.finance-badge small { color: rgba(255, 255, 255, 0.78); }

.finance-chart { padding: 28px; }
.section-heading-inner { margin: 0 0 22px; }
.chart-list { display: grid; gap: 18px; }
.chart-row { display: grid; grid-template-columns: 140px 1fr; gap: 18px; align-items: center; }
.chart-label { display: flex; justify-content: space-between; gap: 10px; }
.chart-label span { color: var(--muted); }
progress {
  width: 100%;
  height: 18px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: var(--teal-soft);
}
progress::-webkit-progress-bar { background: var(--teal-soft); border-radius: 999px; }
progress::-webkit-progress-value {
  background: linear-gradient(90deg, var(--mint), var(--teal));
  border-radius: 999px;
}
progress::-moz-progress-bar {
  background: linear-gradient(90deg, var(--mint), var(--teal));
  border-radius: 999px;
}
.count-pill {
  padding: 7px 11px;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}
.money-pending { color: #9b4a22; font-weight: 850; }
.finance-grid { grid-template-columns: 1fr 1fr; align-items: start; }
.finance-note { margin-top: 30px; }

/* Reportes: misma jerarquía visual que las demás secciones del portal. */
.financial-page { min-width: 0; }
.financial-page-header { align-items: center; }
.financial-page-header > div:first-child { min-width: 0; }
.financial-page-header > div:first-child > p:last-child { margin: 0; color: var(--muted); font-size: 14px; }
.financial-header-actions { align-items: stretch; gap: 10px; }
.financial-period-form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
}
.financial-period-form label { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.financial-period-form select {
  min-height: 34px;
  padding: 6px 9px;
  color: var(--ink);
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 12px;
}
.financial-year-total {
  min-width: 150px;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--mint);
  border-radius: 11px;
}
.financial-year-total span { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.financial-year-total strong { color: var(--navy); font: 700 22px Georgia, serif; }
.financial-metrics { margin-bottom: 20px; }
.financial-metrics .metric { min-height: 104px; padding: 18px; }
.financial-metrics .metric span { font-size: 12px; }
.financial-metrics .metric strong { font-size: 31px; }
.financial-panel { padding: 20px; }
.survey-settings-card { margin-top: 18px; }
.report-list-tools { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.report-list-search { display: flex; align-items: center; gap: 6px; }
.report-list-search input { width: 170px; min-width: 0; }
.survey-settings-form { display: grid; gap: 14px; margin-top: 16px; }
.survey-toggle { display: flex; align-items: center; gap: 9px; color: var(--ink); font-size: 13px; font-weight: 700; }
.survey-toggle input { width: 17px; min-height: 17px; accent-color: var(--teal); }
.survey-message-field { display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 800; }
.survey-message-field textarea { width: 100%; min-height: 64px; padding: 10px 12px; color: var(--ink); background: #fbfcff; border: 1px solid var(--line); border-radius: 9px; font: inherit; font-size: 13px; resize: vertical; }
.financial-section-heading { margin-top: 28px; margin-bottom: 12px; }
.financial-section-heading h2 { font-size: 19px; }
.financial-table-card { border-radius: 15px; }
.financial-table-card table { font-size: 13px; }
.financial-table-card th { padding: 11px 13px; font-size: 10px; }
.financial-table-card td { padding: 11px 13px; vertical-align: middle; }
.financial-table-card td small { font-size: 11px; }
.financial-table-card tbody tr:hover { background: #f8fbff; }
.financial-page .empty-state { min-height: 115px; padding: 25px; }

@media (max-width: 760px) {
  .financial-page-header { align-items: stretch; }
  .financial-header-actions { flex-direction: column; }
  .financial-period-form { justify-content: space-between; }
  .financial-year-total { min-width: 0; }
  .financial-section-heading { align-items: flex-start; gap: 8px; }
}

.grid-two {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
}

.upload-card, .guide-card, .error-panel { padding: 28px; }
.guide-card ol { margin: 0; padding-left: 22px; line-height: 2; }

.note {
  margin: 20px 0 0;
  padding: 14px;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 12px;
  line-height: 1.45;
}

.form-stack { display: grid; gap: 16px; }
.form-stack label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  color: var(--ink);
  background: #fbfcfb;
  border: 1px solid #cbd6d1;
  border-radius: 11px;
}

input[type="file"] {
  min-height: 58px;
  padding: 14px;
  border-style: dashed;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin: 52px 0 16px;
}
.section-heading h2 { margin-bottom: 0; }

.table-card { overflow: hidden; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td {
  padding: 16px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
th {
  color: var(--muted);
  background: #f9fbfa;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
td small { display: block; color: var(--muted); margin-top: 4px; }
tbody tr:last-child td { border-bottom: 0; }

.status {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--teal);
  background: var(--teal-soft);
  font-size: 12px;
  font-weight: 800;
}
.status-invalid, .status-rejected { color: #8f3324; background: var(--coral-soft); }
.status-applied { color: #5c4715; background: #faf0cf; }
.status-rolled_back { color: var(--muted); background: #eef1ef; }

.text-link { color: var(--teal); font-weight: 800; }

.empty-state {
  min-height: 160px;
  padding: 38px;
  display: grid;
  place-content: center;
  text-align: center;
  color: var(--muted);
}
.empty-state strong { color: var(--ink); margin-bottom: 6px; }

.login-layout {
  width: min(1120px, 100%);
  min-height: calc(100vh - 190px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 390px) !important;
  align-items: center;
  gap: clamp(48px, 7vw, 96px);
  padding: 44px 0 64px;
}
.login-intro { max-width: 650px; }
.login-brand-lockup { display: inline-flex; align-items: center; margin-bottom: 28px; }
.login-brand-lockup img { width: 174px; height: auto; display: block; }
.login-card { width: min(390px, 100%); padding: 30px; border: 1px solid #dce6f2; border-radius: 16px; box-shadow: 0 18px 45px rgba(32, 58, 105, .10); }
.login-layout-desktop { grid-template-columns: minmax(0, 1fr) 390px !important; }
.login-card h2 { margin-bottom: 8px; }
.trust-list { display: grid; gap: 10px; color: var(--teal); font-weight: 700; }
.portal-root-login-layout {
  width: min(1040px, 100%);
  grid-template-columns: minmax(0, 1fr) minmax(340px, 410px) !important;
  gap: clamp(42px, 7vw, 88px);
}
.portal-root-login-layout .login-intro h1 {
  max-width: 650px;
  margin-bottom: 16px;
  font-size: clamp(2.25rem, 5vw, 4.4rem);
  line-height: .98;
  letter-spacing: -.055em;
}
.portal-root-login-layout .login-card {
  width: min(410px, 100%);
  padding: 32px;
  border-top: 4px solid var(--teal);
}
.root-login-remember {
  display: flex !important;
  align-items: flex-start;
  gap: 11px !important;
  color: var(--ink) !important;
  cursor: pointer;
}
.root-login-remember input[type="checkbox"] {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 2px 0 0;
  padding: 0;
  accent-color: var(--teal);
}
.root-login-remember span { display: grid; gap: 3px; }
.root-login-remember strong { font-size: 13px; font-weight: 700; }
.root-login-remember small { color: var(--muted); font-size: 11px; font-weight: 500; line-height: 1.35; }
@media (max-width: 760px) {
  .portal-root-login-layout {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 24px;
    padding-top: 24px;
  }
  .portal-root-login-layout .login-intro { text-align: center; }
  .portal-root-login-layout .login-intro h1 {
    margin-inline: auto;
    font-size: clamp(2.15rem, 12vw, 3.25rem);
  }
  .portal-root-login-layout .trust-list { justify-items: center; text-align: left; }
  .portal-root-login-layout .login-card { justify-self: center; padding: 24px; }
}
.portal-unavailable-layout {
  grid-template-columns: minmax(0, 390px) !important;
  justify-content: center;
  justify-items: center;
  align-items: center;
}
.portal-unavailable-card { border-top: 4px solid #dc2626; text-align: center; }
.portal-unavailable-card h1 { color: #7f1d1d; }

.alert {
  margin-bottom: 22px;
  padding: 15px 18px;
  border-radius: 12px;
}
.alert-error { color: #7a2b1e; background: var(--coral-soft); border: 1px solid #f2c5bc; }
.alert-success { color: var(--teal); background: var(--teal-soft); border: 1px solid var(--mint); }

.catalog-heading { margin-top: 44px; }
.spreadsheet-card { overflow: hidden; }
.spreadsheet-wrap { overflow: visible; }
.spreadsheet { width: 100%; min-width: 0; table-layout: fixed; }
.spreadsheet thead { position: sticky; top: 0; z-index: 2; }
.spreadsheet th { background: var(--teal); color: white; }
.spreadsheet th:nth-child(1) { width: 9%; }
.spreadsheet th:nth-child(2) { width: 13%; }
.spreadsheet th:nth-child(3) { width: 16%; }
.spreadsheet th:nth-child(4) { width: 9%; }
.spreadsheet th:nth-child(5) { width: 9%; }
.spreadsheet th:nth-child(6) { width: 8%; }
.spreadsheet th:nth-child(7) { width: 22%; }
.spreadsheet th:nth-child(8) { width: 7%; }
.spreadsheet th:nth-child(9) { width: 5%; }
.spreadsheet th, .spreadsheet td {
  min-width: 0;
  padding: 6px;
  overflow-wrap: anywhere;
}
.spreadsheet td { background: white; }
.spreadsheet input, .spreadsheet select {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 7px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #f8faf9;
  font-size: 13px;
}
.spreadsheet input:hover, .spreadsheet select:hover { border-color: var(--line); }
.spreadsheet input:focus, .spreadsheet select:focus {
  border-color: var(--mint);
  outline: 3px solid rgba(155, 199, 184, 0.25);
}
.spreadsheet input[readonly] { color: var(--muted); background: #eef2f0; }
.new-service-row td { background: #fffdf5; }
.grid-remove {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 9px;
  color: #8f3324;
  background: var(--coral-soft);
  cursor: pointer;
  font-size: 21px;
}
.grid-remove[disabled] { opacity: 0.25; cursor: not-allowed; }
.retired-service { color: var(--muted); font-weight: 700; }
.confirm-dialog { max-width: 440px; border: 0; border-radius: 16px; box-shadow: 0 20px 60px rgba(0, 0, 0, .22); padding: 26px; }
.confirm-dialog::backdrop { background: rgba(16, 34, 29, .45); }
.confirm-dialog h2 { margin-top: 0; }
.dialog-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; }
.plan-status { margin: 28px 0; padding: 22px 24px; }
.plan-status > div:first-child { margin-bottom: 18px; }
.plan-status h2 { margin-bottom: 0; line-height: 1.25; }
.plan-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px 22px; margin: 0; }
.plan-details > div { min-width: 0; padding-top: 12px; border-top: 1px solid var(--line); }
.plan-details dt { color: var(--muted); font-size: 12px; line-height: 1.35; }
.plan-details dd { margin: 6px 0 0; color: var(--ink); font-weight: 750; line-height: 1.4; overflow-wrap: anywhere; }
.plan-form-actions,
.plan-detail-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: nowrap;
}
.plan-form-actions .button,
.plan-detail-actions .button {
  width: auto;
  flex: 0 0 auto;
  white-space: nowrap;
}
.plan-detail-actions .button {
  min-height: 36px;
  padding: 8px 13px;
  border-radius: 9px;
  font-size: 13px;
}
.plan-detail-actions {
  align-self: flex-end;
  margin-left: 24px;
  margin-right: 8px;
}
@media (max-width: 520px) {
  .plan-form-actions,
  .plan-detail-actions { justify-content: stretch; }
  .plan-form-actions .button,
  .plan-detail-actions .button { flex: 1 1 0; }
}
.plan-status > p { margin: 0; padding: 12px 14px; color: var(--muted); background: var(--surface-soft); border-radius: 10px; line-height: 1.45; }
.plan-status .license-badge { white-space: nowrap; }
.plan-feature-list,
.plan-feature-list li {
  font-size: 13px !important;
  line-height: 1.35;
  font-family: Arial, sans-serif;
}
.plan-feature-list li {
  display: flex;
  align-items: center;
  min-height: 18px;
}
.plan-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  margin-bottom: 10px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--teal);
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}
.plan-back-link:hover {
  border-color: #b8c7d9;
  background: #f8fafc;
  text-decoration: none;
  transform: translateY(-1px);
}
.spreadsheet-help {
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  background: #f9fbfa;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.breadcrumb {
  display: flex;
  gap: 10px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 14px;
}
.breadcrumb a { color: var(--teal); font-weight: 750; }

.schedule-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 26px;
  row-gap: 26px;
  align-items: start;
  margin-bottom: 28px;
}
.portal-section-title { margin: 0 0 14px; font-size: 22px; }
.schedule-day {
  min-width: 0;
  padding: 24px;
  box-shadow: none;
  overflow: visible;
}
.schedule-day-header {
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.schedule-day-header h2 { margin: 3px 0 0; font-size: 22px; }
.schedule-intervals { display: grid; gap: 10px; }
.schedule-interval {
  min-width: 0;
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 36px;
  align-items: end;
  gap: 10px;
  border-radius: 12px;
  background: #f7faf8;
  border: 1px solid var(--line);
}
.schedule-interval label { display: grid; gap: 6px; }
.schedule-interval label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.schedule-interval input[type="time"] {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  font: inherit;
}
.schedule-interval input[type="time"]:focus {
  border-color: var(--mint);
  outline: 3px solid rgba(155, 199, 184, 0.25);
}
.schedule-closed {
  margin: 0;
  padding: 16px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: #fbfcfb;
}
.schedule-closed.is-hidden { display: none; }

.changes-list { display: grid; gap: 10px; }
.change-row {
  padding: 20px;
  display: grid;
  grid-template-columns: 94px 1fr;
  gap: 18px;
  box-shadow: none;
}
.change-code {
  color: var(--teal);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-weight: 800;
}
.change-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.change-type {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.change-main ul { margin: 10px 0 0; padding-left: 18px; color: var(--muted); }
.change-nuevo { border-left: 4px solid var(--mint); }
.change-modificado { border-left: 4px solid var(--gold); }
.change-sin_cambios { opacity: 0.72; }

.error-panel { color: #7a2b1e; background: #fffaf9; border-color: #f2c5bc; }
.error-panel ul { line-height: 1.7; }

.action-bar {
  position: static;
  margin-top: 28px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.action-bar span { display: block; color: var(--muted); margin-top: 4px; }
.action-buttons { display: flex; flex-wrap: wrap; justify-content: end; gap: 10px; }
.action-buttons form { margin: 0; }

@media (max-width: 1050px) {
  .hero, .action-bar { align-items: stretch; flex-direction: column; }
  .hero-actions { flex-direction: column; }
  .finance-hero-side { width: 100%; }
  .grid-two { grid-template-columns: 1fr; }
  .finance-grid { grid-template-columns: 1fr; }
  .schedule-grid {
    grid-template-columns: 1fr;
    row-gap: 20px;
  }
  .login-layout { min-height: auto; padding: 34px 0 48px; }
  .metrics, .metrics-wide, .metrics-agenda { grid-template-columns: repeat(2, 1fr); }
  .account > span { display: none; }
  .business-strip, .license-summary {
    align-items: stretch;
    flex-direction: column;
  }
  .license-summary { gap: 10px; text-align: left; }
  .location-form { grid-template-columns: 1fr; }
  .settings-full-width { grid-column: auto; }
  .action-buttons { justify-content: stretch; }
  .action-buttons .button, .action-buttons form { width: 100%; }
  .spreadsheet-help { flex-direction: column; }
  .spreadsheet-wrap { max-height: none; overflow: visible; }
  .spreadsheet { min-width: 0; }
  .spreadsheet thead { display: none; }
  .spreadsheet tbody {
    padding: 10px;
    display: grid;
    gap: 14px;
    background: #eef3f0;
  }
  .spreadsheet tr {
    padding: 14px;
    display: grid;
    gap: 9px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 15px;
    box-shadow: 0 8px 24px rgba(23, 63, 58, 0.06);
  }
  .spreadsheet td,
  .spreadsheet td:first-child,
  .spreadsheet td:nth-child(2),
  .spreadsheet td:nth-child(3),
  .spreadsheet td:nth-child(7),
  .spreadsheet td:last-child {
    width: 100%;
    min-width: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    border: 0;
    background: transparent;
  }
  .spreadsheet td::before {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }
  .spreadsheet td:nth-child(1)::before { content: "Código"; }
  .spreadsheet td:nth-child(2)::before { content: "Categoría"; }
  .spreadsheet td:nth-child(3)::before { content: "Servicio"; }
  .spreadsheet td:nth-child(4)::before { content: "Duración"; }
  .spreadsheet td:nth-child(5)::before { content: "Precio"; }
  .spreadsheet td:nth-child(6)::before { content: "Activo"; }
  .spreadsheet td:nth-child(7)::before { content: "Descripción"; }
  .spreadsheet td:nth-child(8)::before { content: "Posición"; }
  .spreadsheet td:nth-child(9)::before { content: ""; }
  .spreadsheet input, .spreadsheet select {
    width: 100%;
    min-width: 0;
    font-size: 16px;
  }
  .spreadsheet td:last-child {
    display: flex;
    justify-content: flex-end;
  }
  .catalog-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }
}

@media (max-width: 520px) {
  .page-shell { width: min(100% - 20px, 1180px); }
  main { padding-top: 34px; }
  h1 { font-size: 34px; line-height: 1.05; }
  h2 { font-size: 22px; }
  .lead { font-size: 16px; line-height: 1.5; }
  .topbar { min-height: 86px; gap: 10px; }
  .brand { gap: 9px; }
  .portal-brand-logo { width: 145px; max-width: 42vw; max-height: 32px; }
  .business-widget-summary { min-width: 0; max-width: 175px; padding: 7px 8px; }
  .business-widget-summary-copy strong { font-size: 11px; }
  .business-widget-menu { right: -8px; width: min(252px, calc(100vw - 28px)); }
  .account { gap: 6px; }
  .account .button { min-height: 32px; padding: 6px 9px; font-size: 12px; }
  .dashboard-business-widget { width: 100%; }
  .metrics, .metrics-wide, .metrics-agenda { grid-template-columns: 1fr; }
  .metric { min-height: 106px; padding: 19px; }
  .metric strong { font-size: 31px; }
  .change-row { grid-template-columns: 1fr; gap: 8px; }
  .chart-row { grid-template-columns: 1fr; gap: 8px; }
  .finance-badge { min-width: 0; width: 100%; }
  .finance-badge strong { font-size: 29px; }
  .year-filter div { align-items: stretch; }
  .section-heading { align-items: flex-start; gap: 10px; }
  th, td { padding: 13px; }
  .spreadsheet td,
  .spreadsheet td:first-child,
  .spreadsheet td:nth-child(2),
  .spreadsheet td:nth-child(3),
  .spreadsheet td:nth-child(7) {
    grid-template-columns: 88px minmax(0, 1fr);
  }
  .schedule-day { padding: 20px; }
  .schedule-day-header {
    align-items: stretch;
    flex-direction: column;
  }
  .schedule-interval {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 34px;
    padding: 10px;
  }
  .settings-card-header { padding: 22px 20px 17px; }
  .settings-form { padding: 20px; }
  .settings-actions, .schedule-save-row { justify-content: stretch; }
  .settings-actions .button, .schedule-save-row .button { width: 100%; }
  .business-strip { margin-top: 12px; padding: 14px; }
  .closure-settings-form {
    max-width: none;
  }
  .closure-payment-grid {
    grid-template-columns: 1fr;
  }
  .closure-payment-row,
  .closure-toggle-row,
  .closure-number-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .closure-number-row {
    max-width: 120px;
  }
}

/* ==========================================================================
   VINQELO BUSINESS CRM — MOBILE FIRST & AESTHETIC ENHANCEMENTS
   ========================================================================== */

/* Desktop Navigation */
.desktop-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 6px;
}


@media (max-width: 640px) {
  body:has(.login-layout) .pro-shell { padding-left: 10px; }
  .login-layout { gap: 28px; padding: 24px 0 40px; }
  .login-brand-lockup { margin-bottom: 24px; }
  .login-brand-lockup img { width: 150px; }
  .login-card { padding: 24px; }
}

/* Must come after the Pro shell rules: login is a full-screen public page. */
.pro-shell:has(.login-layout) { padding-left: 32px; padding-right: 32px; }
.pro-shell:has(.login-layout) main { display: flex; justify-content: center; width: 100%; }
@media (max-width: 640px) {
  .pro-shell:has(.login-layout) { padding-left: 10px; padding-right: 10px; }
}

.desktop-nav-legacy-pro { display: none; }
.desktop-nav-compact { flex-wrap: wrap; min-width: 0; }
.pro-shell .desktop-nav-compact,
.pro-shell .desktop-nav-legacy-pro { display: none; }
.pro-shell .portal-sidebar-toggle,
.pro-shell .mobile-nav-modules,
.pro-shell .portal-sidebar,
.pro-shell .portal-sidebar-backdrop { display: none !important; }
.pro-shell { width: 100%; max-width: none; padding-left: 248px; padding-right: 32px; }
.pro-shell > .topbar { min-height: 68px; }
.pro-shell > .topbar > .brand { display: none; }
.pro-shell > .topbar { justify-content: space-between; }
.pro-business-header { display: flex; align-items: center; gap: 22px; min-width: 0; margin-right: auto; padding: 8px 18px; border: 1px solid #dce7f3; border-radius: 11px; background: rgba(255, 255, 255, .82); box-shadow: 0 5px 16px rgba(16, 42, 80, .05); }
.pro-business-header-name { display: grid; gap: 2px; min-width: 145px; }
.pro-business-header-kicker, .pro-business-header-fact span { color: #7b8aa1; font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.pro-business-header-name strong { overflow: hidden; color: var(--navy); font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.pro-business-header-fact { display: grid; gap: 3px; min-width: 82px; }
.pro-business-header-fact > strong { color: var(--ink); font-size: 12px; }
.pro-business-status { display: inline-flex; align-items: center; gap: 7px; }
.pro-business-status.status-green { color: #08734a !important; }
.pro-business-status.status-yellow { color: #876313 !important; }
.pro-business-status.status-red { color: #ad3434 !important; }
.pro-business-header .business-widget-semaphore { width: 8px; height: 8px; flex-basis: 8px; box-shadow: 0 0 0 2px rgba(255,255,255,.9), 0 0 0 3px rgba(16,32,68,.07); }
.portal-left-sidebar { position: fixed; z-index: 1000; inset: 0 auto 0 0; width: 232px; display: flex; flex-direction: column; padding: 18px 12px 16px; background: #fff; border-right: 1px solid #dce5f0; box-shadow: 8px 0 24px rgba(16, 42, 80, .06); transition: width .2s ease, transform .2s ease; }
.portal-sidebar-brand { display: flex; align-items: center; min-height: 46px; padding: 0 10px 16px; border-bottom: 1px solid #e6edf6; }
.portal-sidebar-brand img { display: block; width: 178px; max-width: 100%; height: auto; max-height: 38px; object-fit: contain; object-position: left center; }
.portal-sidebar-collapse { position: absolute; top: 21px; right: 10px; width: 26px; height: 26px; border: 1px solid #dce5f0; border-radius: 7px; color: #56708f; background: #fff; cursor: pointer; font-size: 20px; line-height: 1; }
.portal-sidebar-collapse:hover { color: var(--teal); border-color: #9fc2ee; background: #f3f8ff; }
.portal-sidebar-nav { min-height: 0; padding-top: 14px; overflow-y: auto; }
.portal-sidebar-group-label { margin: 13px 9px 5px; color: #8492a7; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.portal-sidebar-group-label:first-child { margin-top: 0; }
.portal-sidebar-link { position: relative; display: flex; align-items: center; gap: 11px; min-height: 38px; padding: 8px 10px; border-radius: 8px; color: #4d5f78; font-size: 14px; font-weight: 650; text-decoration: none; }
.portal-sidebar-link > span { display: grid; place-items: center; width: 18px; color: #6e89aa; font-size: 16px; font-weight: 700; }
.portal-sidebar-link:hover, .portal-sidebar-link.active { color: #0759d9; background: #edf5ff; text-decoration: none; }
.portal-sidebar-link.active::before { position: absolute; left: -12px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: #0759d9; content: ''; }
.portal-sidebar-link.active > span { color: #0759d9; }
.portal-sidebar-collapsed { padding-left: 88px; }
.portal-sidebar-collapsed .portal-left-sidebar { width: 72px; padding-left: 10px; padding-right: 10px; }
.portal-sidebar-collapsed .portal-sidebar-brand { padding-left: 4px; padding-right: 4px; }
.portal-sidebar-collapsed .portal-sidebar-brand img { width: 45px; height: 34px; object-fit: cover; object-position: left center; }
.portal-sidebar-collapsed .portal-sidebar-collapse { right: 22px; transform: rotate(180deg); }
.portal-sidebar-collapsed .portal-sidebar-group-label, .portal-sidebar-collapsed .portal-sidebar-link b { display: none; }
.portal-sidebar-collapsed .portal-sidebar-link { justify-content: center; padding-left: 0; padding-right: 0; }
.portal-sidebar-collapsed .portal-sidebar-link > span { width: 28px; font-size: 18px; }
.portal-sidebar-collapsed .portal-sidebar-link.active::before { left: -10px; }
.portal-mobile-nav-toggle { display: none; }
.portal-right-menu { display: none !important; }
.pro-shell .portal-sidebar {
  display: none;
  position: fixed;
  z-index: 1200;
  top: 82px;
  left: max(12px, calc((100vw - 1180px) / 2 + 12px));
  width: min(620px, calc(100vw - 24px));
  max-height: calc(100vh - 98px);
  padding: 14px 12px 16px;
  overflow-y: auto;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 20px 48px rgba(15, 34, 65, .22);
}
.pro-shell .portal-sidebar.is-open { display: block; }
.portal-sidebar-backdrop {
  position: fixed;
  z-index: 1100;
  inset: 0;
  background: rgba(15, 34, 65, .22);
}
.portal-sidebar-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 31px;
  padding: 6px 10px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: #fff;
  color: #445267;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}
.portal-sidebar-toggle:hover { color: #155fc0; border-color: #9fc2ee; background: #f5f9ff; }
.portal-sidebar-close { float: right; border: 0; background: transparent; color: #7c899b; font-size: 20px; cursor: pointer; }
.portal-sidebar-close:hover { color: #155fc0; }
.portal-sidebar-search { clear: both; max-width: none; margin-top: 4px; margin-bottom: 15px; padding: 7px 9px; }
.portal-sidebar-search span { font-size: 17px; }
.portal-sidebar-search input { font-size: 12px; }
.portal-sidebar-body { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.sidebar-group { gap: 2px; margin-bottom: 0; min-width: 0; }
.sidebar-group h3 { margin-bottom: 5px; }
.sidebar-item { min-height: 32px; padding: 6px 9px; font-size: 12px; }
.sidebar-item, .sidebar-item:hover { text-decoration: none; }
.sidebar-item span { font-size: 13px; }
.pro-shell main, .pro-shell footer { margin-left: 0; }
.portal-right-menu {
  position: fixed;
  z-index: 900;
  top: 104px;
  right: max(14px, calc((100vw - 1500px) / 2));
  width: 190px;
  padding: 12px 10px;
  border: 1px solid #dce5f0;
  border-radius: 14px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 14px 32px rgba(19, 43, 78, .12);
}
.portal-right-menu-title { display: flex; align-items: center; gap: 8px; padding: 5px 8px 12px; color: #123365; font-size: 12px; font-weight: 800; border-bottom: 1px solid #e7edf5; }
.portal-right-menu-mark { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: linear-gradient(135deg, #1276e8, #0b3b9c); color: #fff; font-size: 13px; font-weight: 900; }
.portal-right-menu-links { display: grid; gap: 3px; padding-top: 9px; }
.portal-right-menu-links a { display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 7px 9px; border-radius: 8px; color: #45566f; font-size: 12px; font-weight: 700; text-decoration: none; }
.portal-right-menu-links a span { display: grid; place-items: center; width: 18px; color: #1d69c8; font-size: 15px; font-weight: 700; }
.portal-right-menu-links a:hover, .portal-right-menu-links a.active { background: #edf5ff; color: #0d55ad; text-decoration: none; }
.mobile-nav-modules { border: 0; background: transparent; font: inherit; cursor: pointer; }
.mobile-nav-modules:hover { color: var(--teal); }
.mobile-nav-modules span:first-child { font-size: 1.05rem; line-height: 1; }
.mobile-nav-modules span:last-child { font-size: .68rem; }
.portal-sidebar.is-open + .portal-sidebar-backdrop { display: block; }
.portal-sidebar-backdrop[hidden] { display: none; }
.portal-sidebar[hidden] { display: none; }
.sidebar-item[hidden] { display: none; }
.sidebar-group[data-sidebar-empty="true"] { display: none; }

/* Vinqelo AI */
.ai-page-head { margin-bottom: 18px; }
.ai-usage-card { max-width: 1080px; margin: 0 auto 18px; padding: 22px; }
.ai-usage-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.ai-usage-heading h2 { margin: 4px 0 0; font-size: 1.2rem; }
.ai-status-pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 999px; font-size: .78rem; font-weight: 750; white-space: nowrap; }
.ai-status-pill i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px rgba(255,255,255,.8); }
.ai-status-green { color: #08734a; background: #e4f7ef; }
.ai-status-yellow { color: #876313; background: #fff3cc; }
.ai-status-red { color: #ad3434; background: #feeaea; }
.ai-usage-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ai-usage-metric { min-width: 0; padding: 16px; border: 1px solid #e1e9f3; border-radius: 11px; background: #f8fbff; }
.ai-usage-metric span { display: block; margin-bottom: 8px; color: #71809a; font-size: .73rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.ai-usage-metric strong { display: block; color: #102b59; font-size: 1.15rem; line-height: 1.2; }
.ai-usage-metric small { display: block; margin-top: 7px; color: #71809a; font-size: .76rem; line-height: 1.35; }
.ai-usage-note { margin: 15px 0 0; color: #71809a; font-size: .78rem; }
.ai-layout { display: grid; grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); gap: 18px; max-width: 1080px; margin: 0 auto 18px; }
.ai-config-card, .ai-chat-card, .ai-training-card { padding: 22px; }
.ai-config-card h2, .ai-chat-card h2, .ai-training-card h2 { margin: 4px 0 14px; font-size: 1.15rem; }
.ai-config-list { margin: 0; }
.ai-config-list div { padding: 10px 0; border-bottom: 1px solid #e6edf6; }
.ai-config-list dt { color: #71809a; font-size: .72rem; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
.ai-config-list dd { margin: 3px 0 0; color: #122b54; font-size: .88rem; font-weight: 700; overflow-wrap: anywhere; }
.ai-config-note { margin: 16px 0 0; color: #71809a; font-size: .78rem; line-height: 1.45; }
.ai-chat-header { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.ai-chat-messages { display: flex; flex-direction: column; gap: 10px; min-height: 270px; max-height: 480px; overflow-y: auto; padding: 14px; background: #f5f8fc; border: 1px solid #e1e9f3; border-radius: 12px; }
.ai-chat-empty { margin: auto; color: #7b899e; font-size: .9rem; }
.ai-message { max-width: 82%; padding: 10px 13px; border-radius: 12px; color: #20334f; font-size: .9rem; line-height: 1.45; }
.ai-message-label { display: block; margin-bottom: 3px; color: #71809a; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.ai-message-user { align-self: end; background: #e1efff; border-bottom-right-radius: 4px; }
.ai-message-assistant { align-self: start; background: #fff; border: 1px solid #e0e8f2; border-bottom-left-radius: 4px; }
.ai-chat-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; margin-top: 12px; align-items: end; }
.ai-chat-form textarea, .ai-training-form textarea { width: 100%; resize: vertical; border: 1px solid #d5e0ee; border-radius: 9px; padding: 10px 12px; font: inherit; color: #20334f; background: #fff; }
.ai-training-card { max-width: 1080px; margin: 0 auto; display: grid; grid-template-columns: .8fr 1.2fr; gap: 24px; align-items: start; }
.ai-training-form { display: grid; gap: 10px; }
@media (min-width: 721px) and (max-width: 1199px) {
  .pro-shell { padding-left: 88px; padding-right: 20px; }
  .pro-shell .portal-left-sidebar { width: 72px; padding-left: 10px; padding-right: 10px; }
  .pro-shell .portal-sidebar-brand { padding-left: 4px; padding-right: 4px; }
  .pro-shell .portal-sidebar-brand img { width: 45px; height: 34px; object-fit: cover; object-position: left center; }
  .pro-shell .portal-sidebar-collapse { right: 22px; transform: rotate(180deg); }
  .pro-shell .portal-sidebar-group-label, .pro-shell .portal-sidebar-link b { display: none; }
  .pro-shell .portal-sidebar-link { justify-content: center; padding-left: 0; padding-right: 0; }
  .pro-shell .portal-sidebar-link > span { width: 28px; font-size: 18px; }
  .pro-shell .portal-sidebar-link.active::before { left: -10px; }
}
@media (max-width: 720px) {
  .pro-shell { width: 100%; padding-left: 10px; padding-right: 10px; }
  .pro-shell > .topbar { justify-content: space-between; min-height: 68px; }
  .pro-shell > .topbar > .brand { display: inline-flex; }
  .portal-mobile-nav-toggle { display: inline-grid; place-items: center; width: 34px; height: 34px; order: 1; border: 1px solid #dbe4f2; border-radius: 8px; color: #0759d9; background: #fff; font-size: 23px; line-height: 1; cursor: pointer; }
  .pro-shell .notification-center { order: 2; }
  .pro-shell .account { order: 3; }
  .pro-business-header { order: 1; flex: 1 1 auto; gap: 9px; padding: 6px 8px; overflow-x: auto; }
  .pro-business-header-name { min-width: 105px; }
  .pro-business-header-name strong { font-size: 12px; }
  .pro-business-header-fact { min-width: 65px; }
  .pro-business-header-fact span { font-size: 8px; }
  .pro-business-header-fact > strong { font-size: 10px; }
  .portal-left-sidebar { width: 232px; transform: translateX(-100%); box-shadow: 12px 0 30px rgba(16, 42, 80, .18); }
  .portal-mobile-sidebar-open .portal-left-sidebar { transform: translateX(0); }
  .portal-sidebar-collapse { display: none; }
  .portal-right-menu { display: none; }
  .portal-sidebar-body { grid-template-columns: 1fr; }
  .ai-layout, .ai-training-card { grid-template-columns: 1fr; }
  .ai-usage-card { padding: 16px; }
  .ai-usage-heading { flex-direction: column; }
  .ai-usage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ai-config-card, .ai-chat-card, .ai-training-card { padding: 16px; }
  .ai-message { max-width: 94%; }
  .ai-chat-form { grid-template-columns: 1fr; }
  .ai-chat-form .button { width: 100%; }
}
.nav-more { position: relative; }
.nav-more-trigger {
  list-style: none;
  cursor: pointer;
  padding: 6px 12px;
  color: var(--muted);
  font-weight: 750;
  font-size: 13px;
  border-radius: 8px;
  white-space: nowrap;
}
.nav-more-trigger::-webkit-details-marker { display: none; }
.nav-more-trigger:hover, .nav-more[open] .nav-more-trigger { color: var(--teal); background: var(--teal-soft); }
.nav-more-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 1000;
  min-width: 210px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface, #fff);
  box-shadow: 0 14px 34px rgba(15, 34, 65, .16);
}
.nav-menu-group { display: grid; gap: 3px; padding: 5px 0; }
.nav-menu-group + .nav-menu-group { border-top: 1px solid var(--line); }
.nav-menu-group > span { padding: 4px 9px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.nav-menu-item { padding: 8px 9px; color: var(--ink); font-size: 13px; font-weight: 700; text-decoration: none; border-radius: 7px; }
.nav-menu-item:hover, .nav-menu-item.active { color: var(--teal); background: var(--teal-soft); }

.nav-link {
  padding: 6px 12px;
  color: var(--muted);
  font-weight: 750;
  font-size: 13px;
  text-decoration: none;
  border-radius: 8px;
  white-space: nowrap;
  transition: color 150ms ease, background-color 150ms ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--teal);
  background: var(--teal-soft);
}

.user-badge {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--teal);
  background: var(--teal-soft);
  padding: 5px 10px;
  border-radius: 20px;
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  padding: 6px 12px;
  justify-content: flex-start;
  overflow-x: auto;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 8px;
  flex: 0 0 auto;
}

.mobile-nav-item .icon {
  font-size: 1.2rem;
}

.mobile-nav-item.active {
  color: var(--teal);
  background: var(--teal-soft);
}

/* Demos premium y Barbería El Corte: navegación ligera, sobria y cercana a
   una barra lateral nativa de macOS. El plan Básico queda fuera del alcance. */
.el-corte-shell .portal-left-sidebar,
.el-corte-shell .portal-right-menu,
.el-corte-shell .portal-sidebar,
.el-corte-shell .mobile-bottom-nav {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
.el-corte-shell .desktop-nav .nav-link,
.el-corte-shell .topbar .account,
.el-corte-shell .topbar .button {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
.el-corte-shell .desktop-nav .nav-link {
  color: #526078;
  font-size: 13px;
  font-weight: 580;
  letter-spacing: -.005em;
  border-radius: 10px;
}
.el-corte-shell .desktop-nav .nav-link:hover,
.el-corte-shell .desktop-nav .nav-link.active {
  color: #1264c5;
  background: #eaf3ff;
}
.el-corte-shell .portal-left-sidebar {
  width: 238px;
  padding: 18px 13px 16px;
  background: rgba(255, 255, 255, .94);
  border-right-color: #e3e8f0;
  box-shadow: 8px 0 26px rgba(31, 47, 71, .045);
  overflow-x: hidden;
}
.el-corte-shell .portal-sidebar-brand {
  min-height: 48px;
  padding: 0 11px 17px;
  border-bottom-color: #edf0f5;
}
.el-corte-shell .portal-sidebar-nav { padding-top: 16px; }
.el-corte-shell .portal-sidebar-nav {
  min-width: 0;
  overflow-x: hidden;
  scrollbar-width: none;
}
.el-corte-shell .portal-sidebar-nav::-webkit-scrollbar:horizontal {
  height: 0;
  display: none;
}
.el-corte-shell .portal-sidebar-group-label {
  margin: 16px 10px 6px;
  color: #98a3b5;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .1em;
}
.el-corte-shell .portal-sidebar-link {
  min-height: 40px;
  gap: 12px;
  padding: 9px 11px;
  border-radius: 10px;
  color: #526078;
  font-size: 13px;
  font-weight: 580;
  letter-spacing: -.005em;
  transition: color 150ms ease, background-color 150ms ease, transform 150ms ease;
}
.el-corte-shell .portal-sidebar-link > span {
  width: 20px;
  color: #8a98ac;
  font-family: "Segoe UI Symbol", "Apple Symbols", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
}
.el-corte-shell .portal-sidebar-link:hover {
  color: #1769d2;
  background: #f4f7fb;
  transform: translateX(1px);
}
.el-corte-shell .portal-sidebar-link.active {
  color: #1264c5;
  background: #eaf3ff;
  font-weight: 650;
}
.el-corte-shell .portal-sidebar-link.active::before { display: none; }
.el-corte-shell .portal-sidebar-link.active > span { color: #1264c5; }
.el-corte-shell .portal-right-menu-links a,
.el-corte-shell .sidebar-item,
.el-corte-shell .mobile-nav-item {
  font-family: inherit;
  font-weight: 580;
  letter-spacing: -.005em;
}
.el-corte-shell .portal-right-menu-links a { border-radius: 10px; }
.el-corte-shell .mobile-nav-item.active { font-weight: 650; }
@media (min-width: 721px) and (max-width: 1199px) {
  .el-corte-shell .portal-left-sidebar { width: 72px; padding-left: 10px; padding-right: 10px; }
  .el-corte-shell .portal-sidebar-brand { padding-left: 4px; padding-right: 4px; }
  .el-corte-shell .portal-sidebar-brand img { width: 45px; height: 34px; object-fit: cover; object-position: left center; }
  .el-corte-shell .portal-sidebar-group-label,
  .el-corte-shell .portal-sidebar-link b { display: none; }
  .el-corte-shell .portal-sidebar-link { justify-content: center; padding-left: 0; padding-right: 0; }
  .el-corte-shell .portal-sidebar-link > span { width: 28px; font-size: 18px; }
}

@media (max-width: 640px) {
  .el-corte-shell:has(.el-corte-login-layout) > .topbar > .brand {
    display: none;
  }
  .el-corte-shell .el-corte-login-layout {
    width: 100%;
    min-height: auto;
    grid-template-columns: minmax(0, 1fr) !important;
    align-items: stretch;
    gap: 24px;
    padding: 24px 0 42px;
  }
  .el-corte-shell .el-corte-login-layout .login-intro {
    width: 100%;
    max-width: 100%;
    text-align: center;
  }
  .el-corte-shell .el-corte-login-layout .login-brand-lockup {
    justify-content: center;
    margin-bottom: 20px;
  }
  .el-corte-shell .el-corte-login-layout .login-card {
    width: 100%;
    max-width: 390px;
    min-width: 0;
    justify-self: center;
    padding: 24px;
    position: relative;
    z-index: 1;
  }
  .el-corte-shell .el-corte-login-layout .trust-list {
    justify-items: center;
    text-align: left;
  }
}

/* Page Header & Actions */
.crm-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Metric Cards Grid */
.agenda-summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.metric-card {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 6px 16px rgba(16, 32, 68, .06);

  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metric-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.metric-value {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--ink);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: color 150ms ease, transform 150ms ease;
}
.back-link:hover {
  color: var(--navy);
  transform: translateX(-3px);
}

/* Customer detail: keep the ficha aligned with the portal cards. */
.customer-detail-page { padding-bottom: 32px; }
.customer-detail-header { margin-bottom: 22px; }
.customer-detail-header h1 { margin: 2px 0 6px; font-size: clamp(24px, 3vw, 32px); color: var(--navy); font-weight: 800; }
.customer-detail-title-row { display: flex; align-items: center; gap: 16px; margin-top: 6px; }
.customer-detail-avatar {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--sky), var(--blue) 58%, var(--navy));
  border-radius: 16px;
  box-shadow: 0 9px 22px rgba(7, 89, 217, .22);
  font-size: 24px;
  font-weight: 850;
}
.customer-detail-contact { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; color: var(--muted); font-size: 13px; }
.customer-detail-contact strong { color: var(--ink); }
.customer-detail-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}
.customer-detail-metric { min-height: 92px; padding: 16px 20px; background: var(--card); border: 1px solid rgba(7, 89, 217, 0.12); border-radius: 16px; box-shadow: var(--shadow); }

/* Badges system */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.2;
  white-space: nowrap;
}
.badge-success, .badge-completed, .badge-attendance_confirmed {
  color: #15803d;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
}
.badge-danger, .badge-cancelled, .badge-no_show {
  color: #b91c1c;
  background: #fee2e2;
  border: 1px solid #fca5a5;
}
.badge-warning, .badge-pending_attendance_confirmation {
  color: #b45309;
  background: #fef3c7;
  border: 1px solid #fde68a;
}
.badge-info, .badge-confirmed {
  color: #1d4ed8;
  background: #dbeafe;
  border: 1px solid #bfdbfe;
}
.customer-detail-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); gap: 20px; margin-bottom: 22px; }
.customer-detail-card { padding: 24px 26px; background: var(--card); border: 1px solid rgba(7, 89, 217, 0.12); border-radius: 20px; box-shadow: var(--shadow); }
.customer-detail-card h2 { margin: 0; font-size: 20px; font-weight: 750; color: var(--navy); line-height: 1.2; }
.customer-detail-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.customer-detail-card-heading .eyebrow { margin: 0 0 4px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.customer-detail-card form { display: grid; gap: 14px; }
.customer-detail-notes-label { color: var(--navy); font-size: 13px; font-weight: 750; }
.customer-detail-notes {
  width: 100%;
  min-height: 140px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft, #f8fbff);
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  line-height: 1.5;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.customer-detail-notes:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(7, 89, 217, 0.12);
  background: #fff;
}
.customer-detail-card .form-actions { display: flex; justify-content: flex-end; margin-top: 4px; }
.customer-detail-empty { margin: 0; color: var(--muted); font-size: 13px; font-style: italic; }
.customer-proof-empty {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  padding: 24px;
  text-align: center;
}
.el-corte-proof-card .customer-proof-empty { box-sizing: border-box; }
.debt-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.debt-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.debt-list li:first-child { padding-top: 0; border-top: 0; }
.debt-list strong { display: block; color: #dc2626; font-size: 14px; font-weight: 700; }
.debt-list small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.customer-history-card { padding: 0; overflow: hidden; border-radius: 20px; }
.customer-history-heading { margin: 0; padding: 20px 26px 16px; border-bottom: 1px solid var(--line); background: linear-gradient(135deg, #ffffff, #f4f8fe); }
.customer-detail-count { color: var(--muted); font-size: 12px; font-weight: 750; background: var(--teal-soft); color: var(--teal); padding: 4px 10px; border-radius: 20px; }
.customer-detail-table { margin: 0; width: 100%; border-collapse: collapse; }
.customer-detail-table th, .customer-detail-table td { padding: 14px 20px; vertical-align: middle; }
.customer-detail-table th { text-align: left; font-size: 12px; font-weight: 750; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; background: #fafcff; border-bottom: 1px solid var(--line); }
.customer-detail-table td { border-bottom: 1px solid var(--line); font-size: 14px; }
.customer-detail-table tbody tr:last-child td { border-bottom: 0; }
.customer-detail-table tbody tr:hover { background: var(--surface-soft, #f8fbff); }
.customer-detail-table td:first-child strong { display: block; color: var(--navy); font-weight: 700; }
.customer-detail-table td:first-child small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.customer-detail-table td:nth-child(3) { color: var(--ink); }

/* Appointment Cards */
.agenda-list {
  display: grid;
  gap: 14px;
}

.appointment-card {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: center;
  gap: 14px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.appointment-create-panel {
  max-width: 620px;
  margin: 28px auto 0;
  padding: 22px 24px;
  scroll-margin-top: 20px;
}
.appointment-create-panel h3 { margin: 0 0 18px; }
.appointment-create-panel form { display: grid; gap: 2px; }
.appointment-create-panel .modal-actions { justify-content: flex-end; }

.appointment-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.appointment-time {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--teal-soft);
  color: var(--teal);
  padding: 10px;
  border-radius: 10px;
}

.appointment-time strong { font-size: 1.1rem; }

.customer-name {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.service-pill {
  display: inline-block;
  font-size: 0.82rem;
  background: #f0f4f2;
  color: #334155;
  padding: 3px 8px;
  border-radius: 6px;
  margin-right: 4px;
  margin-bottom: 4px;
}

.appointment-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Badges */
.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  text-transform: uppercase;
}

.badge-confirmed { background: #e0f2fe; color: #0369a1; }
.badge-attendance_confirmed { background: #fef3c7; color: #b45309; }
.badge-completed, .badge-success { background: #dcfce7; color: #15803d; }
.badge-no_show, .badge-warning { background: #ffedd5; color: #c2410c; }
.badge-cancelled, .badge-danger { background: #fee2e2; color: #b91c1c; }

/* Buttons */
.button-success { background: #16a34a; color: #fff; }
.button-success:hover { background: #15803d; }
.button-danger { background: #dc2626; color: #fff; }
.button-danger:hover { background: #b91c1c; }
.button-accent { background: #0284c7; color: #fff; }
.button-accent:hover { background: #0369a1; }

/* Modals */
.crm-modal {
  border: none;
  border-radius: 18px;
  padding: 24px;
  max-width: 480px;
  width: 90%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  background: #ffffff;
}

.crm-modal::backdrop {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}
.crm-modal[open] {
  display: block;
  position: fixed;
  inset: 50% auto auto 50%;
  width: min(480px, calc(100% - 28px));
  max-height: calc(100vh - 28px);
  overflow: auto;
  transform: translate(-50%, -50%);
  z-index: 1001;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .agenda-history > .card { overflow: hidden; background: #fff; border-radius: 14px; }
  .agenda-history-row { background: #fff; color: var(--ink); }
  .desktop-nav { display: none; }
  .pro-shell main, .pro-shell footer { margin-left: 0; }
  .mobile-bottom-nav { display: flex; }
  .page-shell { padding-bottom: 70px; }
  .appointment-card {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .appointment-time {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* Agenda history: give the plain data rows a proper CRM card treatment. */
.agenda-history > .card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(16, 32, 68, .07);
}
.agenda-history-row { background: #ffffff; }
.agenda-history-row:last-child { border-bottom: 0 !important; }
.agenda-history-card {
  padding: 0 !important;
  overflow: hidden !important;
  background: #ffffff !important;
  border: 1px solid #dbe4f2 !important;
  border-radius: 16px !important;
  box-shadow: 0 8px 24px rgba(16, 32, 68, .08) !important;
}
.agenda-history-card .agenda-history-row {
  background: #ffffff !important;
  color: #102044 !important;
  min-height: 68px;
}

/* Final agenda layout rules: keep the history from collapsing into plain text. */
.agenda-history-card .agenda-history-header {
  display: grid !important;
  grid-template-columns: 100px minmax(150px, 1fr) minmax(150px, 1.2fr) 100px 90px !important;
  align-items: center !important;
}
.agenda-history-card .agenda-history-row {
  display: grid !important;
  grid-template-columns: 100px minmax(150px, 1fr) minmax(150px, 1.2fr) 100px 90px !important;
  align-items: center !important;
}

/* Agenda appointment card: compact, structured, and scoped to this view. */
.agenda-appointment-list {
  display: grid;
  gap: 12px;
}
.agenda-appointment-card {
  display: grid !important;
  grid-template-columns: 96px minmax(0, 1fr) 92px auto;
  align-items: center;
  gap: 20px;
  padding: 18px 20px !important;
  min-height: 0 !important;
  height: auto !important;
  overflow: visible;
}
.agenda-appointment-when {
  display: grid;
  gap: 4px;
  text-align: left;
  border-right: 1px solid var(--line);
  padding-right: 16px;
}
.agenda-appointment-when strong {
  color: var(--teal);
  font: 800 20px/1.1 var(--font-sans, Inter, Arial, sans-serif);
  white-space: nowrap;
}
.agenda-appointment-when small,
.agenda-appointment-total span {
  color: var(--muted);
  font-size: 12px;
}
.agenda-appointment-info {
  min-width: 0;
}
.agenda-appointment-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.agenda-appointment-heading > strong {
  color: var(--navy);
  font-size: 16px;
}
.agenda-appointment-services {
  color: var(--muted);
  font-size: 14px;
}
.agenda-appointment-total {
  display: grid;
  gap: 4px;
  justify-items: end;
  white-space: nowrap;
}
.agenda-appointment-total strong {
  color: var(--navy);
  font-size: 17px;
}
.agenda-appointment-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.agenda-appointment-actions form { margin: 0; }
.agenda-appointment-actions .button {
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 13px;
  white-space: nowrap;
}
.agenda-action-primary { background: #dff5ec !important; color: #07583e !important; border: 1px solid #bde8d4 !important; }
.agenda-action-secondary { background: var(--teal-soft) !important; color: var(--teal) !important; border: 1px solid rgba(7,89,217,.12) !important; }
.agenda-status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}
.agenda-status-confirmed,
.agenda-status-pending_attendance_confirmation { background: #fff3cc !important; color: #765600 !important; }
.agenda-status-attendance_confirmed { background: var(--teal-soft) !important; color: var(--teal) !important; }
.agenda-status-completed { background: #dff5ec !important; color: #07583e !important; }
.agenda-status-advanced { background: #dff5ec !important; color: #07583e !important; }
.agenda-status-cancelled { background: #fee8e8 !important; color: #9b2f2f !important; }
.agenda-status-no_show { background: #fee8e8 !important; color: #9b2f2f !important; }
.agenda-history > h2 {
  margin-top: 36px !important;
  font-size: 22px !important;
  line-height: 1.2;
}

@media (max-width: 850px) {
  .agenda-appointment-card {
    grid-template-columns: 88px minmax(0, 1fr) auto;
    gap: 16px;
  }
  .agenda-appointment-actions {
    grid-column: 2 / -1;
    justify-content: flex-start;
    padding-top: 4px;
  }
}

.agenda-history-row {
  transition: background-color .15s ease;
}
.agenda-history-row:hover {
  background: #f8fbff !important;
}
.agenda-history-row > div:last-child span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 750;
}
.agenda-history {
  margin-left: 0;
  margin-right: 0;
}
.page-shell main .hero-actions > *:not(#open-create-modal) {
  display: none !important;
}
.agenda-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 24px;
  overflow-anchor: none;
}
.agenda-panel {
  min-width: 0;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(16,32,68,.06);
  overflow: visible;
  overflow-anchor: none;
}
.agenda-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.agenda-panel-heading h2 { margin: 0; font-size: 20px; color: var(--navy); }
.agenda-panel-heading span { color: var(--muted); font-size: 12px; }
.agenda-filter-bar {
  position: sticky;
  top: 10px;
  z-index: 20;
  display: grid;
  grid-template-columns: 92px minmax(0,1fr) minmax(0,1fr) 92px 130px;
  gap: 8px;
  margin-bottom: 14px;
  padding: 8px 0;
  background: #fff;
  box-shadow: 0 5px 10px rgba(16,32,68,.04);
}
.agenda-filter-bar input,
.agenda-filter-bar select {
  min-width: 0;
  width: 100%;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  box-sizing: border-box;
}
.agenda-panel-list { display: grid; gap: 8px; }
.agenda-list-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 95px auto;
  align-items: center;
  gap: 12px;
  padding: 12px 10px;
  border-top: 1px solid var(--line);
}
.agenda-list-row:has(.agenda-list-actions) {
  grid-template-columns: 88px minmax(0, 1fr) 95px auto;
}
.agenda-list-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}
#agenda-history-panel .agenda-list-row {
  grid-template-columns: 88px minmax(0, 1fr) 95px 120px;
}
.agenda-list-status-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
}
.agenda-debt-action {
  min-height: 22px !important;
  padding: 2px 7px !important;
  font-size: 10px !important;
  font-weight: 750 !important;
  border-radius: 6px !important;
  color: #b91c1c !important;
  background: #fee2e2 !important;
  border: 1px solid #fca5a5 !important;
  text-decoration: none;
  white-space: nowrap;
}
.agenda-debt-action:hover {
  background: #fca5a5 !important;
  color: #7f1d1d !important;
}
.agenda-list-action { margin: 0; }
.agenda-list-action .button { min-height: 30px; padding: 5px 9px; font-size: 11px; }
.agenda-list-row[hidden] {
  display: none !important;
}
.agenda-list-date { display: grid; gap: 3px; }
.agenda-list-date strong { color: var(--teal); font-size: 15px; white-space: nowrap; }
.agenda-list-date small,
.agenda-list-amount small { color: var(--muted); font-size: 11px; }
.agenda-list-main { min-width: 0; display: grid; gap: 3px; }
.agenda-list-main strong { color: var(--navy); font-size: 14px; overflow-wrap: anywhere; }
.agenda-list-main span { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.agenda-list-amount { display: grid; gap: 3px; text-align: right; white-space: nowrap; }
.agenda-list-amount strong { color: var(--navy); font-size: 14px; }
.agenda-panel-empty { margin: 8px 0; color: var(--muted); font-size: 13px; }
.agenda-history-header,
.agenda-history-row {
  display: grid !important;
  grid-template-columns: 140px minmax(150px, 1fr) minmax(180px, 1.25fr) 110px 130px !important;
  align-items: center;
  column-gap: 16px;
}
.agenda-history-header {
  padding: 13px 20px;
  background: #f6f9ff;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.agenda-history-row {
  min-height: 72px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 14px;
}
.agenda-history-row:last-child { border-bottom: 0; }
.agenda-history-row > div { min-width: 0; }
.agenda-history-row > div:first-child {
  display: grid;
  gap: 3px;
}
.agenda-history-row > div:first-child > div:first-child {
  color: var(--teal) !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  white-space: nowrap;
}
.agenda-history-row > div:first-child > div:last-child {
  color: var(--muted) !important;
  font-size: 12px !important;
}
.agenda-history-customer {
  color: var(--navy) !important;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.agenda-history-service {
  color: var(--muted) !important;
  overflow-wrap: anywhere;
}
.agenda-history-amount {
  color: var(--navy) !important;
  font-weight: 800;
  white-space: nowrap;
}
.agenda-history-row > div:last-child span {
  display: inline-flex;
}

@media (max-width: 600px) {
  .agenda-panels { grid-template-columns: 1fr; gap: 14px; }
  .agenda-panel { padding: 14px; }
  .agenda-panel-heading h2 { font-size: 18px; }
  .agenda-filter-bar { grid-template-columns: 1fr 1fr; }
  .agenda-list-row { grid-template-columns: 82px minmax(0,1fr); gap: 8px; }
  .agenda-list-row:has(.agenda-list-action) { grid-template-columns: 82px minmax(0,1fr); }
  .agenda-list-row:has(.agenda-list-actions) { grid-template-columns: 82px minmax(0,1fr); }
  .agenda-list-row:has(.agenda-debt-action) { grid-template-columns: 82px minmax(0,1fr); }
  .agenda-list-amount { text-align: left; }
  .agenda-list-row > .agenda-status { grid-column: 2; grid-row: 1; justify-self: end; }
  .agenda-list-main { grid-column: 1 / -1; }
  .agenda-list-amount { grid-column: 1 / -1; }
  .agenda-list-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .agenda-debt-action { grid-column: 1 / -1; justify-self: start; }
  .agenda-appointment-card {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    padding: 16px !important;
  }
  .agenda-appointment-when {
    border-right: 0;
    padding-right: 0;
  }
  .agenda-appointment-total {
    justify-items: start;
    align-self: end;
  }
  .agenda-appointment-info,
  .agenda-appointment-actions {
    grid-column: 1 / -1;
  }
  .agenda-appointment-actions {
    padding-top: 4px;
  }
  .agenda-appointment-actions .button {
    min-width: 96px;
  }
  .agenda-history > h2 { font-size: 20px !important; }
  .agenda-history-header { display: none !important; }
  .agenda-history-row {
    grid-template-columns: 1fr auto !important;
    row-gap: 10px;
    padding: 15px 16px;
  }
  .agenda-history-row > div {
    grid-column: 1 / -1;
  }
  .agenda-history-row > div:first-child { grid-column: 1; }
  .agenda-history-row > div:last-child {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }
  .agenda-history-customer { grid-column: 1 / -1 !important; }
  .agenda-history-service { grid-column: 1 / -1 !important; }
  .agenda-history-amount { grid-column: 1 / -1 !important; }
  .agenda-history-row::before {
    content: "";
  }
}

/* Shared Vinqelo Admin surface: keeps the central console aligned with the portal. */
.va-shell, .admin-shell {
  max-width: 1200px;
  width: min(100% - 32px, 1200px);
  margin: 0 auto;
  padding: 16px 0 80px;
  color: var(--ink);
}
.va-shell, .admin-shell { background: transparent; }
body:has(.va-shell), body:has(.admin-shell) {
  background: var(--paper);
}
.va-topbar, .admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  margin-bottom: 16px;
  color: var(--ink);
  background: rgba(255,255,255,.94);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 5px 16px rgba(16, 32, 68, .06);
}
.va-navbar {
  display: flex;
  gap: 4px;
  margin-bottom: 22px;
  padding: 6px;
  overflow-x: auto;
  background: rgba(255,255,255,.94);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(16, 32, 68, .07);
}
.va-nav-item {
  flex: 0 0 auto;
  padding: 10px 14px;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 750;
  transition: color 140ms ease, background 140ms ease, border-color 140ms ease;
}
.va-nav-item:hover { color: var(--ink); background: var(--surface-soft); border-color: var(--line); }
.va-nav-item.active {
  color: var(--teal);
  background: var(--teal-soft);
  border-color: rgba(7, 89, 217, .16);
  box-shadow: inset 0 -2px 0 var(--teal);
}
.va-nav-disabled { color: #a7b1c1; background: #f4f6fa; cursor: not-allowed; }
/* Portal scale: keeps the business workspace compact and balanced. */
.page-shell:not(.va-shell) .topbar { min-height: 82px; gap: 16px; }
.page-shell:not(.va-shell) main { padding: 42px 0 60px; }
.page-shell:not(.va-shell) main h1 { font-size: clamp(26px, 3.3vw, 34px); line-height: 1.1; }
.page-shell:not(.va-shell) main h2 { font-size: 22px; }
.page-shell:not(.va-shell) .brand { gap: 0; }
.page-shell:not(.va-shell) main:has(.home-location-card) { display: flex; flex-direction: column; }
.page-shell:not(.va-shell) main:has(.home-location-card) .plan-status { order: 1; }
.page-shell:not(.va-shell) main:has(.home-location-card) .home-location-card { order: 2; }
.home-main { display: flex; flex-direction: column; }
.home-main .plan-status { order: 1; }
.home-main .home-location-card { order: 2; }
.config-only-panel { display: none; }
.services-minimal .header-actions { display: flex; }
.services-minimal h1 { font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: clamp(24px, 3vw, 30px) !important; line-height: 1.15; text-transform: none; }
.services-minimal p { margin-bottom: 0; color: var(--muted); }
.services-summary .metric { min-height: 96px; padding: 16px 18px; }
.services-summary .metric strong { font-size: 30px; }
.services-summary .metric:nth-child(4) { display: none; }
.service-create-modal {
  max-width: 560px;
  padding: 26px 28px;
}
.service-create-modal h3 {
  margin: 0 0 22px;
  color: var(--navy);
  font-size: 21px;
}
.service-create-modal label {
  display: block;
  margin-bottom: 15px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}
.service-create-modal input,
.service-create-modal select,
.service-create-modal textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--ink);
  font: inherit;
}
.service-create-modal input:focus,
.service-create-modal select:focus,
.service-create-modal textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(7, 89, 217, 0.12);
  background: #fff;
}
.service-code-note {
  margin: -5px 0 16px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.excel-service-actions {
  display: flex;
  margin: 18px 0 20px;
}
.excel-upload-form {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.excel-upload-form input[type="file"] {
  padding: 8px;
  background: #fff;
}
.category-section { margin-bottom: 16px; padding: 0; overflow: hidden; border-radius: 14px; box-shadow: 0 6px 18px rgba(16,32,68,.05); }
.category-section > h2 { margin: 0; padding: 14px 18px; color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: 18px; border-bottom: 1px solid var(--line); }
.category-section > h2 small { float: right; color: var(--muted); font-size: 12px; font-weight: 650; }
.category-section .table-responsive { border: 0; border-radius: 0; }
.category-section .crm-table th, .category-section .crm-table td { padding: 11px 14px; vertical-align: middle; }
.category-section .crm-table th { font-size: 11px; }
.services-catalog-table { padding: 0; overflow: hidden; }
.services-catalog-heading { padding: 16px 18px; border-bottom: 1px solid var(--line); }
.services-catalog-heading h2 { margin: 0; font-size: 18px; font-family: Inter, ui-sans-serif, system-ui, sans-serif; }
.services-catalog-table .table-responsive { border: 0; border-radius: 0; }
.services-catalog-table .crm-table th, .services-catalog-table .crm-table td { padding: 11px 14px; vertical-align: middle; }
.services-catalog-table .crm-table th { font-size: 11px; }
@media (max-width: 768px) {
  .services-minimal .header-actions { width: 100%; }
  .services-minimal .header-actions .button { flex: 1; }
  .services-catalog-table .crm-table, .services-catalog-table .crm-table tbody, .services-catalog-table .crm-table tr, .services-catalog-table .crm-table td { display: block; }
  .services-catalog-table .crm-table thead { display: none; }
  .services-catalog-table .crm-table tr { margin: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
  .services-catalog-table .crm-table td { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; padding: 6px 0; border: 0; }
  .services-catalog-table .crm-table td::before { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
  .services-catalog-table .crm-table td:nth-child(1)::before { content: "Código"; }
  .services-catalog-table .crm-table td:nth-child(2)::before { content: "Servicio"; }
  .services-catalog-table .crm-table td:nth-child(3)::before { content: "Categoría"; }
  .services-catalog-table .crm-table td:nth-child(4)::before { content: "Duración"; }
  .services-catalog-table .crm-table td:nth-child(5)::before { content: "Precio"; }
  .services-catalog-table .crm-table td:nth-child(6)::before { content: "Estado"; }
  .services-catalog-table .crm-table td:nth-child(7)::before { content: "Acciones"; }
}
.services-summary .metric-soft { display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.page-shell:not(.va-shell) .crm-page-header h1 { font-size: clamp(25px, 3vw, 34px) !important; line-height: 1.1; }
.page-shell:not(.va-shell) .crm-page-header { margin-bottom: 16px; gap: 12px; }
.page-shell:not(.va-shell) .crm-page-header .header-actions { gap: 8px; }
.page-shell:not(.va-shell) .crm-page-header .search-form { display: flex; align-items: center; gap: 8px; width: min(100%, 380px); }
.page-shell:not(.va-shell) .crm-page-header .search-form input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 38px;
  padding: 8px 11px;
  border-radius: 9px;
  font-size: 13px;
}
.page-shell:not(.va-shell) .customer-search-input { position: relative; flex: 1 1 auto; min-width: 0; }
.page-shell:not(.va-shell) .customer-search-input input { padding-right: 32px; }
.customer-search-clear {
  position: absolute;
  top: 50%;
  right: 9px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: #eef3fa;
  border-radius: 50%;
  font-size: 16px;
  line-height: 1;
  text-decoration: none;
  transform: translateY(-50%);
}
.customer-search-clear:hover { color: var(--navy); background: #dce8f8; }
.page-shell:not(.va-shell) .crm-page-header .button {
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 12px;
}
.button-export-excel {
  min-height: 36px !important;
  padding: 8px 12px !important;
  color: #217346 !important;
  background: #edf8f0 !important;
  border: 1px solid #b9dfc3 !important;
  border-radius: 9px !important;
  box-shadow: none !important;
  font-size: 12px !important;
  font-weight: 800;
  white-space: nowrap;
}
.button-export-excel:hover { color: #15552f !important; background: #dff2e4 !important; }
.customers-table th,
.customers-table td { padding: 8px 11px; line-height: 1.2; vertical-align: middle; }
.customers-table td .button {
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.2;
  white-space: nowrap;
}
.customer-payment-pending { display: grid; justify-items: start; gap: 4px; }
.customer-payment-pending .button { min-height: 26px; padding: 4px 8px; border-radius: 6px; font-size: 10px; }
.customer-debt-alert { margin: 0 0 12px; }
.payment-debts-table th,
.payment-debts-table td { padding: 9px 11px; vertical-align: middle; }
.customer-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
}
.customer-pagination > div { display: flex; align-items: center; gap: 8px; }
.customer-pagination .button-small { min-height: 32px; padding: 6px 10px; font-size: 11px; }
.page-shell:not(.va-shell) .hero { margin-bottom: 28px; gap: 24px; }
.page-shell:not(.va-shell) .lead { font-size: 16px; line-height: 1.55; }
.page-shell:not(.va-shell) .card, .page-shell:not(.va-shell) .metric { border-radius: 16px; box-shadow: 0 10px 28px rgba(16, 32, 68, .07); }
.page-shell:not(.va-shell) .metrics { gap: 12px; margin-bottom: 24px; }
.page-shell:not(.va-shell) .metric { min-height: 112px; padding: 20px; }
.page-shell:not(.va-shell) .metric strong { font-size: 32px; }
.page-shell:not(.va-shell) .section-heading { margin-top: 38px; }
.home-main .grid-two { margin-top: 0; }
.home-main .metrics { margin-bottom: 14px; }
.dashboard-hero + .metrics-wide {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.dashboard-hero + .metrics-wide .metric {
  min-width: 0;
  min-height: 88px;
  padding: 15px 13px;
}
.dashboard-hero + .metrics-wide .metric span {
  font-size: 14px;
  line-height: 1.3;
  white-space: nowrap;
}
.dashboard-hero + .metrics-wide .metric strong { font-size: 32px; }
.dashboard-today-table { table-layout: fixed; font-size: 12px; }
.dashboard-today-table th,
.dashboard-today-table td { padding: 11px 10px; vertical-align: middle; }
.dashboard-today-table th { font-size: 10px; letter-spacing: .01em; }
.dashboard-today-table th:first-child,
.dashboard-today-table td:first-child { width: 145px; min-width: 145px; white-space: nowrap; overflow: hidden; }
.dashboard-today-time {
  display: inline-block;
  max-width: 100%;
  color: var(--navy);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  overflow: hidden;
  white-space: nowrap;
}
.dashboard-today-table td:nth-child(2),
.dashboard-today-table td:nth-child(3) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-today-table .badge { padding: 4px 7px; font-size: 10px; white-space: nowrap; }
.va-shell main, .admin-shell main { color: var(--ink); }
.va-brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  color: #fff;
  background: linear-gradient(145deg, var(--sky), var(--blue));
  border-radius: 9px;
  box-shadow: none;
  font-size: 18px;
  font-weight: 850;
  letter-spacing: -.08em;
}
.va-brand-title { color: var(--navy); font-size: 15px; font-weight: 800; letter-spacing: -.01em; }
.va-brand-sub { margin-top: 2px; color: var(--muted); font-size: 11px; }
.va-user-badge { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); background: transparent; border: 0; padding: 5px 0; font-size: 12px; }
.va-user-dot { width: 7px; height: 7px; display: inline-block; background: #22a06b; border-radius: 50%; }
.va-business-directory { padding: 14px; }
.va-business-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.va-filter-tabs { display: flex; flex-wrap: wrap; gap: 5px; min-width: 0; }
.va-filter-tabs .button { min-height: 32px; padding: 7px 10px; border-radius: 8px; font-size: 12px; box-shadow: none; }
.va-business-search { flex: 0 1 220px; }
.va-business-search input { min-height: 38px; padding: 9px 11px; background: var(--surface-soft); border-radius: 9px; }
.va-business-search input::placeholder { color: #8a98ad; }
.va-shell .va-mobile-bottom-nav { display: none !important; }
.va-shell main { display: grid; gap: 20px; }
.va-shell h1, .va-shell h2, .va-shell h3 { line-height: 1.2; }
.va-shell h1 { font-size: clamp(1.65rem, 3vw, 2.25rem) !important; letter-spacing: -0.03em; }
.va-shell h2 { font-size: 1.15rem; margin: 0; }
.va-shell h3 { font-size: 1rem; margin: 0 0 14px; }
.admin-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}
.admin-metric-card, .admin-section-card {
  background: var(--va-card-bg);
  border: 1px solid var(--va-card-border);
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(0,0,0,.18);
}
.admin-metric-card { padding: 16px; min-height: 104px; }
.admin-metric-card .label { color: var(--va-text-secondary); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.admin-metric-card .value { margin-top: 10px; color: var(--va-text-primary); font-size: 1.8rem; font-weight: 800; }
.admin-section-card { padding: 20px; overflow: hidden; }
.admin-section-header { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; margin-bottom: 16px; }
.admin-table { width: 100%; border-collapse: collapse; color: var(--va-text-primary); }
.admin-table th, .admin-table td { padding: 12px 10px; border-bottom: 1px solid var(--va-card-border); vertical-align: top; }
.admin-table th { color: var(--va-text-secondary); background: transparent; font-size: .7rem; }
.admin-table tr:last-child td { border-bottom: 0; }
.table-responsive { overflow-x: auto; border: 1px solid var(--va-card-border); border-radius: 12px; }
.table-responsive .admin-table { min-width: 760px; }
.action-buttons-row { display: flex; flex-wrap: wrap; gap: 6px; }
.va-shell label { display: grid; gap: 7px; margin-bottom: 14px; color: var(--va-text-secondary); font-size: .85rem; font-weight: 650; }
.va-shell input, .va-shell select, .va-shell textarea { color: var(--va-text-primary); background: rgba(15,23,42,.65); border-color: var(--va-card-border); }
.page-shell input[type="checkbox"][name="features"] {
  appearance: auto;
  width: 14px !important;
  min-width: 14px;
  height: 14px !important;
  margin: 0;
  padding: 0 !important;
  border: 0;
  border-radius: 0;
  background: transparent;
  display: inline-block;
  flex: 0 0 14px;
  cursor: pointer;
  accent-color: #2563eb;
}
.page-shell label:has(> input[type="checkbox"][name="features"]) {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px !important;
  min-height: 18px;
  margin: 0;
  white-space: normal;
}
.va-shell code { color: var(--va-accent-cyan); }

@media (max-width: 768px) {
  .page-shell, .va-shell { width: min(100% - 20px, 1180px); padding-left: 0; padding-right: 0; }
  .topbar { min-height: 84px; gap: 12px; flex-wrap: wrap; }
  .account { margin-left: auto; gap: 8px; }
  .business-strip { align-items: flex-start; flex-direction: column; gap: 12px; }
  .license-summary { justify-content: flex-start; text-align: left; }
  main { padding: 32px 0 78px; }
  .hero, .crm-page-header { align-items: stretch; flex-direction: column; gap: 16px; }
  .hero-actions, .header-actions, .settings-actions { justify-content: flex-start; }
  .metrics, .metrics-wide, .grid-two, .finance-grid, .location-form { grid-template-columns: 1fr; }
  .settings-card-header, .settings-form, .admin-section-card { padding: 18px; }
  .va-topbar { margin-top: .5rem; }
  .va-topbar-actions { flex-wrap: wrap; }
  .va-navbar { margin-bottom: 1rem; }
  .va-shell { padding-bottom: 5rem; }
  .va-shell, .admin-shell { width: min(100% - 20px, 1200px); padding-top: 8px; }
  .va-topbar, .admin-topbar { align-items: flex-start; flex-direction: column; }
  .va-shell .header-actions .button, .va-shell .header-actions { width: 100%; }
  .va-shell .header-actions .button { justify-content: center; }
  .va-business-toolbar { align-items: stretch; flex-direction: column; }
  .va-filter-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
  .va-business-search { flex-basis: auto; }
}

/* ============================================================
   MODAL EMERGENTE — Portal CRM
   El overlay es movido a document.body por JS en base.html
   para evitar que .page-shell restrinja position:fixed.
   ============================================================ */
.crm-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(7, 28, 82, 0.68);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.crm-modal-backdrop.is-active {
  display: flex;
}

.crm-modal-card {
  position: relative;
  background: #ffffff;
  color: #102044;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 16px;
  box-shadow: 0 32px 64px rgba(7, 28, 82, 0.32), 0 8px 16px rgba(7, 28, 82, 0.16);
  padding: 28px;
  box-sizing: border-box;
}
.crm-modal-card:has(#create-appointment-form) {
  max-width: 760px;
  padding: 22px 26px;
}
.crm-modal-card:has(#create-appointment-form) #create-appointment-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
}
.crm-modal-card:has(#create-appointment-form) #create-appointment-form > .crm-form-group:nth-of-type(3),
.crm-modal-card:has(#create-appointment-form) #create-appointment-form > .crm-modal-actions {
  grid-column: 1 / -1;
}
.crm-modal-card:has(#create-appointment-form) .crm-modal-title {
  margin-bottom: 14px;
}
.crm-modal-card:has(#create-appointment-form) .crm-form-group {
  margin-bottom: 12px;
}
.agenda-service-select {
  min-height: 92px !important;
  padding: 3px 6px !important;
}
.agenda-service-select option {
  padding: 4px 7px;
  font-size: 13px;
}
.agenda-service-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  max-height: 176px;
  overflow-y: auto;
  padding: 2px;
}
.agenda-service-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  line-height: 1.25;
}
@media (max-width: 600px) {
  .crm-modal-card:has(#create-appointment-form) {
    max-width: 100%;
    padding: 20px;
  }
  .crm-modal-card:has(#create-appointment-form) #create-appointment-form {
    display: block;
  }
  .crm-modal-card:has(#create-appointment-form) .crm-form-group {
    margin-bottom: 12px;
  }
}
.agenda-service-chip:has(input:checked) {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: var(--navy);
}
.agenda-service-chip input {
  position: static;
  opacity: 1;
  pointer-events: auto;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  accent-color: var(--teal);
}
.agenda-service-help {
  display: block;
  margin: -6px 0 8px;
  color: var(--muted);
  font-size: 11px;
}

.crm-modal-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 20px 0;
  padding-bottom: 14px;
  border-bottom: 1px solid #dbe4f2;
  color: #071c52;
}

.crm-form-group {
  display: block;
  margin-bottom: 18px;
}

.crm-form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #334155;
  letter-spacing: 0.01em;
}

.crm-form-control {
  display: block;
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  border: 1.5px solid #dbe4f2;
  border-radius: 8px;
  background: #f8fbff;
  color: #102044;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
  min-height: 42px;
}

/* Override the global input rules inside modal forms */
.crm-modal-card input.crm-form-control,
.crm-modal-card select.crm-form-control,
.crm-modal-card textarea.crm-form-control {
  min-height: 42px;
  border: 1.5px solid #dbe4f2;
  border-radius: 8px;
  background: #f8fbff;
  padding: 10px 14px;
}

.crm-form-control:focus {
  outline: none;
  border-color: #0759d9;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(7, 89, 217, 0.14);
}

.crm-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #dbe4f2;
}

.crm-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: #60708c;
  border-radius: 6px;
  line-height: 1;
}

.crm-modal-close:hover {
  background: rgba(7, 89, 217, 0.08);
  color: #0759d9;
}

@media (max-width: 768px) {
  .agenda-history-header { display: none !important; }
  .agenda-history-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 9px 14px !important;
    padding: 14px 16px !important;
  }
  .agenda-history-row > div { min-width: 0; white-space: normal !important; }
  .agenda-history-row > div:nth-child(1) { grid-column: 1; }
  .agenda-history-row > div:nth-child(2) { grid-column: 2; }
  .agenda-history-row > div:nth-child(3) { grid-column: 1 / -1; }
  .agenda-history-row > div:nth-child(4) { grid-column: 1; }
  .agenda-history-row > div:nth-child(5) { grid-column: 2; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
  .metric:last-child { grid-column: 1 / -1; }
}

@media (max-width: 980px) {
  .topbar {
    flex-wrap: wrap;
    min-height: auto;
    padding: 12px 0;
    gap: 12px;
  }
  .desktop-nav {
    order: 3;
    width: 100%;
    justify-content: center;
    border-top: 1px solid var(--line);
    padding-top: 10px;
  }
}

@media (max-width: 760px) {
  .customer-detail-grid { grid-template-columns: 1fr; gap: 14px; }
  .customer-detail-card { padding: 18px; }
  .customer-history-heading { padding: 18px; }
  .customer-detail-table th, .customer-detail-table td { padding: 10px 12px; }
  .customer-detail-table th:nth-child(3), .customer-detail-table td:nth-child(3) { min-width: 150px; }
  .customer-detail-table { min-width: 620px; }
  .customer-history-card .table-responsive { overflow-x: auto; }
  .debt-list li { align-items: flex-start; flex-direction: column; }
}

/* Payments Section & Widgets */
.currency-summary {
  display: grid;
  grid-template-columns: minmax(230px, 0.9fr) minmax(0, 2.1fr);
  align-items: stretch;
  gap: 18px;
  margin-bottom: 22px;
  padding: 18px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #dbe6f5;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(16, 32, 68, 0.06);
}
.currency-summary-heading {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 2px 4px;
}
.currency-summary h2 {
  margin: 3px 0 0;
  font-size: 20px;
  color: var(--navy);
}
.currency-summary-subtitle {
  max-width: 290px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.currency-summary-values {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}
.currency-summary-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  min-height: 68px;
  padding: 10px 11px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid #e2eaf5;
  border-radius: 11px;
}
.currency-summary-item span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.25;
}
.currency-summary-item strong {
  overflow-wrap: anywhere;
  margin: 3px 0 0;
  color: var(--navy);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.25;
}
.currency-config-fieldset {
  margin: 0 0 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft, #f8fbff);
}
.currency-config-fieldset legend {
  padding: 0 6px;
  color: var(--navy);
  font-size: 14px;
  font-weight: 800;
}
.currency-config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
}
.currency-config-grid .crm-form-group { margin: 0; }
.settings-form label.currency-switch {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--card);
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
}
.settings-form label.currency-switch input {
  width: 17px;
  height: 17px;
  min-height: 17px;
  padding: 0;
  margin: 0;
}
.currency-rate-input { display: flex; align-items: stretch; }
.currency-rate-input input { border-radius: 9px 0 0 9px; }
.currency-rate-input > span {
  display: flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 9px 9px 0;
  background: var(--card);
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.currency-config-status {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 11px;
}
.currency-config-help {
  margin: 7px 0 0;
  padding: 8px 10px;
  color: #36557c;
  background: #eef6ff;
  border: 1px solid #d7e9ff;
  border-radius: 8px;
  font-size: 11px;
  line-height: 1.4;
}
.is-hidden { display: none !important; }

.payments-widgets-section {
  margin-bottom: 24px;
}
.payments-widgets-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.payments-widgets-header h2 {
  margin: 0;
  font-size: 20px;
  color: var(--navy);
  font-weight: 750;
}
.payments-widgets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}
.payment-widget-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 4px 14px rgba(16, 32, 68, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}
.payment-widget-card.is-active {
  border-color: rgba(7, 89, 217, 0.25);
  box-shadow: 0 8px 22px rgba(7, 89, 217, 0.09);
  background: linear-gradient(145deg, #ffffff, #f8fbff);
}
.payment-widget-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.payment-widget-title-box {
  display: flex;
  align-items: center;
  gap: 10px;
}
.payment-widget-icon {
  font-size: 22px;
}
.payment-widget-name {
  display: block;
  font-size: 14px;
  font-weight: 750;
  color: var(--navy);
  line-height: 1.2;
}
.payment-widget-status-text {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}
.semaphore-gray {
  background: #cbd5e1;
  box-shadow: 0 0 0 3px rgba(203, 213, 225, 0.3);
}
.payment-widget-body {
  font-size: 12px;
  color: var(--ink);
  line-height: 1.45;
  word-break: break-word;
  background: var(--surface-soft, #f8fbff);
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.04);
}
.payment-widget-body p {
  margin: 0;
  white-space: pre-line;
}
.payment-widget-empty-text {
  color: var(--muted) !important;
  font-style: italic;
}
.payment-config-modal {
  max-width: 640px;
  width: 100%;
}
@media (max-width: 900px) {
  .currency-summary { grid-template-columns: 1fr; }
  .currency-summary-subtitle { max-width: none; }
  .currency-summary-values { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .currency-config-grid { grid-template-columns: 1fr; }
  .currency-summary { padding: 14px; }
  .currency-summary-values { grid-template-columns: 1fr 1fr; gap: 8px; }
}
.proofs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 14px;
}
.proof-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.proof-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 750;
  color: var(--navy);
}
.proof-body {
  font-size: 13px;
}
.proof-body p {
  margin: 3px 0;
}
.proof-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 4px;
}
.proof-actions form {
  min-width: 0;
}
.proof-actions > a,
.proof-actions button {
  width: 100%;
  min-width: 0;
  white-space: nowrap;
  padding-left: 8px;
  padding-right: 8px;
  font-size: 12px;
}
.dashboard-proposal-detail { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.dashboard-proposal-form { margin-top: 7px; }
.dashboard-proposal-form .button { padding: 5px 8px; font-size: 10px; line-height: 1.15; white-space: nowrap; }
.close-review-page { max-width: 1180px; margin: 0 auto; padding: 30px 34px 26px; overflow: hidden; }
.close-review-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 28px; }
.close-review-header h1 { max-width: none; margin: 0 0 10px; font-family: inherit; font-size: clamp(30px, 4vw, 46px); line-height: 1.05; letter-spacing: -0.035em; color: var(--navy); }
.close-review-header .text-muted { margin: 0; font-size: 16px; }
.close-review-header .badge { flex: 0 0 auto; margin-top: 8px; }
.close-review-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr); gap: 20px; align-items: start; }
.close-review-items, .close-review-add { min-width: 0; border: 1px solid var(--line); border-radius: 16px; padding: 22px; background: #fff; box-shadow: 0 8px 22px rgba(7, 31, 77, .06); }
.close-review-items h2, .close-review-add h2 { margin: 0 0 14px; font-size: 21px; color: var(--navy); }
.close-review-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.close-review-section-heading h2 { margin-bottom: 0; }
.close-review-count { color: var(--muted); font-size: 12px; font-weight: 700; }
.close-review-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.close-review-add-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.close-review-item small, .close-review-add-row small { display: block; color: var(--muted); margin-top: 3px; }
.close-review-item-info { min-width: 0; flex: 1; }
.close-review-item-info strong { display: block; color: var(--navy); }
.close-review-item-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; min-width: max-content; white-space: nowrap; }
.close-review-item-actions form { display: inline-flex !important; width: auto !important; flex: 0 0 auto; margin: 0; }
.close-review-item-actions .button { min-width: 30px; height: 34px; min-height: 34px; padding: 5px 9px; }
.close-review-quantity-button { min-width: 30px; padding: 4px 9px; }
.close-review-quantity { min-width: 20px; text-align: center; font-weight: 800; color: var(--navy); }
.close-review-remove { padding-inline: 8px; }
.close-review-item-total { min-width: 76px; text-align: right; color: var(--teal); font-size: 16px; }
.close-review-empty { padding: 18px 0; color: var(--muted); }
.close-review-total { display: flex; justify-content: space-between; padding-top: 20px; font-size: 22px; font-weight: 800; color: var(--teal); }
.close-review-currency {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 12px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(7, 89, 217, 0.2);
  border-radius: 12px;
  background: #f5f9ff;
  color: var(--navy);
}
.close-review-currency strong { color: var(--teal); }
.close-review-currency small { grid-column: 1 / -1; color: var(--muted); }
.close-review-add-row span { font-size: 13px; color: var(--navy); }
.close-review-add-row span strong { display: block; }
.close-review-category + .close-review-category { margin-top: 18px; }
.close-review-category h3 { margin: 0; padding: 8px 0; color: var(--navy); font-size: 13px; border-bottom: 2px solid var(--line); }
.close-review-confirm { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 24px; padding: 16px 0 2px; border-top: 1px solid var(--line); }
.close-review-confirm .button-primary { min-width: 280px; }
@media (max-width: 860px) {
  .close-review-page { padding: 24px 20px; }
  .close-review-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .close-review-header { flex-direction: column; gap: 12px; }
  .close-review-header .badge { margin-top: 0; }
  .close-review-items, .close-review-add { padding: 16px; }
  .close-review-item { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
  .close-review-item-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .close-review-item-total { min-width: auto; }
  .close-review-add-row { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
  .close-review-confirm { flex-direction: column-reverse; align-items: stretch; }
  .close-review-confirm .button-primary { min-width: 0; width: 100%; }
}

/* ==========================================================================
   Vinqelo Admin - Consola Centralizada (Superadmin)
   ========================================================================== */
.profile-avatar-superadmin {
  background: linear-gradient(135deg, #1e3a8a, #0b1329);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.profile-crown {
  font-size: 14px;
  line-height: 1;
}

.va-alert-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.va-alert-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 32, 68, 0.05);
}

.va-alert-high {
  background: rgba(225, 29, 72, 0.06);
  border-color: rgba(225, 29, 72, 0.22);
}

.va-alert-medium {
  background: rgba(217, 119, 6, 0.06);
  border-color: rgba(217, 119, 6, 0.22);
}

.va-alert-low {
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(16, 185, 129, 0.22);
}

.va-tab-bar {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
  overflow-x: auto;
}

.va-tab {
  padding: 8px 16px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: color 140ms ease, border-color 140ms ease;
  margin-bottom: -1px;
}

.va-tab:hover {
  color: var(--navy);
}

.va-tab.active {
  color: var(--navy);
  border-bottom-color: var(--navy);
}

.badge-demo {
  background: rgba(2, 132, 199, 0.12);
  color: #0284c7;
  border: 1px solid rgba(2, 132, 199, 0.25);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  text-transform: uppercase;
}

.badge-exempt {
  background: rgba(100, 116, 139, 0.12);
  color: #475569;
  border: 1px solid rgba(100, 116, 139, 0.25);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  text-transform: uppercase;
}

.action-buttons-row {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

/* --- Vinqelo Admin Dashboard Components --- */
.va-alert-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  position: relative;
  overflow: hidden;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.va-alert-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(16, 32, 68, 0.05);
}

.va-alert-indicator {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
}

.va-alert-high .va-alert-indicator { background: #e11d48; }
.va-alert-medium .va-alert-indicator { background: #d97706; }
.va-alert-low .va-alert-indicator { background: #10b981; }

.va-alert-main {
  flex: 1;
  min-width: 0;
  padding-left: 6px;
}

.va-alert-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 3px;
}

.va-alert-title {
  font-size: 14px;
  font-weight: 750;
  color: var(--navy);
}

.va-alert-desc {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

.va-alert-btn {
  flex-shrink: 0;
  white-space: nowrap;
}

.va-stat-card {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.va-stat-highlight {
  background: linear-gradient(135deg, rgba(7, 89, 217, 0.04), rgba(7, 89, 217, 0.09));
  border-color: rgba(7, 89, 217, 0.18);
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.va-stat-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: block;
}

.va-stat-val {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.15;
  display: block;
  margin-top: 2px;
}

.va-stat-val-big {
  font-size: 28px;
  color: var(--navy);
  margin-top: 4px;
}

.va-stat-badge {
  font-size: 11px;
  font-weight: 800;
  color: var(--blue);
  background: #e0f2fe;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(2, 132, 199, 0.2);
  white-space: nowrap;
}

.va-timeline {
  display: flex;
  flex-direction: column;
  position: relative;
  padding-left: 18px;
  border-left: 2px solid var(--line);
  gap: 16px;
}

.va-timeline-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.va-timeline-bullet {
  position: absolute;
  left: -24px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blue);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px rgba(7, 89, 217, 0.2);
}

.va-timeline-top {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
  margin-bottom: 2px;
}

.va-timeline-date {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

.va-timeline-desc {
  margin: 0;
  font-size: 13px;
  color: var(--ink);
  line-height: 1.4;
}

.va-empty-state {
  padding: 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.va-empty-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 800;
}

/* ==========================================================================
   VINQELO ADMIN — BUSINESS DIRECTORY COMPONENT STYLES
   ========================================================================== */
#directorio {
  scroll-margin-top: 80px;
}

.va-dir-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 22px 24px;
}

.va-search-box {
  position: relative;
  width: 250px;
  max-width: 100%;
}

.va-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: #64748b;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.va-search-input {
  width: 100% !important;
  height: 38px !important;
  padding: 0 12px 0 34px !important;
  font-size: 13px !important;
  color: var(--ink) !important;
  background: #ffffff !important;
  border: 1px solid var(--line) !important;
  border-radius: 20px !important;
  box-sizing: border-box !important;
  outline: none !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.va-search-input:focus {
  border-color: var(--teal) !important;
  box-shadow: 0 0 0 3px rgba(7, 89, 217, 0.12) !important;
}

.va-filter-bar {
  padding: 10px 24px;
  background: #fafcff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.va-segmented-group {
  display: inline-flex;
  align-items: center;
  background: #eef3fb;
  padding: 4px;
  border-radius: 10px;
  gap: 3px;
}

.va-segmented-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none !important;
  border-radius: 7px;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 140ms ease;
  line-height: 1;
}

.va-segmented-btn:hover {
  color: var(--navy);
  text-decoration: none !important;
}

.va-segmented-btn.active {
  background: #ffffff;
  color: var(--navy);
  box-shadow: 0 1px 4px rgba(16, 32, 68, 0.08);
  text-decoration: none !important;
}

.va-segmented-btn.active-active {
  color: #15803d;
}

.va-segmented-btn.active-trial {
  color: #0369a1;
}

.va-segmented-btn.active-past_due {
  color: #b45309;
}

.va-segmented-btn.active-suspended {
  color: #b91c1c;
}

.va-pill-counter {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.15);
  color: var(--muted);
  line-height: 1;
}

.va-segmented-btn.active .va-pill-counter {
  background: var(--navy);
  color: #ffffff;
}

.va-segmented-btn.active-active .va-pill-counter {
  background: #15803d;
  color: #ffffff;
}

.va-segmented-btn.active-trial .va-pill-counter {
  background: #0369a1;
  color: #ffffff;
}

.va-segmented-btn.active-past_due .va-pill-counter {
  background: #b45309;
  color: #ffffff;
}

.va-segmented-btn.active-suspended .va-pill-counter {
  background: #b91c1c;
  color: #ffffff;
}

.va-table-wrap {
  width: 100%;
  overflow-x: auto;
  min-height: 380px;
}

.va-dir-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.va-dir-table thead th {
  padding: 12px 20px;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #f8fbff;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.va-dir-table tbody td {
  padding: 14px 20px;
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink);
}

.va-dir-table tbody tr:hover {
  background: #fbfdff;
}

.va-dir-table tbody tr:last-child td {
  border-bottom: 0;
}

.va-biz-avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #e0f2fe, #dbeafe);
  color: #0284c7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  border: 1px solid #bae6fd;
}

.va-biz-name-link {
  font-size: 14px;
  font-weight: 750;
  color: var(--navy);
  text-decoration: none !important;
  display: block;
  margin-bottom: 3px;
}

.va-biz-name-link:hover {
  color: var(--teal);
  text-decoration: none !important;
}

.va-tag {
  font-size: 10px;
  font-weight: 750;
  padding: 1px 6px;
  border-radius: 4px;
  display: inline-block;
  line-height: 1.3;
}

.va-tag-demo {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.va-tag-exempt {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.va-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.va-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.va-status-active {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}
.va-status-active .va-status-dot { background: #10b981; }

.va-status-trial {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}
.va-status-trial .va-status-dot { background: #3b82f6; }

.va-status-past_due {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}
.va-status-past_due .va-status-dot { background: #f59e0b; }

.va-status-suspended {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}
.va-status-suspended .va-status-dot { background: #ef4444; }

.va-table-btn {
  min-height: 28px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--navy);
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 120ms ease;
  cursor: pointer;
}

.va-table-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: var(--navy);
  text-decoration: none !important;
}
.contact-modal-card {
  max-width: 620px;
  padding: 28px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}
.contact-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.contact-modal-card #contact-form {
  gap: 16px !important;
}
.contact-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.contacts-search-form {
  display: flex;
  align-items: center;
  gap: 8px;
}
.contacts-search-form input {
  width: min(310px, 32vw);
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid #dbe4f2;
  border-radius: 8px;
  background: #f8fbff;
  color: var(--ink);
  font-size: 12px;
}
.contacts-search-form input:focus {
  outline: none;
  border-color: #0759d9;
  box-shadow: 0 0 0 3px rgba(7, 89, 217, .12);
  background: #fff;
}
.contacts-search-clear { color: #64748b; font-size: 12px; text-decoration: none; }
.activity-search-clear { display: inline-grid; place-items: center; width: 25px; height: 25px; color: #64748b; border-radius: 50%; font-size: 20px; line-height: 1; text-decoration: none; }
.activity-search-clear:hover { color: #0759d9; background: #eaf2ff; }
.activity-table th,
.activity-table td { vertical-align: top; }
.activity-time { min-width: 145px; }
.activity-time strong,
.activity-time span,
.activity-time small { display: block; }
.activity-time span { margin-top: 3px; color: #173667; font-weight: 700; }
.activity-time small { margin-top: 4px; color: #71819b; font-size: 10px; }
.activity-details { min-width: 250px; max-width: 460px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; }
@media (max-width: 760px) {
  .contacts-search-form { width: 100%; margin-top: 12px; }
  .contacts-search-form input { width: 100%; flex: 1; }
}
.contact-metric-card {
  position: relative;
  min-height: 112px;
  padding: 20px 22px !important;
  overflow: hidden;
  border: 1px solid #dbe5f2 !important;
  border-radius: 14px !important;
  background: linear-gradient(145deg, #fff, #f8fbff) !important;
  box-shadow: 0 8px 20px rgba(7, 45, 115, .08) !important;
}
.contact-metric-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #2563eb;
}
.contact-metric-card:nth-child(2)::before { background: #0ea5e9; }
.contact-metric-card:nth-child(3)::before { background: #16a34a; }
.contact-metric-card:nth-child(4)::before { background: #7c3aed; }
.contact-metric-card span {
  display: block;
  color: #64748b !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: .04em;
}
.contact-metric-card strong {
  margin-top: 10px !important;
  color: #102044 !important;
  font-size: 30px !important;
  line-height: 1 !important;
}
@media (max-width: 640px) {
  .contact-modal-card {
    padding: 22px;
  }
  .contact-form-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .contact-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.plan-row-actions {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  white-space: nowrap;
}
.plan-row-actions .va-table-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.va-dir-footer {
  padding: 12px 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fbff;
  font-size: 12px;
  color: var(--muted);
}

/* ==========================================================================
   VINQELO ADMIN — BUSINESS DETAIL VIEW COMPONENT STYLES
   ========================================================================== */
.va-detail-hero {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px 28px;
  margin-bottom: 24px;
  box-shadow: 0 2px 10px rgba(16, 32, 68, 0.04);
}

.va-detail-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
}

.va-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none !important;
  margin-bottom: 12px;
  transition: color 120ms ease;
}

.va-back-btn:hover {
  color: var(--navy);
  text-decoration: none !important;
}

.va-detail-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.va-detail-title {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
}

.va-meta-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}

.va-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  color: #475569;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.va-detail-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.va-btn-portal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none !important;
  transition: all 120ms ease;
  cursor: pointer;
}

.va-btn-portal:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: var(--navy);
}

.va-btn-primary-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  background: var(--navy);
  border: 1px solid var(--navy);
  border-radius: 8px;
  cursor: pointer;
  transition: all 120ms ease;
  text-decoration: none !important;
}

.va-btn-primary-action:hover {
  background: #1a3366;
  border-color: #1a3366;
  color: #ffffff;
}

.va-detail-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.va-detail-metric-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 1px 4px rgba(16, 32, 68, 0.03);
}

.va-detail-metric-card .label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 6px;
}

.va-detail-metric-card .value {
  font-size: 18px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.2;
}

.va-detail-metric-card .subtext {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.va-detail-tabs-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #eef3fb;
  padding: 6px;
  border-radius: 12px;
  margin-bottom: 28px;
  overflow-x: auto;
  scrollbar-width: none;
}

.va-detail-tabs-bar::-webkit-scrollbar {
  display: none;
}

.va-detail-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
  background: transparent;
  border: none;
  border-radius: 9px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 140ms ease;
  text-decoration: none !important;
  user-select: none;
}

.va-detail-tab-btn svg {
  pointer-events: none;
  flex-shrink: 0;
}

.va-detail-tab-btn:hover {
  color: var(--navy);
  background: rgba(255, 255, 255, 0.5);
  text-decoration: none !important;
}

.va-tab-radio {
  display: none !important;
}

.tab-panel-box {
  display: none;
}

#tab-radio-resumen:checked ~ #tab-panel-resumen,
#tab-radio-suscripcion:checked ~ #tab-panel-suscripcion,
#tab-radio-bot:checked ~ #tab-panel-bot,
#tab-radio-usuarios:checked ~ #tab-panel-usuarios,
#tab-radio-notas:checked ~ #tab-panel-notas,
#tab-radio-actividad:checked ~ #tab-panel-actividad {
  display: block !important;
}

#tab-radio-resumen:checked ~ .va-detail-tabs-bar label[for="tab-radio-resumen"],
#tab-radio-suscripcion:checked ~ .va-detail-tabs-bar label[for="tab-radio-suscripcion"],
#tab-radio-bot:checked ~ .va-detail-tabs-bar label[for="tab-radio-bot"],
#tab-radio-usuarios:checked ~ .va-detail-tabs-bar label[for="tab-radio-usuarios"],
#tab-radio-notas:checked ~ .va-detail-tabs-bar label[for="tab-radio-notas"],
#tab-radio-actividad:checked ~ .va-detail-tabs-bar label[for="tab-radio-actividad"] {
  background: #ffffff !important;
  color: var(--navy) !important;
  box-shadow: 0 2px 6px rgba(16, 32, 68, 0.08) !important;
}

.va-detail-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(16, 32, 68, 0.03);
  margin-bottom: 24px;
}

.va-detail-card-header {
  padding: 22px 28px;
  border-bottom: 1px solid var(--line);
  background: #fafcff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.va-detail-card-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--navy);
}

.va-detail-card-header p {
  margin: 4px 0 0 0;
  font-size: 12px;
  color: var(--muted);
}
.internal-note-sticky {
  position: relative;
  margin-bottom: 22px;
  padding: 18px 20px 16px;
  border: 1px solid #fecaca;
  border-left: 5px solid #dc2626;
  border-radius: 10px;
  background: #fff1f2;
  box-shadow: 0 8px 18px rgba(185, 28, 28, .10);
}
.internal-note-sticky-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: #991b1b;
}
.internal-note-sticky-heading span {
  color: #b91c1c;
  font-size: 11px;
}
.internal-note-sticky p {
  margin: 12px 0 14px;
  color: #7f1d1d;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
}
.internal-note-delete {
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid #fca5a5;
  border-radius: 7px;
  color: #991b1b;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.internal-note-delete:hover { background: #fee2e2; }
.payment-due { color: #b91c1c; font-weight: 800; }
.payment-credit-value { color: #047857; }
.admin-directory-card { margin-top: 0; }
.user-profile-form-card { margin-top: 24px; overflow: hidden; }
.user-profile-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 28px; }
.user-profile-modal { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(7, 28, 82, .62); backdrop-filter: blur(5px); }
.user-profile-modal[hidden] { display: none !important; }
.user-profile-modal-card { position: relative; width: min(720px, 100%); max-height: min(90vh, 760px); overflow-y: auto; border: 1px solid #dbe4f2; border-radius: 16px; background: #fff; box-shadow: 0 24px 70px rgba(7, 28, 82, .28); }
.user-profile-modal-close { position: absolute; top: 15px; right: 17px; z-index: 1; width: 32px; height: 32px; border: 0; border-radius: 8px; background: #eef4fc; color: #415575; font-size: 22px; line-height: 1; cursor: pointer; }
.user-profile-modal-close:hover { background: #dbeafe; color: #0759d9; }
.user-profile-modal-open { overflow: hidden; }
.user-profile-form > label { display: grid; gap: 7px; color: #334155; font-size: 12px; font-weight: 700; }
.user-access-check { display: flex !important; align-items: center; gap: 8px; min-height: 42px; padding: 0 10px; border: 1px solid #dbe4f2; border-radius: 8px; background: #f8fbff; }
.user-access-check input { width: 15px; height: 15px; min-height: 15px; accent-color: #0759d9; }
.user-profile-notes { grid-column: span 2; }
.user-profile-submit { grid-column: span 2; display: flex; align-items: end; justify-content: end; gap: 10px; padding-top: 4px; border-top: 1px solid #e5edf7; }
.user-profile-form small.muted { color: #64748b; font-size: 11px; font-weight: 500; line-height: 1.35; }
.user-row-actions { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 760px) { .user-profile-form { grid-template-columns: 1fr; } .user-profile-notes { grid-column: auto; } .user-profile-submit { justify-content: stretch; } .user-profile-submit .button { width: 100%; } }
.admin-directory-toolbar { align-items: center; justify-content: space-between; }
.admin-search-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.admin-search-form input, .admin-search-form select { min-height: 38px; padding: 8px 10px; border: 1px solid #dbe4f2; border-radius: 8px; background: #fff; color: var(--ink); }
.admin-search-form input { min-width: 230px; }
@media (max-width: 760px) { .admin-directory-toolbar { align-items: stretch; flex-direction: column; } .admin-search-form input { flex: 1; min-width: 0; } }
.va-inline-filter select { min-width: 150px; }
.payment-form {
  padding: 22px 24px 24px;
  gap: 17px;
}
.payment-form-intro {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  color: #536b91;
  background: #f3f7fd;
  border: 1px solid #dbe6f5;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.4;
}
.payment-form-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 27px;
  width: 27px;
  height: 27px;
  color: #fff;
  background: #0759d9;
  border-radius: 8px;
  font-weight: 800;
}
.payment-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 12px;
}
.payment-form .crm-form-label { margin: 0; }
.payment-form .crm-form-control { margin-top: 7px; background: #fbfdff; }
.payment-form textarea.crm-form-control { min-height: 78px; resize: vertical; }
.payment-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 3px;
  padding-top: 17px;
  border-top: 1px solid #e4ebf5;
}
.payment-form-actions span { color: #71819b; font-size: 11px; }
.payment-form-actions .button { min-width: 145px; }
.payment-credit-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 13px;
  border: 1px solid #cfe0f5;
  border-radius: 10px;
  background: #f4f8ff;
  color: #173667;
  cursor: pointer;
}
.payment-credit-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 2px 0 0;
  accent-color: #0759d9;
}
.payment-credit-option span { display: grid; gap: 3px; }
.payment-credit-option small { color: #637596; font-size: 11px; font-weight: 500; line-height: 1.35; }
@media (max-width: 720px) {
  .payment-form-grid { grid-template-columns: 1fr; }
  .payment-form-actions { align-items: stretch; flex-direction: column; }
  .payment-form-actions .button { width: 100%; }
}
.linked-contacts-panel {
  margin-top: 20px;
  padding: 16px 28px 28px;
  border-top: 1px solid var(--line);
}
.linked-contacts-panel > div:first-child {
  gap: 12px;
}
.linked-contacts-panel > div:first-child a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #fff;
  color: #0284c7 !important;
  font-size: 11px !important;
}
.linked-contact-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid #dbe5f2;
  border-radius: 9px;
  background: #f8fafc;
}
.linked-contact-access {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}
@media (max-width: 560px) {
  .linked-contacts-panel { padding: 16px 18px 22px; }
  .linked-contact-item { align-items: flex-start; flex-direction: column; }
  .linked-contact-access { justify-content: flex-start; }
}

.va-info-table {
  width: 100%;
  border-collapse: collapse;
}

.va-info-table tr {
  border-bottom: 1px solid var(--line);
}

.va-info-table tr:last-child {
  border-bottom: none;
}

.va-info-table td {
  padding: 18px 28px;
  font-size: 14px;
  vertical-align: middle;
  line-height: 1.5;
}

.va-info-table td.label-col {
  width: 200px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.va-info-table td.val-col {
  color: var(--navy);
  font-weight: 600;
}

.va-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: vaPulse 2s infinite;
}

@keyframes vaPulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.va-detail-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.va-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.va-form-group label {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 4px;
  padding-left: 2px;
}

.va-form-input,
.va-form-textarea {
  width: 100%;
  padding: 11px 14px;
  font-size: 14px;
  line-height: 1.5;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  box-sizing: border-box;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.va-form-select {
  width: 100%;
  padding: 11px 36px 11px 14px;
  font-size: 14px;
  line-height: 1.5;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  box-sizing: border-box;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23475569' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px;
}

.va-form-input:focus,
.va-form-select:focus,
.va-form-textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(7, 89, 217, 0.12);
}

.va-switch-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  user-select: none;
  line-height: 1.4;
}

.va-switch-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--navy);
  cursor: pointer;
  margin-top: 2px;
}

.va-hero-biz-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #102044 0%, #1e3a8a 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(16, 32, 68, 0.15);
}

.va-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e2e8f0;
  color: var(--navy);
  font-weight: 750;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  flex-shrink: 0;
}

.va-copy-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  color: #475569;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  cursor: pointer;
  transition: all 120ms ease;
  user-select: all;
}

.va-copy-chip:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
  color: var(--navy);
}

.va-field-hint {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.va-card-body {
  padding: 28px 32px 32px 32px !important;
  box-sizing: border-box;
}

/* Controls for Business > Detail > Users. */
.va-admin-inline-message { margin: 0 28px 16px; padding: 10px 12px; border: 1px solid #bfdbfe; border-radius: 8px; background: #eff6ff; color: #1e40af; font-size: 13px; font-weight: 650; }
.va-user-create-panel { padding: 18px 28px; border-bottom: 1px solid #e2e8f0; background: #fbfdff; }
.va-user-create-panel > summary, .va-user-manager > summary { cursor: pointer; color: #0759d9; font-size: 13px; font-weight: 750; list-style-position: outside; }
.va-user-create-form { display: grid; grid-template-columns: repeat(3, minmax(150px, 1fr)); gap: 12px; align-items: end; margin-top: 16px; }
.va-user-create-form label, .va-user-edit-form label { display: grid; gap: 5px; color: #52627a; font-size: 11px; font-weight: 750; letter-spacing: .02em; }
.va-user-create-form input, .va-user-create-form select, .va-user-edit-form input, .va-user-edit-form select { width: 100%; min-height: 36px; box-sizing: border-box; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 7px; background: #fff; color: #172b4d; font-size: 13px; }
.va-user-create-form input:focus, .va-user-create-form select:focus, .va-user-edit-form input:focus, .va-user-edit-form select:focus { border-color: #1677ff; box-shadow: 0 0 0 3px rgba(22,119,255,.12); outline: none; }
.va-user-create-form .button { min-height: 36px; }
.va-user-manager { position: relative; min-width: 220px; }
.va-user-manager[open] { z-index: 30; }
.va-user-edit-form { position: absolute; top: 22px; right: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; width: 360px; margin: 0; padding: 13px; border: 1px solid #dbe4f2; border-radius: 9px; background: #f8fbff; box-shadow: 0 12px 28px rgba(15,35,70,.16); }
.va-user-edit-form label:first-of-type, .va-user-edit-form label:nth-of-type(2), .va-user-edit-form label:nth-of-type(3), .va-user-edit-form label:nth-of-type(6), .va-user-edit-form .button { grid-column: 1 / -1; }
.va-user-revoke-form { margin-top: 8px; }
@media (max-width: 900px) { .va-user-create-form { grid-template-columns: 1fr 1fr; } .va-user-edit-form { width: min(320px, 72vw); } }
@media (max-width: 640px) { .va-user-create-form { grid-template-columns: 1fr; } .va-user-edit-form { width: min(280px, 78vw); grid-template-columns: 1fr; } .va-user-edit-form label { grid-column: 1 / -1 !important; } }
.va-user-edit-hero { margin-bottom: 18px; }
.va-user-edit-page-card { max-width: 820px; margin: 0 auto; }
.va-user-edit-page-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 24px 28px 28px; }
.va-user-edit-page-form label { display: grid; gap: 6px; color: #52627a; font-size: 12px; font-weight: 750; }
.va-user-edit-page-form input, .va-user-edit-page-form select { width: 100%; min-height: 40px; box-sizing: border-box; padding: 9px 11px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; color: #172b4d; font-size: 13px; }
.va-user-edit-page-form input:focus, .va-user-edit-page-form select:focus { border-color: #1677ff; box-shadow: 0 0 0 3px rgba(22,119,255,.12); outline: none; }
.va-user-edit-page-form label:nth-of-type(1), .va-user-edit-page-form label:nth-of-type(3), .va-user-edit-page-form label:nth-of-type(6) { grid-column: 1 / -1; }
.va-user-edit-page-form small { color: #718096; font-size: 11px; font-weight: 500; }
.va-user-edit-page-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 9px; padding-top: 4px; }
.va-user-edit-danger { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 28px 26px; padding: 14px 16px; border: 1px solid #fecaca; border-radius: 10px; background: #fff7f7; color: #7f1d1d; }
.va-user-edit-danger p { margin: 4px 0 0; color: #991b1b; font-size: 12px; }
.va-user-edit-danger .button-danger { border: 1px solid #fca5a5; border-radius: 8px; background: #fff; color: #b91c1c; white-space: nowrap; }
.va-user-edit-danger .button-danger:hover { background: #fee2e2; }
@media (max-width: 640px) { .va-user-edit-page-form { grid-template-columns: 1fr; padding: 18px; } .va-user-edit-page-form label { grid-column: 1 / -1 !important; } }

/* Vinqelo Admin inherits the established Vinqelo Business Pro visual system. */
.admin-pro-shell main {
  min-width: 0;
}

.admin-pro-shell .admin-pro-header {
  max-width: min(620px, 48vw);
}

.admin-pro-shell .admin-pro-header .pro-business-header-fact {
  min-width: 96px;
}

.admin-pro-shell .metrics-wide {
  gap: 12px;
  margin-bottom: 22px;
}

.admin-pro-shell .metrics-wide .metric {
  min-height: 88px;
  padding: 15px 13px;
}

.admin-pro-shell .metrics-wide .metric span {
  font-size: 12px;
  line-height: 1.3;
}

.admin-pro-shell .metrics-wide .metric strong {
  font-size: 30px;
}

.admin-pro-shell .settings-card {
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(16, 32, 68, 0.07);
}

.admin-pro-shell .activity-directory-card {
  padding-bottom: 14px;
}

.admin-pro-shell .activity-directory-card .settings-card-header {
  margin-bottom: 12px;
  padding-bottom: 12px;
}

.admin-pro-shell .activity-directory-card .settings-card-header h2 {
  margin-bottom: 3px;
  font-size: 18px;
}

.admin-pro-shell .activity-directory-card .settings-card-header p:last-child {
  font-size: 11px;
}

.admin-pro-shell .activity-table th,
.admin-pro-shell .activity-table td {
  padding: 8px 10px;
  font-size: 12px;
}

.admin-pro-shell .activity-table .activity-time {
  min-width: 124px;
}

.admin-pro-shell .activity-table .activity-details {
  min-width: 180px;
  max-width: 320px;
  line-height: 1.3;
}

.admin-pro-shell .activity-table .badge {
  padding: 4px 7px;
  font-size: 10px;
}

.activity-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  color: #71819b;
  font-size: 11px;
}

.activity-pagination-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.activity-pagination-page {
  min-width: 42px;
  color: #173667;
  font-weight: 750;
  text-align: center;
}

.activity-pagination button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

@media (min-width: 1200px) {
  .admin-pro-shell .pro-business-header {
    max-width: 650px;
  }
}

@media (max-width: 720px) {
  .admin-pro-shell .admin-pro-header {
    max-width: none;
  }

.admin-pro-shell .admin-pro-header .pro-business-header-fact {
    min-width: 72px;
  }
}



.web-chat-page-heading { max-width: 1440px; margin-bottom: 14px; }
.web-chat-page-heading h1 { font-size: clamp(28px, 3vw, 38px); }
.web-chat-url-card { display: grid; grid-template-columns: minmax(190px, .35fr) minmax(0, 1fr); align-items: center; max-width: 1440px; gap: 14px 22px; margin-bottom: 14px; padding: 17px; }
.web-chat-url-card h2 { margin: 2px 0 0; font-size: 18px; }
.web-chat-url-control { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.web-chat-url-control input { width: 100%; min-width: 0; height: 42px; padding: 9px 12px; border: 1px solid #d5e0ee; border-radius: 10px; color: #334155; background: #f8fbff; box-sizing: border-box; }
.web-chat-copy-status { grid-column: 2; min-height: 16px; color: #087443; font-size: 12px; font-weight: 700; }
.web-chat-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr); max-width: 1440px; gap: 18px; margin-bottom: 14px; }
.web-chat-config-card, .web-chat-preview-card, .web-chat-contacts-card { padding: 17px; }
.web-chat-config-card h2, .web-chat-preview-card h2, .web-chat-contacts-card h2 { margin: 2px 0 6px; font-size: 18px; }
.web-chat-config-form { display: grid; gap: 13px; margin-top: 15px; }
.web-chat-config-form label { display: grid; gap: 8px; font-size: 13px; font-weight: 750; }
.web-chat-config-form input[type="file"] { width: 100%; padding: 10px; border: 1px solid #d5e0ee; border-radius: 10px; background: #fbfdff; }
.web-chat-config-form small { color: #64748b; font-weight: 500; }
.web-chat-color-controls { display: flex; align-items: center; gap: 12px; }
.web-chat-color-controls input { width: 74px; height: 46px; padding: 3px; border: 1px solid #d5e0ee; border-radius: 10px; background: white; cursor: pointer; }
.web-chat-color-controls output { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; color: #334155; }
.web-chat-preview { --preview-color: #1267e5; overflow: hidden; min-height: 230px; margin-top: 14px; border: 1px solid #dce6f3; border-radius: 14px; background: #edf3fa; box-shadow: 0 10px 25px rgba(15, 35, 70, .1); }
.web-chat-preview header { display: grid; grid-template-columns: 36px 1fr auto; gap: 9px; align-items: center; padding: 11px 12px; color: white; background: var(--preview-color); background: linear-gradient(135deg, color-mix(in srgb, var(--preview-color) 52%, #081632), var(--preview-color)); }
.web-chat-preview header img { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; background: white; }
.web-chat-preview header span, .web-chat-preview header strong { display: block; }
.web-chat-preview header span { margin-bottom: 2px; color: rgba(255, 255, 255, .76); font-size: 11px; }
.web-chat-preview header i { width: 9px; height: 9px; border-radius: 50%; background: #37d987; box-shadow: 0 0 0 4px rgba(55, 217, 135, .18); }
.web-chat-preview-thread { display: grid; gap: 9px; padding: 15px 12px; }
.web-chat-preview-message { width: fit-content; max-width: 84%; padding: 9px 11px; border-radius: 13px 13px 13px 4px; font-size: 13px; color: #15213a; background: white; box-shadow: 0 5px 16px rgba(34, 65, 105, .08); }
.web-chat-preview-message.user { margin-left: auto; border-radius: 16px 16px 5px 16px; color: white; background: var(--preview-color); }
.web-chat-contacts-card { max-width: 1440px; }
.web-chat-contacts-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 11px; }
.web-chat-contacts-heading > span { padding: 6px 10px; border-radius: 999px; color: #0755bb; background: #eaf3ff; font-size: 12px; font-weight: 800; }
.web-chat-contacts-card .empty-state { margin: 0; padding: 32px 15px; color: #64748b; text-align: center; }
@media (max-width: 920px) { .web-chat-layout { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .web-chat-url-card { grid-template-columns: 1fr; padding: 16px; } .web-chat-url-control { grid-template-columns: 1fr; } .web-chat-copy-status { grid-column: 1; } .web-chat-config-card, .web-chat-preview-card, .web-chat-contacts-card { padding: 16px; } .web-chat-contacts-heading { align-items: start; } }
