/* Department schedule: read-only calendar / list. No admin or account data in client code. */
body[data-page="schedule"]{background:#f5f7fb}
body[data-page="schedule"] .schedule-intro{padding-bottom:18px}
body[data-page="schedule"] .schedule-source-note{font-size:13px!important;color:#52647e;line-height:1.7;margin-top:9px!important}
.schedule-page{padding-bottom:70px}
.schedule-toolbar,.schedule-card{border:1px solid #dbe3ef;border-radius:16px;background:#fff;box-shadow:0 4px 20px rgba(20,45,112,.035)}
.schedule-toolbar{display:grid;grid-template-columns:270px minmax(0,1fr);gap:24px;align-items:end;margin-bottom:16px;padding:19px 22px}
.schedule-search-wrap,.schedule-filter-wrap{display:grid;gap:10px;min-width:0}
.schedule-search-wrap label,.schedule-filter-label{display:block;color:#304665;font-size:13px;font-weight:750}
.schedule-search-wrap input{height:44px;width:100%;margin:0;border:1px solid #bdcbe1;border-radius:9px;padding:0 13px;background:#fff;color:#142d50;font:inherit;font-size:14px}
.schedule-filters{display:flex;gap:7px;flex-wrap:wrap}
.schedule-filters button{min-height:40px;padding:7px 12px;border:1px solid #d4dfee;border-radius:9px;background:#f8faff;color:#364c6c;font:inherit;font-size:13px;font-weight:700;cursor:pointer}
.schedule-filters button[aria-pressed="true"]{border-color:#142d70;background:#142d70;color:#fff}
.schedule-layout{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(290px,.9fr);gap:16px;align-items:start}
.schedule-card{min-width:0;padding:23px}
.schedule-section-heading{display:flex;gap:16px;align-items:start;justify-content:space-between;margin-bottom:21px}
.schedule-section-heading h2{margin:0 0 3px;color:#142d70;font-size:21px;line-height:1.35}
.schedule-section-heading p{margin:0;color:#617089;font-size:13px;line-height:1.5}
.schedule-month-controls{display:flex;gap:5px;align-items:center;flex-shrink:0}
.schedule-month-controls button{width:34px;height:36px;display:grid;place-items:center;border:1px solid #d9e3ef;border-radius:8px;background:#fff;color:#142d70;font:inherit;font-weight:700;font-size:24px;cursor:pointer}
.schedule-month-controls strong{min-width:105px;text-align:center;color:#162c50;font-size:15px;white-space:nowrap}
.schedule-month-controls button.schedule-today{width:auto;height:36px;padding:0 9px;font-size:13px}
.schedule-weekdays,.schedule-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}
.schedule-weekdays{border-bottom:1px solid #e9eef5;padding-bottom:8px;color:#62718a;font-size:13px;font-weight:700;text-align:center}
.schedule-weekdays span:first-child{color:#b7505b}
.schedule-weekdays span:last-child{color:#3866b3}
.schedule-days{gap:5px;padding-top:9px}
.schedule-day{position:relative;display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;gap:4px;min-width:0;min-height:78px;padding:9px;border:1px solid transparent;border-radius:10px;background:#fbfcff;color:#344c6e;font:inherit;text-align:left;cursor:pointer}
.schedule-day:hover{border-color:#a8bddc;background:#f2f7ff}
.schedule-day.is-outside{color:#94a0b3;background:#fff}
.schedule-day.is-today{border-color:#9ebde6}
.schedule-day.is-selected{border-color:#153f89;background:#eaf1ff;box-shadow:inset 0 0 0 1px #153f89}
.schedule-day-number{font-size:13px;font-weight:800;line-height:1.5}
.schedule-day.is-today .schedule-day-number{color:#1554a0}
.schedule-day-meta{display:flex;gap:5px;align-items:center;min-height:10px;font-size:11px;color:#285799;font-weight:700}
.schedule-day-dot{width:6px;height:6px;border-radius:50%;background:#245cbb;flex-shrink:0}
.schedule-day.is-outside .schedule-day-dot{background:#93a7c5}
.schedule-calendar-help{display:flex;align-items:center;gap:6px;margin:12px 0 0;color:#617089;font-size:12px}
.schedule-dot-legend{display:inline-block;width:7px;height:7px;border-radius:50%;background:#245cbb}
.schedule-day-panel{margin-top:23px;border-top:1px solid #e5ebf3;padding-top:16px}
.schedule-day-panel h3{margin:0 0 12px;color:#142d70;font-size:17px}
.schedule-count{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;background:#eef3fb;color:#174787;padding:5px 10px;font-size:12px;font-weight:800;white-space:nowrap}
.schedule-upcoming .schedule-section-heading{align-items:center}
.schedule-empty{margin:0;padding:22px 14px;border:1px dashed #cbd8e9;border-radius:11px;background:#fafcff;color:#5e6d81;font-size:14px;text-align:center;line-height:1.75;word-break:keep-all}
.schedule-event-list{list-style:none;padding:0;margin:0;display:grid;gap:9px}
.schedule-event{display:grid;gap:8px;padding:13px 14px;border:1px solid #e0e7f1;border-radius:11px;background:#fff}
.schedule-event-top{display:flex;gap:6px;align-items:center;justify-content:space-between}
.schedule-event-category{display:inline-block;padding:3px 8px;border-radius:6px;background:#eaf0fc;color:#215399;font-size:11px;font-weight:800}
.schedule-event-category[data-category="academic"]{background:#e7effe;color:#214f92}
.schedule-event-category[data-category="exam"]{background:#fff0e7;color:#a34c1b}
.schedule-event-category[data-category="project"]{background:#eaf5ef;color:#227149}
.schedule-event-category[data-category="employment"]{background:#f0eafa;color:#65459e}
.schedule-event-category[data-category="certificate"]{background:#fff6df;color:#815b13}
.schedule-event-category[data-category="event"]{background:#e6f5f7;color:#146978}
.schedule-event-dday{font-weight:800;color:#1a4a91;font-size:12px}
.schedule-event-title{margin:0;color:#162e53;font-size:15px;line-height:1.5;font-weight:800;overflow-wrap:anywhere}
.schedule-event-time,.schedule-event-description{margin:0;color:#566981;font-size:13px;line-height:1.6;white-space:normal;overflow-wrap:anywhere}
.schedule-event-link{width:fit-content;display:inline-flex;align-items:center;min-height:34px;color:#174f97;font-size:13px;font-weight:700;text-decoration:underline;text-underline-offset:3px}
.schedule-result-note{min-height:1em;margin:12px 0 0;color:#51647e;font-size:13px}
.schedule-admin-note{margin:17px 0 0;padding:13px 16px;border-radius:10px;background:#eaf0fa;color:#4d617d;font-size:13px;line-height:1.7}
.schedule-page button:focus-visible,.schedule-page input:focus-visible{outline:3px solid #1ba7d4;outline-offset:2px}
@media(max-width:1100px){.schedule-toolbar{grid-template-columns:1fr;gap:15px}.schedule-layout{grid-template-columns:minmax(0,1.3fr) minmax(260px,.9fr)}.schedule-section-heading{flex-direction:column}.schedule-month-controls{width:100%;justify-content:flex-start}}
@media(max-width:767px){.schedule-page{padding-bottom:36px}.schedule-toolbar,.schedule-card{padding:15px;border-radius:12px}.schedule-layout{grid-template-columns:1fr;gap:11px}.schedule-toolbar{gap:16px}.schedule-section-heading{gap:10px;margin-bottom:14px}.schedule-section-heading h2{font-size:19px}.schedule-month-controls{justify-content:space-between;gap:3px}.schedule-month-controls strong{min-width:100px}.schedule-days{gap:3px}.schedule-day{min-height:60px;padding:6px;border-radius:8px}.schedule-day-number{font-size:13px}.schedule-day-meta{font-size:10px}.schedule-filters button{min-height:42px}.schedule-event{padding:13px}.schedule-upcoming .schedule-section-heading{flex-direction:row}}
@media(max-width:370px){.schedule-days{gap:2px}.schedule-day{min-height:54px;padding:5px}.schedule-month-controls strong{font-size:14px;min-width:98px}}
@media(prefers-reduced-motion:reduce){.schedule-page *{scroll-behavior:auto}}

.schedule-sync-status{margin:0 0 13px;padding:12px 15px;border:1px solid #cddbed;border-radius:10px;background:#edf4fd;color:#34547b;font-size:13px;line-height:1.7}
.schedule-registration{margin-bottom:16px}
.schedule-registration summary{cursor:pointer;color:#142d70;font-size:17px;font-weight:800;min-height:28px}
.schedule-registration>p{color:#566981;font-size:14px;margin:14px 0}
.schedule-register-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.schedule-register-grid label{display:grid;gap:7px;min-width:0;font-size:13px;font-weight:700;color:#304665}
.schedule-register-title{grid-column:span 2}
.schedule-register-pair{grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;min-width:0}
.schedule-register-grid input,.schedule-register-grid select{box-sizing:border-box;min-width:0;width:100%;height:44px;padding:9px 11px;border:1px solid #bdcbe1;border-radius:8px;background:#fff;color:#142d50;font:inherit;font-size:16px}
.schedule-all-day{display:flex;align-items:center;gap:8px;margin:15px 0;font-size:14px;color:#304665}
.schedule-all-day input{width:18px;height:18px}
.schedule-register-actions{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.schedule-register-actions button{min-height:44px;padding:10px 20px;border:0;border-radius:9px;background:#142d70;color:white;font:inherit;font-weight:700;cursor:pointer}
.schedule-register-actions button:disabled{opacity:.55;cursor:wait}
.schedule-register-actions span,#schedule-register-status{font-size:13px;color:#52647e}
#schedule-register-status{margin:12px 0 0;line-height:1.6}
.schedule-register-trap{position:absolute;left:-10000px;width:1px;height:1px;overflow:hidden}
@media(max-width:767px){.schedule-register-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.schedule-register-title{grid-column:1/-1}.schedule-register-pair{gap:10px}.schedule-register-pair input{padding-inline:7px;font-size:14px}}

/* Delete action is available only for events explicitly marked as portal-created. */
.schedule-event-actions{display:flex;justify-content:flex-end}
.schedule-delete-button{min-height:36px;padding:7px 12px;border:1px solid #bdcbe1;border-radius:8px;background:#fff;color:#9a2935;font:inherit;font-size:13px;font-weight:750;cursor:pointer}
.schedule-delete-button:hover{background:#fff4f4;border-color:#be6e77}
.schedule-delete-button:disabled{opacity:.55;cursor:wait}
.schedule-action-status{margin:12px 0 0;color:#304665;font-size:13px;line-height:1.6}
.schedule-action-status:empty{display:none}

/* Phase 2: target-grade audience and calendar filter. */
.schedule-grade-filter{grid-column:1/-1;display:flex;flex-wrap:wrap;align-items:center;gap:12px;min-width:0;padding-top:5px;border-top:1px solid #edf0f7}
.schedule-grade-filter .schedule-filter-label{white-space:nowrap}
.schedule-event-top{justify-content:flex-start;flex-wrap:wrap}
.schedule-event-dday{margin-left:auto}
.schedule-grade-badge{padding:3px 8px;border-radius:6px;background:#eef3fb;color:#425a7a;font-weight:800;font-size:11px}
.schedule-page select:focus-visible{outline:3px solid #1ba7d4;outline-offset:2px}
@media(max-width:767px){.schedule-grade-filter{align-items:flex-start;gap:9px}.schedule-grade-filter .schedule-filter-label{width:100%}}


/* Per-event sharing controls: compact on desktop and wrap on narrow screens. */
.schedule-event-actions{display:flex;justify-content:flex-start;align-items:center;gap:7px;flex-wrap:wrap}
.schedule-share-button{min-height:36px;padding:7px 10px;border:1px solid #bdcbe1;border-radius:8px;background:#f8faff;color:#264b7f;font:inherit;font-size:12px;font-weight:750;cursor:pointer;white-space:nowrap}
.schedule-share-button:hover{background:#eef4ff;border-color:#8eaacc}
.schedule-share-band{background:#e9f6ec;border-color:#acdfbf;color:#166d3c}
.schedule-share-band:hover{background:#d9efdf;border-color:#78c492}
.schedule-event-actions .schedule-delete-button{margin-left:auto}
.schedule-event.is-shared{border:2px solid #245cbb;background:#f6f9ff}
@media(max-width:767px){
  .schedule-event-actions{gap:6px}
  .schedule-share-button{min-height:38px;padding:8px 10px;font-size:12px}
}

.schedule-share-note{margin:13px 0 0;color:#576b81;font-size:12px;line-height:1.65}
