/* Agenda del edificio. Cada fecha abre su detalle completo, también en pantallas chicas. */
.agenda-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 154px;
  margin-bottom: 22px;
  padding: clamp(20px, 3vw, 38px);
  color: #183c3b;
  background: #e2eee8;
  border-radius: 16px;
}
.agenda-hero > div { position: relative; z-index: 1; }
.agenda-hero h2 {
  margin: 0;
  color: #173d3b;
  font: 500 clamp(1.9rem, 3.8vw, 3.1rem)/1.12 Georgia, "Times New Roman", serif;
  letter-spacing: -.045em;
}
.agenda-hero p { margin: .5em 0 0; color: #34554f; font-size: 1rem; }
.agenda-hero p::first-letter, .agenda-detail > h3:first-child::first-letter,
.agenda-form-date::first-letter { text-transform: uppercase; }
.agenda-sketch {
  position: absolute;
  z-index: -1;
  right: 1.2%;
  bottom: 0;
  width: min(35%, 390px);
  height: auto;
  color: #649688;
  pointer-events: none;
}
.agenda-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.agenda-actions:empty { display: none; }
.agenda-actions button { min-height: 44px; padding: 8px 15px; }
.agenda-grid.calgrid {
  display: grid;
  grid-template-columns: minmax(0, 1.95fr) minmax(220px, 1fr);
  gap: clamp(14px, 1.8vw, 26px);
  align-items: start;
}
.agenda-main, .agenda-side { min-width: 0; }
.agenda-month, .agenda-side .avp, .agenda-news, .agenda-grid .agenda-detail {
  border: 1px solid var(--bd, #d7dfda);
  border-radius: 14px;
  background: var(--sf, white);
  padding: clamp(14px, 1.7vw, 24px);
  box-shadow: none;
}
.agenda-month { container-type: inline-size; }
.agenda-month-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 12px; }
.agenda-grid h3 { line-height: 1.25; }
.agenda-month-head h3 { margin: 0; font-size: clamp(1.25rem, 2vw, 1.65rem); letter-spacing: -.03em; }
.agenda-month-tools { display: flex; align-items: center; gap: 4px; }
.agenda-month-tools button { min-width: 44px; min-height: 44px; padding: 4px 9px; font-size: 1.5rem; line-height: 1; }
.agenda-month-tools #agenda-hoy { font-size: 1rem; }
.agenda-hint { font-size: 1rem; line-height: 1.45; color: var(--mut); margin: .5rem 0 1rem; }
.agenda-grid .cal { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.agenda-grid .cal .h { font-weight: 600; text-align: center; font-size: .86rem; margin-bottom: 5px; color: var(--mut); }
.agenda-grid .cal .d {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 3px;
  padding: 7px;
  min-height: 64px;
  min-width: 0;
  border-radius: 7px;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.25;
  background: var(--sf);
  box-shadow: none;
}
.agenda-grid .cal .d b { font-variant-numeric: tabular-nums; }
.agenda-grid .cal .d:hover { border-color: #568f82; }
.agenda-grid .cal .d[aria-current="date"] b { text-decoration: underline; text-underline-offset: .25em; }
.agenda-grid .cal .d.sel { color: #164a40; border-color: #17645e; outline: 0; box-shadow: inset 0 0 0 1px #17645e; background: #e0eee6; }
.agenda-grid .cal .d:focus-visible { outline: 3px solid #17645e; outline-offset: 1px; }
.agenda-dot { display: none; }
.agenda-grid .pill { font-weight: 650; }
.agenda-grid .pill.er { background: #eee8f7; color: #50396b; }
.agenda-grid .pill.eo, .agenda-grid .pill.pe, .agenda-grid .pill.mp { background: #faedce; color: #654809; }
.agenda-grid .pill.eb { background: #f9e2de; color: #792e2c; }
.agenda-grid .pill.ee { background: #dceaf3; color: #284b64; }
.agenda-grid .pill.oc { background: #e9eeeb; color: #374e46; }
.agenda-grid .pill.me { background: #256957; color: #fff; }
.agenda-key { margin-top: 10px; border-top: 1px solid var(--bd); }
.agenda-key summary { width: fit-content; padding: 10px 0; min-height: 44px; color: var(--ac); cursor: pointer; font-size: 1rem; font-weight: 600; }
.agenda-key .leyenda { margin: 0; }
.agenda-mobile-key { display: none; font-size: 1rem; margin: 8px 0; }
.agenda-grid .agenda-detail { margin-top: 16px; }
.agenda-detail hr { border: none; border-top: 1px solid var(--bd); margin: 22px 0; }
.agenda-detail .g { align-items: end; }
.agenda-detail [tabindex], .agenda-month-head { scroll-margin-top: 80px; }
.agenda-detail #agenda-dia { margin: 0 0 12px; }
.agenda-detail .agenda-form-date { color: var(--mut); margin: -2px 0 12px; }
.agenda-side.calside { order: 0; }
.agenda-side .avp { margin-bottom: 16px; }
.agenda-side-scroll {
  max-height: 480px;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
}
.agenda-side h3 { margin: 0 0 12px; font-size: 1.25rem; display: flex; align-items: center; justify-content: space-between; }
.agenda-side h3 .nb { color: #20564c; background: #e1eee7; border-radius: 30px; min-width: 25px; text-align: center; font-size: .9rem; }
.agenda-side button.avi {
  display: grid;
  grid-template-columns: 8px minmax(0,1fr);
  align-items: start;
  gap: 10px;
  margin: 0;
  padding: 13px 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  font-size: 1rem;
  font-weight: 650;
  color: var(--ink);
  background: transparent;
  line-height: 1.4;
  border-top: 1px solid var(--bd);
}
.agenda-side .avi:hover > span:last-child > span { text-decoration: underline; }
.agenda-side .avi small { color: var(--mut); line-height: 1.38; font-size: .92rem; margin-top: 3px; }
.agenda-side .avi small:last-child { color: var(--ac); font-weight: 600; }
.agenda-article { padding: 15px 0; border-top: 1px solid var(--bd); }
.agenda-article:last-child { padding-bottom: 0; }
.agenda-article h4 { margin: 0; font-size: 1.05rem; line-height: 1.4; }
.agenda-article p { font-size: 1rem; line-height: 1.5; margin: .35em 0; white-space: pre-line; overflow-wrap: anywhere; }
.agenda-article small { color: var(--mut); font-size: .9rem; }
.agenda-article .agenda-tags { display: flex; gap: 6px; }
.agenda-tags span { color: #725119; font-size: .82rem; font-weight: 700; }
@container (max-width: 440px) {
  .agenda-grid .cal .d { min-height: 46px; padding: 5px 2px; align-items: center; justify-content: center; }
  .agenda-grid .cal .pill { display: none; }
  .agenda-dot { display: block; height: 5px; width: 5px; border-radius: 50%; background: #407567; }
  .agenda-mobile-key { display: block; }
}
@media (max-width: 1180px) {
  .agenda-grid.calgrid { grid-template-columns: minmax(0,1fr); }
  .agenda-side { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); align-items: start; gap: 14px; }
  .agenda-side .avp { margin: 0; }
}
@media (max-width: 680px) {
  .agenda-hero { min-height: 130px; margin-bottom: 14px; padding: 18px; }
  .agenda-hero h2 { font-size: clamp(1.55rem, 6vw, 2rem); }
  .agenda-sketch { width: 28%; opacity: .32; }
  .agenda-side { display: block; }
  .agenda-side .avp { margin-bottom: 14px; }
  .agenda-detail .g { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 400px) {
  .agenda-month-tools { gap: 0; }
  .agenda-month-tools button { min-width: 40px; }
}
.agenda-actions .agenda-shortcut { display: none; }
.agenda-detail .agenda-reservation-date { display: block; font-weight: 600; max-width: 280px; }
.agenda-reservation-date input { margin-top: 4px; }
.agenda-side #agenda-avisos { scroll-margin-top: 80px; }
@media (max-width: 1180px) {
  .agenda-actions .agenda-shortcut { display: inline-block; }
}
.home-bulletin-head { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; margin-bottom:20px; }
.home-bulletin-head h2 { margin:0; }
.home-bulletin article h3, .home-bulletin article p { overflow-wrap:anywhere; }
.home-bulletin article h3 { margin-top:2px; }
.home-bulletin summary { font-size:1.1rem; min-height:44px; padding:6px 0; cursor:pointer; font-weight:650; }
.agenda-month-head h3::first-letter { text-transform:uppercase; }
@media (prefers-color-scheme:dark) {
 .agenda-hero { background:#244640; color:#edf6f2; }
 .agenda-hero h2, .agenda-hero p { color:#edf6f2; }
 .agenda-sketch { color:#739b8d; }
 .agenda-tags span { color:#e4c38d; }
}
.agenda-hero.admin-hero { background:#173e45; color:#fff; }
.admin-hero h2 { color:#fff; }
.admin-hero p { color:#deeae7; }
.admin-hero .agenda-sketch { color:#6e9b92; }
.admin-hero .agenda-actions .p { color:#173f3e; background:#daeadf; border-color:#daeadf; }
.admin-hero .agenda-actions button:not(.p) { color:#fff; background:#20494d; border-color:#799a97; }
.admin-work, .admin-queue { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(200px,100%),1fr)); gap:10px; margin:0 0 18px; }
.admin-work button, .admin-queue button {
 display:flex; align-items:center; gap:12px; min-width:0; min-height:76px; padding:12px 16px; text-align:left;
 background:var(--sf); color:var(--ink); border:1px solid var(--bd); border-radius:12px;
}
.admin-work button:hover, .admin-queue button:hover { border-color:var(--ac); }
.admin-work strong, .admin-work small { display:block; }
.admin-work strong { font-size:1.05rem; line-height:1.4; }
.admin-work small { font-size:.94rem; line-height:1.4; font-weight:400; color:var(--mut); }
.admin-work-icon { display:grid; place-items:center; flex-shrink:0; width:37px; height:37px; border-radius:10px; color:#1b5b50; background:#e2efe8; }
.admin-next { margin-left:auto; color:var(--ac); font-size:1.2rem; }
.admin-calendar-tools { display:flex; flex-wrap:wrap; gap:6px; margin-top:12px; }
.admin-calendar-tools button { min-height:44px; }
.admin-calendar-tools .agenda-shortcut { display:none; }
.admin-queue { margin-top:12px; }
.admin-queue b { color:var(--ac); font-size:1.55rem; }
.admin-reservas h3[tabindex] { scroll-margin-top:75px; }
.people-head, .people-filters { display:flex; align-items:center; flex-wrap:wrap; justify-content:space-between; gap:12px; }
.people-head { margin-bottom:16px; }
.people-head h2 { margin:0; }
.people-form summary { cursor:pointer; font-weight:650; min-height:44px; padding:6px 0; }
.people-form .g { align-items:end; }
.people-filters { justify-content:flex-start; align-items:end; }
.people-filters label { display:grid; flex:1 1 180px; gap:4px; font-size:1rem; font-weight:600; }
.people-filters label:first-child { flex-grow:2; }
#people-result { margin:12px 0; color:var(--mut); font-size:.97rem; }
.person-row { display:grid; grid-template-columns:minmax(100px,1.4fr) minmax(90px,1fr) minmax(84px,auto) minmax(96px, auto); align-items:start; gap:10px; padding:16px 0; border-top:1px solid var(--bd); line-height:1.4; }
.person-who, .person-unit { min-width:0; overflow-wrap:anywhere; }
.person-row small { display:block; color:var(--mut); font-size:.95rem; }
.person-state { width:fit-content; border:1px solid var(--bd); border-radius:6px; padding:3px 7px; color:var(--mut); font-size:.9rem; font-weight:600; }
.person-state.active { color:#205549; background:#e3efe8; border-color:#c1ddd1; }
.person-actions { min-width:0; }
.person-actions summary { color:var(--ac); cursor:pointer; font-weight:600; min-height:44px; }
.person-actions div { display:flex; flex-flow:column; align-items:stretch; gap:5px; }
.person-actions button, .person-actions a { text-align:left; font-size:.95rem; min-height:44px; }
@media(max-width:1180px){.admin-calendar-tools .agenda-shortcut{display:inline-block}}
@media(max-width:760px){
 .admin-work { grid-template-columns:minmax(0,1fr); gap:5px; }
 .admin-work button { padding:8px 12px; min-height:55px; }
 .admin-queue { grid-template-columns:minmax(0,1fr); gap:5px; }
 .admin-queue button { min-height:48px; }
 .person-row { grid-template-columns:minmax(0,1fr) auto; }
 .person-unit { grid-column:1; }
 .person-state { grid-column:2; grid-row:1; }
 .person-actions { grid-column:1/-1; }
 .person-actions summary { min-height:44px; }
}
.people-page:not([hidden]) { display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:10px; margin-top:12px; }

/* Organigrama y Directorio de Personal */
.staff-container { margin-top: 12px; }
.staff-area-section { margin-bottom: 24px; }
.staff-area-title { display: flex; align-items: center; gap: 8px; font-size: 1.15rem; font-weight: 700; margin-bottom: 12px; padding-bottom: 6px; border-bottom: 2px solid var(--bd); }
.staff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.staff-card { background: var(--bg); border: 1px solid var(--bd); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.staff-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.staff-role-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 0.8rem; font-weight: 700; padding: 3px 8px; border-radius: 6px; }
.staff-name { font-size: 1.08rem; font-weight: 700; margin-top: 4px; }
.staff-detail { font-size: 0.9rem; color: var(--mut); margin: 2px 0; display: flex; align-items: center; gap: 6px; }
.staff-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; padding-top: 8px; border-top: 1px dashed var(--bd); }
.staff-btn { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 6px; font-size: 0.86rem; font-weight: 600; text-decoration: none; border: 1px solid var(--bd); color: var(--fg); background: var(--card-bg, #fff); cursor: pointer; }
.staff-btn:hover { background: var(--bd); }
.staff-btn.wa { background: #25D366; color: #fff; border-color: #20ba5a; }
.staff-btn.wa:hover { background: #1faa52; }
.staff-btn.tel { background: #0284c7; color: #fff; border-color: #0369a1; }
.staff-btn.tel:hover { background: #0369a1; }

/* Importador Rápido de Reservas */
.import-box { background: var(--bg); border: 1px solid var(--bd); border-radius: 8px; padding: 16px; margin-bottom: 16px; }
.import-table-wrap { max-height: 380px; overflow-y: auto; margin: 12px 0; border: 1px solid var(--bd); border-radius: 6px; }
.import-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; text-align: left; }
.import-table th { background: var(--bd); padding: 8px 10px; font-weight: 700; position: sticky; top: 0; }
.import-table td { padding: 8px 10px; border-bottom: 1px solid var(--bd); }
.status-badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 0.78rem; font-weight: 700; }
.status-badge.ok { background: #dcfce7; color: #166534; }
.status-badge.error { background: #fee2e2; color: #991b1b; }
.status-badge.warn { background: #fef3c7; color: #92400e; }

/* Banners de Circulares y Asambleas */
.asamblea-banner { background: linear-gradient(135deg, #1e3a8a0f, #3b82f61a); border-left: 6px solid #2563eb; padding: 12px 16px; border-radius: 6px; margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.circular-banner { background: linear-gradient(135deg, #f59e0b0f, #f59e0b1a); border-left: 6px solid #d97706; padding: 12px 16px; border-radius: 6px; margin-bottom: 14px; }


/* Agenda Event Collapsible Form */
.agenda-event-collapsible {
  border-left: 4px solid var(--ac, #1b7a65);
  transition: all .2s ease;
}
.agenda-event-collapsible summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  user-select: none;
  padding: 4px 0;
  outline: none;
}
.agenda-event-collapsible summary::-webkit-details-marker,
.agenda-event-collapsible summary::marker {
  display: none;
}
.agenda-event-collapsible summary:hover {
  color: var(--ac, #34d399);
}
.agenda-event-collapsible[open] summary {
  margin-bottom: 6px;
}

/* Semáforo de Vigencia (Seguros, Legales, Cuentas Corrientes y Estados de Consultas) */
.tag.vig-ok { background: #dcfce7; color: #166534; border: 1px solid #86efac; font-weight: 700; }
.tag.vig-warn { background: #fef3c7; color: #92400e; border: 1px solid #fde047; font-weight: 700; }
.tag.vig-bad { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; font-weight: 700; }
.tag.vig-info { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; font-weight: 700; }

.btn-alert {
  border-color: #f59e0b !important;
  color: var(--tx) !important;
}
.btn-alert:hover {
  background: rgba(245, 158, 11, 0.15) !important;
}

/* Subnavegación persistente y Grupos de Botones unificados */
.btn-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-card, rgba(255, 255, 255, 0.06));
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--bd);
}
.btn-group .padm-pill {
  margin: 0;
  border: none;
  font-size: 0.9rem;
}
.btn-group .padm-pill.active {
  background: var(--ac);
  color: #fff !important;
  font-weight: 700;
}
.exp-subnav .padm-pill {
  transition: all 0.15s ease;
}
.exp-subnav .padm-pill:hover {
  background: var(--hover-bg, rgba(255, 255, 255, 0.1));
}
.exp-subnav .padm-pill.active {
  background: var(--ac);
  color: #fff !important;
  font-weight: 700;
}
