/* FL Buddy 7 · konsolidierter Seiten-Audit */
.flb7-workspace .flb7-nav-children{display:none}.flb7-workspace .flb7-nav-group.open .flb7-nav-children{display:grid}
/* Kalender: dunkler, lesbar, echte belegte Blöcke */
#page-kalender{--cal-head:#10343b!important}#page-kalender .time-head,#page-kalender .day-head{background:var(--flb-light-surface, #10343b)!important;color:var(--flb-light-ink, #eefafa)!important;border-color:var(--flb-light-line, #2c555d)!important}#page-kalender .day-head span,#page-kalender .day-head small,#page-kalender .time-col span{color:var(--flb-light-muted, #9fc1c5)!important}#page-kalender .time-col{background:var(--flb-light-surface, #0d3037)!important;border-color:var(--flb-light-line, #2a5158)!important}#page-kalender .day-col{background-color:var(--flb-light-surface, #0c3037)!important;border-color:var(--flb-light-line, #294f57)!important;background-image:repeating-linear-gradient(to bottom,transparent 0,transparent 59px,var(--flb-light-raised, #244951) 60px)!important}#page-kalender .day-col.weekend{background-color:var(--flb-light-surface, #12343a)!important}.cal-event.flb-booked-event{border-width:2px!important;box-shadow:0 0 0 1px rgba(255,255,255,.10),0 7px 18px rgba(0,0,0,.28)!important}.cal-event.drive{background:var(--flb-light-raised, #174f48)!important;color:var(--flb-light-ink, #e8fffb)!important;border-color:var(--flb-light-outline, #45cbb8)!important}.cal-event.auto{background:var(--flb-light-blue-soft, #403d61)!important;color:var(--flb-light-ink, #f0efff)!important;border-color:var(--flb-light-outline, #a8a0ef)!important}.cal-event.exam{background:var(--flb-light-amber-soft, #60491f)!important;color:var(--flb-light-warning, #fff3d2)!important;border-color:var(--flb-light-outline, #e6b95e)!important}.cal-event.theory{background:var(--flb-light-raised, #244d64)!important;color:var(--flb-light-ink, #e7f6ff)!important;border-color:var(--flb-light-outline, #69afd5)!important}.cal-event.blocked,.cal-event.pause{background:var(--flb-light-red-soft, #5a3439)!important;color:var(--flb-light-ink, #ffecef)!important;border-color:var(--flb-light-outline, #d7828c)!important}
#page-kalender .week-calendar{max-height:calc(100vh - 285px)!important;min-height:560px;overflow-y:auto!important;overflow-x:hidden!important;scrollbar-width:thin!important}#page-kalender .calendar-grid{grid-template-rows:90px 1440px!important;overflow:visible!important}#page-kalender .time-col{grid-template-rows:repeat(24,60px)!important;height:1440px!important}#page-kalender .day-col{height:1440px!important}
/* Ressourcen-Kalender */
.flb-resource-panel{padding:0!important}.flb-resource-title{display:flex;justify-content:space-between;align-items:flex-end;gap:18px;padding:18px 20px;border:1px solid var(--flb-light-line, #24505a);border-radius:18px 18px 0 0;background:var(--flb-light-surface, #10363e)}.flb-resource-title h2{margin:4px 0;font-size:24px}.flb-resource-title p{margin:0;color:var(--flb-light-muted, #9cb9bd)}.flb-resource-nav{display:flex;gap:7px}.flb-resource-nav button{border:1px solid var(--flb-light-line, #2c5961);background:var(--flb-light-raised, #123c44);color:var(--flb-light-ink, #eefafa);border-radius:10px;padding:9px 12px}.flb-resource-scroll{height:calc(100vh - 250px);min-height:600px;overflow:auto;border:1px solid var(--flb-light-line, #24505a);border-top:0;border-radius:0 0 18px 18px;background:var(--flb-light-surface, #0a2b32)}.flb-resource-grid{position:relative;display:grid;grid-template-columns:72px repeat(var(--rc),minmax(210px,1fr));grid-template-rows:58px repeat(24,64px);min-width:max(100%,calc(72px + var(--rc)*210px))}.flb-r-corner,.flb-r-head{position:sticky;top:0;z-index:8;background:var(--flb-light-surface, #103840);border-bottom:1px solid var(--flb-light-line, #2d5961);border-right:1px solid var(--flb-light-line, #2d5961)}.flb-r-head{padding:10px 12px}.flb-r-head b,.flb-r-head small{display:block}.flb-r-head small{color:var(--flb-light-muted, #91b4b8);margin-top:3px}.flb-r-time{position:sticky;left:0;z-index:5;background:var(--flb-light-surface, #0f343b);color:var(--flb-light-muted, #91b4b8);text-align:right;padding:6px 9px;border-right:1px solid var(--flb-light-line, #2b555d);border-bottom:1px solid var(--flb-light-line, #244951);font-size:11px}.flb-r-hour{border-right:1px solid var(--flb-light-line, #244951);border-bottom:1px solid var(--flb-light-line, #244951);background:var(--flb-light-surface, #0b3037)}.flb-r-event{position:absolute;grid-column:var(--col);top:calc(58px + var(--top)*1.0666667px + 3px);height:max(34px,calc(var(--mins)*1.0666667px - 6px));left:5px;right:5px;z-index:4;border:2px solid;border-radius:10px;padding:6px 8px;text-align:left;overflow:hidden}.flb-r-event b,.flb-r-event strong,.flb-r-event small{display:block}.flb-r-event.drive{background:var(--flb-light-raised, #174f48);color:var(--flb-light-ink, #effffb);border-color:var(--flb-light-outline, #45cbb8)}.flb-r-event.auto{background:var(--flb-light-blue-soft, #403d61);color:var(--flb-light-ink, #f4f2ff);border-color:var(--flb-light-outline, #a8a0ef)}.flb-r-event.blocked{background:var(--flb-light-red-soft, #5a3439);color:var(--flb-light-ink, #ffecef);border-color:var(--flb-light-outline, #d7828c)}.flb-r-now{position:absolute;left:72px;right:0;top:calc(58px + var(--now)*1.0666667px);height:2px;background:var(--flb-light-red-strong, #ff656d);z-index:6;pointer-events:none}
/* Schülerkonto kompakt */
.flb-action-cell{white-space:nowrap!important;display:flex!important;gap:6px!important;align-items:center!important}.flb-icon-action{width:38px!important;height:36px!important;min-width:38px!important;padding:0!important;border:1px solid var(--flb-light-line, #2b5961)!important;border-radius:9px!important;background:var(--flb-light-raised, #123a42)!important;color:var(--flb-light-ink, #effafa)!important;display:inline-grid!important;place-items:center!important;font-size:14px!important}.flb-neg,.flb-neg b{color:var(--flb-light-danger, #ff7d88)!important}.flb-pos,.flb-pos b{color:var(--flb-light-accent-ink, #54d6a2)!important}.flb-zero,.flb-zero b{color:var(--flb-light-muted, #a8bdc1)!important}
/* Einladung reparieren */
#studentModal.flb-invite-fixed .invite-student-modal{width:min(620px,calc(100vw - 32px))!important;max-height:90vh!important;overflow:auto!important;padding:24px!important}#studentModal.flb-invite-fixed .invite-form-grid{display:grid!important;grid-template-columns:1fr!important;gap:16px!important}#studentModal.flb-invite-fixed label.wide{display:grid!important;grid-column:1/-1!important;gap:7px!important;width:100%!important}#studentModal.flb-invite-fixed textarea,#studentModal.flb-invite-fixed select{display:block!important;width:100%!important;min-height:48px!important;box-sizing:border-box!important}#studentModal.flb-invite-fixed textarea{min-height:100px!important;resize:vertical!important}.modal-backdrop{z-index:300!important}
/* Mitarbeitervergütung */
.flb-comp-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin:20px 0}.flb-comp-grid>section{border:1px solid var(--flb-light-line, #28535b);border-radius:15px;padding:16px;background:var(--flb-light-surface, #0d3037)}.flb-comp-card{padding:12px;border-bottom:1px solid var(--flb-light-line, #244b52)}.flb-comp-card:last-child{border-bottom:0}.flb-comp-card b,.flb-comp-card small{display:block}.flb-comp-card small{color:var(--flb-light-muted, #9bb7bb);margin-top:4px}.flb-error{color:var(--flb-light-danger, #ff8791)}
/* Schülerakte als Arbeitsbereich statt schwebendem Overlay */
body.flb7-workspace #fullStudentRecordModal.show{position:absolute!important;inset:92px 18px 18px 228px!important;background:var(--flb-light-surface, #082830)!important;backdrop-filter:none!important;display:block!important;overflow:auto!important;z-index:40!important;padding:0!important}body.flb7-workspace #fullStudentRecordModal.show .student-record-modal.flb-record-workspace{width:100%!important;max-width:none!important;min-height:100%!important;max-height:none!important;margin:0!important;border-radius:18px!important;box-shadow:none!important;overflow:visible!important}.flb-record-workspace .record-tabs{display:flex!important;flex-wrap:wrap!important;overflow:visible!important;gap:6px!important}.flb-record-workspace .record-tab{flex:0 0 auto!important;min-width:auto!important}.flb-placeholder-tab{opacity:.85}
/* keine globalen KPI-Karten in Facharbeitsbereichen */
body.flb7-workspace #page-buero .office-kpis,body.flb7-workspace #page-buero .office-tabs{display:none!important}
@media(max-width:900px){.flb-comp-grid{grid-template-columns:1fr}body.flb7-workspace #fullStudentRecordModal.show{inset:84px 8px 8px!important}.flb-resource-grid{grid-template-columns:62px repeat(var(--rc),minmax(180px,1fr))}.flb-r-now{left:62px}}

/* FL Buddy: Uhrzeitspalte auf Smartphones vollständig sichtbar halten. */
@media(max-width:760px){
  #page-kalender .calendar-grid{grid-template-columns:42px repeat(6,minmax(0,1fr))!important;}
  #page-kalender .time-col span{
    box-sizing:border-box!important;
    text-align:left!important;
    padding-left:4px!important;
    padding-right:0!important;
    font-size:10px!important;
    letter-spacing:0!important;
    white-space:nowrap!important;
    overflow:visible!important;
  }
}

/* Mobile Schülerverwaltung: Schülerliste zuerst, Kennzahlen nach der Liste. */
@media (max-width: 760px) {
  #page-fahrschueler {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }
  #page-fahrschueler > .students-topbar { order: 0; margin-bottom: 12px; gap: 10px; }
  #page-fahrschueler > .students-panel { order: 1; min-width: 0; }
  #page-fahrschueler > .student-metrics { order: 2; margin: 16px 0 0; }
  #page-fahrschueler .students-topbar h1 { font-size: clamp(25px,7vw,32px); margin: 0; }
  #page-fahrschueler .students-topbar .page-subtitle { display: none; }
  #page-fahrschueler .students-topbar .kicker { display: none; }
  #page-fahrschueler .students-topbar .top-actions { gap: 8px; }
  #page-fahrschueler .students-topbar .calendar-action {
    min-width: 0; padding: 10px 9px; font-size: 12px; line-height: 1.2;
  }
  #page-fahrschueler .student-toolbar { padding: 12px; gap: 8px; }
  #page-fahrschueler .student-search { width: 100%; min-width: 0; }
  #page-fahrschueler .student-search input { min-width: 0; }
  #page-fahrschueler .student-filters { max-width: 100%; overflow-x: auto; }
  #page-fahrschueler .student-kpi { padding: 12px; }
  #page-fahrschueler .student-kpi strong { font-size: 22px; }
}

/* Mobile Schüler: echte DOM-Reihenfolge statt fragiler flex-order-Regeln. */
@media(max-width:760px){
  #page-fahrschueler.active {display:block!important}
  #page-fahrschueler .students-panel{margin:0 0 12px!important}
  #page-fahrschueler .student-metrics{margin:12px 0 0!important}
  #page-fahrschueler .students-topbar{margin-bottom:12px!important}
  #page-fahrschueler .student-toolbar{padding:10px!important}
  #page-fahrschueler .student-search{box-sizing:border-box;width:100%;max-width:100%;min-width:0}
  #page-fahrschueler .student-search input{box-sizing:border-box;width:100%;min-width:0;max-width:100%}
  #page-fahrschueler .student-filters{overflow-x:auto;min-width:0}
}

/* Seitenwechsel absichern: Schüleransicht nur anzeigen, wenn der Reiter aktiv ist. */
@media(max-width:760px){#page-fahrschueler:not(.active){display:none!important}}
