/* ===== RESET & GLOBAL ===== */
*{box-sizing:border-box;margin:0;padding:0}
body{font-family:'Segoe UI',Tahoma,Geneva,Verdana,sans-serif;background:#f4f4f9;color:#333;padding-bottom:90px}
.hidden{display:none!important}

/* ===== GLOBAL NAV ===== */
.global-nav-bar{position:absolute;top:30px;left:0;width:100%;display:flex;justify-content:space-between;padding:0 20px;box-sizing:border-box;z-index:9999;pointer-events:none}
.global-nav-bar a{pointer-events:auto;display:flex;align-items:center;gap:8px;text-decoration:none;color:#bdc3c7;font-weight:600;font-family:inherit;font-size:1rem;transition:color .3s}
.global-nav-bar a:hover{color:#3498db!important}
.nav-link-home{font-size:1.5rem!important}
@media(max-width:600px){.global-nav-bar{padding:0 15px}.nav-text{display:none}.global-nav-bar a:first-child{font-size:1.2rem}}

/* ===== HEADER ===== */
header{background:#2c3e50;color:#fff;padding:1rem;text-align:center;box-shadow:0 2px 5px rgba(0,0,0,.1);position:sticky;top:0;z-index:500}
header h1{font-size:1.4rem;font-weight:700}
header h1 i{margin-right:8px;color:#3498db}
/* Undo / Redo buttons */
#historyUndoBtn:not(:disabled):hover,#historyRedoBtn:not(:disabled):hover{background:rgba(255,255,255,0.22)!important;border-color:rgba(255,255,255,0.5)!important}
#historyUndoBtn:disabled,#historyRedoBtn:disabled{opacity:.35;cursor:not-allowed!important}

/* ===== CONTAINER & PAGES ===== */
.app-layout { display: flex; align-items: flex-start; padding: 0 10px; margin: 0; gap: 20px; transition: all 0.3s; }
.sidebar-wrapper { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 15px; position: sticky; top: 75px; }
.quick-sidebar { width: 230px; background: #fff; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); padding: 10px; transition: all 0.3s; overflow: hidden; display: flex; flex-direction: column; max-height: calc(100vh - 170px); }
.quick-sidebar.collapsed { width: 0; padding: 0; margin: 0; border: none; box-shadow: none; opacity: 0; }
.quick-sidebar-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #eee; padding-bottom: 6px; margin-bottom: 8px; }
.quick-sidebar-header h3 { font-size: 0.92rem; color: #2c3e50; }
.quick-sidebar-list { overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 3px; padding-right: 4px; }
.quick-sidebar-list::-webkit-scrollbar { width: 4px; }
.quick-sidebar-list::-webkit-scrollbar-track { background: transparent; }
.quick-sidebar-list::-webkit-scrollbar-thumb { background: #cbd5e0; border-radius: 10px; }
.quick-sidebar-list::-webkit-scrollbar-thumb:hover { background: #a0aec0; }
.quick-course-btn { text-align: left; background: #f8f9fa; border: 1px solid #eee; padding: 6px 10px; border-radius: 5px; cursor: pointer; transition: all 0.2s; font-size: 0.82rem; color: #34495e; display: flex; align-items: center; justify-content: space-between; }
.quick-course-btn:hover { background: #ecf0f1; border-color: #bdc3c7; }
.quick-course-btn.active { background: #3498db; color: #fff; border-color: #2980b9; font-weight: bold; }
.quick-course-btn.active .quick-badge { background: rgba(255,255,255,0.2); color: #fff; }
.quick-student-count { color: #a0aec0 !important; font-weight: normal !important; margin-left: 4px; font-size: 0.8rem; }
.quick-course-btn.active .quick-student-count { color: rgba(255,255,255,0.7) !important; }

.quick-subjects-container {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 3px;
    padding-left: 8px;
    border-left: 2px solid #3498db;
    margin-bottom: 5px;
}
.quick-subject-btn {
    text-align: left;
    background: #fdfdfd;
    border: 1px solid #e2e8f0;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.78rem;
    color: #4a5568;
    display: flex;
    align-items: center;
    gap: 6px;
}
.quick-subject-btn:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
    color: #2d3748;
}
.quick-subject-btn.active {
    background: #ebf8ff;
    color: #2b6cb0;
    border-color: #bee3f8;
    font-weight: 600;
}

.main-content-area { flex: 1; min-width: 0; max-width: 1200px; margin: 0; padding: 15px 10px; }
.container{max-width:100%;margin:20px auto;padding:0 15px;}
.page{display:none}
.page.active{display:block;animation:fadeIn .3s}
@keyframes fadeIn{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}

#sidebarToggleBtn { background: #fff; border: 1px solid #ddd; color: #2c3e50; font-size: 1.2rem; cursor: pointer; padding: 8px 12px; border-radius: 6px; transition: all 0.2s; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
#sidebarToggleBtn:hover { background: #f8f9fa; border-color: #bdc3c7; }
header { position: sticky; top: 0; z-index: 500; }
header h1 { margin: 0; }

/* ===== PAGE HEADER ===== */
.page-header{margin-bottom:20px}
.page-header h2{color:#2c3e50;border-bottom:2px solid #3498db;padding-bottom:10px;font-size:1.3rem}
.page-header h2 i{margin-right:8px;color:#3498db}

/* ===== SECTION HEADER ===== */
.section-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:15px;padding:10px 0;border-bottom:1px solid #eee}
.section-header h3{color:#34495e;font-size:1.1rem}

/* ===== BUTTONS ===== */
.btn-add{background:linear-gradient(135deg,#3498db,#2980b9);color:#fff;border:none;padding:10px 20px;border-radius:6px;font-weight:700;cursor:pointer;font-size:.95rem;transition:all .2s;box-shadow:0 2px 5px rgba(52,152,219,.3)}
.btn-add:hover{transform:translateY(-2px);box-shadow:0 4px 10px rgba(52,152,219,.4)}
.btn-primary{background:linear-gradient(135deg,#3498db,#2980b9);color:#fff;border:none;padding:8px 16px;border-radius:6px;font-weight:600;cursor:pointer;transition:all .2s}
.btn-primary:hover{transform:translateY(-1px)}
.btn-secondary{background:#ecf0f1;color:#34495e;border:1px solid #bdc3c7;padding:8px 14px;border-radius:6px;cursor:pointer;font-size:.9rem;font-weight:600;transition:all .2s}
.btn-secondary:hover{background:#dfe6e9}
.btn-icon{background:none;border:none;cursor:pointer;font-size:1.1rem;padding:8px;border-radius:6px;transition:all .2s}
.btn-icon:hover{background:#ecf0f1}
.btn-edit{color:#3498db}
.btn-danger{color:#e74c3c}
.btn-cancel{flex:1;padding:12px;background:#95a5a6;color:#fff;border:none;border-radius:6px;cursor:pointer;font-weight:700;transition:all .2s}
.btn-cancel:hover{background:#7f8c8d}
.btn-confirm{flex:1;padding:12px;background:linear-gradient(135deg,#3498db,#2980b9);color:#fff;border:none;border-radius:6px;cursor:pointer;font-weight:700;transition:all .2s}
.btn-confirm:hover{transform:translateY(-1px)}

/* ===== CARD LIST ===== */
.card-list{display:flex;flex-direction:column;gap:8px;margin-bottom:20px}
.course-card{background:#fff;padding:15px 20px;border-radius:8px;border-left:5px solid #3498db;display:flex;justify-content:space-between;align-items:center;cursor:pointer;transition:all .2s;box-shadow:0 2px 5px rgba(0,0,0,.05);user-select:none;}
.course-card:hover{background:#f8f9fa;transform:translateX(5px)}
.course-card.selected{border-left-color:#2ecc71;background:#e8f8f0;box-shadow:0 4px 10px rgba(46,204,113,.2)}
.course-card.dragging { opacity: 0.4; border: 2px dashed #7f8c8d; background: #fafafa; }
.course-card.dragover { border: 2px dashed #3498db; background: #eef5fb; transform: scale(1.01); box-shadow: 0 4px 12px rgba(52, 152, 219, 0.15); }
.course-card-name{font-weight:600;font-size:1.1rem;color:#2c3e50}
.course-card-meta{color:#95a5a6;font-size:.85rem}

/* ===== BADGE ===== */
.badge{display:inline-block;padding:3px 10px;border-radius:20px;font-size:.75rem;font-weight:600;color:#fff}
.badge-mittelstufe{background:#e67e22}
.badge-oberstufe{background:#8e44ad}

/* ===== EDITOR PANEL ===== */
.editor-panel{background:#fff;padding:20px;border-radius:10px;box-shadow:0 3px 15px rgba(0,0,0,.08);margin-top:20px;animation:fadeIn .3s}
.editor-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px;padding-bottom:15px;border-bottom:1px solid #eee}
.editor-title-group{display:flex;align-items:center;gap:10px}
.editor-actions{display:flex;gap:5px}

/* ===== STUDENT TOOLS & LIST ===== */
.student-tools{display:flex;gap:10px;margin-bottom:15px;flex-wrap:wrap}
.student-list-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}
.student-count{color:#95a5a6;font-size:.9rem}
.sort-toggle{display:flex;gap:4px}
.btn-sort{background:#ecf0f1;border:1px solid #ddd;padding:5px 12px;border-radius:4px;cursor:pointer;font-size:.85rem;font-weight:600;color:#7f8c8d;transition:all .2s}
.btn-sort.active{background:#3498db;color:#fff;border-color:#3498db}
.student-list{display:flex;flex-direction:column;gap:4px}
.student-item{background:#f8f9fa;padding:10px 15px;border-radius:6px;display:flex;justify-content:space-between;align-items:center;border-left:4px solid #3498db;transition:all .2s}
.student-item:hover{background:#eef5fb}
.student-item-name{font-weight:500;color:#2c3e50}
.student-item-actions{display:flex;gap:4px}

/* ===== CONTROLS BAR ===== */
.controls-bar{background:#fff;padding:12px 15px;border-radius:8px;box-shadow:0 2px 5px rgba(0,0,0,.05);margin-bottom:20px;display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.controls-bar select{padding:10px;border:1px solid #ddd;border-radius:6px;flex:1;min-width:150px;font-size:1rem;cursor:pointer;background:#fff;font-family:inherit}

/* ===== UNIT CHIPS ===== */
.unit-chips{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:20px}
.unit-chip{padding:8px 16px;border-radius:20px;font-size:.9rem;font-weight:600;color:#fff;cursor:pointer;transition:all .2s;border:2px solid transparent;position:relative}
.unit-chip:hover{transform:scale(1.05)}
.unit-chip .delete-chip{position:absolute;top:-6px;right:-6px;background:#e74c3c;color:#fff;border:none;border-radius:50%;width:20px;height:20px;font-size:.7rem;cursor:pointer;display:none;align-items:center;justify-content:center;line-height:1}
.unit-chip:hover .delete-chip{display:flex}

/* ===== CALENDAR ===== */
.calendar-controls{background:#fff;padding:15px;border-radius:8px;box-shadow:0 2px 5px rgba(0,0,0,.05);margin-bottom:20px}
.calendar-controls label{font-weight:600;color:#34495e;margin-right:8px;font-size:.9rem}
.slot-config,.date-range{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:10px}
.date-range span{color:#95a5a6}
.calendar-controls select,.calendar-controls input[type="date"]{padding:8px 10px;border:1px solid #ddd;border-radius:6px;font-size:.9rem;font-family:inherit}
.calendar-list{display:flex;flex-direction:column;gap:6px}
.calendar-slot{background:#fff;padding:12px 16px;border-radius:8px;border-left:5px solid #bdc3c7;display:flex;align-items:center;gap:12px;cursor:pointer;transition:all .2s;box-shadow:0 1px 3px rgba(0,0,0,.04)}
.calendar-slot:hover{background:#f8f9fa;transform:translateX(3px)}
.calendar-slot.cancelled{opacity:.5;border-left-color:#e74c3c!important}
.calendar-slot.holiday{opacity:.5;border-left-color:#7f8c8d!important}
.calendar-slot .slot-date{font-weight:700;color:#2c3e50;min-width:100px;font-size:.9rem}
.calendar-slot .slot-unit{padding:3px 10px;border-radius:12px;font-size:.8rem;color:#fff;font-weight:600}
.calendar-slot .slot-topic{flex:1;color:#7f8c8d;font-size:.9rem;font-style:italic}
.calendar-slot .slot-absence-count{background:#e74c3c;color:#fff;padding:2px 8px;border-radius:10px;font-size:.75rem;font-weight:600}
.calendar-slot .slot-assign{min-width:80px}
.calendar-slot .slot-assign select{padding:4px 8px;border:1px solid #ddd;border-radius:4px;font-size:.8rem;background:#fff;cursor:pointer}

/* ===== ABSENCE SECTION ===== */
.unit-filter{background:#fff;padding:15px;border-radius:8px;box-shadow:0 2px 5px rgba(0,0,0,.05);margin-bottom:20px}
.unit-filter h3{color:#34495e;margin-bottom:10px;font-size:1rem}
.unit-checkboxes{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:10px}
.unit-checkbox-label{display:flex;align-items:center;gap:6px;padding:6px 12px;border-radius:6px;cursor:pointer;font-size:.9rem;font-weight:500;background:#f8f9fa;border:1px solid #ddd;transition:all .2s}
.unit-checkbox-label:hover{background:#ecf0f1}
.unit-checkbox-label input{transform:scale(1.2)}
.filter-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.checkbox-label{display:flex;align-items:center;gap:6px;font-size:.85rem;color:#7f8c8d;cursor:pointer;margin-left:auto}

/* ===== DATA TABLE ===== */
.results-table-container{overflow-x:auto;margin-top:10px}
.data-table{width:100%;border-collapse:collapse;background:#fff;font-size:.9rem}
.data-table th{background:#34495e;color:#fff;padding:10px 12px;text-align:left;font-weight:600;white-space:nowrap}
.data-table td{padding:8px 12px;border-bottom:1px solid #eee}
.data-table tbody tr:hover{background:#f8f9fa}
.data-table small{color:#95a5a6;font-weight:400}
.sticky-col{position:sticky;left:0;background:#34495e;z-index:2}
.data-table tbody .sticky-col{background:#fff;font-weight:600;border-right:2px solid #eee}
.data-table tbody tr:hover .sticky-col{background:#f8f9fa}
.pct-cell{font-weight:600}
.pct-low{color:#27ae60}
.pct-mid{color:#f39c12}
.pct-high{color:#e74c3c}

/* ===== LISTEN ===== */
.list-card-grid{display:flex;flex-direction:column;gap:8px;margin-bottom:20px}
.list-card{background:#fff;padding:15px 20px;border-radius:8px;border-left:5px solid #16a085;display:flex;justify-content:space-between;align-items:center;cursor:pointer;transition:all .2s;box-shadow:0 2px 5px rgba(0,0,0,.05)}
.list-card:hover{background:#f8f9fa;transform:translateX(5px)}
.list-card.selected{border-left-color:#2ecc71;background:#e8f8f0;box-shadow:0 4px 10px rgba(46,204,113,.2)}
.list-modal-section{margin-top:8px;margin-bottom:10px}
.list-modal-section .btn-secondary{display:inline-flex;align-items:center;gap:6px}
.list-column-drafts{display:flex;flex-direction:column;gap:8px;margin-bottom:12px}
.list-column-row{display:grid;grid-template-columns:1fr 140px auto;gap:8px;align-items:center;background:#f8f9fa;border:1px solid #e2e8f0;border-radius:8px;padding:8px}
.list-column-row input,.list-column-row select,.list-filter-row input,.list-filter-row select{width:100%;padding:9px 10px;border:1px solid #d7dee4;border-radius:6px;font-size:.92rem;font-family:inherit;background:#fff}
.list-options-input{grid-column:1 / -1}
.list-filter-row{display:grid;grid-template-columns:1.4fr 1fr 130px;gap:8px;margin-bottom:10px}
.list-selection-actions{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:10px}
.list-student-choices{border:1px solid #e2e8f0;border-radius:8px;max-height:420px;overflow-y:auto;background:#fff}
.list-student-choice{display:flex;align-items:center;gap:10px;padding:10px 12px;border-bottom:1px solid #f1f5f9;cursor:pointer}
.list-student-choice:last-child{border-bottom:none}
.list-student-choice:hover{background:#f8f9fa}
.list-student-choice input{transform:scale(1.15)}
.list-student-choice span{display:flex;flex-direction:column;gap:2px;color:#2c3e50}
.list-student-choice small{color:#7f8c8d;font-size:.78rem}
.list-table th{text-align:center}
.list-table td:not(.sticky-col){min-width:130px;text-align:center;vertical-align:middle}
.list-check-cell{display:flex;justify-content:center}
.list-check-cell input{transform:scale(1.25);cursor:pointer}
.list-text-cell,.list-select-cell{width:100%;min-width:160px;padding:7px 8px;border:1px solid #d7dee4;border-radius:6px;font-family:inherit;background:#fff}
.list-counter-cell{display:inline-flex;align-items:center;gap:8px;background:#f8f9fa;border:1px solid #e2e8f0;border-radius:20px;padding:2px 6px}
.list-counter-cell span{min-width:28px;font-weight:700;color:#2c3e50}
.list-counter-cell .btn-icon{font-size:.85rem;padding:5px;color:#3498db}

/* ===== GRADES SECTION ===== */
.semester-toggle{display:inline-flex;align-items:center;gap:6px;background:#f1f5f9;padding:6px;border-radius:12px;border:1px solid #e2e8f0;margin-bottom:15px;box-shadow:inset 0 2px 4px rgba(0,0,0,0.04);flex-wrap:wrap;justify-content:flex-end}
.btn-semester{padding:9px 14px;border:none;border-radius:8px;background:transparent;color:#64748b;font-weight:600;font-size:.95rem;cursor:pointer;transition:all .2s ease;outline:none;white-space:nowrap}
.btn-semester:hover{color:#1e293b;background:rgba(0,0,0,0.02)}
.btn-semester.active{background:#1e3a8a;color:#fff;font-weight:700;box-shadow:0 4px 12px rgba(30,58,138,0.25)}
.grades-accordion{display:flex;flex-direction:column;gap:10px;margin-bottom:20px}
.grade-unit-block{background:#fff;border-radius:8px;box-shadow:0 2px 5px rgba(0,0,0,.05);overflow:hidden}
.grade-unit-header{padding:12px 16px;display:flex;justify-content:space-between;align-items:center;cursor:pointer;transition:background .2s}
.grade-unit-header:hover{filter:brightness(.95)}
.grade-unit-header h4{color:#fff;font-size:1rem;display:flex;align-items:center;gap:8px}
.grade-unit-header .chevron{color:#fff;transition:transform .3s}
.grade-unit-header.open .chevron{transform:rotate(180deg)}
.grade-unit-body{padding:0;max-height:0;overflow:hidden;transition:max-height .3s ease}
.grade-unit-body.open{max-height:none;padding:15px}
.grade-category{background:#f8f9fa;border-radius:6px;padding:12px;margin-bottom:10px;border-left:4px solid #3498db}
.grade-category-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
.grade-category-header h5{font-size:.95rem;color:#2c3e50;display:flex;align-items:center;gap:6px}
.grade-category-type{font-size:.75rem;padding:2px 8px;border-radius:10px;font-weight:600}
.grade-type-oral{background:#e8f8f0;color:#27ae60}
.grade-type-written{background:#e8f4fc;color:#2980b9}
.grade-category-actions{display:flex;gap:4px}
.sub-grade-row{display:flex;align-items:center;gap:8px;padding:4px 0;flex-wrap:wrap}
.sub-grade-label{font-size:.85rem;color:#7f8c8d;min-width:100px;font-weight:500}
.sub-grade-inputs{display:flex;gap:4px;flex-wrap:wrap;flex:1}
.grade-input-cell{display:flex;flex-direction:column;align-items:center;min-width:55px}
.grade-input-cell label{font-size:.65rem;color:#bdc3c7;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:55px}
.grade-input{width:50px;padding:4px;border:1px solid #ddd;border-radius:4px;text-align:center;font-size:.9rem;font-weight:600;transition:border-color .2s}
.grade-input:focus{border-color:#3498db;outline:none;box-shadow:0 0 0 2px rgba(52,152,219,.15)}
.grade-input.has-value{background:#e8f4fc}
.grade-avg{font-weight:700;color:#2c3e50;background:#fff;border:2px solid #3498db;padding:4px 8px;border-radius:4px;font-size:.9rem;min-width:50px;text-align:center}
.add-sub-grade-btn{background:none;border:1px dashed #bdc3c7;color:#95a5a6;padding:4px 10px;border-radius:4px;cursor:pointer;font-size:.8rem;transition:all .2s}
.add-sub-grade-btn:hover{border-color:#3498db;color:#3498db}

/* ===== GRADE SUMMARY ===== */
.grades-summary{background:#fff;border-radius:8px;box-shadow:0 2px 5px rgba(0,0,0,.05);padding:15px;margin-top:10px}
.grades-summary h3{color:#2c3e50;font-size:1.1rem;margin-bottom:12px}
.grades-summary h3 i{color:#3498db;margin-right:6px}
.summary-config{background:#f8f9fa;padding:10px 12px;border-radius:6px;margin-bottom:12px}
.summary-config label{font-size:.9rem;font-weight:600;color:#34495e;display:block;margin-bottom:6px}
.weight-preset-row{display:flex;gap:6px;flex-wrap:wrap}
.btn-preset{padding:6px 14px;background:#ecf0f1;border:1px solid #bdc3c7;border-radius:20px;cursor:pointer;font-size:.85rem;font-weight:600;color:#34495e;transition:all .2s}
.btn-preset.active,.btn-preset:hover{background:#3498db;color:#fff;border-color:#3498db}

/* ===== SLOT DETAIL MODAL ===== */
.slot-student-list{max-height:400px;overflow-y:auto}
.slot-student-row{display:flex;align-items:center;justify-content:space-between;padding:8px 10px;border-bottom:1px solid #f0f0f0;gap:8px}
.slot-student-row:last-child{border-bottom:none}
.slot-student-name{font-weight:500;font-size:.9rem;min-width:120px}
.absence-buttons{display:flex;gap:4px}
.absence-btn{padding:4px 10px;border-radius:4px;border:1px solid #ddd;background:#f8f9fa;cursor:pointer;font-size:.75rem;font-weight:600;transition:all .2s}
.absence-btn:hover{transform:scale(1.05)}
.absence-btn.active-excused{background:#e74c3c;color:#fff;border-color:#e74c3c}
.absence-btn.active-school{background:#f39c12;color:#fff;border-color:#f39c12}
.absence-btn.active-inactive{background:#e67e22;color:#fff;border-color:#e67e22}
.absence-legend{display:flex;gap:15px;margin-bottom:10px;flex-wrap:wrap}
.legend-item{display:flex;align-items:center;gap:5px;font-size:.8rem;color:#7f8c8d}
.legend-dot{width:10px;height:10px;border-radius:50%}
.legend-dot.excused{background:#e74c3c}
.legend-dot.school-internal{background:#f39c12}
.legend-dot.inactive{background:#e67e22}
.slot-actions-row{margin-bottom:12px}
.btn-cancel-slot{width:100%}
.btn-cancel-slot.is-cancelled{background:#e74c3c;color:#fff;border-color:#e74c3c}
.btn-holiday-slot{width:100%}
.btn-holiday-slot.is-holiday{background:#7f8c8d;color:#fff;border-color:#7f8c8d}

/* ===== MODAL ===== */
.modal{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.5);display:flex;justify-content:center;align-items:center;z-index:2000;animation:fadeIn .2s}
.modal-content{background:#fff;padding:25px;border-radius:12px;width:90%;max-width:420px;box-shadow:0 10px 40px rgba(0,0,0,.2);max-height:90vh;overflow-y:auto}
.modal-large{max-width:600px}
.modal-content h3{margin-bottom:20px;text-align:center;color:#2c3e50;font-size:1.1rem}
.modal-content h3 i{margin-right:8px;color:#3498db}
.modal-content h4{color:#34495e;margin-bottom:8px;font-size:.95rem}
.modal-buttons{display:flex;gap:10px;margin-top:15px}

/* ===== FORM ELEMENTS ===== */
.form-group{margin-bottom:15px}
.form-group label{display:block;font-weight:600;color:#34495e;margin-bottom:5px;font-size:.9rem}
.form-group input[type="text"],.form-group input[type="number"]{width:100%;padding:10px 12px;border:2px solid #ddd;border-radius:8px;font-size:1rem;font-family:inherit;transition:border-color .2s;outline:none}
.form-group input:focus{border-color:#3498db}
.radio-group{display:flex;flex-direction:column;gap:6px}
.radio-option{display:flex;align-items:center;gap:8px;cursor:pointer;padding:8px 12px;border-radius:6px;transition:background .2s}
.radio-option:hover{background:#f8f9fa}
.radio-option input{transform:scale(1.2);cursor:pointer}
.radio-option span{font-size:.95rem;color:#34495e}

/* ===== COLOR PICKER ===== */
.color-picker{display:flex;gap:8px;flex-wrap:wrap}
.color-swatch{width:36px;height:36px;border-radius:50%;border:3px solid transparent;cursor:pointer;transition:all .2s}
.color-swatch:hover{transform:scale(1.15)}
.color-swatch.active{border-color:#2c3e50;box-shadow:0 0 0 2px #fff,0 0 0 4px #2c3e50}

/* ===== TOAST ===== */
.toast{position:fixed;bottom:100px;left:50%;transform:translateX(-50%) translateY(30px);background:#1e293b;color:#fff;padding:12px 24px;border-radius:10px;font-size:.9rem;font-weight:500;opacity:0;transition:all .3s;z-index:3000;pointer-events:none}
.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}

/* ===== BOTTOM NAV ===== */
nav{position:fixed;bottom:0;left:0;width:100%;background:#fff;box-shadow:0 -2px 10px rgba(0,0,0,.1);display:flex;justify-content:space-around;padding:8px 0;z-index:1000}
nav button{background:none;border:none;font-size:.75rem;color:#95a5a6;cursor:pointer;font-weight:600;padding:6px 8px;border-radius:8px;display:flex;flex-direction:column;align-items:center;gap:3px;transition:all .2s;font-family:inherit}
nav button i{font-size:1.2rem}
nav button.active{color:#3498db;background:rgba(52,152,219,.1)}

/* ===== EMPTY STATE ===== */
.empty-state{text-align:center;padding:40px 20px;color:#95a5a6}
.empty-state i{font-size:3rem;margin-bottom:15px;display:block}

/* ===== RESPONSIVE ===== */
@media(max-width:600px){
.section-header{flex-direction:column;gap:10px;align-items:flex-start}
.btn-add{width:100%}
.student-tools{flex-direction:column}
.student-tools .btn-secondary{width:100%}
.slot-config,.date-range{flex-direction:column;align-items:flex-start}
.calendar-controls select,.calendar-controls input[type="date"]{width:100%}
.editor-header{flex-direction:column;gap:10px;align-items:flex-start}
.controls-bar{flex-direction:column}
.controls-bar select{width:100%}
.list-column-row{grid-template-columns:1fr}
.list-filter-row{grid-template-columns:1fr}
.list-selection-actions .btn-secondary{width:100%}
.sub-grade-inputs{flex-direction:column}
.grade-input-cell{flex-direction:row;gap:6px;min-width:100%}
.grade-input-cell label{max-width:none;min-width:80px}
}

/* ===== NOTENBAUM (NOTEN 2) — CSS Grid ===== */
.g2-section{background:#fff;border-radius:10px;padding:18px;box-shadow:0 2px 8px rgba(0,0,0,.06)}
.g2-matrix-container{overflow-x:auto;overflow-y:visible;border:1px solid #ddd;border-radius:8px;margin-top:10px}

/* Grid layout */
.g2-grid{display:grid;width:max-content;min-width:100%;font-size:.85rem}
/* Hidden columns use visibility:hidden (not display:none) to keep their grid position */

/* Name column (sticky left) — works in both header-grid and body-grid */
.g2-grid-name-hdr,.g2-grid-name{position:sticky;left:0;z-index:20;background:#fff;text-align:left;padding:8px 10px;border-right:2px solid #ccc;border-bottom:1px solid #e0e0e0;font-weight:600;white-space:nowrap;display:flex;align-items:center;gap:6px}
.g2-grid-name-hdr{z-index:30;background:#f0f2f5;font-size:.8rem;color:#555;border-bottom:2px solid #bbb}
/* Header grid is sticky at top of scroll container */
.g2-header-grid{position:sticky;top:0;z-index:40;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,0.08)}
/* Body grid scrolls normally */
.g2-body-grid{background:#fff}

/* Header cells — z-index is set inline per cell (deeper cells get higher z-index to overlay parents) */
.g2-grid-hdr{padding:6px 6px;border-bottom:1px solid rgba(0,0,0,0.15);border-right:1px solid rgba(0,0,0,0.08);text-align:left;display:flex;flex-direction:column;justify-content:flex-start;align-items:flex-start}
.g2-grid-hdr .g2-hdr-top{display:flex;align-items:flex-start;gap:4px;font-weight:700;font-size:.8rem;color:#2c3e50;flex-wrap:wrap;width:100%}
.g2-grid-hdr .g2-hdr-name{word-break:break-word;line-height:1.2}
.g2-grid-hdr .g2-hdr-actions{display:flex;gap:3px;margin-top:6px;opacity:0;transition:opacity .15s;flex-wrap:wrap}
.g2-grid-hdr:hover .g2-hdr-actions{opacity:1}
.g2-hdr-btn{cursor:pointer;color:#7f8c8d;font-size:.7rem;padding:2px 3px;border-radius:3px;transition:all .12s}
.g2-hdr-btn:hover{background:#3498db;color:#fff}
.g2-hdr-btn-del:hover{background:#e74c3c!important}
.g2-collapse-arrow{cursor:pointer;color:#555;font-size:.85rem;flex-shrink:0;transition:color .15s}
.g2-collapse-arrow:hover{color:#3498db}

/* Depth-based styling */
.g2-depth-0{font-size:.85rem!important}
.g2-depth-0 .g2-hdr-name{font-size:.85rem;max-width:none}
.g2-depth-1 .g2-hdr-name{font-size:.78rem}
.g2-depth-2 .g2-hdr-name{font-size:.75rem}
.g2-depth-3 .g2-hdr-name{font-size:.72rem}

/* Leistungsart badges */
.g2-lart{display:inline-block;padding:2px 6px;border-radius:4px;font-size:.72rem;font-weight:bold;color:#fff;flex-shrink:0}
.g2-lart.s{background:#e74c3c}
.g2-lart.m{background:#f39c12}
.g2-lart.n{background:#3498db}

/* Data cells */
.g2-grid-cell{padding:4px 3px;border-bottom:1px solid #e8e8e8;border-right:1px solid rgba(0,0,0,.05);display:flex;align-items:center;justify-content:center;min-height:38px}
.g2-grid-calc{cursor:pointer;flex-direction:column;gap:0}
.g2-grid-calc:hover{background:rgba(52,152,219,.08)!important}
.g2-val{font-weight:700;font-size:.95rem;color:#2c3e50;line-height:1.1}
.g2-dec{font-size:.65rem;color:#95a5a6;line-height:1}
.g2-calc-icon{font-size:.6rem;color:#bdc3c7;cursor:pointer;margin-left:3px}
.g2-calc-icon.active{color:#e67e22}
.g2-grid-input{background:#fff}
.g2-inp,.g2-sel{width:58px;padding:3px;border:1px solid #ddd;border-radius:4px;text-align:center;font-size:.82rem;font-family:inherit;transition:border-color .2s}
.g2-inp:focus,.g2-sel:focus{border-color:#3498db;outline:none;box-shadow:0 0 0 2px rgba(52,152,219,.15)}
.g2-inp.has-value,.g2-sel.has-value{background:#eaf7ff}
.g2-sel{width:62px;padding:2px 1px}
.g2-left{opacity:.5}

/* Privacy */
.g2-student-name-label{overflow:hidden;text-overflow:ellipsis}
.g2-info-btn{width:22px;height:22px;border:1px solid #cbd5e1;background:#f8fafc;color:#3498db;border-radius:50%;cursor:pointer;font-size:.7rem;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;transition:all .15s}
.g2-info-btn:hover{background:#3498db;color:#fff;border-color:#3498db}
.g2-priv-btn{background:none;border:none;cursor:pointer;color:#bdc3c7;font-size:.7rem;padding:2px 3px;margin-left:auto;border-radius:3px;transition:all .15s;flex-shrink:0}
.g2-priv-btn:hover,.g2-priv-btn.active{color:#3498db;background:#eaf7ff}

/* Performance panel */
.g2-performance-content{width:min(96vw,980px);max-width:980px!important;max-height:92vh;position:relative;padding:22px;overflow:auto}
.g2-performance-close{position:absolute;right:16px;top:14px;background:none;border:none;font-size:1.2rem;cursor:pointer;color:#7f8c8d}
.g2-performance-close:hover{color:#2c3e50}
.g2-performance-header{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:14px;border-bottom:1px solid #e2e8f0;padding-bottom:12px}
.g2-performance-header h3{margin:0!important;text-align:left!important;font-size:1.25rem!important;color:#2c3e50}
.g2-performance-header p{margin:4px 0 0;color:#64748b;font-weight:600}
.g2-performance-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:14px}
.g2-performance-metric{border:1px solid #e2e8f0;border-radius:8px;background:#fff;padding:10px 12px;display:flex;flex-direction:column;gap:4px}
.g2-performance-metric span{font-size:.82rem;font-weight:800;color:#64748b;display:flex;align-items:center;gap:6px}
.g2-performance-metric strong{font-size:1.5rem;color:#1e293b;line-height:1}
.g2-performance-metric small{font-size:.76rem;color:#94a3b8;font-weight:700}
.g2-performance-metric.written{border-left:4px solid #e74c3c}
.g2-performance-metric.oral{border-left:4px solid #f39c12}
.g2-performance-metric.final{border-left:4px solid #3498db}
.g2-performance-tabs{display:flex;gap:8px;margin-bottom:12px}
.g2-performance-tabs button{flex:1;border:1px solid #cbd5e1;background:#f8fafc;color:#34495e;border-radius:8px;padding:9px 12px;font-family:inherit;font-weight:800;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:7px;transition:all .15s}
.g2-performance-tabs button:hover{border-color:#3498db;background:#eef8ff}
.g2-performance-tabs button.active{background:#3498db;color:#fff;border-color:#3498db;box-shadow:0 2px 8px rgba(52,152,219,.22)}
.g2-performance-section{border:1px solid #e2e8f0;border-radius:10px;padding:12px;margin-top:12px;background:#fff}
.g2-performance-section-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
.g2-performance-section-head h4{margin:0;color:#2c3e50;font-size:1rem}
.g2-performance-section-head span{font-size:.78rem;color:#64748b;font-weight:800;background:#f1f5f9;border-radius:999px;padding:3px 8px}
.g2-performance-chart-wrap{border:1px solid #e2e8f0;border-radius:10px;background:#fff;overflow:hidden;margin-bottom:10px}
.g2-performance-chart{display:block;width:100%;height:auto}
.g2-performance-empty{min-height:170px;border:1px dashed #cbd5e1;border-radius:10px;background:#f8fafc;color:#94a3b8;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;margin-bottom:10px}
.g2-performance-empty i{font-size:1.6rem;color:#cbd5e1}
.g2-performance-empty p{margin:0;font-weight:700}
.g2-performance-table-wrap{overflow:auto;border:1px solid #e2e8f0;border-radius:8px}
.g2-performance-table{width:100%;border-collapse:collapse;font-size:.85rem}
.g2-performance-table th,.g2-performance-table td{padding:8px 10px;border-bottom:1px solid #eef2f7;text-align:left;vertical-align:middle}
.g2-performance-table th{background:#f8fafc;color:#64748b;font-size:.75rem;text-transform:uppercase}
.g2-performance-table tr:last-child td{border-bottom:none}
.g2-performance-unit-name{font-weight:700;color:#2c3e50}
.g2-performance-grade-cell{display:inline-flex;flex-direction:column;gap:2px;min-width:52px;line-height:1.1}
.g2-performance-grade-cell strong{font-size:.9rem;color:#1e293b}
.g2-performance-grade-cell small{font-size:.72rem;color:#94a3b8;font-weight:700}
.g2-performance-art{display:inline-flex;border-radius:999px;padding:2px 7px;font-size:.72rem;font-weight:800;background:#e2e8f0;color:#475569}
.g2-performance-art.schriftlich{background:#fde8e8;color:#c0392b}
.g2-performance-art.muendlich{background:#fef3e0;color:#d35400}
.g2-performance-art.note{background:#e8f4fc;color:#2980b9}

/* Grade pad */
.g2-grade-pad-content{width:min(98vw,1180px);max-width:1180px!important;height:min(96vh,840px);padding:18px;position:relative;overflow:hidden;display:flex;flex-direction:column}
.g2-pad-close{position:absolute;right:16px;top:14px;background:none;border:none;font-size:1.2rem;cursor:pointer;color:#7f8c8d;z-index:2}
.g2-pad-close:hover{color:#2c3e50}
.g2-pad-layout{display:grid;grid-template-columns:minmax(220px,280px) 1fr;gap:18px;min-height:0;flex:1}
.g2-pad-student-panel{border:1px solid #e2e8f0;border-radius:8px;background:#f8fafc;display:flex;flex-direction:column;min-height:0;overflow:hidden}
.g2-pad-panel-title{padding:12px 14px;font-weight:800;color:#2c3e50;border-bottom:1px solid #e2e8f0;display:flex;align-items:center;gap:8px}
.g2-pad-panel-title i{color:#3498db}
.g2-pad-student-list{overflow:auto;padding:8px;display:flex;flex-direction:column;gap:6px}
.g2-pad-student-btn{width:100%;border:1px solid transparent;background:#fff;color:#2c3e50;border-radius:6px;padding:9px 10px;display:flex;align-items:center;justify-content:space-between;gap:10px;text-align:left;cursor:pointer;font-family:inherit;font-weight:700;transition:all .15s}
.g2-pad-student-btn:hover{border-color:#a8d7f5;background:#eef8ff}
.g2-pad-student-btn.active{background:#3498db;color:#fff;border-color:#2980b9;box-shadow:0 2px 8px rgba(52,152,219,.25)}
.g2-pad-student-btn.is-left{opacity:.55}
.g2-pad-student-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.g2-pad-student-meta{display:flex;align-items:center;gap:5px;flex-shrink:0;font-size:.85rem;color:#7f8c8d}
.g2-pad-student-btn.active .g2-pad-student-meta{color:#eaf7ff}
.g2-pad-main{min-width:0;min-height:0;display:flex;flex-direction:column}
.g2-pad-header{display:flex;align-items:center;border-bottom:1px solid #eee;padding:0 26px 10px;margin-bottom:12px}
.g2-pad-header h3{margin:0!important;font-size:1.25rem!important;color:#2c3e50;font-weight:800;text-align:center;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.g2-pad-nav-btn{background:none;border:none;font-size:1.15rem;cursor:pointer;color:#3498db;padding:6px 10px;border-radius:6px;transition:all .15s}
.g2-pad-nav-btn:hover:not(:disabled){background:#e8f4fc}
.g2-pad-nav-btn:disabled{cursor:default;color:#bdc3c7}
.g2-pad-buttons{min-height:0;flex:none}
.g2-pad-notes-group{margin-top:8px;display:flex;flex-direction:column;gap:6px;min-height:240px;flex:1}
.g2-pad-notes-group label{font-weight:800;color:#34495e;font-size:.9rem}
.g2-pad-notes-group textarea{width:100%;min-height:240px;flex:1;resize:none;padding:12px;border:2px solid #dbe3ea;border-radius:8px;font-size:1rem;line-height:1.4;font-family:inherit;outline:none}
.g2-pad-notes-group textarea:focus{border-color:#3498db;box-shadow:0 0 0 3px rgba(52,152,219,.15)}
.g2-pad-os .g2-pad-notes-group{min-height:205px;flex:0 0 205px}
.g2-pad-os .g2-pad-notes-group textarea{min-height:165px}
.g2-pad-delete-btn{margin-top:10px;width:100%;padding:8px 10px;background:#fdf9f9;border:1px solid #e74c3c;border-radius:6px;cursor:pointer;font-weight:bold;color:#e74c3c}
.g2-pad-calc-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:12px}
.g2-pad-calc-btn{width:100%;padding:9px 10px;background:#f0f3f4;border:1px solid #bdc3c7;border-radius:6px;cursor:pointer;font-weight:800;color:#2c3e50;display:flex;flex-direction:column;align-items:center;gap:3px;box-sizing:border-box;font-family:inherit;text-align:center;transition:all .15s}
.g2-pad-calc-btn:hover{border-color:#3498db;background:#eef8ff}
.g2-pad-calc-btn.active{background:#e8f4fc;border-color:#3498db;box-shadow:0 0 0 2px rgba(52,152,219,.12)}
.g2-pad-calc-btn span{font-size:.9rem;display:flex;align-items:center;justify-content:center;gap:6px;line-height:1.15}
.g2-pad-calc-btn small{font-size:.72rem;font-weight:600;color:#7f8c8d;line-height:1.2}
.g2-pad-skip-btn{margin-top:8px;width:100%;padding:8px 10px;background:#e8f4fc;border:1px solid #3498db;border-radius:6px;cursor:pointer;font-weight:bold;color:#2980b9}
.g2-pad-os .g2-pad-delete-btn{margin-top:14px;padding:7px 10px}
.g2-pad-os .g2-pad-skip-btn{margin-top:9px;padding:7px 10px}

@media(max-width:760px){
    html,body{width:100%;max-width:100%;overflow-x:hidden}
    body{padding-bottom:calc(86px + env(safe-area-inset-bottom));background:#f6f7fb}
    .global-nav-bar{top:14px;padding:0 12px}
    header{padding:10px 52px 8px;min-height:64px}
    header h1{font-size:1.05rem;line-height:1.2;white-space:nowrap}
    #historyBar{gap:4px!important;margin-top:4px!important}
    #historyUndoBtn,#historyRedoBtn{font-size:.68rem!important;padding:4px 7px!important;gap:4px!important}
    .app-layout{display:block;padding:0;margin:0;width:100%;max-width:100%}
    .main-content-area,.container{width:100%;max-width:100%;margin:0;padding:10px 8px}
    .sidebar-wrapper{position:fixed;top:72px;left:8px;z-index:1200;margin:0;pointer-events:none;align-items:flex-start}
    #sidebarToggleBtn{pointer-events:auto;width:42px;height:42px;padding:0;border-radius:12px;box-shadow:0 6px 20px rgba(15,23,42,.18)}
    .quick-sidebar{pointer-events:auto;width:min(82vw,300px);max-height:calc(100vh - 170px);box-shadow:0 14px 34px rgba(15,23,42,.22);border:1px solid #e2e8f0}
    .quick-sidebar.collapsed{width:0;max-height:0;padding:0;margin:0;opacity:0;pointer-events:none}
    .page-header{margin:4px 0 12px}
    .page-header h2{font-size:1.05rem;padding-bottom:8px;margin-left:50px;min-height:42px;display:flex;align-items:center;gap:7px}
    #page-grades .page-header{display:block!important}
    #page-grades .page-header h2{margin-bottom:8px}
    .section-header{padding:8px 0;margin-bottom:10px}
    .section-header h3{font-size:1rem}
    #page-grades .section-header>div{width:100%;display:flex!important;align-items:flex-start!important;gap:8px!important;flex-direction:column}
    #page-grades .section-header .btn-secondary{width:100%;justify-content:center}
    .semester-toggle{width:100%;display:flex;flex-wrap:nowrap;overflow-x:auto;justify-content:flex-start;margin:0 0 12px;padding:5px;scrollbar-width:none}
    .semester-toggle::-webkit-scrollbar{display:none}
    .btn-semester{flex:0 0 auto;padding:8px 11px;font-size:.86rem}
    .g2-section{border-radius:8px;padding:10px;margin:0 -2px;box-shadow:0 1px 4px rgba(0,0,0,.05)}
    .g2-matrix-container{border-radius:8px;overflow:auto;-webkit-overflow-scrolling:touch;max-width:100%;max-height:calc(100vh - 245px);background:#fff;scrollbar-width:thin}
    .g2-grid{font-size:.78rem}
    .g2-grid-name-hdr,.g2-grid-name{padding:7px 6px;gap:4px;white-space:normal;min-height:40px}
    .g2-grid-name-hdr{font-size:.72rem}
    .g2-student-name-label{max-width:92px;line-height:1.15}
    .g2-grid-hdr{padding:5px 4px}
    .g2-grid-hdr .g2-hdr-top{font-size:.72rem;gap:3px}
    .g2-grid-hdr .g2-hdr-name{line-height:1.12}
    .g2-grid-hdr .g2-hdr-actions{opacity:1;gap:2px}
    .g2-hdr-btn{font-size:.67rem;padding:3px}
    .g2-grid-cell{min-height:40px;padding:3px 2px}
    .g2-val{font-size:.86rem}
    .g2-dec{font-size:.6rem}
    .g2-info-btn{width:24px;height:24px}
    .modal{align-items:flex-end;padding:0}
    .modal-content{width:100%;max-width:none;border-radius:16px 16px 0 0;max-height:88vh;padding:18px}
    .modal-buttons{position:sticky;bottom:0;background:#fff;padding-top:10px}
    nav{justify-content:flex-start;gap:2px;overflow-x:auto;padding:7px 8px calc(7px + env(safe-area-inset-bottom));-webkit-overflow-scrolling:touch}
    nav button{flex:0 0 70px;min-width:70px;padding:6px 4px;font-size:.66rem}
    nav button i{font-size:1.05rem}
    nav::-webkit-scrollbar{display:none}
    .g2-performance-content{width:96vw;padding:16px}
    .g2-performance-metrics{grid-template-columns:1fr}
    .g2-performance-tabs{flex-direction:column}
    .g2-grade-pad-content{height:94vh;width:96vw;padding:14px;overflow:auto}
    .g2-pad-layout{grid-template-columns:1fr}
    .g2-pad-student-panel{max-height:190px}
    .g2-pad-header{padding-right:28px}
    .g2-pad-calc-actions{grid-template-columns:1fr}
}

/* ===== PDF EXPORT ===== */
.pdf-section { background: #fff; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); margin-bottom: 14px; padding: 16px 20px; border: 1px solid #eee; transition: border-color 0.2s; }
.pdf-section:hover { border-color: #d0d7de; }
.pdf-section-toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 1rem; font-weight: 600; color: #2c3e50; }
.pdf-section-toggle input[type="checkbox"] { width: 18px; height: 18px; accent-color: #3498db; cursor: pointer; }
.pdf-section-toggle span { display: flex; align-items: center; gap: 8px; }
.pdf-section-toggle i { color: #3498db; font-size: 1.1rem; }
.pdf-section-opts { margin-top: 12px; padding-top: 12px; border-top: 1px solid #f0f0f0; }

/* ===== IMPORT DRAG & DROP ZONE ===== */
.import-drop-zone {
    width: 100%;
    background: #f8f9fa;
    border: 2px dashed #bdc3c7;
    border-radius: 8px;
    padding: 16px 20px;
    text-align: center;
    cursor: pointer;
    margin-bottom: 20px;
    transition: all 0.2s ease-in-out;
    display: flex;
    justify-content: center;
    align-items: center;
}
.import-drop-zone:hover {
    border-color: #3498db;
    background: #ebf5fb;
}
.import-drop-zone.dragover {
    border-color: #2980b9;
    background: #d6eaf8;
    transform: scale(1.005);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.1);
}
.drop-zone-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    pointer-events: none; /* children shouldn't trigger drag events separately */
}
.drop-zone-icon {
    font-size: 1.6rem;
    color: #3498db;
    transition: transform 0.2s ease-in-out;
}
.import-drop-zone.dragover .drop-zone-icon {
    transform: translateY(-2px);
}
.drop-zone-text {
    color: #7f8c8d;
    font-size: 0.95rem;
    font-weight: 500;
}

/* G2 Sort Buttons */
.g2-sort-btn {
    padding: 2px 6px;
    font-size: 0.65rem;
    font-weight: 600;
    border: 1px solid #cbd5e1;
    border-radius: 3px;
    cursor: pointer;
    background: #fff;
    color: #64748b;
    transition: all 0.15s ease-in-out;
}
.g2-sort-btn.active {
    background: #3498db !important;
    color: #fff !important;
    border-color: #3498db !important;
}
.g2-sort-btn:hover:not(.active) {
    background: #f1f5f9 !important;
    color: #1e293b !important;
}

/* G2 Row Highlight Overlay */
.g2-row-highlighted {
    position: relative;
}
.g2-row-highlighted::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(52, 152, 219, 0.09) !important;
    pointer-events: none;
    z-index: 1;
}
