/* =============================
   Bugambilias — Tropical Sorbet (stable)
   Clean, flat CSS (no nesting)
   ============================= */
:root{
  /* Brand palette */
  --brand-ink:#69504A;   /* taupe */
  --brand-sun:#ECDB70;   /* sun   */
  --brand-ivory:#F4F3E6; /* ivory */
  --brand-peach:#F6ABA1; /* salmon*/
  --brand-coral:#EC6B57; /* coral */

  /* Aliases (sorbet*) used by some blocks */
  --sorbet-ink:var(--brand-ink);
  --sorbet-cream:var(--brand-ivory);
  --sorbet-peach:var(--brand-peach);
  --sorbet-coral:var(--brand-coral);
  --sorbet-soft:rgba(246,171,161,.75);

  /* Surfaces/typography */
  --text:#2b2b2b;
  --muted:#666;
  --surface:#ffffff;
  --surface-2:#FAF8F6;
  --border:#E8E4DF;
  --radius:12px;
  --shadow:0 12px 26px rgba(0,0,0,.08);
}

/* ===== Base ===== */
html,body{height:100%}
body{
  margin:0;
  color:var(--text);
  line-height:1.6;
  /* Fuente base: Open Sans */
  font-family:"Open Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji", sans-serif;
  background:
    radial-gradient(1100px 500px at 85% -15%, rgba(246,171,161,.18), transparent 60%),
    radial-gradient(900px 600px at -10% 20%, rgba(236,219,112,.12), transparent 55%),
    var(--brand-ivory);
}

/* Titulares: Montserrat 700 */
h1,h2,h3{ font-family:"Montserrat", system-ui, sans-serif; font-weight:700; color:var(--brand-ink); letter-spacing:.2px; margin:0 0 .75rem 0; }
/* Acento/subtítulos: Playfair Display 600 (incluye option italic en elementos que lo usen) */
.subtitle, h4, blockquote{ font-family:"Playfair Display", Georgia, serif; font-weight:600; color:var(--brand-ink) }

.main-container{ max-width:1100px; margin:0 auto; padding:24px 16px; }
.page-padding{ padding:24px; }

/* ===== Cards / tables ===== */
.card{ background:#fff; border:1px solid var(--border); border-radius:16px; padding:18px; box-shadow:var(--shadow); margin-bottom:18px; }
.card.cal-card{ padding:24px 26px 26px; position:relative; overflow:hidden; }
.card.cal-card::before{ content:""; position:absolute; inset:0; background:linear-gradient(145deg, rgba(236,107,87,.07), rgba(246,171,161,.05) 40%, rgba(236,219,112,.05)); pointer-events:none; }

/* legacy .table kept; new unified .tbl below */
.table{ width:100%; border-collapse:collapse; border:1px solid var(--border); background:#fff; border-radius:14px; overflow:hidden }
.table th,.table td, table th, table td{ padding:12px 14px; border-bottom:1px solid var(--border) }
.table thead th, thead th{ background:var(--surface-2); color:var(--brand-ink); text-align:left; font-weight:700 }

/* === Unified tables === */
.tbl{ width:100%; border-collapse:separate; border-spacing:0; table-layout:auto; background:#fff; border:1px solid var(--brand-border,#e6e0d8); border-radius:14px; overflow:visible; position:relative }
.tbl thead th{ font-weight:700; text-align:left; padding:12px 14px; background:var(--surface-2); color:var(--brand-ink); }
.tbl tbody td{ padding:12px 14px; vertical-align:middle; border-top:1px solid var(--brand-border,#e6e0d8); }
.row-actions form{ display:inline; margin:0; }
@media (min-width: 841px){ .table-wrap > .tbl{ width: max-content; min-width: 100%; } }
.cell-wrap{ max-width:100%; }
.cell-wrap__title{ display:flex; flex-wrap:wrap; gap:6px; align-items:baseline; }
.cell-main{ font-weight:700; }
.cell-sub{ color: var(--brand-muted, var(--ui-muted, #6f6a64)); font-size:.92rem; word-break:break-word; }
.ta-right{ text-align:right; }
.svc-popwrap{ position: relative; }
.svc-pop-btn{ all: unset; cursor: pointer; }
.svc-pop-btn .cell-main{ text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; }
.svc-more-btn{ all:unset; cursor:pointer; color:#5f5348; padding:2px 6px; border-radius:8px; }
.svc-more-btn:hover{ background:#f0ece7; }
.svc-popover{ position:absolute; top: 100%; left: 0; margin-top: 6px; background:#fff; border:1px solid var(--brand-border,#e6e0d8); border-radius:12px; box-shadow:0 10px 24px rgba(0,0,0,.12); padding:8px; display:flex; flex-direction:column; gap:6px; min-width: 180px; z-index: 20; }
.svc-popover[aria-hidden="true"]{ display:none; }
.svc-popover.is-right{ left:auto; right:0; }
.svc-popover .btn{ padding:.4rem .65rem; border-radius:10px; width:100%; justify-content:flex-start; }

/* Chips (categories/status) */
.chip{ display:inline-block; padding:4px 10px; border-radius:999px; background:#f6f2ee; border:1px solid var(--brand-border,#e6e0d8); font-size:.88rem; }
.chip{ font-family:"Playfair Display", Georgia, serif; font-weight:600; }
.chip--ok{ background:#e7f6ed; border-color:#cfe9da; }
.chip--warn{ background:#fff5e5; border-color:#ffe3b8; }
.chip--muted{ background:#f5f3f0; border-color:#e6e0d8; }

/* Autocomplete results for proveedores */
.prov-results{ margin-top:6px; border:1px solid var(--brand-border,#e6e0d8); border-radius:12px; background:#fff; box-shadow:0 8px 20px rgba(0,0,0,.08); overflow:hidden; }
.prov-results button{ width:100%; text-align:left; padding:10px 12px; border:0; background:#fff; cursor:pointer; }
.prov-results button:hover{ background:#f6f4f1; }
.cat-results{ margin-top:6px; border:1px solid var(--brand-border,#e6e0d8); border-radius:12px; background:#fff; box-shadow:0 8px 20px rgba(0,0,0,.08); overflow:hidden; }
.cat-results button{ width:100%; text-align:left; padding:10px 12px; border:0; background:#fff; cursor:pointer; }
.cat-results button:hover{ background:#f6f4f1; }
.chips{ display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; }
.chips .chip input[type="checkbox"]{ accent-color: var(--brand-primary, #6a7d4d); }
.chip__x{ background:transparent; border:0; cursor:pointer; font-weight:700; line-height:1; }

/* Responsive cards for rows */
@media (max-width: 840px){
  .tbl thead{ display:none; }
  .tbl tbody tr{ display:block; padding:12px 10px; border:1px solid var(--brand-border,#e6e0d8); border-radius:12px; margin-bottom:10px; background:#fff; }
  .tbl tbody td{ display:flex; justify-content:space-between; gap:10px; padding:8px 0; border:0; }
  .tbl tbody td::before{ content: attr(data-label); font-weight:600; color: var(--brand-muted, var(--ui-muted, #6f6a64)); }
  .ta-right{ text-align:left; }
}

/* Dashboard two-column grid responsive adjustments */
.two-col-grid{ display:grid; grid-template-columns: 1.2fr 1fr; gap:18px; align-items:start; }
@media (max-width: 920px){
  .two-col-grid{ grid-template-columns: 1fr; }
  .two-col-grid > .card{ width:100%; box-sizing:border-box; }
  .card.cal-card{ padding:16px; }
  .qcal{ --day-size:36px; }
}
@media (max-width: 480px){
  .two-col-grid{ gap:12px; }
  .qcal{ --day-size:30px; }
  .cal-legend{ font-size:11px; gap:6px; }
  .cal-card { padding:12px; }
}

/* Make the Upcoming list compact and scrollable on small screens so it doesn't push other modules out */
@media (max-width: 920px) {
  .upcoming-wrap { max-height: 46vh; overflow: auto; padding-right: 6px; }
  .upcoming-wrap .tbl { margin-bottom: 0; }
  .upcoming-wrap .tbl tbody tr { margin-bottom: 8px; }
}

/* Inbox should be visible and scrollable on mobile */
#inbox-list { display:flex; flex-direction:column; gap:8px; }
@media (max-width: 920px) {
  #inbox-list { max-height: 36vh; overflow:auto; padding-right:6px; }
  #inbox-list .card { margin-bottom: 8px; }
}

/* Make finance canvas responsive */
#fin-chart-mini { width: 100% !important; height: auto !important; max-height: 140px; }

/* Ensure cards take full width and don't get clipped */
@media (max-width: 920px) {
  .card { width: 100%; box-sizing: border-box; }
  .card.cal-card { overflow: visible; }
}

/* ===== Buttons ===== */
.btn{
  display:inline-flex; align-items:center; gap:.5rem;
  padding:.6rem .95rem; border-radius:12px; border:1px solid transparent;
  cursor:pointer; text-decoration:none; font-weight:600; transition:transform .06s ease, box-shadow .18s ease, background .18s ease;
  /* Botones principales: Montserrat */
  font-family:"Montserrat", system-ui, sans-serif; color:inherit; background:transparent;
}
.btn, .fc .fc-button{ min-height:40px; }
.btn--sm{ min-height:32px; padding:.35rem .65rem; font-size:.9rem; border-radius:10px; }
.btn-lg{ padding:.75rem 1.15rem; font-size:.95rem; }
.btn:hover{ transform:translateY(-1px) }
.btn:active{ transform:translateY(0) }
.btn-primary{ color:#fff; background:linear-gradient(140deg, var(--brand-coral), var(--brand-peach)); box-shadow:0 8px 22px rgba(236,107,87,.25); }
.btn-secondary{ color:var(--brand-ink); background:var(--brand-ivory); border-color:#e7e0d8 }
.btn-ghost{ background:transparent; border-color:var(--border); color:var(--brand-ink) }
.btn-gradient{ color:#fff; background:linear-gradient(135deg, var(--sorbet-coral), var(--sorbet-peach)); box-shadow:0 10px 24px rgba(236,107,87,.25); }
/* Aliases / new naming style (double dash) */
.btn--ghost{ background:#f6f2ee; border:1px solid var(--btn-neutral-br,#e7ded6); color:#2c2a28; }
.btn--ghost:hover{ background:#efe9e3; }
.btn--accent{ background: var(--btn-accent,#6a7d4d); color:#fff; border:1px solid var(--btn-accent,#6a7d4d); box-shadow:0 6px 18px rgba(0,0,0,.08); }
.btn--accent:hover{ background: var(--btn-accent-hover,#5c7043); }

/* Optional grain overlay for .btn-primary/.bg-sorbet */
.btn-primary.has-grain, .bg-sorbet{ position:relative; overflow:hidden; }
.btn-primary.has-grain::before, .bg-sorbet::before{
  content:""; position:absolute; inset:0; pointer-events:none; opacity:.15;
  background-image: radial-gradient(rgba(0,0,0,.15) 1px, transparent 1px); background-size:3px 3px; mix-blend-mode:multiply; border-radius:inherit;
}

/* ===== Sidebar fija ===== */
.sb{
  position: fixed;
  inset: 0 auto 0 0; /* top:0; left:0; bottom:0 */
  width: 280px; max-width: 86vw;
  transform: translateX(-100%);
  transition: transform .24s ease;
  background: #fff;
  box-shadow: 8px 0 24px rgba(0,0,0,.08);
  z-index: 4000; /* por encima de FullCalendar */
  overflow:auto;
}
.sb.is-open{ transform: translateX(0); }
.sb-inner{ display:flex; flex-direction:column; height:100%; padding:10px 6px; }
.sb-header{ display:flex; align-items:center; gap:.5rem; padding:8px 12px 12px; cursor:pointer; }
.sb-logo{ width:28px; height:28px; object-fit:contain; }
.sb-brand{ font-weight:700; color:var(--brand-ink); }
.sb-nav{ display:flex; flex-direction:column; padding:10px 6px; gap:4px; }
/* (top nav removed) */

/* Evitar que el main salte */
.main-container{ position:relative; z-index:0; padding: 2rem; padding-right: 2rem; background:var(--sorbet-cream); min-height:100vh; box-sizing:border-box; }

/* Chips select component */
.chips-select { position: relative; }
.chips-select__control { display:flex; align-items:center; justify-content:space-between; gap:8px; border:1px solid #e0e0e0; border-radius:8px; padding:6px 8px; background:#fff; cursor:pointer; min-height:42px; }
.chips-select__chips { display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
.chips-select__toggle { background:#f7f7f5; border:1px solid #e0e0e0; border-radius:6px; padding:4px 8px; color:#333; cursor:pointer; }
.chips-select__menu { position:absolute; z-index:20; top:100%; left:0; right:0; background:#fff; border:1px solid #e0e0e0; border-radius:8px; margin-top:6px; padding:8px; max-height:260px; overflow:auto; box-shadow:0 6px 24px rgba(0,0,0,0.08); }
.chips-select__menu ul { list-style:none; margin:0; padding:0; }
.chips-option { padding:6px 4px; }
.chips-option label { display:flex; align-items:center; gap:10px; cursor:pointer; }
.chips-option input[type="checkbox"] { width:20px; height:20px; }
/* ===== Overlay con blur ===== */
.chip { display:inline-flex; align-items:center; gap:6px; padding:4px 8px; background:#f5efe7; color:#4b3f2f; border:1px solid #e6dac8; border-radius:16px; font-size:12px; line-height:1; }
.chip--placeholder { background:transparent; color:#888; border:0; }
.chip__remove { border:0; background:transparent; color:#7a6a55; cursor:pointer; font-size:14px; line-height:1; padding:0 2px; }
.chip__remove:hover { color:#000; }
.sb-overlay{
@media (max-width: 640px){
  .chips-select__menu { max-height: 50vh; }
  .chips-option input[type="checkbox"] { width:24px; height:24px; }
}
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.12);
  backdrop-filter: blur(6px) saturate(1.05);
  -webkit-backdrop-filter: blur(6px) saturate(1.05);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
  z-index: 3990; /* debajo de sidebar, encima del contenido */
}
.sb-overlay.is-visible{ opacity:1; pointer-events:auto; }

/* Bloqueo de scroll al abrir */
.no-scroll{ overflow:hidden; }

/* El contenido principal no debe moverse con la sidebar */
.main-container{ position: relative; z-index: 0; }

/* HOTSPOT: banda invisible en el borde izquierdo */
.sb-sensor{
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: 14px;                 /* sensible, ajustable */
  z-index: 3980;               /* debajo de overlay/sidebar, encima del contenido */
  pointer-events: auto;
  background: transparent;     /* invisible */
}

/* ===== Calendar day type indicators ===== */
/* Base day already styled; we layer colored dots/borders */
.cal-day.is-event { position: relative; }
/* Removed inner dot for event (use ring only) */
.cal-day.is-event::after { display:none; }

.cal-day.is-visit { position: relative; }
/* Removed inner square for visit (use ring only) */
.cal-day.is-visit::after { display:none; }

/* Pago en efectivo (visita para efectivo) */
.cal-day.is-visit-efectivo { position: relative; }
.cal-day.is-visit-efectivo::after { content:"$"; position:absolute; bottom:2px; left:50%; transform:translateX(-50%); font-size:11px; font-weight:700; color:#1b5e20; background:#d4f8d8; padding:1px 3px; border-radius:6px; box-shadow:0 0 0 1px #b2e8b9; }

/* Combine multiple types (stack visually) */
/* Adjust combos: only show the $ marker for efectivo scenarios */
.cal-day.is-event.is-visit::after { display:none; }
.cal-day.is-event.is-visit-efectivo::after { content:"$"; position:absolute; bottom:2px; left:50%; transform:translateX(-50%); background:transparent; color:#1b5e20; font-weight:700; font-size:11px; box-shadow:none; }
.cal-day.is-visit.is-visit-efectivo::after { content:"$"; position:absolute; bottom:2px; left:50%; transform:translateX(-50%); background:transparent; color:#1b5e20; font-weight:700; font-size:11px; box-shadow:none; }
.cal-day.is-event.is-visit.is-visit-efectivo::after { content:"$"; position:absolute; bottom:2px; left:50%; transform:translateX(-50%); background:transparent; color:#1b5e20; font-weight:700; font-size:11px; box-shadow:none; }

/* Extra differentiation (rings) */
.cal-day{ position:relative; }
.cal-day::after{
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 44px; height: 44px; /* slightly smaller than the day cell to create a visible ring */
  transform: translate(-50%, -50%);
  border-radius: 12px;
  pointer-events: none;
  box-shadow: none;
  opacity: 0; transition: opacity .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.cal-day.is-event::after { opacity:1; box-shadow: inset 0 0 0 3px rgba(232,92,158,0.22); border: 1px solid rgba(232,92,158,0.32); background: transparent; }
.cal-day.is-visit::after { opacity:1; box-shadow: inset 0 0 0 3px rgba(238,145,185,0.18); border: 1px solid rgba(238,145,185,0.28); background: transparent; }
.cal-day.is-visit-efectivo::after { opacity:1; box-shadow: inset 0 0 0 3px rgba(255,134,188,0.22); border: 1px solid rgba(255,134,188,0.34); background: transparent; }
/* Support stacked states by layering multiple box-shadows on the pseudo element */
.cal-day.is-event.is-visit::after { box-shadow: inset 0 0 0 3px rgba(232,92,158,0.22), inset 0 0 0 6px rgba(238,145,185,0.12); opacity:1; }
.cal-day.is-event.is-visit-efectivo::after { box-shadow: inset 0 0 0 3px rgba(232,92,158,0.22), inset 0 0 0 6px rgba(255,134,188,0.12); opacity:1; }
.cal-day.is-event.is-visit.is-visit-efectivo::after { box-shadow: inset 0 0 0 3px rgba(232,92,158,0.22), inset 0 0 0 6px rgba(238,145,185,0.12), inset 0 0 0 9px rgba(255,134,188,0.08); opacity:1; }

/* === Calendar presence enhancements === */
.qcal{ --day-size:48px; font-family:"Montserrat", system-ui, sans-serif; }
.qcal .cal-header{ display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; }
.qcal .cal-title{ font-weight:700; font-size:1.15rem; letter-spacing:.5px; color:var(--brand-ink); display:flex; align-items:baseline; gap:6px; }
.qcal .cal-title-year{ font-size:.8rem; font-weight:600; opacity:.75; text-transform:uppercase; letter-spacing:1px; }
.qcal .cal-weekdays{ display:grid; grid-template-columns:repeat(7, var(--day-size)); gap:4px; margin-bottom:4px; font-size:.70rem; font-weight:600; letter-spacing:.5px; text-transform:uppercase; color:#7a7068; }
.qcal .cal-weekdays > div{ text-align:center; }
.qcal .cal-days{ --cal-offset:1; display:grid; grid-template-columns:repeat(7, var(--day-size)); gap:4px; }
.qcal .cal-days > *:first-child{ grid-column-start: var(--cal-offset); }
.qcal .cal-day{ width:var(--day-size); height:var(--day-size); border:0; background:#f7f5f2; border-radius:14px; display:flex; align-items:center; justify-content:center; color:#5c4f48; position:relative; cursor:pointer; transition:background .15s ease, transform .12s ease, box-shadow .18s ease, color .18s ease; font-weight:700; font-size:1.05rem; box-shadow: inset 0 -1px 0 rgba(0,0,0,.05); }
.qcal .cal-day--empty{ display:none; }
.qcal .cal-day:hover{ background:#efe9e4; }
.qcal .cal-day.is-selected{ background:#ec6b57; color:#fff; box-shadow:0 4px 14px rgba(236,107,87,.35); }
.qcal .cal-day.is-selected.is-event{ box-shadow:0 4px 18px rgba(236,107,87,.45); }
.qcal .cal-day.is-today:not(.is-selected){ outline:2px solid #ec6b57; outline-offset:2px; background:#ffffff; }
.qcal .cal-day.is-busy:not(.is-selected){ background:#fff; }
.qcal .cal-nav{ background:#fff; border:1px solid var(--brand-border,#e6e0d8); width:34px; height:34px; border-radius:10px; cursor:pointer; font-size:1.2rem; line-height:1; color:#6a5a52; display:flex; align-items:center; justify-content:center; box-shadow:0 4px 10px rgba(0,0,0,.06); transition:background .15s ease, transform .12s ease; }
.qcal .cal-nav:hover{ background:#f6f2ee; }
.qcal .cal-nav:active{ transform:translateY(1px); }
.qcal .cal-day.is-event{ background:#fff; }
.qcal .cal-day.is-event.is-selected{ background:#ec6b57; }
.qcal .cal-day.is-event:not(.is-selected):hover{ background:#fdf5f3; }
.qcal .cal-day.is-visit:not(.is-selected){ background:#f4f8f2; }
.qcal .cal-day.is-visit-efectivo:not(.is-selected){ background:#f2faf2; }
.qcal .cal-day.is-visit:not(.is-selected):hover{ background:#eef5ea; }
.qcal .cal-day.is-visit-efectivo:not(.is-selected):hover{ background:#e9f7ea; }
@media (max-width:820px){ .qcal{ --day-size:42px; } }
@media (max-width:600px){ .qcal{ --day-size:36px; } }

/* Slight scale on hover for better presence */
.qcal .cal-day:not(.is-selected):hover{ transform:translateY(-2px); }
.qcal .cal-day.is-selected{ transform:translateY(-1px); }

/* Day info panel tuned for new size */
.cal-day-info-panel{ border:1px solid var(--brand-border,#e6e0d8); }

/* (opcional) estilos internos */
.sb-nav{ display:flex; flex-direction:column; gap:8px; padding:12px; }
.sb-nav a{
  padding:10px 12px;
  border-radius:10px;
  text-decoration:none;
  color:#2c2a28;
  font-family:"Montserrat", system-ui, sans-serif;
}
.sb-nav a:hover{ background:#f6f2ee; }
.sb-nav a.is-active{
  background:#f6f2ee;
  font-weight:600;
}

/* ===== FullCalendar (verde estándar) ===== */
.fc .fc-toolbar-title{ font-family:"Montserrat", system-ui, sans-serif; color:var(--brand-ink); font-weight:700; }
.fc .fc-col-header-cell-cushion, .fc .fc-daygrid-day-number{ color:var(--brand-ink) }
.fc .fc-toolbar{ gap:.5rem; }
.fc .fc-toolbar-chunk .fc-button-group{
  border-radius:999px; overflow:hidden;
  border:1px solid rgba(0,0,0,.06);
  box-shadow:var(--shadow);
  background: linear-gradient(140deg, var(--brand-primary,#6a7d4d), var(--brand-primary-700,#5a6a41));
}
.fc .fc-toolbar-chunk .fc-button-group .fc-button{ background:transparent; color:#fff; border:none; box-shadow:none; }
.fc .fc-toolbar-chunk .fc-button-group .fc-button:hover{ filter:brightness(.98) }
.fc .fc-today-button{
  background: var(--brand-primary,#6a7d4d);
  color:#fff; border:none; border-radius:999px; box-shadow:var(--shadow)
}
.fc .fc-button-primary{
  border:none; color:#fff;
  background: linear-gradient(140deg, var(--brand-primary,#6a7d4d), var(--brand-primary-700,#5a6a41));
}
.fc .fc-button-primary:not(:disabled):hover{ filter:brightness(1.02); box-shadow:0 6px 18px rgba(90,106,65,.28); }
.fc .fc-daygrid-day.fc-day-today{ background: #eef2e3; /* verde suave (match mini cal) */ }
#calendar{ min-height:560px }
/* Asegurar que los grids no se colapsen cuando están dentro de tarjetas */
.fc .fc-view-harness{ min-height: 520px; }

/* ===== Day info floating panel (mini calendar) ===== */
.cal-day-info-panel{ font-family:inherit; line-height:1.3; animation:fadeInCal .14s ease; }
.cal-day-info-panel .mini-list{ list-style:none; margin:4px 0 0; padding:0; }
.cal-day-info-panel .mini-list li{ margin:2px 0; }
.cal-day-info-panel .day-block + .day-block{ margin-top:8px; }
.cal-day-info-panel a{ color:#2b5a2b; text-decoration:none; }
.cal-day-info-panel a:hover{ text-decoration:underline; }
.cal-day-info-panel .pill-link{ display:inline-block; background:#eef5e9; padding:2px 6px; border-radius:4px; font-size:11px; font-weight:600; }
.cal-day-info-panel .btn.btn--sm{ font-size:12px; padding:4px 8px; }
@keyframes fadeInCal{ from{ opacity:0; transform:translateY(-4px);} to{ opacity:1; transform:translateY(0);} }

/* ===== Calendar legend ===== */
.cal-legend{ display:flex; flex-wrap:wrap; gap:14px; margin-top:8px; font-size:12.5px; line-height:1.3; color:#444; }
.cal-legend__item{ display:inline-flex; align-items:center; gap:6px; }
.cal-legend .leg-swatch{ width:18px; height:18px; border-radius:6px; position:relative; box-sizing:border-box; display:inline-block; }
.cal-legend .leg-event{ background: linear-gradient(135deg, rgba(232,92,158,0.95), rgba(246,139,189,0.9)); border:1px solid rgba(232,92,158,0.8); box-shadow:0 4px 10px rgba(232,92,158,0.16); }
.cal-legend .leg-visit{ background: linear-gradient(135deg, rgba(238,145,185,0.95), rgba(255,182,203,0.9)); border:1px solid rgba(238,145,185,0.8); box-shadow:0 4px 10px rgba(238,145,185,0.12); }
.cal-legend .leg-visit-efectivo{ background: linear-gradient(135deg, rgba(255,134,188,0.95), rgba(255,190,220,0.9)); border:1px solid rgba(255,134,188,0.9); box-shadow:0 4px 12px rgba(255,134,188,0.12); }
/* Eventos en month view: puntito y textos con verde */
.fc .fc-daygrid-event-dot{ border-color: var(--brand-primary,#6a7d4d); }
.fc .fc-daygrid-event .fc-event-time, 
.fc .fc-daygrid-event .fc-event-title{ color: var(--brand-ink); }
/* Hover de evento: leve fondo oliva */
.fc .fc-daygrid-event:hover{ background: rgba(106,125,77,.08); }

/* === Integración de aros (visitas / eventos) también en FullCalendar === */
/* Aplicamos los mismos anillos que en el mini calendario pero sobre la celda .fc-daygrid-day */
.fc-daygrid-day,
.fc-daygrid-day .fc-daygrid-day-frame,
.fc-daygrid-day .fc-daygrid-day-top{ position: relative !important; }
/* Remove legacy green/orange box-shadows from the day cell (force override) */
.fc-daygrid-day,
.fc-daygrid-day.is-event,
.fc-daygrid-day.is-visit,
.fc-daygrid-day.is-visit-efectivo{ box-shadow: none !important; }

/* Centered ring pseudo-element for FullCalendar day cells */
.fc-daygrid-day::after{
  content:'';
  position:absolute;
  top:50%; left:50%;
  width:60%; height:70%; /* tuned to be inset and match pill-shaped day cells */
  transform:translate(-50%,-50%);
  border-radius:12px;
  pointer-events:none;
  opacity:0;
  transition: opacity .12s ease, box-shadow .12s ease, border-color .12s ease;
}
/* Pink variants with higher specificity to override defaults */
.fc .fc-daygrid-day.is-event::after{ opacity:1 !important; box-shadow: inset 0 0 0 3px rgba(232,92,158,0.26) !important; border:1px solid rgba(232,92,158,0.36) !important; }
.fc .fc-daygrid-day.is-visit::after{ opacity:1 !important; box-shadow: inset 0 0 0 3px rgba(238,145,185,0.20) !important; border:1px solid rgba(238,145,185,0.30) !important; }
.fc .fc-daygrid-day.is-visit-efectivo::after{ opacity:1 !important; box-shadow: inset 0 0 0 3px rgba(255,134,188,0.24) !important; border:1px solid rgba(255,134,188,0.36) !important; }
/* stacked states */
.fc .fc-daygrid-day.is-event.is-visit::after{ box-shadow: inset 0 0 0 3px rgba(232,92,158,0.26), inset 0 0 0 6px rgba(238,145,185,0.12) !important; opacity:1 !important; }
.fc .fc-daygrid-day.is-event.is-visit-efectivo::after{ box-shadow: inset 0 0 0 3px rgba(232,92,158,0.26), inset 0 0 0 6px rgba(255,134,188,0.12) !important; opacity:1 !important; }
.fc .fc-daygrid-day.is-event.is-visit.is-visit-efectivo::after{ box-shadow: inset 0 0 0 3px rgba(232,92,158,0.26), inset 0 0 0 6px rgba(238,145,185,0.12), inset 0 0 0 9px rgba(255,134,188,0.08) !important; opacity:1 !important; }

/* Ensure day numbers and event dots sit above the ring */
.fc .fc-daygrid-day-number, .fc .fc-daygrid-event, .fc .fc-daygrid-day-top { position:relative; z-index:2; }
.fc .fc-daygrid-day::after { z-index:1; }

/* Also apply to custom mini calendar (.qcal/.cal-day) and override previous green/orange styles */
.qcal .cal-day{ box-shadow:none !important; }
.qcal .cal-day::after{ content:''; position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); width:70%; height:72%; border-radius:12px; pointer-events:none; opacity:0; transition:opacity .12s ease, box-shadow .12s ease; z-index:1; }
.qcal .cal-day.is-event::after{ opacity:1; box-shadow: inset 0 0 0 3px rgba(232,92,158,0.22); border:1px solid rgba(232,92,158,0.32); }
.qcal .cal-day.is-visit::after{ opacity:1; box-shadow: inset 0 0 0 3px rgba(238,145,185,0.18); border:1px solid rgba(238,145,185,0.28); }
.qcal .cal-day.is-visit-efectivo::after{ opacity:1; box-shadow: inset 0 0 0 3px rgba(255,134,188,0.22); border:1px solid rgba(255,134,188,0.34); }
.qcal .cal-day .num, .qcal .cal-day > * { position:relative; z-index:2; }

/* Hide any legacy outline/box-shadow from other theme files on targeted classes */
.fc-daygrid-day.is-selected, .fc-daygrid-day.is-selected.is-event, .cal-day.is-selected { box-shadow: none !important; outline: none !important; }

/* Símbolo $ para visita efectivo en FullCalendar (lo colocamos junto al número del día) */
.fc-daygrid-day.is-visit-efectivo .fc-daygrid-day-number { position:relative; }
.fc-daygrid-day.is-visit-efectivo .fc-daygrid-day-number::after {
  content:"$"; position:absolute; top:2px; right:4px; font-size:10px; font-weight:700; color:#1b5e20;
  background:#d4f8d8; padding:1px 3px; border-radius:6px; box-shadow:0 0 0 1px #b2e8b9;
}
/* Cuando hay evento + visita-efectivo solo dejamos símbolo simple sin fondo (consistencia con mini) */
.fc-daygrid-day.is-event.is-visit-efectivo .fc-daygrid-day-number::after { background:transparent; box-shadow:none; }

/* ----- Aggressive override: draw the centered pill ring on the day FRAME to match pill-shaped cells ----- */
/* Remove any remaining outlines/shadows on inner frame elements */
.fc .fc-daygrid-day .fc-daygrid-day-frame,
.fc .fc-daygrid-day .fc-daygrid-day-top,
.fc .fc-daygrid-day .fc-daygrid-day-bg { box-shadow: none !important; border: none !important; background: transparent !important; }

/* Also hide any inline pseudo-elements or outlines applied by theme files */
.fc .fc-daygrid-day .fc-daygrid-day-frame::after,
.fc .fc-daygrid-day .fc-daygrid-day-frame::before,
.fc .fc-daygrid-day .fc-daygrid-day-top::after,
.fc .fc-daygrid-day .fc-daygrid-day-top::before,
.fc .fc-daygrid-day .fc-daygrid-day-bg::after,
.fc .fc-daygrid-day .fc-daygrid-day-bg::before { display:none !important; content:none !important; }

/* Hide legacy selection outline that shows as orange rectangle */
.fc .fc-daygrid-day.fc-daygrid-day-selected,
.fc .fc-daygrid-day.is-selected,
.fc .fc-daygrid-day .fc-daygrid-day-frame.is-selected,
.fc .fc-day-sel { outline: none !important; box-shadow: none !important; border: none !important; background: transparent !important; }

/* Also target any theme-specific selection classes commonly used */
.fc .fc-daygrid-day .fc-daygrid-day-frame[aria-selected="true"] { outline: none !important; box-shadow:none !important; background:transparent !important; }

/* Finally, ensure our frame ::before is the visible ring */
.fc .fc-daygrid-day .fc-daygrid-day-frame::before{ z-index:1; display:block; }

/* Aggressive global overrides within FullCalendar scope to remove any legacy highlight boxes */
.fc * { box-shadow: none !important; outline: none !important; border: none !important; background: transparent !important; }

/* Re-allow numbers and events to be visible */
.fc .fc-daygrid-day-number, .fc .fc-daygrid-event, .fc .fc-daygrid-event-dot { position: relative !important; color: inherit !important; background: transparent !important; z-index: 4 !important; }

/* Ensure our ring is sized to the pill cell and clearly visible */
.fc .fc-daygrid-day .fc-daygrid-day-frame::before{ margin:6px; inset:0; width:auto; height:auto; border-radius:14px; }
.fc .fc-daygrid-day.is-event .fc-daygrid-day-frame::before{ opacity:1 !important; box-shadow: inset 0 0 0 3px rgba(232,92,158,0.28) !important; border:1px solid rgba(232,92,158,0.42) !important; }


/* Draw indicator as ::before of the frame so it aligns perfectly and can be sized to pill shape */
.fc .fc-daygrid-day .fc-daygrid-day-frame::before{
  content: '';
  position: absolute;
  inset: 0;           /* fill the frame */
  margin: 6px;       /* inset so number has breathing room */
  border-radius: 14px; /* match pill radius */
  pointer-events: none;
  opacity: 0;
  z-index: 1; /* behind numbers/events */
  transition: opacity .12s ease, box-shadow .12s ease, border-color .12s ease;
}

/* Pink variants applied to the frame pseudo-element with high specificity */
.fc .fc-daygrid-day.is-event .fc-daygrid-day-frame::before{ opacity:1 !important; box-shadow: inset 0 0 0 3px rgba(232,92,158,0.26) !important; border:1px solid rgba(232,92,158,0.36) !important; background: transparent !important; }
.fc .fc-daygrid-day.is-visit .fc-daygrid-day-frame::before{ opacity:1 !important; box-shadow: inset 0 0 0 3px rgba(238,145,185,0.20) !important; border:1px solid rgba(238,145,185,0.30) !important; background: transparent !important; }
.fc .fc-daygrid-day.is-visit-efectivo .fc-daygrid-day-frame::before{ opacity:1 !important; box-shadow: inset 0 0 0 3px rgba(255,134,188,0.24) !important; border:1px solid rgba(255,134,188,0.36) !important; background: transparent !important; }

/* stacked states layering */
.fc .fc-daygrid-day.is-event.is-visit .fc-daygrid-day-frame::before{ box-shadow: inset 0 0 0 3px rgba(232,92,158,0.26), inset 0 0 0 6px rgba(238,145,185,0.12) !important; opacity:1 !important; }
.fc .fc-daygrid-day.is-event.is-visit-efectivo .fc-daygrid-day-frame::before{ box-shadow: inset 0 0 0 3px rgba(232,92,158,0.26), inset 0 0 0 6px rgba(255,134,188,0.12) !important; opacity:1 !important; }
.fc .fc-daygrid-day.is-event.is-visit.is-visit-efectivo .fc-daygrid-day-frame::before{ box-shadow: inset 0 0 0 3px rgba(232,92,158,0.26), inset 0 0 0 6px rgba(238,145,185,0.12), inset 0 0 0 9px rgba(255,134,188,0.08) !important; opacity:1 !important; }

/* Ensure numbers and event nodes sit above */
.fc .fc-daygrid-day .fc-daygrid-day-number, .fc .fc-daygrid-day .fc-daygrid-event { position: relative !important; z-index: 3 !important; }

/* Slight size tweak for the mini calendar too (frame-based) */
.qcal .cal-day::after{ margin:0; width:78%; height:78%; }

/* --------------------------- FINAL OVERRIDES --------------------------- */
/* Remove any pseudo-elements or decorative boxes added by other styles inside day cells */
.fc .fc-daygrid-day *::before, .fc .fc-daygrid-day *::after,
.qcal .cal-day *::before, .qcal .cal-day *::after { display:none !important; content: none !important; }

/* Remove any borders/backgrounds on immediate children of day cells */
.fc .fc-daygrid-day > div, .fc .fc-daygrid-day .fc-daygrid-day-frame, .fc .fc-daygrid-day .fc-daygrid-day-top,
.qcal .cal-day > * { background: transparent !important; border: none !important; box-shadow: none !important; }

/* Ensure our pink ring is the only visible indicator */
.fc .fc-daygrid-day .fc-daygrid-day-frame::before{ content:''; position:absolute; inset:0; margin:6px; border-radius:14px; pointer-events:none; opacity:0; transition:opacity .12s ease; z-index:1; }
.fc .fc-daygrid-day.is-event .fc-daygrid-day-frame::before{ opacity:1 !important; box-shadow: inset 0 0 0 3px rgba(232,92,158,0.28) !important; border:1px solid rgba(232,92,158,0.42) !important; background: transparent !important; }
.fc .fc-daygrid-day.is-visit .fc-daygrid-day-frame::before{ opacity:1 !important; box-shadow: inset 0 0 0 3px rgba(238,145,185,0.20) !important; border:1px solid rgba(238,145,185,0.30) !important; }
.fc .fc-daygrid-day.is-visit-efectivo .fc-daygrid-day-frame::before{ opacity:1 !important; box-shadow: inset 0 0 0 3px rgba(255,134,188,0.24) !important; border:1px solid rgba(255,134,188,0.36) !important; }

.qcal .cal-day::before{ content:''; position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); width:78%; height:78%; border-radius:12px; pointer-events:none; opacity:0; transition:opacity .12s ease; z-index:1; }
.qcal .cal-day.is-event::before{ opacity:1; box-shadow: inset 0 0 0 3px rgba(232,92,158,0.22); border:1px solid rgba(232,92,158,0.32); }
.qcal .cal-day.is-visit::before{ opacity:1; box-shadow: inset 0 0 0 3px rgba(238,145,185,0.18); border:1px solid rgba(238,145,185,0.28); }
.qcal .cal-day.is-visit-efectivo::before{ opacity:1; box-shadow: inset 0 0 0 3px rgba(255,134,188,0.22); border:1px solid rgba(255,134,188,0.34); }

/* Keep day numbers and events above the ring */
.fc .fc-daygrid-day-number, .fc .fc-daygrid-event, .qcal .cal-day > * { position:relative !important; z-index:3 !important; }

/* End FINAL OVERRIDES */

/* Solid, centered calendar ring element inserted by calendar-fix.js */
.cal-ring{
  position:absolute;
  top:50%; left:50%;
  transform:translate(-50%,-50%);
  border-radius:12px;
  pointer-events:none;
  z-index:1; /* behind numbers/events which are z-index:3 */
  background: transparent; /* default transparent, colored by modifiers */
  box-shadow: none;
  border: 0;
}
.cal-ring--event{ background: rgba(232,92,158,0.95); }
.cal-ring--visit{ background: rgba(238,145,185,0.95); }
.cal-ring--efectivo{ background: rgba(255,134,188,0.95); }

/* Make the rings slightly rounded and fully opaque; add subtle inner border for contrast */
.cal-ring{ box-shadow: inset 0 0 0 2px rgba(255,255,255,0.06); border-radius: 12px; }
.cal-ring--event{ box-shadow: inset 0 0 0 2px rgba(255,255,255,0.06), 0 6px 18px rgba(232,92,158,0.14); }
.cal-ring--visit{ box-shadow: inset 0 0 0 2px rgba(255,255,255,0.06), 0 6px 18px rgba(238,145,185,0.12); }
.cal-ring--efectivo{ box-shadow: inset 0 0 0 2px rgba(255,255,255,0.06), 0 6px 20px rgba(255,134,188,0.12); }

/* Ensure numbers and events sit above the inserted ring */
.fc .fc-daygrid-day-number, .fc .fc-daygrid-event, .qcal .cal-day > * { position: relative !important; z-index: 3 !important; }

/* ===== Quick create panel ===== */
#quick-event-panel{ display:none; }
.quick-card{ background:#fff; border:1px solid var(--border); border-radius:16px; padding:18px; box-shadow:var(--shadow); margin-bottom:18px; }
.quick-form-row{ display:grid; grid-template-columns: 1fr 1fr; gap:16px; margin-bottom:12px; }
.quick-actions{ display:flex; gap:.5rem; justify-content:flex-end; }

/* ===== Accessibility / motion ===== */
@media (prefers-reduced-transparency: reduce){ .bg-sorbet::before, .btn-primary.has-grain::before{ opacity:.05; } }

/* Utilidad para ocultar */
.hidden{ display:none !important; }

/* Overlay del modal */
.modal-overlay{
  position:fixed; inset:0; z-index:1400;
  background:rgba(0,0,0,.35);
  display:flex; align-items:center; justify-content:center;
}

/* Tarjeta del modal */
.modal-card{
  width:min(720px, 92vw);
  background:#fff; border:1px solid var(--border);
  border-radius:16px; box-shadow:var(--shadow);
  padding:18px;
}

/* (legacy sidebar rules removed; replaced by fixed sidebar + overlay) */

/* (Opcional) Ajustes de inputs en el modal */
#evt-form input{ width:100%; padding:.6rem .75rem; border:1px solid var(--border); border-radius:10px; }
.form-error{ color:#b00020; margin-top:.5rem; }

/* ===== Contratos toolbar/list (snippet) ===== */
.p-24{ padding:24px; }
.gap-16{ gap:16px; display:flex; flex-direction:column; }
/* Utility headings + spacing */
.h2{ font-size:1.4rem; font-family:"Montserrat", system-ui, sans-serif; font-weight:700; letter-spacing:.2px; color:var(--brand-ink); }
.m-0{ margin:0 !important; }
.muted{ color: var(--brand-muted, #6b6b6b); }

.contratos__toolbar{ display:grid; gap:12px; align-items:end; }
.contratos__filters{ display:grid; grid-template-columns:1fr 180px 180px 150px 150px auto auto; gap:8px; }
@media (max-width: 900px){ .contratos__filters{ grid-template-columns:1fr 1fr; } }

.inp{ padding:0 14px; border:1px solid var(--brand-border); border-radius:10px; background:#fff; height:var(--control-h); }
.btn--primary{ background:#ffd8c8; border-color:#ffc8b6; }
.btn--danger{ background:#f3a699; border-color:#e88e7f; color:#fff; }

.contratos__list{ list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:12px; }
.contrato{ display:grid; grid-template-columns:1fr auto; align-items:center; gap:12px; padding:14px; border:1px solid #efe7de; border-radius:12px; background:#fff; }
.contrato__title{ margin:0 0 4px; font-size:1.05rem; }
.contrato__meta{ margin:0; color:#69635c; font-size:.92rem; }
.contrato__actions{ display:flex; gap:8px; align-items:center; }

/* ===== Paleta: cambia estos para “probar tonos” ===== */
:root{
  --ui-bg: #ffffff;
  --ui-border: #e6e0d8;
  --ui-muted: #6f6a64;
  --control-h: 44px;
  --control-radius: 12px;
  --gap: 10px;
  --gap-md: 12px;

  /* Botones (oliva/arena) */
  --btn-accent: #6a7d4d;        /* verde oliva */
  --btn-accent-hover: #5c7043;  /* oliva + oscuro */
  --btn-neutral-bg: #f6f2ee;    /* neutro cálido */
  --btn-neutral-br: #e7ded6;    /* arena claro */

  /* Campos */
  --inp-bg: #ffffff;
  --inp-br: #e6e0d8;            /* borde suave */
  --inp-focus: #6a7d4d33;       /* oliva con transparencia */
  /* Brand base for forms */
  --brand-primary: #6a7d4d;
  --brand-primary-700: #5a6a41;
  --brand-border: #e6e0d8;
  --focus-ring: color-mix(in oklab, var(--btn-accent) 28%, white);
}

/* ===== Toolbar / Filtros ===== */
.contratos__toolbar { display:grid; gap:12px; align-items:end; }

.contratos__filters{
  display:grid;
  grid-template-columns: 1fr 160px 160px 150px 150px 160px;
  grid-template-areas:
    "search estado tipo desde hasta filtrar"
    "clear  clear  clear  clear  clear  clear"; /* fila completa para Limpiar */
  gap: var(--gap);
  align-items:end;
}
.contratos__filters [name="query"]{ grid-area: search; }
.contratos__filters .filters__clear{ grid-area: clear; justify-self:start; }
.contratos__filters [name="estado"]{ grid-area: estado; }
.contratos__filters [name="tipo"]{ grid-area: tipo; }
.contratos__filters [name="desde"]{ grid-area: desde; }
.contratos__filters [name="hasta"]{ grid-area: hasta; }
.contratos__filters .filters__filtrar{ grid-area: filtrar; justify-self:end; width:auto; }

/* Responsive */
@media (max-width: 900px){
  .contratos__filters{
    grid-template-columns: 1fr 1fr; /* 2 columnas en responsive */
    grid-template-areas:
      "search search"
      "estado tipo"
      "desde hasta"
      "filtrar filtrar"
      "clear clear";
  }
  .contratos__filters .filters__filtrar{ justify-self:stretch; width:100%; }
  .contratos__filters .filters__clear{ justify-self:stretch; width:100%; }
}

/* Responsive for filters inline layout */
@media (max-width: 900px){
  .filters-grid{
    grid-template-columns: 1fr;
  }
  .filters__actions{
    width: 100%;
    justify-content: stretch;
  }
  .filters__actions .btn{
    flex: 1;
  }
}

/* --- Filtros (inline en una sola fila, card propia) --- */
.filters-grid{
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 200px 200px 170px 170px auto;
  align-items: center;
  max-width: 1100px;
  margin-inline: auto;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--brand-border,#e7ded6);
  border-radius: 16px;
}
.filters__actions{
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.filters-grid .inp,
.filters-grid .btn{
  height: 44px;
  font-size: .95rem;
  border-radius: 12px;
}

/* ===== Inputs / Selects ===== */
.inp{
  height: var(--control-h,44px);
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--brand-border,#e6e0d8);
  background: #fff;
  outline:none;
  min-height: var(--control-h);
  height: var(--control-h);
  box-sizing: border-box;
  margin:0;
}

/* === Categorías (vertical list) === */
.form-group-categorias{ display:flex; flex-direction:column; gap:8px; margin-top:6px; }
.categoria-opcion input[type="checkbox"]{ margin-right:8px; }
#otrosCategoria.hidden{ display:none; }
.inp:focus{
  box-shadow:0 0 0 3px var(--focus-ring);
  border-color: var(--brand-primary);
}
select.inp{
  appearance:none;
  padding-right:36px;
  background:
    linear-gradient(45deg, transparent 50%, #6f6a64 50%),
    linear-gradient(135deg, #6f6a64 50%, transparent 50%);
  background-position:right 14px center, right 9px center;
  background-size:6px 6px; background-repeat:no-repeat;
}

/* ===== Botones ===== */
.btn{
  height: var(--control-h,44px);
  padding: 0 16px;
  border-radius:12px;
  border:1px solid var(--brand-border,#e6e0d8);
  background:var(--btn-neutral-bg);
  text-decoration:none;
  color:#2c2a28;
  display:inline-flex; align-items:center; justify-content:center;
  gap:8px; font-weight:600; cursor:pointer; line-height:1; white-space:nowrap;
  min-height: var(--control-h);
  font-size:.95rem;
  box-sizing: border-box;
  margin:0;
  font-family:"Montserrat", system-ui, sans-serif;
}
.btn--md{ font-size:.95rem; }
.btn:hover{ filter:brightness(0.98); }

.btn--accent{ background: var(--brand-primary,#6a7d4d); border-color: var(--brand-primary,#6a7d4d); color:#fff; }
.btn--accent:hover{ background: var(--brand-primary-700,#5a6a41); }

.btn--ghost{ background:#f6f2ee; border-color:#e7ded6; color:#2c2a28; }
.btn--ghost:hover{
  background:#d9cec6;  /* un tono más oscuro */
}

/* Botón Limpiar ocupa su fila completa en grid */
.contratos__filters .filters__clear{ width:max-content; }

/* Disabled buttons */
.btn.is-disabled,
.btn:disabled{
  opacity:.55;
  cursor:not-allowed;
  filter:none;
}

/* ===== Header + botón logo que abre sidebar ===== */
/* Minimal header */
.app-header{ padding:12px 20px; font-weight:600; font-size:1.1rem; color:#2c2a28; }
.logo{ margin:0; }

/* ===== Filtros (card en una sola fila flex) ===== */
.card .filters-row{
  max-width: 1100px;
  margin-inline: auto;
  background: #fff;
  border: 1px solid var(--brand-border, #e7ded6);
  border-radius: 16px;
  padding: 12px;
  box-sizing: border-box;

  display: flex;
  flex-wrap: wrap;          /* evita desbordes */
  gap: 12px;                /* separación uniforme */
  align-items: center;
}
.filters-row .inp{
  min-width: 200px;         /* select/fecha no se colapsan */
  flex: 1 1 220px;          /* crecen y hacen wrap si no cabe */
}
.filters-row .filters__actions{
  margin-left: auto;        /* empuja a la derecha */
  display: flex;
  gap: 10px;
  flex: 0 0 auto;           /* no se rompen ni saltan raro */
}
/* Alturas y tipografía unificadas en el contexto del filtro */
.filters-row .inp,
.filters-row .btn,
.filters-row .btn--md{
  height: 44px;
  font-size: 0.95rem;
  border-radius: 12px;
}
/* Botones: respetar variables ya definidas */
.filters-row .btn{ padding:0 16px; border:1px solid var(--brand-border,#e7ded6); background:var(--btn-neutral-bg,#f6f2ee); font-weight:600; white-space:nowrap; }
.filters-row .btn--accent{ background: var(--brand-primary,#6a7d4d); border-color: var(--brand-primary,#6a7d4d); color:#fff; }
.filters-row .btn--accent:hover{ background: var(--brand-primary-700,#5a6a41); }
.filters-row .btn--ghost{ background:#f6f2ee; border-color:#e7ded6; color:#2c2a28; }

@media (max-width: 900px){
  .filters-row .inp{ flex: 1 1 100%; min-width: 0; }
  .filters-row .filters__actions{ width: 100%; justify-content: flex-end; }
}

/* ===== Formularios: grupos en línea ===== */
.form-group-inline{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:flex-end;
}
@media (max-width: 600px){
  .form-group-inline{ flex-direction:column; }
}

/* WhatsApp alternate field visibility */
.whatsapp-alt[hidden]{ display:none !important; }

/* (opcional) tonos alternos rápidos: solo cambia variables */
/* Tema arena:
:root{ --btn-accent:#b36b58; --btn-accent-hover:#9c5d4d; }
*/
.prov-cell{ max-width:100%; }
.prov-cell__title{ display:flex; flex-wrap:wrap; gap:6px; align-items:baseline; }
.prov-brand{ font-weight:700; }
.prov-name{ font-weight:600; }
.prov-email{ color: var(--brand-muted, var(--ui-muted, #6f6a64)); font-size:.9rem; word-break:break-word; }
table.table{ table-layout:auto; }
/* Client email (in event 'Datos del cliente' card) should use brand pink instead of default link blue */
#card-cliente a[href^="mailto:"]{
  color: #e85c9e; /* pink */
  text-decoration: underline;
}
#card-cliente a[href^="mailto:"]:hover{
  color: #d24a8a;
}
/* Tema carbón:
:root{ --btn-accent:#2f3640; --btn-accent-hover:#272d35; }
*/