.container{max-width:1400px;margin:0 auto}.loading-spinner{width:40px;height:40px;border:4px solid #e5e7eb;border-top-color:#3b82f6;border-radius:50%;animation:spin 1s linear infinite;margin:0 auto}@keyframes spin{to{transform:rotate(1turn)}}.control-panel{background:white;padding:1.5rem;border-radius:.75rem;box-shadow:0 4px 6px rgba(0,0,0,.1);margin-bottom:1.5rem}.control-panel-compact{background:white;padding:.75rem;border-radius:.5rem;box-shadow:0 2px 4px rgba(0,0,0,.1)}.teacher-select-compact{min-width:100px}.period-select-compact,.teacher-select-compact{padding:.25rem .5rem;border:1px solid #d1d5db;border-radius:.25rem;background:white;font-size:.875rem}.period-select-compact{min-width:45px}.btn-compact{padding:.375rem .75rem;font-weight:500;display:inline-flex;align-items:center;gap:.25rem;font-size:.875rem}.btn-add-compact,.btn-compact{border-radius:.25rem;cursor:pointer;transition:all .2s;border:none}.btn-add-compact{padding:.25rem .5rem;background:#10b981;color:white;font-size:.75rem}.btn-add-compact:hover{background:#059669}.btn-remove-compact{padding:.125rem .375rem;background:#ef4444;color:white;border-radius:.25rem;font-size:.875rem;cursor:pointer;border:none;transition:all .2s;line-height:1}.btn-remove-compact:hover{background:#dc2626}.control-group{margin-bottom:1rem}.control-group label{display:block;margin-bottom:.5rem;font-weight:500;color:#374151}.control-group-horizontal{display:flex;align-items:center;gap:.5rem;margin-bottom:1rem}.control-group-horizontal label{font-weight:500;color:#374151}.absent-teacher-row{display:flex;align-items:center;gap:.5rem;margin-bottom:.5rem}.teacher-select{padding:.5rem;border:1px solid #d1d5db;border-radius:.375rem;background:white;min-width:150px}.number-select{min-width:60px}.period-range{display:flex}.btn,.period-range{align-items:center;gap:.5rem}.btn{padding:.5rem 1rem;border-radius:.375rem;font-weight:500;cursor:pointer;transition:all .2s;display:inline-flex;border:none}.primary-btn{background:#3b82f6;color:white}.primary-btn:hover{background:#2563eb}.history-btn{background:#8b5cf6;color:white}.history-btn:hover{background:#7c3aed}.add-btn{background:#10b981;color:white}.add-btn:hover{background:#059669}.danger-btn{background:#ef4444;color:white;padding:.25rem .5rem;font-size:1.25rem;line-height:1}.danger-btn:hover{background:#dc2626}.status-message{padding:.75rem 1rem;border-radius:.5rem;margin-bottom:1rem;font-weight:500;animation:slideIn .3s ease-out}.status-message.success{background:#d1fae5;color:#065f46;border:1px solid #10b981}.status-message.error{background:#fee2e2;color:#991b1b;border:1px solid #ef4444}@keyframes slideIn{0%{transform:translateY(-10px);opacity:0}to{transform:translateY(0);opacity:1}}.schedule-table-container{background:white;padding:1.5rem;border-radius:.75rem;box-shadow:0 4px 6px rgba(0,0,0,.1);height:100%;display:flex;flex-direction:column}.schedule-table{width:100%;height:100%;border-collapse:collapse;table-layout:fixed}.schedule-table td,.schedule-table th{border:1px solid #d1d5db;padding:.75rem;text-align:center}.schedule-table tbody tr{height:1fr}.schedule-table thead{background:white;color:#1f2937}.period-header{font-weight:600}.class-header,.period-header{padding:.5rem;border-right:1px solid rgba(255,255,255,.4)}.class-header{font-weight:500}.period-cell{background:#f3f4f6;font-weight:600;color:#374151;border-right:2px solid #d1d5db}.table-cell{position:relative;transition:all .2s}.table-cell:hover{background:#f3f4f6}.table-cell.absent-teacher{position:relative}.table-cell.absent-teacher:after{content:"";position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(239,68,68,.2);pointer-events:none;border:2px solid #ef4444}.table-cell.reassigned{position:relative}.table-cell.reassigned:after{content:"";position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(251,191,36,.2);pointer-events:none;border:2px solid #f59e0b}.table-cell.changed-subject{position:relative}.table-cell.changed-subject:after{content:"";position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(236,72,153,.2);pointer-events:none;border:2px solid #ec4899}.subject{font-weight:700;font-size:1.125rem}.teacher-name{font-size:.875rem;margin-top:.25rem;opacity:.9}.legend-item{display:flex;align-items:center;gap:.5rem}.legend-color{width:20px;height:20px;border-radius:.25rem;border:1px solid #d1d5db}.legend-color.absent-teacher{background:#fee2e2}.legend-color.reassigned{background:#fef3c7}.legend-color.changed-subject{background:#fce7f3}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.5);display:flex;align-items:center;justify-content:center;z-index:1000}.modal-content{background:white;border-radius:.75rem;max-width:800px;max-height:80vh;width:90%;overflow:hidden;display:flex;flex-direction:column}.modal-header{padding:1.5rem;border-bottom:1px solid #e5e7eb;display:flex;justify-content:space-between;align-items:center}.modal-header h2{font-size:1.5rem;font-weight:600;color:#1f2937}.close-button{background:none;border:none;font-size:1.5rem;color:#6b7280;cursor:pointer;width:32px;height:32px;display:flex;align-items:center;justify-content:center;border-radius:.375rem;transition:all .2s}.close-button:hover{background:#f3f4f6;color:#1f2937}.modal-body{padding:1.5rem;overflow-y:auto;flex:1}.history-list{space-y:1rem}.history-item{border:1px solid #e5e7eb;border-radius:.5rem;padding:1rem;margin-bottom:1rem}.history-header{display:flex;justify-content:space-between;margin-bottom:.75rem;padding-bottom:.75rem;border-bottom:1px solid #e5e7eb}.history-date{font-weight:600;color:#1f2937}.history-teacher{color:#6b7280}.history-changes{space-y:.5rem}.change-item{display:flex;gap:1rem;padding:.5rem;background:#f9fafb;border-radius:.25rem}.change-period{color:#1f2937}.change-class,.change-period{font-weight:500;min-width:60px}.change-class{color:#3b82f6}.change-subject{color:#ef4444;flex:1}.change-teacher{color:#6b7280;flex:1}.matrix-container{overflow-x:auto}.matrix-table{width:100%;border-collapse:collapse}.matrix-table td,.matrix-table th{border:1px solid #e5e7eb;padding:.5rem;text-align:center}.matrix-header-corner{background:#f3f4f6;font-weight:600}.matrix-header,.matrix-row-header{background:#f9fafb;font-weight:500}.matrix-row-header{text-align:left}.matrix-cell{background:white}.matrix-cell.has-changes{background:#fef3c7;font-weight:600}