/* eSchool Admin-Theme — Override-CSS ueber den Herstellerstyles (M02 Task 4).
   Einzige Stelle der Admin-Optik (docs/plans/2026-09-25-m02-branding.md, Task 4).
   Geladen nach layouts/include.blade.php:58-81 (:root mit --theme-color) und nach
   login.css — schlaegt die Herstellerregeln der Seite per Ladereihenfolge, nicht per
   Spezifitaet. Nur logische CSS-Eigenschaften (rules/06_i18n-rtl.md). */

/* ---------- Readex Pro, selbst gehostet (brand/fonts/readex-pro/readex-pro.css,
   Pfade relativ zu public/platform/css/ auf public/platform/fonts/readex-pro/) ---------- */
@font-face {
  font-family: 'Readex Pro';
  font-style: normal;
  font-weight: 160 700;
  font-display: swap;
  src: url('../fonts/readex-pro/readex-pro-arabic-wght.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}
@font-face {
  font-family: 'Readex Pro';
  font-style: normal;
  font-weight: 160 700;
  font-display: swap;
  src: url('../fonts/readex-pro/readex-pro-latin-ext-wght.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Readex Pro';
  font-style: normal;
  font-weight: 160 700;
  font-display: swap;
  src: url('../fonts/readex-pro/readex-pro-latin-wght.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens (Quelle: assets/niceadmin/starterkit/src/utils/theme/*.tsx, GREEN_THEME) ---------- */
:root {
  --es-primary: #165A50;
  --es-primary-light: #165a501a;
  --es-secondary: #C2FD75; /* Limette — nie als Text/Icon auf hellem Grund, s. u. */
  --es-bg: #F5F5F5;
  --es-paper: #ffffff;
  --es-text: #030E09CC;
  /* NiceAdmin text.secondary (#030E0966) liegt bei ~2,6:1 auf Weiss (A8 verlangt AA);
     Ersatz mit belegter Kontrastrechnung ~7,56:1 auf Weiss. */
  --es-muted: #4B5563;
  --es-divider: #030E091A;
  --es-hover: #053b2514;
  --es-radius: 12px;
  --es-sidebar-width: 270px;
  --es-topbar-height: 70px;
  --es-card-shadow: 0px 2px 3px rgba(0, 0, 0, 0.10);
}

:root[dir='rtl'] {
  /* Arabische Diakritika brauchen mehr Raum als der Herstellerwert (rules/06_i18n-rtl.md) */
  line-height: 1.6;
}

@media (prefers-reduced-motion: reduce) {
  .sidebar .nav .nav-item.active,
  .sidebar .nav .nav-item:hover,
  .btn {
    transition: none;
  }
}

/* ---------- Schrift: die Selektoren, die style.min.css/rtl.min.css ubuntu-* setzen,
   plus body/Formulare/Tabellen. Kein `*`, keine Icon-Klassen (.mdi, .fa-Praefixe,
   [class^="mdi-"], .menu-icon bleiben unberuehrt). Die vendor-praefixierten Placeholder-
   Pseudoklassen (:-moz-placeholder, :-ms-input-placeholder, ::-moz-placeholder) sind
   bewusst nicht uebernommen: Chromium kennt sie nicht und sie sind fuer keine Abnahme
   noetig; sie standen nur in der Vendor-Datei, weil deren Regel auch fuer Firefox/IE gilt.
   !important R8-begruendet: `body { font-family: var(--bs-body-font-family) }` aus
   bootstrap-5.3/css/bootstrap.min.css laedt NACH style.min.css/custom.css und gewinnt bei
   gleicher Spezifitaet allein durch Ladereihenfolge (Vendor-Quirk: ubuntu-regular greift
   serverseitig nie). Auf der Loginseite setzt zusaetzlich
   apps/admin/public/assets/home_page/css/style.css:9 `body{font-family:'Lato'!important}`.
   Beleg per Probe-Lauf (scripts/ui-nachweis --css-lokal): bodyFont 20/20 "Readex Pro". ---------- */
body,
.CodeMirror,
.accordion .card .card-body,
.accordion .card .card-header *,
.ajax-upload-dragdrop .ajax-file-upload,
.asColorPicker-input,
.avgrund-popin,
.avgrund-popin p,
.badge,
.btn,
.card .card-description,
.card .card-subtitle,
.card .card-title,
.context-menu-list .context-menu-item span,
.dataTables_wrapper select,
.datepicker-custom .datepicker.datepicker-inline .datepicker-centuries .table-condensed thead tr th.datepicker-switch,
.datepicker-custom .datepicker.datepicker-inline .datepicker-centuries .table-condensed thead tr th.dow,
.datepicker-custom .datepicker.datepicker-inline .datepicker-centuries .table-condensed thead tr th.next,
.datepicker-custom .datepicker.datepicker-inline .datepicker-centuries .table-condensed thead tr th.prev,
.datepicker-custom .datepicker.datepicker-inline .datepicker-days .table-condensed thead tr th.datepicker-switch,
.datepicker-custom .datepicker.datepicker-inline .datepicker-days .table-condensed thead tr th.dow,
.datepicker-custom .datepicker.datepicker-inline .datepicker-days .table-condensed thead tr th.next,
.datepicker-custom .datepicker.datepicker-inline .datepicker-days .table-condensed thead tr th.prev,
.datepicker-custom .datepicker.datepicker-inline .datepicker-decades .table-condensed thead tr th.datepicker-switch,
.datepicker-custom .datepicker.datepicker-inline .datepicker-decades .table-condensed thead tr th.dow,
.datepicker-custom .datepicker.datepicker-inline .datepicker-decades .table-condensed thead tr th.next,
.datepicker-custom .datepicker.datepicker-inline .datepicker-decades .table-condensed thead tr th.prev,
.datepicker-custom .datepicker.datepicker-inline .datepicker-months .table-condensed thead tr th.datepicker-switch,
.datepicker-custom .datepicker.datepicker-inline .datepicker-months .table-condensed thead tr th.dow,
.datepicker-custom .datepicker.datepicker-inline .datepicker-months .table-condensed thead tr th.next,
.datepicker-custom .datepicker.datepicker-inline .datepicker-months .table-condensed thead tr th.prev,
.datepicker-custom .datepicker.datepicker-inline .datepicker-years .table-condensed thead tr th.datepicker-switch,
.datepicker-custom .datepicker.datepicker-inline .datepicker-years .table-condensed thead tr th.dow,
.datepicker-custom .datepicker.datepicker-inline .datepicker-years .table-condensed thead tr th.next,
.datepicker-custom .datepicker.datepicker-inline .datepicker-years .table-condensed thead tr th.prev,
.datepicker.datepicker-dropdown .datepicker-days table.table-condensed thead tr th.dow,
.datepicker.datepicker-inline .datepicker-days table.table-condensed thead tr th.dow,
.email-wrapper .mail-list-container .mail-list .content .sender-name,
.email-wrapper .mail-sidebar .menu-bar .online-status .chat,
.email-wrapper .mail-sidebar .menu-bar .profile-list-item a .user .u-name,
.email-wrapper .message-body .sender-details .details .msg-subject,
.email-wrapper .message-body .sender-details .details .sender-email,
.email-wrapper .message-body .sender-details .details .sender-email i,
.fc button,
.font-weight-bold,
.font-weight-light,
.font-weight-normal,
.footer,
.form-control,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6,
.icons-list>div,
.jsgrid .jsgrid-table .jsgrid-filter-row input[type=number],
.jsgrid .jsgrid-table .jsgrid-filter-row input[type=text],
.jsgrid .jsgrid-table .jsgrid-filter-row select,
.jsgrid .jsgrid-table th,
.jsgrid .jsgrid-table thead th,
.nav-tabs.nav-tabs-vertical-custom .nav-link,
.navbar,
.noUi-target .noUi-pips .noUi-value,
.pricing-table .pricing-card .pricing-card-body .plan-features li,
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--single .select2-search__field,
.sidebar,
.sidebar .nav .nav-item.active>.nav-link .menu-title,
.swal2-modal .swal2-buttonswrapper .swal2-styled,
.swal2-modal .swal2-buttonswrapper .swal2-styled.swal2-cancel,
.swal2-modal .swal2-buttonswrapper .swal2-styled.swal2-confirm,
.swal2-modal .swal2-content,
.swal2-modal .swal2-title,
.table,
.table thead th,
.tooltip .tooltip-inner,
.tt-hint,
.tt-query,
.typeahead,
.wizard>.actions a,
.wizard>.steps a,
code,
h1,
h2,
h3,
h4,
h5,
h6,
input,
select,
textarea {
  font-family: 'Readex Pro', system-ui, sans-serif !important;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
  font-weight: 600;
}

body {
  font-size: 0.875rem;
  line-height: 1.334rem;
  font-weight: 400;
  background-color: var(--es-bg);
  color: var(--es-text);
}

/* ---------- Sidebar ---------- */
.sidebar {
  background-color: var(--es-paper);
}

.sidebar .nav .nav-item.active {
  background-color: var(--es-primary-light);
  border-radius: var(--es-radius);
}

.sidebar .nav .nav-item:hover {
  background-color: var(--es-hover);
}

/* R8: comman.css:475-480 setzt den Hersteller-Hintergrund auf dem <a>, nicht auf dem <li>
   (unsere Regel oben) — gleiche Selektoren und !important noetig, um bei gleicher
   Spezifitaet allein per Ladereihenfolge zu gewinnen (M02 Task 10, H8). Die Textfarbe
   kommt dort bereits ueber var(--primary-color-sidebar) aus theme_color = #165A50. */
.sidebar .nav .nav-item.active>.nav-link,
.sidebar .nav .nav-item .nav-link.active {
  background-color: var(--es-primary-light) !important;
}

/* Sidebar-Breite auf den NiceAdmin-Token — nur im Hersteller-Breakpoint des fixierten
   Sidebar-Layouts (style.min.css ~31680-31696), sonst kollidiert es mit dem Off-Canvas-
   Verhalten unterhalb 992px und riskiert Overflow auf den 375px-Aufnahmen. */
@media (min-width: 992px) {
  .sidebar-fixed .sidebar {
    inline-size: var(--es-sidebar-width);
  }
  .sidebar-fixed .main-panel {
    margin-inline-start: var(--es-sidebar-width);
  }
}

/* ---------- Header/Topbar ---------- */
.navbar {
  background-color: var(--es-paper);
  box-shadow: var(--es-card-shadow);
}

/* ---------- Karten ---------- */
.card {
  border-radius: var(--es-radius);
  box-shadow: var(--es-card-shadow);
  background-color: var(--es-paper);
}

/* ---------- Tabellen (inkl. bootstrap-table, die Standard-.table rendert) ---------- */
.table thead th {
  color: var(--es-muted);
  border-color: var(--es-divider);
}

.table td,
.table th {
  border-color: var(--es-divider);
}

/* ---------- Formulare ---------- */
.form-control {
  border-radius: var(--es-radius);
  border-color: var(--es-divider);
}

.form-control:focus {
  border-color: var(--es-primary);
  box-shadow: 0 0 0 0.2rem var(--es-primary-light);
  outline: none;
}

.select2-container--default .select2-selection--single {
  border-radius: var(--es-radius);
  border-color: var(--es-divider);
}

/* ---------- Buttons ---------- */
.btn {
  border-radius: var(--es-radius);
  text-transform: none;
}

.btn-primary {
  background-color: var(--es-primary);
  border-color: var(--es-primary);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--es-primary);
  border-color: var(--es-primary);
  filter: brightness(0.92);
}

/* ---------- Badges ---------- */
.badge {
  border-radius: var(--es-radius);
}

.badge-success {
  color: #1a6e2e !important; /* R8: comman.css setzt #28a745 mit !important auf
    rgba(40,167,69,.1) = 2,81:1 (axe, M02 Task 7); #1a6e2e ergibt 5,7:1. */
}

/* Hersteller: #888 auf Weiss = 3,54:1 (axe, M02 Task 7); #6b6b6b ergibt 5,33:1. */
.sidebar .nav.sub-menu .nav-item .nav-link {
  color: #6b6b6b;
}

/* Icon-Kachel "Gesamtzahl Schulen" im Super-Admin-Dashboard (comman.css .bg-soft-blue):
   Herstellerblau #007bff, unabhaengig von theme_color. Die anderen drei Kacheln
   (gruen/lila/orange) sind ein Status-Farbschema, keine Hersteller-Markenfarbe — bleiben
   unveraendert (M02 Task 10, H8). */
.bg-soft-blue {
  background-color: var(--es-primary-light);
  color: var(--es-primary);
}

/* ---------- Login-Panel ---------- */
.lp-brand-col {
  background-color: var(--es-primary) !important; /* R8: Herstellerkopf setzt hier keinen
    Inline-Hintergrund, aber die Panel-Farbe muss die Markenfarbe unabhaengig vom
    theme_color-CSS-Var. der Seite fuehren; !important haelt sie gegen spaetere
    Utility-Klassen fest, ohne die Blade-View umzubauen. */
  background-size: 220px auto !important; /* R8: auth/login.blade.php:214 setzt
    background-size:contain inline (hoehere Spezifitaet als jede externe Klasse);
    ohne !important bliebe unsere Groessenbegrenzung wirkungslos und das Logo fuellt
    das ganze Panel. */
  background-repeat: no-repeat;
  background-position: center;
}

/* Limette (--es-secondary) wird hier bewusst auf keinen Text/Icon-Selektor angewendet:
   auf hellem Grund liegt sie bei ~1,2:1 Kontrast (Brief, A8). Nicht genutzt = korrekt. */

/* ---------- Landingpage (M02 Task 10, H7) ----------
   resources/views/home.blade.php setzt :root { --primary-color: ... } als Inline-<style>
   im <body> aus system_settings.theme_primary_color/-secondary_color/-secondary_color_1
   (Hersteller-Seeder, nicht Teil von BrandManifest) — das laedt NACH dieser Datei
   (eingebunden in layouts/home_page/include.blade.php:<head>) und gewinnt ohne
   !important allein durch Ladereihenfolge, unabhaengig vom DB-Wert. .commonBtn (alle
   Haupt-Buttons) nutzt --primary-color/--secondary-color mit weisser Schrift; #165A50
   ergibt 8,04:1 (Messbericht M02 Task 7, "Markenpaare"). */
:root {
  --primary-color: var(--es-primary) !important;
  --secondary-color: var(--es-primary) !important;
  --secondary-color1: var(--es-primary) !important;
}

/* ---------- Landingpage: Zeilenhoehe und Sprachumschalter (M02 Task 11) ----------
   `body { line-height: 1.334rem }` oben ist ein fester Wert und wird vererbt: die 45px-
   Hero-Ueberschrift (.commonDesc) und die 30px-Abschnittstitel (.sectionTitle span) liefen
   mit 21px Zeilenhoehe ineinander bzw. in den Button darueber. Unitless skaliert je Schrift.
   Je Abschnitt statt `.main`: eine Regel auf `.main` griff im Probe-Lauf ab „Ueber uns“
   nicht (Ursache im Hersteller-Markup nicht ermittelt). */
.heroSection,
.features,
#school-count + section,
.whyBest,
.pricing,
.customPack,
.faqs,
.getInTouch,
.ourApp,
footer.commonMT {
  line-height: 1.5;
}

/* Abschnitt „Schulen“ folgt ohne .commonMT direkt auf die Merkmale (home.blade.php) */
#school-count + section {
  margin-block-start: 60px;
}

.platform-lang-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  font-weight: 600;
}

/* R8: !important an beiden Farben — assets/home_page/css/style.css:13-16 setzt
   `a { color: #29363F !important }`; ohne !important lag das aktive Label bei 1,54:1. */
.platform-lang-switch a {
  color: var(--es-primary) !important;
  text-decoration: none;
  padding-block: 4px;
  padding-inline: 6px;
  border-radius: 6px;
}

.platform-lang-switch a[aria-current] {
  background-color: var(--es-primary);
  color: #ffffff !important;
}

.platform-lang-switch a:focus-visible {
  outline: 2px solid var(--es-primary);
  outline-offset: 2px;
}
