/* Professional agenda (js/agenda.js). Built on the shared tokens and controls of styles.css. */
.agenda-panel { display: grid; gap: 14px; }
.agenda-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.agenda-toolbar__nav { display: flex; align-items: center; gap: 8px; }
.agenda-toolbar__nav b { min-width: 150px; font-size: 13px; text-align: center; }
.agenda-toolbar__today { min-height: 32px; padding: 0 12px; font-size: 11px; }

.agenda-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.agenda-day { display: grid; align-content: start; gap: 8px; min-height: 180px; padding: 9px; border: 1px solid var(--line); border-radius: 12px; background: rgba(9,18,27,.6); }
.agenda-day.is-today { border-color: var(--line-strong); box-shadow: inset 0 0 0 1px rgba(93,236,255,.18); }
.agenda-day.is-past { opacity: .72; }
.agenda-day__head { display: grid; grid-template-columns: minmax(0,1fr) auto; grid-template-areas: 'weekday add' 'date add'; align-items: center; column-gap: 6px; }
.agenda-day__head span { grid-area: weekday; color: var(--muted); font-size: 9.5px; font-weight: 850; text-transform: uppercase; letter-spacing: .04em; }
.agenda-day__head b { grid-area: date; font-size: 13px; }
.agenda-day.is-today .agenda-day__head b { color: var(--cyan); }
.agenda-day__head .icon-action { grid-area: add; width: 26px; height: 26px; }
.agenda-day__head .icon-action i { font-size: 13px; }
.agenda-day__list { display: grid; gap: 6px; }
.agenda-day__free { padding: 6px 2px; color: var(--soft); font-size: 10px; font-weight: 700; }

.agenda-item { display: grid; grid-template-columns: auto minmax(0,1fr); grid-template-areas: 'time copy' 'badges badges'; gap: 4px 8px; width: 100%; padding: 8px 9px; border: 1px solid var(--line); border-left: 3px solid var(--cyan); border-radius: 9px; color: var(--text); background: rgba(16,30,43,.85); text-align: left; transition: border-color .15s ease, transform .15s ease; }
.agenda-item:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.agenda-item--consultation { border-left-color: var(--green); }
.agenda-item--assessment { border-left-color: var(--orange); }
.agenda-item--other { border-left-color: var(--blue); }
.agenda-item.is-cancelled { opacity: .55; }
.agenda-item.is-cancelled .agenda-item__copy b { text-decoration: line-through; }
.agenda-item__time { grid-area: time; display: grid; color: var(--cyan); font-size: 11px; font-weight: 950; line-height: 1.15; }
.agenda-item__time small { color: var(--soft); font-size: 9px; font-weight: 800; }
.agenda-item__copy { grid-area: copy; display: grid; min-width: 0; gap: 2px; }
.agenda-item__copy b { overflow: hidden; font-size: 10.5px; line-height: 1.3; text-overflow: ellipsis; }
.agenda-item__copy small { display: flex; align-items: center; gap: 4px; overflow: hidden; color: var(--muted); font-size: 9px; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
.agenda-item__copy small i { font-size: 11px; }
.agenda-item__badges { grid-area: badges; display: flex; flex-wrap: wrap; gap: 4px; }
.agenda-item__badges i { font-size: 11px; }
.agenda-empty { margin: 0; text-align: center; }

.agenda-form { grid-template-columns: 1fr; }
.agenda-form__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; }
.agenda-form__wide { grid-column: span 2; }
.agenda-form .form-field input, .agenda-form .form-field select { min-height: 40px; padding: 8px 12px; }
.agenda-form .form-field textarea { min-height: 64px; }
.agenda-form__actions { flex-wrap: wrap; }
.agenda-form__actions .secondary-button { min-height: 40px; }
.agenda-danger { color: var(--red); border-color: rgba(255,92,122,.3); }
.agenda-inline { display: flex; align-items: center; gap: 8px; }
.agenda-inline input { max-width: 90px; }
.agenda-inline small { color: var(--muted); font-size: 11px; font-weight: 700; }
.agenda-weekdays, .agenda-scope { display: flex; flex-wrap: wrap; gap: 6px; }
.agenda-weekday { position: relative; display: inline-flex; min-height: 34px; align-items: center; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: rgba(5,12,19,.72); font-size: 11px; font-weight: 850; cursor: pointer; }
.agenda-weekday input { position: absolute; opacity: 0; pointer-events: none; }
.agenda-weekday.is-on { color: #031116; border-color: var(--cyan); background: var(--cyan); }
.agenda-weekday:focus-within { box-shadow: 0 0 0 3px rgba(93,236,255,.15); }

.agenda-feed { display: grid; gap: 10px; }
.agenda-feed .panel-head h2 { display: flex; align-items: center; gap: 6px; }
.agenda-feed__row { display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 8px; }
.agenda-feed__row .search-field { min-height: 42px; font-size: 11px; }

@media (max-width: 1180px) {
    .agenda-week { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .agenda-form__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .agenda-feed__row { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .agenda-week { grid-template-columns: 1fr; }
    .agenda-day { min-height: 0; }
    .agenda-form__grid { grid-template-columns: 1fr; }
    .agenda-form__wide { grid-column: auto; }
    .agenda-toolbar { flex-direction: column; align-items: stretch; }
    .agenda-toolbar__nav { justify-content: space-between; }
    .agenda-toolbar .form-field--inline select { min-width: 0; flex: 1; }
}
