.schedule-panel[hidden], .admin-placeholder[hidden] { display: none; }
.schedule-panel { min-width: 0; border-radius: 20px; overflow: hidden; }
.schedule-toolbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; padding: 24px 26px 20px; }
.schedule-toolbar h2 { margin: 0; font-size: clamp(19px,2vw,25px); }
.schedule-mode-note { margin: 7px 0 0; color: #667b75; font-size: 13px; }
.schedule-toolbar-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.schedule-add, .schedule-save { flex: none; padding: 11px 17px; border: 0; border-radius: 11px; background: var(--navy); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.schedule-modules-button { flex: none; padding: 10px 16px; border: 1px solid #80aba0; border-radius: 11px; background: rgba(255,255,255,.7); color: var(--navy); font: inherit; font-weight: 700; cursor: pointer; }
.schedule-modules-button:hover { background: #e6f3ed; }
.schedule-add:hover, .schedule-save:hover { background: var(--cyan); }
.schedule-feedback { margin: 0 26px 16px; padding: 10px 13px; border-radius: 10px; background: #e9f4ec; color: #22614d; font-size: 13px; }
.schedule-feedback[hidden] { display: none; }
.schedule-table-scroll { max-height: calc(100dvh - 200px); min-height: 210px; overflow: auto; overscroll-behavior: contain; border-top: 1px solid #d7e2df; }
.schedule-table { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 13px; }
.schedule-table th, .schedule-table td { box-sizing: border-box; min-width: 132px; max-width: 210px; padding: 12px 13px; text-align: left; vertical-align: middle; border-right: 1px solid #e1e9e6; border-bottom: 1px solid #e1e9e6; background: rgba(255,255,255,.74); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.schedule-table th { position: sticky; top: 0; z-index: 5; background: #edf5f0; font-size: 12px; color: #345d58; box-shadow: 0 1px 0 #c9dbd4; }
.schedule-table tr:hover td { background: #f7faf8; }
.schedule-table .schedule-actions { width: 60px; min-width: 60px; max-width: 60px; left: 0; position: sticky; z-index: 3; white-space: normal; padding: 7px 5px; }
.schedule-table .schedule-cover { width: 64px; min-width: 64px; max-width: 64px; left: 60px; position: sticky; z-index: 3; padding: 7px; }
.schedule-table .schedule-module { width: 45px; min-width: 45px; max-width: 45px; left: 124px; position: sticky; z-index: 3; padding: 8px; text-align: center; font-weight: 800; }
.schedule-table .schedule-topic { width: 100px; min-width: 100px; max-width: 100px; left: 169px; position: sticky; z-index: 3; font-weight: 700; box-shadow: 3px 0 8px rgba(26,61,73,.07); }
.schedule-table th.schedule-actions, .schedule-table th.schedule-cover, .schedule-table th.schedule-module, .schedule-table th.schedule-topic { z-index: 8; background: #e8f2ed; }
.schedule-table .schedule-cover img { width: 50px; height: 28px; object-fit: cover; display: block; border-radius: 5px; background: #dae7e2; }
.schedule-table .schedule-cover-empty { display: block; width: 50px; height: 28px; background: #dae7e2; border-radius: 5px; }
.schedule-action-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 3px; }
.schedule-action-grid button { width: 25px; height: 25px; padding: 0; border: 1px solid #d3dfda; border-radius: 6px; background: #fff; color: var(--navy); cursor: pointer; font-size: 16px; line-height: 1; }
.schedule-action-grid button:hover { border-color: var(--cyan); background: #e9f6f2; }
.schedule-action-grid button:disabled { opacity: .3; cursor: default; }
.schedule-action-grid button[data-action="delete"] { color: #a34444; }
.schedule-muted { color: #889992; }
.schedule-empty { padding: 32px !important; text-align: center !important; font-size: 14px; color: #60736e; }
.schedule-dialog-edit { width: min(880px,calc(100vw - 24px)); max-height: min(90dvh,900px); padding: 0; border: 1px solid #d9e5df; border-radius: 20px; color: var(--navy); background: #f6f8f5; box-shadow: 0 25px 80px rgba(16,44,52,.3); }
.schedule-dialog-edit::backdrop { background: rgba(16,32,42,.53); backdrop-filter: blur(5px); }
.schedule-dialog-edit form { display: flex; flex-direction: column; max-height: inherit; }
.schedule-dialog-header, .schedule-dialog-actions { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 18px 25px; background: transparent; }
.schedule-dialog-header { border-bottom: 1px solid #e0e9e4; }
.schedule-dialog-header h2 { margin: 0; font-size: 24px; }
.schedule-dialog-close { width: 34px; height: 34px; border: 0; background: transparent; color: var(--navy); font-size: 27px; cursor: pointer; }
.schedule-form-content { overflow-y: auto; padding: 22px 25px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.schedule-field { min-width: 0; padding: 14px; border: 1px solid #dce7e1; border-radius: 13px; background: rgba(255,255,255,.72); }
.schedule-field.wide { grid-column: 1 / -1; }
.schedule-field-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.schedule-field-top > label, .schedule-field-label { font-size: 13px; font-weight: 700; }
.schedule-field input:not([type="checkbox"]):not([type="file"]):not([type="radio"]), .schedule-field select, .schedule-field textarea { width: 100%; min-height: 39px; padding: 8px 10px; border: 1px solid #b9cdc4; border-radius: 8px; background: #fff; color: var(--navy); font: inherit; font-size: 13px; }
.schedule-field textarea { min-height: 80px; resize: vertical; }
.schedule-mode-options { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
.schedule-mode-option { position: relative; cursor: pointer; }
.schedule-mode-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.schedule-mode-option span { display: flex; min-height: 39px; align-items: center; justify-content: center; padding: 7px 4px; border: 1px solid #b9cdc4; border-radius: 8px; background: #fff; color: var(--navy); font-size: 13px; font-weight: 600; text-align: center; }
.schedule-mode-option input:checked + span { border-color: var(--cyan); background: #e2f3ed; color: var(--navy); box-shadow: inset 0 0 0 1px var(--cyan); }
.schedule-mode-option input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 2px; }
.schedule-field small { display: block; margin-top: 5px; color: #71827c; font-size: 11px; }
.schedule-cover-preview { width: min(100%,260px); aspect-ratio: 16/9; display: block; object-fit: cover; margin: 0 0 10px; border-radius: 9px; background: #e2ebe6; }
.schedule-cover-preview[hidden], .schedule-cover-error[hidden] { display: none; }
.schedule-cover-preview { margin-top: 10px; }
.schedule-cover-error { color: #963c36 !important; }
.schedule-evaluators { display: flex; flex-wrap: wrap; gap: 9px 15px; }
.schedule-evaluators label { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; }
.schedule-other { margin-top: 10px; }
.schedule-modules-content { overflow-y: auto; padding: 18px 25px; display: grid; gap: 12px; }
.schedule-module-card { display: grid; grid-template-columns: 88px minmax(0,1fr) minmax(0,1fr); gap: 12px; align-items: end; padding: 14px; border: 1px solid #dce7e1; border-radius: 13px; background: rgba(255,255,255,.72); }
.schedule-module-card strong { align-self: center; color: var(--cyan); }
.schedule-module-card label { display: grid; gap: 5px; font-size: 12px; font-weight: 700; }
.schedule-module-card input { width: 100%; min-width: 0; padding: 9px 10px; border: 1px solid #b9cdc4; border-radius: 8px; background: #fff; color: var(--navy); font: inherit; font-size: 13px; }
.schedule-module-image-field { grid-column: 2 / -1; }
.schedule-module-image-field small { color: #71827c; font-size: 11px; font-weight: 400; }
.schedule-module-image-preview, .schedule-module-image-error { grid-column: 2 / -1; }
.schedule-module-image-preview { display: block; max-width: 220px; max-height: 140px; width: auto; height: auto; border-radius: 8px; object-fit: contain; }
.schedule-module-image-preview[hidden], .schedule-module-image-error[hidden] { display: none; }
.schedule-module-image-error { color: #963c36; font-size: 12px; }
.schedule-dialog-actions { border-top: 1px solid #e0e9e4; }
.schedule-form-error { margin: 0 25px 12px; padding: 9px 12px; border-radius: 8px; color: #963c36; background: #fbe9e7; font-size: 13px; }
.schedule-form-error[hidden] { display: none; }
.schedule-cancel { border: 1px solid #adc9bf; border-radius: 10px; padding: 9px 17px; background: #fff; color: var(--navy); font: inherit; cursor: pointer; }
.schedule-save:disabled { opacity: .55; cursor: wait; }
@media (max-width: 700px) { .schedule-toolbar { flex-wrap: wrap; padding: 18px; } .schedule-table-scroll { max-height: calc(100dvh - 235px); } .schedule-form-content { grid-template-columns: 1fr; padding: 14px; } .schedule-field.wide { grid-column: auto; } .schedule-module-card { grid-template-columns: 1fr; } .schedule-module-image-field, .schedule-module-image-preview, .schedule-module-image-error { grid-column: 1; } .schedule-dialog-header, .schedule-dialog-actions { padding: 14px; } }

/* Sheet-backed schedule table: the widths are set per column by schedule.js. */
.schedule-toolbar-actions { align-items: center; }
.schedule-active-filters { padding: 0 26px; }
#schedule-search { width: clamp(190px, 22vw, 300px); min-height: 40px; padding: 8px 12px; border: 1px solid #adc9bf; border-radius: 10px; background: rgba(255,255,255,.72); color: var(--navy); font: inherit; }
.schedule-table th, .schedule-table td { width: var(--column-width,155px); min-width: var(--column-width,155px); max-width: var(--column-width,155px); padding: 9px 10px; white-space: nowrap; }
.schedule-table th { padding-right: 15px; }
.schedule-table .schedule-col-coverUrl { position: sticky; left: 0; z-index: 3; background: #f2f5f0; }
.schedule-table .schedule-col-module { position: sticky; left: var(--schedule-module-left,82px); z-index: 3; background: #f2f5f0; font-weight: 700; }
.schedule-table .schedule-col-topic { position: sticky; left: var(--schedule-topic-left,172px); z-index: 3; background: #f5f7f4; font-weight: 700; box-shadow: 3px 0 8px rgba(26,61,73,.06); }
.schedule-table th.schedule-col-coverUrl, .schedule-table th.schedule-col-module, .schedule-table th.schedule-col-topic { z-index: 7; background: #dceae6; }
.schedule-table tbody tr:nth-child(even) td:not(.schedule-col-module):not(.schedule-col-topic) { background: rgba(255,255,255,.46); }
.schedule-table tbody tr:hover td { background: #eaf4ef !important; }
.schedule-table th { overflow: visible; }
.schedule-cover-button { display: inline-flex; justify-content: center; align-items: center; width: 54px; height: 34px; padding: 0; border: 1px solid #b7d1c6; border-radius: 6px; background: #fff; color: var(--cyan); font: inherit; font-size: 11px; cursor: pointer; overflow: hidden; }
.schedule-cover-button img { width: 100%; height: 100%; object-fit: cover; }
.schedule-columns-menu { position: fixed; z-index: 1000; display: grid; grid-template-columns: repeat(2,minmax(160px,1fr)); gap: 8px 16px; width: min(510px,calc(100vw - 35px)); max-height: 60vh; overflow-y: auto; padding: 18px; border: 1px solid #bfd5cc; border-radius: 13px; background: #f8faf7; box-shadow: 0 18px 46px rgba(20,44,49,.18); }
.schedule-panel { position: relative; }
.schedule-columns-menu[hidden] { display: none; }
.schedule-columns-menu strong { grid-column: 1 / -1; }
.schedule-columns-menu label { display: flex; align-items: center; gap: 7px; font-size: 12px; }
.schedule-cover-topic { grid-column: 1 / -1; font-weight: 700; }
.schedule-cover-field { grid-column: 1 / -1; display: grid; gap: 8px; font-weight: 700; }
.schedule-cover-field input { width: 100%; padding: 10px; border: 1px solid #b9cdc4; border-radius: 9px; background: #fff; color: var(--navy); font: inherit; }
.schedule-cover-help { grid-column: 1 / -1; margin: -6px 0 0; color: #667b75; font-size: 12px; }
#schedule-cover-preview { grid-column: 1 / -1; width: min(100%,300px); height: auto; max-height: 180px; object-fit: contain; }
#schedule-cover-preview[hidden] { display: none; }
.schedule-module-card { grid-template-columns: 80px minmax(0,1fr); align-items: center; }
.schedule-module-name { margin: 0; font-size: 13px; font-weight: 700; }
.schedule-module-image-field { grid-column: 2; }
@media (max-width:700px) { #schedule-search { width: 100%; } .schedule-module-image-field { grid-column: 1; } }
