.timetable-page-title { align-items: flex-start; }
.timetable-mode-tabs { display: flex; gap: 10px; margin-bottom: 16px; }
.timetable-mode-tabs button { border: 1px solid #ddd9fb; background: #fff; color: #5e54a5; border-radius: 12px; padding: 12px 20px; font: inherit; font-weight: 800; cursor: pointer; }
.timetable-mode-tabs button.active { color: #fff; background: linear-gradient(135deg, #7059df, #5642c5); box-shadow: 0 8px 20px rgba(91,69,201,.2); }
.timetable-builder-controls { display: grid; grid-template-columns: repeat(4,minmax(135px,1fr)) auto; gap: 14px; align-items: end; padding: 18px; margin-bottom: 16px; }
.timetable-builder-controls label,.tt-settings-form label { display: grid; gap: 7px; color: #67627f; font-size: 12px; font-weight: 700; }
.timetable-builder-controls select,.tt-settings-form input,.tt-settings-form select { width: 100%; min-height: 46px; border: 1px solid #e0deed; border-radius: 10px; padding: 8px 11px; background: #fff; color: #171d3b; font: inherit; }
.timetable-workspace { padding: 18px; }
.timetable-workspace-head { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 14px; }
.timetable-workspace-head h2,.timetable-palette-wrap h3 { margin: 0; color: #171d3b; }
.timetable-workspace-head p,.timetable-palette-wrap p { margin: 5px 0 0; color: #8b87a5; font-size: 12px; }
#timetableClassBadge { padding: 7px 11px; color: #614ed1; background: #f0edff; border-radius: 999px; font-size: 12px; font-weight: 800; }
.timetable-table-wrap { overflow: auto; border: 1px solid #e5e3ef; border-radius: 14px; background: #fff; }
.class-timetable { width: 100%; min-width: 880px; border-collapse: collapse; table-layout: fixed; }
.class-timetable th,.class-timetable td { border: 1px solid #e8e6f0; padding: 8px; text-align: center; vertical-align: middle; }
.class-timetable thead th { background: #f5f3ff; color: #44398b; font-size: 12px; }
.class-timetable .tt-time-cell { width: 125px; background: #fafafe; color: #646078; font-size: 11px; }
.class-timetable .tt-time-cell strong { display: block; margin-bottom: 3px; color: #2b3158; font-size: 12px; }
.class-timetable .tt-slot-cell { height: 76px; background: #fff; transition: .15s ease; }
.class-timetable .tt-slot-cell:hover,.class-timetable .tt-slot-cell.drag-over { background: #f4f1ff; box-shadow: inset 0 0 0 2px #907ce8; }
.class-timetable .tt-slot-cell.selected-cell { background: #eeeaff; box-shadow: inset 0 0 0 2px #6d56d8; }
.class-timetable .tt-break-row td { background: #fff8d9; color: #92711e; font-weight: 800; }
.class-timetable .tt-dismissal-row td { background: #e9f8f1; color: #25775a; font-weight: 800; }
.tt-assignment { min-height: 56px; display: grid; place-items: center; align-content: center; gap: 3px; padding: 6px; border-radius: 10px; position: relative; }
.tt-assignment strong { color: #242849; font-size: 12px; }
.tt-assignment small { color: #67627f; font-size: 10px; }
.tt-assignment button { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border: 0; border-radius: 50%; background: rgba(255,255,255,.85); color: #c33; cursor: pointer; }
.timetable-palette-wrap { margin-top: 18px; padding-top: 16px; border-top: 1px solid #ebe9f2; }
.timetable-card-palette { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 13px; min-height: 56px; }
.tt-drag-card { min-width: 130px; padding: 11px 14px; border: 1px solid rgba(70,60,120,.12); border-radius: 12px; color: #262947; font-size: 12px; font-weight: 800; cursor: grab; box-shadow: 0 5px 13px rgba(39,35,75,.08); user-select: none; }
.tt-drag-card:active { cursor: grabbing; }
.tt-empty { padding: 35px 15px; text-align: center; color: #8b87a5; }
.tt-empty b { display: block; margin-bottom: 5px; color: #3a3e61; }
.tt-settings { direction: rtl; }
.tt-settings-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 18px; }
.tt-settings-nav button { border: 1px solid #dedaf3; border-radius: 10px; padding: 9px 13px; background: #fff; color: #5b4cc2; font: inherit; font-weight: 800; cursor: pointer; }
.tt-settings-nav button.active { background: #6451d1; color: #fff; }
.tt-settings-form { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; padding: 14px; border-radius: 13px; background: #f8f7fd; }
.tt-settings-form .full { grid-column: 1/-1; }
.tt-settings-form button { align-self: end; }
.tt-list { display: grid; gap: 9px; margin-top: 14px; }
.tt-list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 13px; border: 1px solid #e7e4f2; border-radius: 11px; background: #fff; }
.tt-list-row div { display: grid; gap: 3px; }
.tt-list-row small { color: #8b87a5; }
.tt-list-row .danger-outline { min-height: 34px; padding: 5px 10px; }
.tt-subject-link-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; margin: 12px 0; }
.tt-subject-link-grid label { display: flex; align-items: center; gap: 8px; padding: 10px; border: 1px solid #e4e1f0; border-radius: 9px; background: #fff; }
@media(max-width:900px){.timetable-builder-controls,.tt-settings-form{grid-template-columns:1fr 1fr}.timetable-builder-controls button{grid-column:1/-1}.tt-subject-link-grid{grid-template-columns:1fr}}
@media(max-width:600px){.timetable-builder-controls,.tt-settings-form{grid-template-columns:1fr}.timetable-mode-tabs{flex-direction:column}}
