/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS and SCSS file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */

:root {
  --app-accent: #1f7a8c;
  --app-accent-strong: #0f4c5c;
  --app-warm: #b45f06;
  --app-soft: #f6f8fb;
}

[data-bs-theme="dark"] {
  --app-accent: #43b0c9;
  --app-accent-strong: #7ac7d8;
  --app-warm: #f0a84b;
  --app-soft: #151a21;
}

.app-body {
  background: var(--app-soft);
  min-height: 100vh;
}

.app-navbar {
  background: var(--bs-body-bg);
}

.page-title {
  color: var(--app-accent-strong);
}

.status-pill {
  border: 1px solid color-mix(in srgb, var(--app-accent) 55%, transparent);
  color: var(--app-accent-strong);
}

.table-card,
.form-panel,
.detail-panel {
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 8px;
}

.money {
  color: var(--app-warm);
}

.email-row + .email-row {
  margin-top: .5rem;
}

.table > tbody > tr.lead-row-confirmed > * {
  background-color: #dff3e4;
  color: #17492a;
}

.table > tbody > tr.lead-row-waiting > * {
  background-color: #fff1df;
  color: #8a4b08;
}

.table > tbody > tr.lead-row-lost > * {
  background-color: #f8dddd;
  color: #6f1d1b;
}

.table > tbody > tr.lead-row-confirmed a,
.table > tbody > tr.lead-row-confirmed .money {
  color: #0f3f24;
}

.table > tbody > tr.lead-row-waiting a,
.table > tbody > tr.lead-row-waiting .money {
  color: #7a4307;
}

.table > tbody > tr.lead-row-lost a,
.table > tbody > tr.lead-row-lost .money {
  color: #5f1615;
}

.table > tbody > tr.lead-row-confirmed .status-pill {
  background-color: #c6ead0;
  border-color: #4b9662;
  color: #17492a;
}

.table > tbody > tr.lead-row-waiting .status-pill {
  background-color: #ffd9ad;
  border-color: #d28b36;
  color: #8a4b08;
}

.table > tbody > tr.lead-row-lost .status-pill {
  background-color: #f2c4c4;
  border-color: #bc6262;
  color: #6f1d1b;
}

[data-bs-theme="dark"] .table > tbody > tr.lead-row-confirmed > * {
  background-color: #203c2a;
  color: #d8f4df;
}

[data-bs-theme="dark"] .table > tbody > tr.lead-row-waiting > * {
  background-color: #4d3418;
  color: #ffe2b7;
}

[data-bs-theme="dark"] .table > tbody > tr.lead-row-lost > * {
  background-color: #452627;
  color: #f7dada;
}

[data-bs-theme="dark"] .table > tbody > tr.lead-row-confirmed a,
[data-bs-theme="dark"] .table > tbody > tr.lead-row-confirmed .money {
  color: #bdebc8;
}

[data-bs-theme="dark"] .table > tbody > tr.lead-row-waiting a,
[data-bs-theme="dark"] .table > tbody > tr.lead-row-waiting .money {
  color: #ffd39b;
}

[data-bs-theme="dark"] .table > tbody > tr.lead-row-lost a,
[data-bs-theme="dark"] .table > tbody > tr.lead-row-lost .money {
  color: #f0bcbc;
}

[data-bs-theme="dark"] .table > tbody > tr.lead-row-confirmed .status-pill {
  background-color: #294f37;
  border-color: #79c58d;
  color: #d8f4df;
}

[data-bs-theme="dark"] .table > tbody > tr.lead-row-waiting .status-pill {
  background-color: #70491f;
  border-color: #f0b25f;
  color: #ffe2b7;
}

[data-bs-theme="dark"] .table > tbody > tr.lead-row-lost .status-pill {
  background-color: #5a3032;
  border-color: #dd8e8e;
  color: #f7dada;
}

/* Bootstrap no adapta .table-danger al tema oscuro (el fondo se queda fijo
   en rosa claro); sin esto, el texto claro del tema oscuro queda casi
   ilegible encima (taquillas offline en /taquillas). Mismo tono que
   lead-row-lost, por coherencia. */
[data-bs-theme="dark"] .table-danger {
  --bs-table-bg: #452627;
  --bs-table-color: #f7dada;
  --bs-table-border-color: #6f3a3c;
}

[data-bs-theme="dark"] .table-danger a,
[data-bs-theme="dark"] .table-danger .text-body-secondary {
  color: #f0bcbc;
}

.lead-section-tabs .nav-link {
  color: var(--app-accent-strong);
}

.lead-section-tabs .nav-link.active {
  font-weight: 600;
}

.lead-history-toggle {
  color: inherit;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.lead-history-toggle:hover,
.lead-history-toggle:focus {
  color: inherit;
  text-decoration: underline;
}

.lead-history-panel {
  background: var(--bs-body-bg);
  border-top: 1px solid var(--bs-border-color);
  border-bottom: 1px solid var(--bs-border-color);
}

.lead-management-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.lead-management-form {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.lead-management-top-fields {
  flex: 0 0 auto;
}

.lead-management-action {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.lead-management-action-input {
  flex: 1 1 auto;
  min-height: 10rem;
}

.statistics-range-tabs .nav-link {
  border: 1px solid var(--bs-border-color);
  color: var(--app-accent-strong);
}

.statistics-range-tabs .nav-link.active {
  background: var(--app-accent);
  border-color: var(--app-accent);
  color: #fff;
}

.stats-card {
  background: linear-gradient(180deg, color-mix(in srgb, var(--bs-body-bg) 92%, var(--app-soft)), var(--bs-body-bg));
  border: 1px solid var(--bs-border-color);
  border-radius: 12px;
  padding: 1rem 1.1rem;
}

.stats-label {
  color: var(--bs-secondary-color);
  font-size: .85rem;
  margin-bottom: .45rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.stats-value {
  color: var(--app-accent-strong);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.1;
}

/* Botones de la barra que son solo un icono (notificaciones, tema). */
.nav-icon-button {
  line-height: 1.2;
  padding: .2rem .5rem;
  font-size: 1rem;
}

/* Campos secundarios plegados (alta de incidencias y llamadas del SAT). */
.incident-more > summary {
  cursor: pointer;
  color: var(--app-accent-strong);
  font-weight: 600;
  list-style: none;
  padding: .35rem 0;
}

.incident-more > summary::-webkit-details-marker { display: none; }

.incident-more > summary::before {
  content: "▸ ";
  display: inline-block;
  transition: transform .15s ease;
}

.incident-more[open] > summary::before { content: "▾ "; }

.incident-more > summary:hover { text-decoration: underline; }
