/* EUREKA functional alpha — minimum overrides on top of user's v428 prototype stylesheet. */
body.eureka-root{margin:0;background:#f6f8fc;color:#16213e;font-family:Inter,system-ui,-apple-system,'Segoe UI',Arial,sans-serif}
/* Beta 28 — reserve the desktop document scrollbar track even on short views.
   Switching between dashboard/list/detail views must not move the sidebar or topbar.
   This stylesheet is loaded only on EUREKA's application page. On mobile the
   document uses the platform's existing native/overlay scrolling behavior. */
@media (min-width:761px) {
  html { scrollbar-gutter: stable; }
}
.eureka-root *{box-sizing:border-box}
.eureka-shell{min-height:100vh}
.eureka-shell .main{min-width:0;flex:1}
.eureka-shell .content{max-width:1260px;margin:0 auto;padding:24px}

.eureka-shell .nav-bottom{margin-top:auto}

.eureka-root .eureka-panel{max-width:540px;margin:36px auto;padding:32px}
.eureka-guest{min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:24px;padding:32px}
.eureka-guest>img{display:block;max-width:180px}
.eureka-root .eureka-form{display:flex;flex-direction:column;align-items:stretch;gap:12px;margin:12px 0}
.eureka-root .eureka-form .register-field{margin:0;width:100%}
.eureka-root .eureka-form label>span{display:block;font-size:13px;font-weight:600;margin-bottom:6px}
.eureka-root .eureka-form input,.eureka-root .eureka-form textarea,.eureka-root .eureka-form select,.eureka-root .eureka-filter select{
    width:100%;max-width:100%;border:1px solid #d8deeb;border-radius:9px;min-height:40px;padding:6px 10px;background:#fff;color:#172443;font:inherit;font-size:16px;font-weight:500;line-height:1.35
}
.eureka-root .eureka-form textarea{min-height:100px;resize:vertical}
/* Consistent readable fields: use the padding budget, not larger form cards.
   16px also prevents automatic focus zoom in iOS Safari. */
.eureka-root .eureka-form :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),textarea,select){
    font-size:16px;
    font-weight:500;
    line-height:1.35;
    padding-block:6px;
    padding-inline:10px;
}
.eureka-root .eureka-form :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),textarea)::placeholder{
    font-size:16px;
    font-weight:400;
    color:#818da1;
    opacity:1;
}
.eureka-root .eureka-form .btn{align-self:flex-start;cursor:pointer}
.eureka-root .eureka-notice{padding:12px 16px;background:#edf4ff;border:0;border-left:4px solid #457adb;border-radius:0;margin:12px 0;line-height:1.5}
.eureka-root .eureka-section{margin:16px 0;padding:22px}
.eureka-root .eureka-section>h2{font-size:18px;margin:0 0 16px}
.eureka-root .eureka-muted{color:#63708a}
.eureka-root .eureka-actions{display:flex;gap:12px;flex-wrap:wrap;margin:10px 0 20px}
.eureka-root .eureka-list-row{display:flex;gap:14px;justify-content:space-between;align-items:center;padding:14px 8px;border-bottom:1px solid #e9edf4;color:inherit;text-decoration:none;min-width:0;flex-wrap:wrap}
.eureka-root .eureka-list-row:hover{background:#f7faff}
.eureka-root .eureka-list-row>span:nth-child(2):not(:last-child){flex:1;min-width:150px}
.eureka-root .eureka-list-row strong{display:block;font-weight:650;color:#16213e}
.eureka-root .eureka-list-row small{display:block;color:#63708a;margin-top:4px;line-height:1.4}
.eureka-root .eureka-list-row .eureka-form{margin:0;display:flex;flex-direction:row;align-items:flex-end;gap:8px;flex-wrap:wrap}
.eureka-root .eureka-list-row .eureka-form .btn{margin:0}
.eureka-root .eureka-small-field{font-size:12px;min-width:170px}
.eureka-root .eureka-avatar{display:inline-flex;align-items:center;justify-content:center;font-size:25px;width:44px;height:44px;border-radius:12px;background:#eaf0fc}
.eureka-root .eureka-readonly{display:block;width:100%;border:1px solid #cbd5e1;border-radius:8px;padding:10px;font:inherit}
.eureka-root .eureka-status{font-size:13px;color:#60718b}
.eureka-root .eureka-step{display:flex;justify-content:space-between;align-items:center;gap:16px;border-bottom:1px solid #edf0f6;padding:18px 4px}
.eureka-root .eureka-step-text{max-width:700px}
.eureka-root .eureka-step-text p{margin:8px 0 0;line-height:1.55}
.eureka-root .eureka-step .eureka-form{margin:0}
.eureka-root .eureka-completed{background:#e9f9f2;color:#18734f;border-color:#a9ddc7}
.eureka-root .eureka-filter{display:block;max-width:340px;font-size:13px;font-weight:600;margin:8px 0 16px}
.eureka-root .eureka-filter select{margin-top:6px}
.eureka-root .eureka-tabs{display:flex;gap:8px;margin:8px 0 12px}
.eureka-root [hidden]{display:none!important}
.eureka-root .eureka-mobile-toggle{display:none;background:none;border:0;color:inherit;font-size:24px;cursor:pointer}
.eureka-root .eureka-nav-button{width:100%;text-align:left;background:transparent;border:0;cursor:pointer;font:inherit}
.eureka-root .breadcrumbs{margin:0;padding:14px 24px;font-size:13px}
.eureka-root .breadcrumbs a{color:inherit}
.eureka-admin .eureka-metrics{display:grid;grid-template-columns:repeat(4,minmax(130px,1fr));gap:14px}
.eureka-admin .eureka-big-number{font-size:28px;font-weight:750;margin:6px 0}
@media(max-width:760px){
 .eureka-root .eureka-shell{display:block}

 .eureka-root .eureka-app-content{padding:14px}
 .eureka-root .eureka-step{align-items:flex-start;flex-direction:column}
 .eureka-root .eureka-step .eureka-form,.eureka-root .eureka-step .btn{width:100%}
 .eureka-root .eureka-section{padding:18px}
 .eureka-root .eureka-list-row .eureka-form{flex:1 0 100%}
 .eureka-root .eureka-list-row .eureka-form .btn{width:100%}
 .eureka-admin .eureka-metrics{grid-template-columns:repeat(2,minmax(100px,1fr))}
}

/* Only a WordPress POST form wraps logout; it must not change the v428 nav item's layout. */
.eureka-root .eureka-shell .nav-bottom-links .eureka-form{display:block;margin:0;padding:0;gap:0}
.eureka-root .eureka-shell .nav-bottom-links .eureka-nav-button{display:flex;align-items:center;justify-content:flex-start;gap:10px;width:100%;background:transparent;border:0;text-align:left;font-size:14px!important;font-weight:400;line-height:20px;color:#fff;padding:10px 11px}
.eureka-root .eureka-shell .nav-bottom-links .eureka-nav-button:hover{background:#262a42}
.eureka-root .eureka-shell .nav-bottom-links .power-icon{color:#e1e4f4}

/* Authentication visual system is isolated in auth.css and loaded for guest views only. */

/* Alpha 7: consistent panel icons for teacher and pupil, independent of font and CSS masks. */
.eureka-root .dashboard-sidebar-toggle svg.sidebar-toggle-icon{
  display:block;width:20px;height:20px;flex:0 0 20px;
  fill:none;stroke:currentColor;stroke-width:1.8;
  stroke-linecap:round;stroke-linejoin:round;
}
.eureka-root .dashboard-sidebar-toggle[aria-expanded="true"] .sidebar-toggle-icon-show,
.eureka-root .dashboard-sidebar-toggle[aria-expanded="false"] .sidebar-toggle-icon-hide{display:none!important}

/* Alpha 8 — single layout invariant, initialized in <head> before first paint.
   Preview is an overlay: it must never enlarge the reserved grid column. */
@media (min-width:761px){
 html.eureka-sidebar-collapsed-preload .eureka-shell,
 html.eureka-student-sidebar-collapsed-preload .eureka-shell,
 .eureka-shell.sidebar-is-collapsed{
   grid-template-columns:68px minmax(0,1fr)!important;
 }
 html.eureka-sidebar-initializing .eureka-shell,
 html.eureka-sidebar-initializing .eureka-shell .main,
 html.eureka-sidebar-initializing .dashboard-adaptive-sidebar{
   transition:none!important;
 }
 html.eureka-sidebar-collapsed-preload.eureka-sidebar-hover-preload .eureka-shell,
 html.eureka-student-sidebar-collapsed-preload.eureka-student-sidebar-hover-preload .eureka-shell,
 .eureka-shell.sidebar-is-collapsed.sidebar-hover-preview-restored{
   grid-template-columns:68px minmax(0,1fr)!important;
 }
 .eureka-shell.sidebar-is-collapsed .dashboard-adaptive-sidebar{
   min-width:0;
 }
}
/* The prototype's old preload selectors covered teacher only. Mirror compact
   first-paint controls for pupils until sidebar.js hydrates both roles. */
@media(min-width:761px){
 html.eureka-student-sidebar-collapsed-preload:not(.eureka-student-sidebar-hover-preload) .dashboard-adaptive-sidebar{
   width:68px!important;transition:none!important;
 }
 html.eureka-student-sidebar-collapsed-preload:not(.eureka-student-sidebar-hover-preload) .dashboard-sidebar-logo-wrap{
   width:38px!important;flex:0 0 38px!important;transition:none!important;
 }
 html.eureka-student-sidebar-collapsed-preload:not(.eureka-student-sidebar-hover-preload) .dashboard-sidebar-logo-full{
   opacity:0!important;pointer-events:none!important;
 }
 html.eureka-student-sidebar-collapsed-preload:not(.eureka-student-sidebar-hover-preload) .dashboard-sidebar-logo-mark{
   opacity:1!important;
 }
 html.eureka-student-sidebar-collapsed-preload:not(.eureka-student-sidebar-hover-preload) .dashboard-sidebar-toggle{
   visibility:hidden!important;opacity:0!important;pointer-events:none!important;
 }
 html.eureka-student-sidebar-collapsed-preload:not(.eureka-student-sidebar-hover-preload) .dashboard-adaptive-sidebar .nav-link{
   justify-content:center!important;gap:0!important;padding-left:10px!important;padding-right:10px!important;
 }
 html.eureka-student-sidebar-collapsed-preload:not(.eureka-student-sidebar-hover-preload) .dashboard-adaptive-sidebar .nav-label,
 html.eureka-student-sidebar-collapsed-preload:not(.eureka-student-sidebar-hover-preload) .dashboard-adaptive-sidebar .teacher-profile-copy{
   max-width:0!important;opacity:0!important;
 }
 html.eureka-student-sidebar-collapsed-preload:not(.eureka-student-sidebar-hover-preload) .dashboard-adaptive-sidebar .teacher-profile-mini-link{
   justify-content:center!important;gap:0!important;
 }
}

/* Alpha 13: one avatar component shared by registration, groups and user profiles. */
.eureka-root .eureka-avatar-badge{
 display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;
 width:48px;height:48px;min-width:48px;border-radius:14px;
 background:var(--avatar-bg,#E9EEFF);color:#25304c;border:1px solid rgba(35,54,90,.09);
 font-size:25px;line-height:1;vertical-align:middle;
}
.eureka-root .eureka-avatar-badge>span{display:block}
.eureka-root .eureka-avatar-badge.teacher-sidebar-avatar{width:40px;height:40px;min-width:40px;font-size:22px}
.eureka-root .eureka-avatar-badge.group-icon{width:44px;height:44px;min-width:44px;font-size:24px}
.eureka-root .eureka-avatar-badge.eureka-invite-avatar{width:53px;height:53px;min-width:53px;font-size:27px}
.eureka-root .eureka-avatar-badge.eureka-avatar{width:38px;height:38px;min-width:38px;font-size:20px}
/* Shared avatar editor for student/teacher registration, profiles and groups.
   The same selected pastel colour fills the avatar and gently tints its preview card. */
.eureka-root .eureka-avatar-editor{
 display:flex;flex-direction:column;gap:13px;min-width:0;margin:6px 0 13px;width:100%;
}
.eureka-root .eureka-avatar-profile-preview{
 display:flex;flex-direction:row;align-items:center;justify-content:flex-start;
 gap:13px;min-width:0;width:100%;box-sizing:border-box;
 padding:12px 14px;text-align:left;
 /* Never tint the profile card more than 15%: labels stay readable for all avatar colors. */
 background:color-mix(in srgb,var(--avatar-bg,#E9EEFF) 15%,white);
 border:1px solid color-mix(in srgb,var(--avatar-bg,#E9EEFF) 25%,#d4dbe8);
 border-radius:14px;transition:background-color .18s ease,border-color .18s ease;
}
.eureka-root .eureka-avatar-profile-preview[hidden]{display:none!important}
.eureka-root .eureka-avatar-badge.eureka-avatar-preview{
 display:inline-flex;justify-content:center;align-items:center;
 width:52px;height:52px;min-width:52px;min-height:52px;
 border-radius:50%;font-size:25px;background:var(--avatar-bg,#E9EEFF);
 border:2px solid rgba(38,49,74,.14);
 box-shadow:inset 0 0 0 1px rgba(255,255,255,.35);
}
.eureka-root .eureka-avatar-profile-copy{
 display:flex;flex:1;flex-direction:column;gap:1px;min-width:0;
}
.eureka-root .eureka-avatar-preview-name{
 display:block;min-width:0;font-size:16px;font-weight:650;line-height:1.45;
 color:#1a2947;overflow-wrap:anywhere;
}
.eureka-root .eureka-avatar-preview-role{
 display:block;color:#1a2947;font-size:13px;font-weight:400;line-height:1.35;
}
.eureka-root .eureka-avatar-randomize{
 display:inline-flex;align-items:center;justify-content:center;
 width:100%;min-height:47px;gap:10px;
}
.eureka-root .eureka-avatar-dice-icon{width:21px;height:21px;flex:0 0 21px;stroke:currentColor}
.eureka-root .dashboard-sidebar-toggle svg.sidebar-toggle-icon{width:18px;height:18px;flex-basis:18px}
/* Keep both role labels as readable as the account name; teacher card slightly lighter. */
.eureka-root .eureka-teacher-avatar-hero{
 background:color-mix(in srgb,var(--avatar-bg,#E9EEFF) 10%,white);
 border-color:color-mix(in srgb,var(--avatar-bg,#E9EEFF) 20%,#d4dbe8);
}
.eureka-root .eureka-teacher-avatar-hero .eureka-avatar-profile-copy{gap:1px}
.eureka-root .eureka-teacher-avatar-hero .eureka-avatar-preview-role{color:#1a2947}
.eureka-root .eureka-avatar-profile-preview[data-eureka-avatar-hero]{margin:0 0 12px}
@media(max-width:470px){
  .eureka-root .eureka-avatar-profile-preview{gap:11px;padding:10px 12px}
  .eureka-root .eureka-avatar-badge.eureka-avatar-preview{
    width:45px;height:45px;min-width:45px;min-height:45px;font-size:23px;
  }
  .eureka-root .eureka-avatar-preview-name{font-size:15px}
}

/* Common accessible helper belongs to the shared app stylesheet, including group/profile editors. */
.eureka-root .eureka-visually-hidden{
  position:absolute!important;width:1px!important;height:1px!important;
  overflow:hidden!important;clip:rect(0 0 0 0)!important;
  white-space:nowrap!important;clip-path:inset(50%)!important;
}

/* Alpha 35: the shape encodes entity type across the entire platform.
   Groups are small-radius squares, people are circles, regardless of size. */
.eureka-root .eureka-avatar-badge.eureka-avatar--group{border-radius:5px!important}
.eureka-root .eureka-avatar-badge.eureka-avatar--user{border-radius:50%!important}
/* Alpha153: the teacher profile editor previews both the current and selected user avatar. */
.eureka-root .eureka-avatar-badge.eureka-user-avatar-preview{border-radius:50%!important}

/* Shared spinner for authentication and in-app AJAX actions. */
.eureka-root .loader{
  --color-1:#a1a9b8;--color-2:#1b93d2;--size:1.5px;
  width:calc(48 * var(--size));height:calc(48 * var(--size));
  border-radius:50%;display:inline-block;position:relative;
  border:calc(3 * var(--size)) solid;
  border-color:var(--color-1) var(--color-1) transparent transparent;
  box-sizing:border-box;animation:eureka-rotation 1s linear infinite;
}
.eureka-root .loader::after,.eureka-root .loader::before{
  content:"";box-sizing:border-box;position:absolute;left:0;right:0;top:0;bottom:0;margin:auto;
  border:calc(3 * var(--size)) solid;
  border-color:transparent transparent var(--color-2) var(--color-2);
  width:calc(40 * var(--size));height:calc(40 * var(--size));
  border-radius:50%;animation:eureka-rotation-back .5s linear infinite;
  transform-origin:center center;
}
.eureka-root .loader::before{
  width:calc(32 * var(--size));height:calc(32 * var(--size));
  border-color:var(--color-1) var(--color-1) transparent transparent;
  animation:eureka-rotation 1.5s linear infinite;
}
@keyframes eureka-rotation{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}
@keyframes eureka-rotation-back{0%{transform:rotate(0deg)}100%{transform:rotate(-360deg)}}
@media(prefers-reduced-motion:reduce){
 .eureka-root .loader,.eureka-root .loader::before,.eureka-root .loader::after{animation:none}
}

/* Shared transient AJAX feedback — reusable across authenticated EUREKA views. */
.eureka-ajax-toast[hidden]{display:none!important}
.eureka-ajax-toast{
  position:fixed;
  right:22px;
  bottom:calc(22px + env(safe-area-inset-bottom, 0px));
  z-index:240;
  box-sizing:border-box;
  display:flex;
  align-items:center;
  gap:11px;
  width:max-content;
  max-width:min(360px, calc(100vw - 32px));
  min-height:54px;
  padding:12px 15px;
  border:1px solid #15803d;
  border-radius:11px;
  background:#15803d;
  color:#fff;
  box-shadow:0 12px 32px rgba(27,40,65,.16);
  opacity:0;
  visibility:hidden;
  transform:translateY(10px);
  transition:opacity .22s ease,transform .22s ease,visibility 0s linear .22s;
  pointer-events:none;
}
.eureka-ajax-toast.is-visible{
  opacity:1;
  visibility:visible;
  transform:translateY(0);
  transition:opacity .22s ease,transform .22s ease,visibility 0s;
}
.eureka-ajax-toast-icon{
  display:grid;
  place-items:center;
  flex:0 0 21px;
  width:21px;
  height:21px;
  color:#fff;
}
/* Error state shares the same white-on-color typography and iconography. */
.eureka-ajax-toast[data-kind="error"]{background:#b91c1c;border-color:#b91c1c}
.eureka-ajax-toast[data-kind="error"] .eureka-ajax-toast-icon{color:#fff}
.eureka-ajax-toast-icon svg{display:block;width:19px;height:19px}
.eureka-ajax-toast-copy{display:flex;flex-direction:column;gap:2px;min-width:0}
.eureka-ajax-toast-title{color:#fff;font-size:14px;line-height:1.3;font-weight:650}
.eureka-ajax-toast-message{color:#fff;font-size:12px;font-weight:450;line-height:1.4;overflow-wrap:anywhere}
@media (max-width:760px){
  .eureka-ajax-toast{
    right:12px;
    left:12px;
    bottom:calc(12px + env(safe-area-inset-bottom, 0px));
    width:auto;
    max-width:none;
    padding:13px 15px;
  }
}
@media (prefers-reduced-motion:reduce){
  .eureka-ajax-toast,.eureka-ajax-toast.is-visible{transition:none;transform:none}
}

/* EUREKA: ukrywamy tylko plywajacy widget Cookiebota.
   Okno ustawien zgod pozostaje dostepne przez link "Twoje zgody". */
#CookiebotWidget {
  display: none !important;
}

/* Beta353: the user's three-circle TEAM symbol, never the WordPress funnel.
   The SVG mask inherits any icon/text color and works in both themes. */
.eureka-root .dashicons.eureka-team-dots::before {
  content:"";
  display:inline-block;
  width:1em;
  height:1em;
  background-color:currentColor;
  -webkit-mask:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iYmxhY2siIGFyaWEtaGlkZGVuPSJ0cnVlIj48Y2lyY2xlIGN4PSIxMiIgY3k9IjUuNDUiIHI9IjQuNCIvPjxjaXJjbGUgY3g9IjUuNjUiIGN5PSIxNi4wNSIgcj0iNC40Ii8+PGNpcmNsZSBjeD0iMTguMzUiIGN5PSIxNi4wNSIgcj0iNC40Ii8+PC9zdmc+Cg==") center / contain no-repeat;
  mask:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iYmxhY2siIGFyaWEtaGlkZGVuPSJ0cnVlIj48Y2lyY2xlIGN4PSIxMiIgY3k9IjUuNDUiIHI9IjQuNCIvPjxjaXJjbGUgY3g9IjUuNjUiIGN5PSIxNi4wNSIgcj0iNC40Ii8+PGNpcmNsZSBjeD0iMTguMzUiIGN5PSIxNi4wNSIgcj0iNC40Ii8+PC9zdmc+Cg==") center / contain no-repeat;
  vertical-align:top;
}
