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

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

.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-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-list-loading {
  font-size: 14px;
  color: #6b5a4f;
}

.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-remove-button {
  border: none;
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  background: #f7dfdc;
  color: #9a4f4b;
  font: inherit;
  font-weight: 600;
}

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

#agenda-list-controls,
#finance-controls,
#marketing-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid #eadfd5;
  border-radius: 18px;
  background: linear-gradient(135deg, #fffaf6, #f7efe8);
  box-shadow: 0 10px 24px rgba(155, 131, 124, 0.08);
}

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

#agenda-list-controls select,
#finance-controls select,
#marketing-controls select {
  border: 1px solid #dccfc4;
  border-radius: 999px;
  padding: 9px 14px;
  background: white;
  color: #6b5a4f;
  font: inherit;
  min-width: 130px;
  box-shadow: inset 0 1px 2px rgba(124, 92, 77, 0.06);
}

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

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

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

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