body {
  font-family: "Poppins", sans-serif;
  margin: 0;
  background: #f9f7f4;
  color: #2f241d;
}

.heading-font {
  font-family: "Crimson Pro", serif;
}

.tab-btn.active {
  background: linear-gradient(135deg, #9b837c, #b8a299);
  color: white;
}

.section {
  display: none;
}

.section.active {
  display: block;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-box {
  background: white;
  border-radius: 16px;
  padding: 24px;
  max-width: 560px;
  width: 92%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
}

.cal-cell {
  min-height: 50px;
  border: 1px solid #e5e7eb;
  padding: 4px;
  font-size: 12px;
}

.cal-cell.today {
  background: #fef3c7;
}

.cal-cell .appt {
  padding: 2px 4px;
  margin: 1px 0;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-left: 3px solid;
}

.status-pendiente {
  background: #fef3c7;
  border-left-color: #f59e0b;
}

.status-confirmada {
  background: #d1fae5;
  border-left-color: #10b981;
}

.status-en-curso {
  background: #dbeafe;
  border-left-color: #3b82f6;
}

.status-completada {
  background: #e5e4d1;
  border-left-color: #9b837c;
}

.status-cancelada {
  background: #fee2e2;
  border-left-color: #ef4444;
}

.status-cobrada {
  background: #f0fdf4;
  border-left-color: #16a34a;
}

.status-reprogramada {
  background: #e7eefb;
  color: #46628e;
}

.status-no-show {
  background: #f8dddd;
  color: #9f3f3f;
}

.client-search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.client-search-dropdown div {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 14px;
}

.client-search-dropdown div:hover {
  background: #f5f5f5;
}

.drag-over {
  background: #f0f9ff !important;
  border: 2px dashed #9b837c;
}

.crm-task-list {
  display: grid;
  gap: 10px;
}

.crm-stage-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.crm-stage-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  min-width: max-content;
  padding-bottom: 6px;
}

.crm-stage-column {
  width: 320px;
  flex: 0 0 320px;
}

.crm-task-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border: 1px solid #eadfd5;
  border-radius: 16px;
  background: #fffdfa;
}

.crm-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.crm-badge-danger {
  background: #fee2e2;
  color: #b42318;
}

.crm-badge-warning {
  background: #fef3c7;
  color: #9a6700;
}

.crm-badge-neutral {
  background: #f3f4f6;
  color: #6b7280;
}

.crm-badge-soft {
  background: #f6efe8;
  color: #7a645c;
}

.crm-inline-button {
  border: 1px solid #dccfc4;
  border-radius: 999px;
  padding: 7px 11px;
  background: white;
  color: #7b6259;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.crm-inline-icon-button {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.crm-card-actions {
  align-items: center;
}

.crm-lead-card {
  box-shadow: 0 8px 18px rgba(155, 131, 124, 0.06);
}

.crm-lead-note {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.crm-next-action-line {
  color: #6b5a4f;
  line-height: 1.4;
}

.crm-next-action-done {
  color: #2f855a;
  font-weight: 600;
}

.fin-tab.active {
  border-bottom: 2px solid #9b837c;
  color: #9b837c;
  font-weight: 600;
}

.metric-card {
  border-radius: 16px;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

#income-chart {
  cursor: crosshair;
  position: relative;
}

.chart-tooltip {
  position: fixed;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 12px;
  pointer-events: none;
  white-space: nowrap;
  z-index: 10;
  display: none;
}

.dashboard-hero {
  background-image:
    linear-gradient(90deg, rgba(34, 24, 20, 0.58), rgba(34, 24, 20, 0.18)),
    url("https://images.unsplash.com/photo-1515377905703-c4788e51af15?auto=format&fit=crop&w=1600&q=80");
  background-size: cover;
  background-position: center;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  background:
    radial-gradient(circle at top right, rgba(222, 193, 165, 0.5), transparent 20%),
    linear-gradient(180deg, #f8f3ed 0%, #f4ede4 100%);
}

.auth-grid {
  width: min(1100px, 100%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.auth-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #eadfd5;
  border-radius: 24px;
  box-shadow: 0 20px 40px rgba(92, 65, 51, 0.1);
  padding: 28px;
}

.auth-logo {
  width: 132px;
  height: auto;
  display: block;
  margin: 0 0 20px;
}

.auth-card h2,
.auth-card h3 {
  margin-top: 0;
}

.auth-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.auth-copy {
  color: #6b5a4f;
  line-height: 1.7;
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-form label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
}

.auth-form input {
  border: 1px solid #ddd2c8;
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
}

.auth-form button {
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(135deg, #9b837c, #b8a299);
  color: white;
}

.auth-secondary-button {
  border: 1px solid #dccfc4;
  border-radius: 999px;
  padding: 12px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  background: #fffaf6;
  color: #8b6f64;
}

.auth-secondary-button:hover {
  background: #f7efe8;
}

.auth-action-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.auth-inline-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.auth-link-button {
  border: none;
  background: transparent;
  color: #8b6f64;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 0;
}

.auth-link-button:hover {
  color: #6e574f;
}

.modal-cancel-button {
  flex: 1;
}

.access-list-wrap {
  display: grid;
  gap: 10px;
}

.access-admin-shell {
  align-items: flex-start;
}

.access-admin-page {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.access-admin-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 30px;
  border-radius: 28px;
  border: 1px solid #eadfd5;
  background: linear-gradient(135deg, #fffaf6, #f3ece6);
}

.access-admin-page-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

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

.access-summary-card {
  border: 1px solid #eadfd5;
  border-radius: 16px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #faf7f3, #f1ebe5);
}

.access-summary-label {
  margin: 0;
  font-size: 12px;
  color: #8b746b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.access-summary-value {
  margin: 6px 0 0;
  font-size: 28px;
  font-weight: 700;
  color: #5c473f;
}

.access-list-loading {
  font-size: 14px;
  color: #6b5a4f;
}

.access-admin-toolbar {
  display: grid;
  gap: 10px;
  padding: 22px 24px;
  border-radius: 24px;
  border: 1px solid #eadfd5;
  background: #fffdfb;
}

.access-admin-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.access-admin-form label {
  margin: 0;
}

.access-admin-table-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 26px;
  border-radius: 24px 24px 0 0;
  border: 1px solid #eadfd5;
  border-bottom: none;
  background: linear-gradient(135deg, #f8f2ec, #f1ebe6);
}

.access-admin-filters {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.access-admin-filter {
  display: grid;
  gap: 6px;
  min-width: 140px;
}

.access-admin-filter span {
  font-size: 12px;
  font-weight: 600;
  color: #7a645c;
}

.access-admin-filter input,
.access-admin-filter select {
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid #dbc7b6;
  background: rgba(255, 255, 255, 0.95);
  padding: 0 16px;
  color: #4d3d36;
  font: inherit;
}

.access-table-shell {
  border: 1px solid #eadfd5;
  border-radius: 0 0 24px 24px;
  background: #fffdfb;
  overflow: hidden;
}

.access-table-results {
  padding: 14px 18px 0;
  font-size: 13px;
  color: #8b746b;
}

.access-table-scroll {
  width: 100%;
  overflow-x: auto;
}

.access-admin-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.access-admin-table th,
.access-admin-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid #f0e5dc;
  vertical-align: top;
}

.access-admin-table th {
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8b746b;
  background: #fcf7f2;
}

.access-admin-table tbody tr:last-child td {
  border-bottom: none;
}

.access-admin-table tbody tr:hover {
  background: #fff8f2;
}

.access-cell-email {
  min-width: 220px;
}

.access-cell-primary {
  font-weight: 600;
  color: #4d3d36;
  overflow-wrap: anywhere;
}

.access-cell-secondary {
  margin-top: 4px;
  font-size: 12px;
  color: #8b746b;
  overflow-wrap: anywhere;
}

.access-cell-stack {
  display: grid;
  gap: 6px;
}

.access-cell-actions {
  white-space: nowrap;
}

.access-empty-state {
  padding: 24px 26px;
  border: 1px solid #eadfd5;
  border-top: none;
  border-radius: 0 0 24px 24px;
  background: #fffdfb;
}

.access-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #eadfd5;
  border-radius: 14px;
  padding: 12px 14px;
  background: #fffaf6;
}

.access-item-rich {
  align-items: flex-start;
}

.access-item-main {
  flex: 1;
  min-width: 0;
}

.access-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.access-email {
  font-weight: 600;
  color: #4d3d36;
  overflow-wrap: anywhere;
}

.access-source-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.access-source-manual {
  background: #f6efe8;
  color: #7a645c;
}

.access-source-stripe {
  background: #ede9fe;
  color: #5b4ab7;
}

.access-source-whop {
  background: #e8f7ef;
  color: #26744e;
}

.access-mode-permanent {
  background: #e7f4ea;
  color: #246a3d;
}

.access-mode-subscription {
  background: #e7eefc;
  color: #31538f;
}

.access-mode-trial {
  background: #fff0d9;
  color: #9a5b09;
}

.access-mode-expired {
  background: #f7dfdc;
  color: #9a4f4b;
}

.access-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 8px;
  font-size: 12px;
  color: #8b746b;
}

.access-item-note {
  margin: 8px 0 0;
  font-size: 13px;
  color: #6b5a4f;
}

.access-remove-button {
  border: none;
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  background: #f7dfdc;
  color: #9a4f4b;
  font: inherit;
  font-weight: 600;
}

@media (max-width: 768px) {
  .access-admin-page-head {
    padding: 22px 20px;
  }

  .access-admin-page-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .access-admin-summary {
    grid-template-columns: 1fr;
  }

  .access-admin-toolbar {
    padding: 18px;
  }

  .access-admin-form {
    grid-template-columns: 1fr;
  }

  .access-admin-table-head {
    padding: 20px 18px;
    border-radius: 20px 20px 0 0;
  }

  .access-admin-filters {
    width: 100%;
    justify-content: stretch;
  }

  .access-admin-filter {
    width: 100%;
  }

  .access-empty-state {
    padding: 20px 18px;
    border-radius: 0 0 20px 20px;
  }
}

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

.marketing-kpi-grid div {
  border: 1px solid #eee2d7;
  border-radius: 12px;
  padding: 10px 12px;
  background: white;
}

.marketing-kpi-grid span {
  display: block;
  font-size: 12px;
  color: #7a6b61;
  margin-bottom: 4px;
}

.marketing-kpi-grid strong {
  display: block;
  font-size: 15px;
}

.auth-feedback {
  min-height: 24px;
  margin: 8px 0 0;
  color: #8b5e4a;
  font-size: 14px;
}

.session-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 12px;
  font-weight: 600;
}

.session-note {
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
}

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

.session-action-button {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.14);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.session-action-button:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.filter-shell,
#agenda-list-controls,
#finance-controls,
#marketing-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding: 16px 18px;
  border: 1px solid #e7dbd1;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 28px rgba(155, 131, 124, 0.08);
}

.filter-shell label,
#agenda-list-controls label,
#finance-controls label,
#marketing-controls label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #6e574f;
  font-weight: 600;
}

.filter-shell select,
#agenda-list-controls select,
#finance-controls select,
#marketing-controls select {
  border: 1px solid #d9c8bb;
  border-radius: 999px;
  padding: 10px 16px;
  background: #fffaf6;
  color: #6b5a4f;
  font: inherit;
  min-width: 130px;
  box-shadow: inset 0 1px 2px rgba(124, 92, 77, 0.04);
}

.pager-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid #eadfd5;
  border-radius: 18px;
  background: #fffdfa;
}

.pager-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pager-button {
  border: 1px solid #dccfc4;
  border-radius: 999px;
  padding: 8px 14px;
  background: white;
  color: #7b6259;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.pager-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pager-status {
  font-size: 13px;
  color: #7a6b61;
}

.pager-size {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #6e574f;
  font-weight: 600;
}

.pager-size select {
  border: 1px solid #dccfc4;
  border-radius: 999px;
  padding: 8px 14px;
  background: white;
  color: #6b5a4f;
  font: inherit;
}

.finance-kpi-card {
  box-shadow: 0 10px 24px rgba(155, 131, 124, 0.08);
}

.finance-kpi-income {
  background: #f0fdf4;
  border-color: #b9dec2;
  color: #2d6a3e;
}

.finance-kpi-expense {
  background: #fef2f2;
  border-color: #efc9c9;
  color: #9a3d3d;
}

.finance-kpi-balance {
  background: #faf7f3;
  border-color: #e2d4c8;
  color: #7e665e;
}

.finance-panel-intro,
.section-card.finance-hero-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding: 18px 20px;
  border: 1px solid #eadfd5;
  border-radius: 18px;
  background: linear-gradient(135deg, #f9f7f4, #ede8e3);
}

.section-card {
  padding: 18px 20px;
  border: 1px solid #eadfd5;
  border-radius: 18px;
  background: linear-gradient(135deg, #f9f7f4, #ede8e3);
  box-shadow: 0 10px 22px rgba(155, 131, 124, 0.06);
}

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

.finance-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: capitalize;
}

.marketing-calendar-toolbar {
  align-items: center;
}

.marketing-week-shell {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

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

.marketing-week-day {
  border: 1px solid #eadfd5;
  border-radius: 18px;
  background: #fffdfa;
  min-height: 260px;
  display: flex;
  flex-direction: column;
}

.marketing-week-day-head {
  padding: 14px 14px 10px;
  border-bottom: 1px solid #f0e6de;
}

.marketing-week-day-name {
  font-size: 13px;
  font-weight: 700;
  color: #7a645c;
  text-transform: capitalize;
}

.marketing-week-day-date {
  font-size: 12px;
  color: #aa948b;
  margin-top: 2px;
}

.marketing-week-day-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  flex: 1;
}

.marketing-week-empty {
  border: 1px dashed #ddcfc4;
  border-radius: 14px;
  padding: 16px 12px;
  text-align: center;
  font-size: 12px;
  color: #a28e85;
  background: rgba(249, 246, 242, 0.9);
}

.marketing-content-card {
  width: 100%;
  text-align: left;
  padding: 12px;
  border: 1px solid #eadfd5;
  border-radius: 16px;
  background: white;
  box-shadow: 0 8px 18px rgba(155, 131, 124, 0.06);
}

.marketing-content-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.marketing-mini-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: #f6efe8;
  color: #7a645c;
  font-size: 11px;
  font-weight: 600;
}

@media (max-width: 768px) {
  .marketing-week-grid {
    min-width: 980px;
  }
}

.finance-type-badge.is-income {
  background: #ecfdf3;
  color: #2d6a3e;
}

.finance-type-badge.is-expense {
  background: #fff1f1;
  color: #b24141;
}

.budget-input {
  width: 100%;
  border: 1px solid #ddd2c8;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  background: #fffdfb;
}

.finance-annual-table thead tr:first-child {
  background: linear-gradient(135deg, #faf3ec, #f5ebe2);
}

.finance-annual-group th {
  font-size: 13px;
  font-weight: 700;
  color: #6e574f;
}

.finance-big-number {
  font-size: 2rem;
  line-height: 1.05;
}

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

.icon-action-button {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid #eadfd5;
  background: #fffaf6;
  color: #8b6f64;
  cursor: pointer;
}

.icon-action-button.is-danger {
  border-color: #f2d3d3;
  background: #fff4f4;
  color: #b24141;
}

.appt-access-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
}

.appt-access-badge-package {
  background: #f7e7c2;
  color: #8c6228;
}

.appt-access-badge-membership {
  background: #dceefc;
  color: #2b6892;
}

.crm-activity-item {
  border: 1px solid #eee4dc;
  border-radius: 12px;
  padding: 10px 12px;
  background: #faf9f7;
}

.crm-client-match {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 11px 13px;
  border: 1px solid #e7ddd5;
  border-radius: 12px;
  background: #faf9f7;
  color: #6b5a4f;
  font-size: 13px;
  line-height: 1.4;
}

.crm-client-match-warning {
  border-color: #edc77f;
  background: #fff8e9;
  color: #805d1e;
}

.crm-client-match-linked {
  border-color: #a9d9ba;
  background: #eefaf2;
  color: #276943;
}

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

@media (max-width: 639px) {
  .crm-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.business-week-grid {
  display: grid;
  gap: 8px;
}

.business-week-row {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) 120px 120px;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid #eee4dc;
  border-radius: 12px;
  background: #faf9f7;
}

.business-week-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}

.pricing-v2-section {
  margin-top: 20px;
  padding: 20px;
  border: 1px solid #eadfd5;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(83, 58, 48, 0.05);
}

.pricing-v2-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.pricing-v2-heading > span {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #9b837c;
  color: #fff;
  font-weight: 700;
}

.pricing-v2-heading h4 {
  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: 700;
}

.pricing-v2-heading p,
.pricing-v2-field small {
  color: #786a64;
  font-size: 12px;
}

.pricing-v2-input-grid,
.pricing-v2-kpis,
.pricing-v2-cost-grid,
.pricing-v2-result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.pricing-v2-field,
.pricing-v2-cost-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}

.pricing-v2-field input,
.pricing-v2-cost-grid input {
  width: 100%;
  border: 1px solid #dfd4cd;
  border-radius: 10px;
  padding: 9px 11px;
  font-weight: 400;
}

.pricing-v2-kpis {
  margin-top: 16px;
}

.pricing-v2-kpis > div,
.pricing-v2-result-grid > div {
  display: flex;
  flex-direction: column;
  padding: 14px;
  border-radius: 12px;
  background: #faf7f3;
}

.pricing-v2-kpis strong,
.pricing-v2-result-grid strong {
  font-size: 20px;
  color: #6e574f;
}

.pricing-v2-kpis span,
.pricing-v2-result-grid span,
.pricing-v2-kpis small {
  font-size: 12px;
  color: #786a64;
}

.pricing-v2-warning {
  margin-top: 14px;
  padding: 11px 13px;
  border-radius: 10px;
  background: #fff7ed;
  color: #9a5d17;
  font-size: 13px;
}

.pricing-v2-warning.is-danger {
  background: #fff1f1;
  color: #a43d3d;
}

.pricing-v2-warning.is-success {
  background: #effaf2;
  color: #39734b;
}

.pricing-v2-service-list {
  display: grid;
  gap: 16px;
}

.pricing-v2-service-card {
  border: 1px solid #eadfd5;
  border-radius: 14px;
  padding: 16px;
  background: #fcfaf8;
}

.pricing-v2-service-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.pricing-v2-service-title h5 {
  font-weight: 700;
}

.pricing-v2-service-title p,
.pricing-v2-service-title > span {
  color: #786a64;
  font-size: 12px;
}
.pricing-v2-subheading { display: flex; flex-direction: column; gap: 2px; margin: 14px 0 8px; color: #5f4941; }
.pricing-v2-subheading small { color: #8d7d76; font-size: 11px; }

.pricing-v2-cost-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pricing-v2-result-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 14px;
}

.pricing-v2-apply {
  margin-top: 14px;
  padding: 9px 14px;
  border-radius: 10px;
  background: #9b837c;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.pricing-v2-apply:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.appointment-detail-summary {
  display: grid;
  gap: 5px;
}

.appointment-payment-summary {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 14px;
  border-radius: 14px;
  background: #f9f7f4;
}

.appointment-payment-summary > div {
  display: flex;
  flex-direction: column;
}

.appointment-payment-summary span {
  font-size: 11px;
  color: #786a64;
}

.appointment-payment-summary strong {
  font-size: 16px;
}

.appointment-payment-status {
  grid-column: 1 / -1;
  justify-self: start;
  padding: 4px 9px;
  border-radius: 999px;
  font-weight: 700;
  text-transform: capitalize;
}

.payment-status-paid { background: #dff5e5; color: #347148 !important; }
.payment-status-partial { background: #fff0c9; color: #8d681d !important; }
.payment-status-pending { background: #eee9e5; color: #6f625d !important; }

.appointment-history-panel {
  max-height: 190px;
  overflow-y: auto;
  padding: 12px;
  border: 1px solid #eadfd5;
  border-radius: 12px;
}

.appointment-history-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 0;
  border-bottom: 1px solid #eee5df;
  font-size: 12px;
}

.appointment-history-item:last-child { border-bottom: 0; }
.appointment-history-item small { color: #8c7c75; }

.table-scroll-shell {
  display: block;
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  overscroll-behavior-x: contain;
}

.scroll-wide-surface,
.scroll-wide-table {
  width: 100%;
}

@media (max-width: 900px) {
  .auth-grid {
    grid-template-columns: 1fr;
  }

  .marketing-kpi-grid {
    grid-template-columns: 1fr;
  }

  .pager-shell {
    align-items: stretch;
  }

  .finance-panel-intro,
  .section-card.finance-hero-card,
  .filter-shell {
    flex-direction: column;
    align-items: stretch;
  }

  .finance-inline-actions {
    width: 100%;
    justify-content: stretch;
  }

  .pricing-config-grid {
    grid-template-columns: 1fr;
  }

  .space-y-3 > .pricing-item-row,
  .pricing-item-row {
    grid-template-columns: minmax(0, 1fr) 84px 34px !important;
  }

  .pricing-item-label {
    font-size: 12px;
  }

  #agenda-list-controls label,
  #finance-controls label,
  #marketing-controls label,
  .filter-shell label {
    width: 100%;
    justify-content: space-between;
  }

  .budget-input {
    min-width: 120px;
  }

  .finance-big-number {
    font-size: 1.6rem;
  }

  .table-scroll-shell table,
  .table-scroll-shell > div {
    max-width: none;
  }

  .scroll-wide-surface,
  .scroll-wide-table {
    width: max-content;
  }

  .business-week-row {
    grid-template-columns: 1fr 1fr;
  }

  .business-week-toggle {
    grid-column: 1 / -1;
  }

  .pricing-v2-section {
    padding: 15px;
  }

  .pricing-v2-input-grid,
  .pricing-v2-kpis,
  .pricing-v2-cost-grid,
  .pricing-v2-result-grid {
    grid-template-columns: 1fr;
  }

  .appointment-payment-summary {
    grid-template-columns: 1fr 1fr;
  }
}

.phase3-stack { display: grid; gap: 18px; }
.phase3-toolbar, .phase3-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.phase3-toolbar, .phase3-card, .phase3-acquisition { border: 1px solid #eadfd5; border-radius: 18px; padding: 18px; background: #fff; box-shadow: 0 8px 24px rgba(83, 58, 48, .05); }
.phase3-toolbar p, .phase3-card-head p, .phase3-acquisition p { color: #786a64; font-size: 12px; }
.phase3-card h3, .phase3-acquisition h3 { font-family: Georgia, serif; font-size: 18px; font-weight: 700; }
.phase3-select, .phase3-form-grid input, .phase3-form-grid select, .phase3-card input, .phase3-card select, .phase3-card textarea, #modal-root form input:not([type="checkbox"]), #modal-root form select, #modal-root form textarea { width: 100%; border: 1px solid #dfd4cd; border-radius: 10px; padding: 9px 11px; background: #fff; }
.phase3-metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.phase3-metric { display: flex; flex-direction: column; padding: 15px; border-radius: 14px; background: linear-gradient(135deg, #faf4ee, #f6eee7); border: 1px solid #eadfd5; }
.phase3-metric span, .phase3-plan-grid span { color: #786a64; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.phase3-metric strong { color: #5f4941; font-size: 21px; }
.phase3-metric small { color: #947f76; font-size: 11px; }
.phase3-two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.phase3-button { display: inline-flex; align-items: center; justify-content: center; padding: 9px 13px; border-radius: 10px; background: #9b837c; color: #fff; font-size: 12px; font-weight: 700; white-space: nowrap; }
.phase3-button.secondary { background: #f6eee8; color: #765f57; border: 1px solid #ddcfc4; }
.phase3-link { margin-top: 10px; color: #8b6f64; text-decoration: underline; font-size: 12px; }
.phase3-badge { display: inline-flex; width: fit-content; border-radius: 999px; padding: 4px 8px; background: #f2e9e2; color: #765f57; font-size: 11px; font-style: normal; text-transform: capitalize; }
.goal-row { display: grid; grid-template-columns: 1fr auto; gap: 5px; margin-top: 12px; font-size: 12px; }
.goal-row > div { grid-column: 1 / -1; height: 7px; overflow: hidden; border-radius: 999px; background: #eee6df; }
.goal-row i { display: block; height: 100%; border-radius: inherit; background: #72ad7f; }
.attention-line { padding: 8px 0; border-bottom: 1px solid #eee5df; }
.phase3-table-shell { overflow-x: auto; margin-top: 12px; }
.phase3-table-shell table { min-width: 650px; width: 100%; font-size: 12px; }
.phase3-table-shell th, .phase3-table-shell td { padding: 9px; text-align: left; border-bottom: 1px solid #eee5df; }
.phase3-plan-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.phase3-plan-grid > div { display: flex; flex-direction: column; padding: 12px; border-radius: 12px; background: #faf7f3; }
.phase3-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
#modal-root form label { display: block; margin-bottom: 11px; font-size: 13px; font-weight: 600; }
#modal-root form label input:not([type="checkbox"]), #modal-root form label select, #modal-root form label textarea { display: block; margin-top: 5px; font-weight: 400; }
.phase3-modal-actions { display: flex; gap: 9px; margin-top: 16px; }
.phase3-modal-actions > button { padding: 9px 14px; border-radius: 10px; border: 1px solid #dfd4cd; }
.phase3-modal-actions .phase3-button { border: 0; }
.phase3-template-list { display: grid; gap: 10px; max-height: 58vh; overflow-y: auto; padding-right: 5px; }
.phase3-template-list textarea { min-height: 85px; }
.phase3-policy-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.phase3-policy-list span { padding: 6px 9px; border-radius: 999px; background: #f6eee8; font-size: 11px; }
.phase3-policy-list p { flex-basis: 100%; }
.phase3-mini-list { display: grid; gap: 6px; margin-top: 12px; }
.phase3-mini-list p { padding: 7px 9px; border-radius: 9px; background: #faf7f3; font-size: 11px; }
.phase3-mini-list span { margin-right: 5px; color: #765f57; font-weight: 700; text-transform: capitalize; }
.phase3-mini-list p { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.phase3-mini-list p button { margin-left: auto; color: #8b6f64; font-weight: 700; text-decoration: underline; }
.crm-source-other-hidden { display: none !important; }
.invoice-status-pendiente, .invoice-status-pago-parcial, .invoice-status-pagada { display: inline-flex; border-radius: 999px; padding: 4px 8px; font-size: 11px; font-weight: 700; }
.invoice-status-pendiente { background: #f8e3df; color: #9e5146; }
.invoice-status-pago-parcial { background: #f7eacb; color: #8a6a26; }
.invoice-status-pagada { background: #dff1e5; color: #39754b; }
.retention-list { display: grid; gap: 8px; margin-top: 12px; }
.retention-list button { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; width: 100%; padding: 11px; border: 1px solid #eee5df; border-radius: 12px; text-align: left; }
.retention-list button span { display: flex; flex-direction: column; }
.retention-list button small, .retention-list button em { color: #8c7c75; font-size: 11px; font-style: normal; }

@media (max-width: 900px) {
  .phase3-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .phase3-two-col { grid-template-columns: 1fr; }
  .phase3-plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .phase3-toolbar, .phase3-card-head { flex-direction: column; }
  .phase3-toolbar .phase3-select, .phase3-card-head .phase3-button { width: 100%; }
  .phase3-metric-grid, .phase3-form-grid { grid-template-columns: 1fr; }
  .retention-list button { grid-template-columns: minmax(0, 1fr) auto; }
  .retention-list button em { grid-column: 1 / -1; }
}
