/* Eduinfó visual system — integration overlay for the current Laravel/Blade frontend.
   Load AFTER /css/k-info.css and Vite CSS. Does not modify route, auth or forms.
   The production portal includes bootstrap 5.3, Tom Select, .kinfo-* header,
   and a separate sidebar using .active-admin-nav / .dashboard-card. */
:root,
:root[data-theme='light'] {
  color-scheme:light;
  --maroon-50:#f7ecee; --maroon-100:#ead5d9; --maroon-300:#c2798b;
  --maroon-500:#9b3952; --maroon-700:#862633; --maroon-800:#6c1d28;
  --color-bg:#f7f7f5; --color-surface:#fff; --color-surface-alt:#fafaf9;
  --color-border:#e5e6e3; --color-border-strong:#d4d7d3;
  --color-text:#24282b; --color-text-muted:#4b5458; --color-text-subtle:#687378;
  --color-brand:#862633; --color-brand-hover:#70202d;
  --color-brand-soft:#f7ecee; --color-brand-soft-text:#862633;
  --color-on-brand:#fff;
  --color-info:#294d78; --color-info-soft:#ecf3fa; --color-info-text:#25496c;
  --color-success:#176a55; --color-success-soft:#eaf5ef; --color-success-text:#176a55;
  --color-warning:#855c16; --color-warning-soft:#f8f1e4; --color-warning-text:#775015;
  --color-danger:#a63741; --color-danger-soft:#faecec; --color-danger-text:#9d343c;
  --color-focus-ring:rgba(134,38,51,.24);
  --radius-sm:5px; --radius-md:7px; --radius-lg:9px; --radius-xl:12px;
  --shadow-sm:none; --shadow-md:0 4px 16px rgba(24,28,30,.055);
  --bs-body-bg:#f7f7f5; --bs-body-color:#24282b;
  --bs-secondary-color:#4b5458; --bs-tertiary-bg:#fafaf9;
  --bs-border-color:#e5e6e3; --bs-emphasis-color:#24282b;
  --bs-link-color:#862633; --bs-link-hover-color:#70202d;
}
:root[data-theme='dark'] {
  color-scheme:dark;
  --maroon-50:#342329; --maroon-100:#5b3b45; --maroon-300:#edb0c0;
  --maroon-500:#ac4c65; --maroon-700:#9b3952; --maroon-800:#842d42;
  --color-bg:#151719; --color-surface:#202326; --color-surface-alt:#24282b;
  --color-border:#343a3e; --color-border-strong:#4b5257;
  --color-text:#f1f2f1; --color-text-muted:#d4d8d9; --color-text-subtle:#aab3b7;
  --color-brand:#edb0c0; --color-brand-hover:#f3c2ce;
  --color-brand-soft:#342329; --color-brand-soft-text:#edb0c0;
  --color-on-brand:#291419;
  --color-info:#a5c7ec; --color-info-soft:#223343; --color-info-text:#afcfe9;
  --color-success:#9cdbc0; --color-success-soft:#1e3b31; --color-success-text:#9cdbc0;
  --color-warning:#efca8f; --color-warning-soft:#3a3222; --color-warning-text:#efca8f;
  --color-danger:#f3a6a9; --color-danger-soft:#41292e; --color-danger-text:#f3a6a9;
  --color-focus-ring:rgba(237,176,192,.30);
  --shadow-sm:none; --shadow-md:0 4px 18px rgba(0,0,0,.14);
  --bs-body-bg:#151719; --bs-body-color:#f1f2f1;
  --bs-secondary-color:#d4d8d9; --bs-tertiary-bg:#24282b;
  --bs-border-color:#343a3e; --bs-emphasis-color:#f1f2f1;
  --bs-link-color:#edb0c0; --bs-link-hover-color:#f3c2ce;
  --bs-primary:#9b3952; --bs-primary-rgb:155,57,82;
}
:root[data-theme='dark'] { --nav-bg:var(--color-surface); --nav-border:var(--color-border);
  --nav-text:var(--color-text-muted); --nav-text-hover:var(--color-text);
  --nav-bg-hover:var(--color-surface-alt); --nav-text-active:var(--color-brand);
  --nav-bg-active:var(--color-brand-soft); --nav-dropdown-bg:var(--color-surface);
  --nav-dropdown-border:var(--color-border); --nav-search-bg:var(--color-surface-alt);
  --nav-search-border:var(--color-border); --nav-search-color:var(--color-text);
  --nav-search-btn-bg:#96334c; --nav-search-btn-bg-hover:#a5445e; --nav-search-btn-color:#fff; }
:root[data-theme='light'] { --nav-bg:var(--color-surface); --nav-border:var(--color-border);
  --nav-text:var(--color-text-muted); --nav-text-hover:var(--color-text);
  --nav-bg-hover:var(--color-surface-alt); --nav-text-active:var(--color-brand);
  --nav-bg-active:var(--color-brand-soft); --nav-dropdown-bg:var(--color-surface);
  --nav-dropdown-border:var(--color-border); --nav-search-bg:var(--color-surface-alt);
  --nav-search-border:var(--color-border); --nav-search-color:var(--color-text); }
html, body { background:var(--color-bg) !important; color:var(--color-text) !important; }
body { font-family:'Fira Sans',system-ui,sans-serif !important; line-height:1.5 }
h1,h2,h3,h4,h5 {letter-spacing:-.018em; color:var(--color-text)}
h1,h2 {font-weight:650}h3,h4,h5 {font-weight:620}
.text-muted,.text-secondary,.text-body-secondary {color:var(--color-text-muted)!important}
.border,.border-top,.border-bottom,.border-start,.border-end {border-color:var(--color-border)!important}
a:not(.btn) {text-underline-offset:3px}
/* Global navigation */
.kinfo-navbar-wrapper {background:var(--color-surface)!important;border-bottom-color:var(--color-border)!important;box-shadow:none!important}
.kinfo-navbar-container {min-height:66px}
.kinfo-navbar-nav a.nav-link-item {border-radius:5px!important;font-weight:560!important}
.kinfo-navbar-nav a.nav-link-item.active {font-weight:650!important;background:var(--color-brand-soft)!important;color:var(--color-brand)!important}
.kinfo-dropdown-menu,.dropdown-menu,.dropdown-menu.show {background:var(--color-surface)!important;border:1px solid var(--color-border)!important;color:var(--color-text)!important;box-shadow:0 7px 18px rgba(0,0,0,.10)!important}
.dropdown-item,.kinfo-dropdown-item {color:var(--color-text-muted)!important}
.dropdown-item:hover,.dropdown-item:focus,.kinfo-dropdown-item:hover {background:var(--color-surface-alt)!important;color:var(--color-text)!important}
.kinfo-search-input {background:var(--color-surface-alt)!important;color:var(--color-text)!important;border-color:var(--color-border-strong)!important}
.kinfo-search-input::placeholder {color:var(--color-text-subtle)!important}
/* Admin chrome and shared page surfaces */
#admin-sidebar {background:var(--color-surface-alt)!important;border-color:var(--color-border)!important}
#admin-sidebar h2[style] {color:var(--color-brand)!important}
.active-admin-nav {background:var(--color-brand-soft)!important;color:var(--color-brand)!important;box-shadow:inset 3px 0 0 var(--color-brand);border-radius:5px!important}
.text-muted-admin-nav {color:var(--color-text-muted)!important}
.text-muted-admin-nav:hover {background:var(--color-surface)!important;color:var(--color-text)!important}
.submenu-admin-link {border-radius:5px}
.submenu-admin-link.active {background:var(--color-brand-soft)!important;color:var(--color-brand)!important}
.dashboard-card,.card,.accordion-item,.modal-content,.offcanvas,.list-group-item,.pagination-card {background:var(--color-surface)!important;color:var(--color-text)!important;border:1px solid var(--color-border)!important;box-shadow:none!important;border-radius:8px!important}
.dashboard-card:hover {border-color:var(--color-border-strong)!important;transform:none!important}
.dashboard-icon-box {background:var(--color-brand-soft)!important;color:var(--color-brand)!important;border-radius:6px!important}
.card-header,.card-footer,.modal-header,.modal-footer,.accordion-button,.list-group-item-action:hover {background:var(--color-surface-alt)!important;border-color:var(--color-border)!important;color:var(--color-text)!important}
.accordion-button:not(.collapsed){color:var(--color-brand)!important}
.modal-backdrop.show {opacity:.65}
:root[data-theme='dark'] .modal-content,:root[data-theme='dark'] .offcanvas {color-scheme:dark}
/* Table and data density */
.table {--bs-table-bg:transparent;--bs-table-color:var(--color-text);--bs-table-border-color:var(--color-border);--bs-table-striped-bg:var(--color-surface-alt);--bs-table-striped-color:var(--color-text);--bs-table-hover-bg:var(--color-surface-alt);--bs-table-hover-color:var(--color-text);color:var(--color-text)}
.table th,.table thead th {font-weight:650;color:var(--color-text-muted);background:var(--color-surface-alt);border-color:var(--color-border)}
.table td {border-color:var(--color-border)}
.table-responsive {border-radius:6px}
/* Inputs incl Bootstrap + TomSelect: eliminate white panes in dark mode */
.form-control,.form-select,.form-check-input,.input,.select,.ts-wrapper .ts-control,.ts-dropdown,.input-group-text,.form-control:disabled,.form-select:disabled {background-color:var(--color-surface)!important;color:var(--color-text)!important;border-color:var(--color-border-strong)!important;border-radius:6px!important}
.form-control::placeholder,.input::placeholder {color:var(--color-text-subtle)!important;opacity:1}
.form-control:focus,.form-select:focus,.input:focus,.select:focus,.ts-wrapper.focus .ts-control {border-color:var(--color-brand)!important;box-shadow:0 0 0 3px var(--color-focus-ring)!important}
.ts-dropdown .option,.ts-dropdown .create,.ts-control input {color:var(--color-text)!important;background:transparent!important}
.ts-dropdown .option.active,.ts-dropdown .option:hover,.ts-dropdown .option[aria-selected='true'] {background:var(--color-brand-soft)!important;color:var(--color-brand)!important}
:root[data-theme='dark'] input:-webkit-autofill { -webkit-text-fill-color:#f1f2f1!important;box-shadow:0 0 0 1000px #202326 inset!important;caret-color:#f1f2f1 }
.form-control:disabled,.form-select:disabled,:disabled:not(button){opacity:.78}
input[type='checkbox'],input[type='radio'],.form-check-input {accent-color:#862633}
select option {background:var(--color-surface);color:var(--color-text)}
/* Buttons: primary always has white readable text, including dark theme. */
.btn,.btn-sm,.btn-lg {border-radius:6px!important;font-weight:600;box-shadow:none!important}
.btn-primary,.btn[style*='background-color: var(--color-brand)'] {background:#862633!important;border-color:#862633!important;color:#fff!important}
.btn-primary:hover {background:#70202d!important;border-color:#70202d!important}
:root[data-theme='dark'] .btn-primary,:root[data-theme='dark'] .btn[style*='background-color: var(--color-brand)']{background:#96334c!important;border-color:#96334c!important;color:#fff!important}
.btn-outline-secondary,.btn-light{background:var(--color-surface)!important;color:var(--color-text)!important;border-color:var(--color-border-strong)!important}
.btn-outline-secondary:hover,.btn-light:hover{background:var(--color-surface-alt)!important}
.badge {font-weight:600;border-radius:4px!important}
:root[data-theme='dark'] .badge.bg-light,:root[data-theme='dark'] .bg-white,:root[data-theme='dark'] .bg-light{background:var(--color-surface-alt)!important;color:var(--color-text)!important}
.alert {border:1px solid var(--color-border)!important;border-radius:7px!important;box-shadow:none!important}
.alert-info{color:var(--color-info-text);background:var(--color-info-soft)}
.alert-success{color:var(--color-success-text);background:var(--color-success-soft)}
.alert-warning{color:var(--color-warning-text);background:var(--color-warning-soft)}
.alert-danger{color:var(--color-danger-text);background:var(--color-danger-soft)}
.toast,.popover,.tooltip-inner {background:var(--color-surface)!important;color:var(--color-text)!important;border:1px solid var(--color-border)}
.kinfo-bottom-nav {background:var(--color-surface)!important;border-color:var(--color-border)!important;box-shadow:none!important}
.kinfo-bottom-tab.active {color:var(--color-brand)!important}
/* Graphs, dashboards, document and calendar blocks inherit the same frame */
.graph-board,.graph-container,.curriculum-graph-container,.chart-container,.calendar,.fc,.document-card,.subject-card,.program-card {background-color:var(--color-surface);color:var(--color-text);border-color:var(--color-border)}
:root[data-theme='dark'] .fc-theme-standard td,:root[data-theme='dark'] .fc-theme-standard th {border-color:var(--color-border)}
:root[data-theme='dark'] .fc .fc-col-header-cell,:root[data-theme='dark'] .fc .fc-daygrid-day {background:var(--color-surface);color:var(--color-text)}
/* Theme parity for keyboard focus and high contrast */
:where(a,button,input,select,textarea,[tabindex]):focus-visible {outline:2px solid var(--color-brand)!important;outline-offset:2px!important}
@media(prefers-reduced-motion:reduce) {*,*:before,*:after {transition-duration:.01ms!important;animation-duration:.01ms!important;scroll-behavior:auto!important}}
@media(max-width:767.98px){.dashboard-card{border-radius:7px!important}.kinfo-navbar-container{padding-inline:14px!important} main {max-width:100%}}
