/* CCBE Terminal · Actividades Calendar & Agenda */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(6, 182, 212, .03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(6, 182, 212, .03) 1px, transparent 1px);
  background-size: 50px 50px;
  z-index: -2;
  pointer-events: none;
}

.ccbe-act-section {
  width: min(calc(100% - 48px), 1180px);
  margin: 0 auto;
  padding: 40px 0 92px;
}

.ccbe-act-top {
  margin-bottom: 18px;
}

.ccbe-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid rgba(34, 211, 238, .35);
  background: rgba(2, 11, 14, .82);
  color: var(--ccbe-cyan-bright);
  font: 600 .72rem var(--ccbe-font-display);
  letter-spacing: .1em;
  text-transform: uppercase;
  transition: .2s ease;
}

.ccbe-back-link:hover,
.ccbe-back-link:focus-visible {
  background: rgba(34, 211, 238, .18);
  border-color: var(--ccbe-cyan);
  color: #fff;
  box-shadow: 0 0 18px rgba(34, 211, 238, .25);
  outline: none;
}

.ccbe-act-hero {
  text-align: center;
  margin-bottom: 30px;
}

.ccbe-act-hero h1 {
  margin: 10px 0 8px;
  color: #fff;
  font: 800 clamp(1.7rem, 4.4vw, 2.7rem)/1.2 var(--ccbe-font-ui);
  letter-spacing: .15em;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(34, 211, 238, .55), 0 0 26px rgba(6, 182, 212, .42);
}

.ccbe-act-hero__sub {
  margin: 0;
  color: var(--ccbe-cyan-bright);
  font: .76rem/1.6 var(--ccbe-font-display);
  letter-spacing: .11em;
  text-transform: uppercase;
  opacity: .84;
}

.ccbe-act-shell {
  padding: 24px;
  border: 1px solid rgba(34, 211, 238, .24);
  background: linear-gradient(155deg, rgba(4, 17, 22, .92), rgba(1, 6, 9, .95));
  box-shadow: 0 0 42px rgba(6, 182, 212, .08), inset 0 0 40px rgba(34, 211, 238, .03);
}

/* Controls bar */
.ccbe-cal-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(34, 211, 238, .16);
}

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

.ccbe-cal-month {
  margin: 0 4px;
  min-width: 195px;
  text-align: center;
  color: #fff;
  font: 700 1.05rem/1.3 var(--ccbe-font-ui);
  letter-spacing: .1em;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(34, 211, 238, .35);
}

.ccbe-cal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid rgba(34, 211, 238, .36);
  background: rgba(6, 182, 212, .08);
  color: var(--ccbe-cyan-bright);
  font: 600 .72rem var(--ccbe-font-display);
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: .18s ease;
}

.ccbe-cal-btn--icon {
  min-width: 38px;
  padding: 0;
  font-size: 1.25rem;
  line-height: 1;
}

.ccbe-cal-btn:hover,
.ccbe-cal-btn:focus-visible {
  background: var(--ccbe-cyan);
  color: #001116;
  box-shadow: 0 0 16px rgba(34, 211, 238, .45);
  outline: none;
}

.ccbe-cal-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.ccbe-cal-count {
  color: var(--ccbe-muted);
  font: .7rem var(--ccbe-font-mono);
  letter-spacing: .07em;
  text-transform: uppercase;
}

.ccbe-cal-views {
  display: inline-flex;
  border: 1px solid rgba(34, 211, 238, .34);
  background: rgba(0, 8, 12, .85);
}

.ccbe-cal-tab {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: var(--ccbe-muted);
  font: 600 .68rem var(--ccbe-font-display);
  letter-spacing: .07em;
  text-transform: uppercase;
  cursor: pointer;
  transition: .18s ease;
}

.ccbe-cal-tab + .ccbe-cal-tab {
  border-left: 1px solid rgba(34, 211, 238, .22);
}

.ccbe-cal-tab.is-active {
  background: rgba(34, 211, 238, .18);
  color: #fff;
  text-shadow: 0 0 10px rgba(34, 211, 238, .55);
}

.ccbe-cal-tab:hover:not(.is-active),
.ccbe-cal-tab:focus-visible {
  color: var(--ccbe-cyan-bright);
  background: rgba(34, 211, 238, .08);
  outline: none;
}

/* Legend matching gestion.ccbe.space scopes */
.ccbe-cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 14px 0 18px;
}

.ccbe-leg {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #cde3e8;
  font: .68rem/1.3 var(--ccbe-font-display);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.ccbe-leg i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex: 0 0 auto;
}

.ccbe-leg--principal i { background: #f1c40f; }
.ccbe-leg--secundario i { background: #29bfd6; }
.ccbe-leg--privada i { background: #2ecc71; }
.ccbe-leg--merr i { background: #d62828; }
.ccbe-leg--mandalorianos i { background: #ff5300; }
.ccbe-leg--trade i { background: #e91e63; }
.ccbe-leg--general i { background: #22d3ee; }

/* Monthly calendar grid */
.ccbe-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border: 1px solid rgba(34, 211, 238, .24);
  border-bottom: 0;
  background: rgba(6, 182, 212, .09);
}

.ccbe-cal-weekdays span {
  padding: 10px 8px;
  text-align: center;
  color: var(--ccbe-cyan-bright);
  font: 700 .66rem var(--ccbe-font-display);
  letter-spacing: .09em;
  text-transform: uppercase;
}

.ccbe-cal-weekdays span + span {
  border-left: 1px solid rgba(34, 211, 238, .14);
}

.ccbe-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-top: 1px solid rgba(34, 211, 238, .22);
  border-left: 1px solid rgba(34, 211, 238, .22);
}

.ccbe-cal-day {
  min-width: 0;
  min-height: 122px;
  padding: 8px;
  border-right: 1px solid rgba(34, 211, 238, .22);
  border-bottom: 1px solid rgba(34, 211, 238, .22);
  background: rgba(2, 9, 12, .74);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ccbe-cal-day.is-outside {
  background: rgba(1, 4, 6, .45);
  opacity: .48;
}

.ccbe-cal-day.is-today {
  background: rgba(6, 182, 212, .09);
  box-shadow: inset 0 2px 0 var(--ccbe-cyan), inset 0 0 24px rgba(34, 211, 238, .12);
}

.ccbe-cal-day__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.ccbe-cal-day__num {
  color: #e6f8fc;
  font: 700 .78rem var(--ccbe-font-mono);
}

.ccbe-cal-day.is-today .ccbe-cal-day__num {
  color: var(--ccbe-cyan);
  text-shadow: 0 0 8px rgba(34, 211, 238, .65);
}

.ccbe-cal-today-tag {
  padding: 1px 5px;
  border: 1px solid var(--ccbe-cyan);
  color: var(--ccbe-cyan-bright);
  font: 700 .56rem/1.3 var(--ccbe-font-mono);
  letter-spacing: .06em;
}

.ccbe-cal-day__events {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

/* Strict title-only event item: never clickable, no time/details */
.ccbe-cal-ev {
  min-width: 0;
  padding: 5px 7px;
  border-left: 3px solid #29bfd6;
  background: rgba(41, 191, 214, .1);
  color: #ecf9fc;
  font: 500 .72rem/1.35 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ccbe-cal-ev--principal { border-left-color: #f1c40f; background: rgba(241, 196, 15, .13); }
.ccbe-cal-ev--secundario { border-left-color: #29bfd6; background: rgba(41, 191, 214, .12); }
.ccbe-cal-ev--privada { border-left-color: #2ecc71; background: rgba(46, 204, 113, .13); }
.ccbe-cal-ev--merr { border-left-color: #d62828; background: rgba(156, 0, 0, .24); }
.ccbe-cal-ev--mandalorianos { border-left-color: #ff5300; background: rgba(255, 83, 0, .15); }
.ccbe-cal-ev--trade { border-left-color: #e91e63; background: rgba(233, 30, 99, .15); }
.ccbe-cal-ev--general { border-left-color: #22d3ee; background: rgba(34, 211, 238, .12); }

.ccbe-cal-more {
  align-self: flex-start;
  padding: 2px 7px;
  border: 1px solid rgba(34, 211, 238, .35);
  background: rgba(6, 182, 212, .12);
  color: var(--ccbe-cyan-bright);
  font: 700 .64rem/1.4 var(--ccbe-font-mono);
  cursor: pointer;
}

.ccbe-cal-more:hover,
.ccbe-cal-more:focus-visible {
  background: var(--ccbe-cyan);
  color: #001015;
  outline: none;
}

/* Agenda view */
.ccbe-agenda-list {
  display: grid;
  gap: 12px;
}

.ccbe-agenda-day {
  display: grid;
  grid-template-columns: 165px minmax(0, 1fr);
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(34, 211, 238, .2);
  background: rgba(2, 10, 14, .78);
}

.ccbe-agenda-day.is-today {
  border-color: var(--ccbe-cyan);
  box-shadow: 0 0 18px rgba(34, 211, 238, .14);
}

.ccbe-agenda-date {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ccbe-agenda-date strong {
  color: #fff;
  font: 700 .86rem/1.3 var(--ccbe-font-display);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.ccbe-agenda-date span {
  color: var(--ccbe-cyan);
  font: .72rem var(--ccbe-font-mono);
  text-transform: uppercase;
}

.ccbe-agenda-items {
  display: grid;
  gap: 8px;
  align-content: start;
}

.ccbe-agenda-items .ccbe-cal-ev {
  padding: 9px 12px;
  font-size: .88rem;
}

.ccbe-cal-empty {
  padding: 36px 20px;
  border: 1px dashed rgba(34, 211, 238, .28);
  text-align: center;
  color: var(--ccbe-muted);
  font: .8rem/1.6 var(--ccbe-font-display);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.ccbe-cal-note {
  margin: 18px 0 0;
  color: rgba(148, 168, 173, .85);
  font: .72rem/1.6 var(--ccbe-font-mono);
  text-align: center;
}

@media (max-width: 900px) {
  .ccbe-act-section {
    width: min(calc(100% - 28px), 1180px);
    padding: 28px 0 72px;
  }
  .ccbe-act-shell {
    padding: 18px 14px;
  }
  .ccbe-cal-day {
    min-height: 105px;
    padding: 6px;
  }
  .ccbe-cal-ev {
    font-size: .68rem;
    padding: 4px 6px;
  }
}

@media (max-width: 760px) {
  .ccbe-cal-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .ccbe-cal-nav {
    justify-content: space-between;
  }
  .ccbe-cal-month {
    flex: 1;
    min-width: 0;
    font-size: .92rem;
  }
  .ccbe-cal-right {
    margin-left: 0;
    justify-content: space-between;
  }
  .ccbe-cal-grid-wrap {
    overflow-x: auto;
  }
  .ccbe-cal-weekdays,
  .ccbe-cal-grid {
    min-width: 680px;
  }
  .ccbe-agenda-day {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px;
  }
}

@media (max-width: 520px) {
  .ccbe-cal-right {
    flex-direction: column;
    align-items: stretch;
  }
  .ccbe-cal-views {
    width: 100%;
  }
  .ccbe-cal-tab {
    flex: 1;
    padding: 0 8px;
    font-size: .62rem;
  }
}
