/* Shared Evalia presentation. Feature-specific styles remain on the original forms. */
:root {
  --ev-navy: #102d45; --ev-blue: #174862; --ev-petrol: #18536a; --ev-teal: #0e6973; --ev-accent: #70d3c8;
  --ev-ink: #142b3d; --ev-muted: #496074; --ev-bg: #f3f6f8; --ev-line: #d9e3ea; --ev-paper: #fff; --ev-soft: #eaf2f5;
  --ev-control-line: #7f96a5; --ev-selected: #e0f2ef; --ev-selected-line: #80b7b1;
  --ev-radius: 14px; --ev-control-radius: 8px; --ev-shadow: 0 2px 5px #102d4509;
  --ev-font: "IBM Plex Sans Arabic", "Cairo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ev-gradient: linear-gradient(112deg, #15495b, #102d45 78%);
  --ev-space: clamp(14px, 2.25vw, 32px); --ev-rail-width: 232px;
  --font: var(--ev-font); --primary: var(--ev-navy); --primary2: var(--ev-petrol); --accent: var(--ev-teal); --line: var(--ev-line); --ink: var(--ev-ink);
}
*, *::before, *::after { box-sizing: border-box; }
body.ev-app, body.ev-auth-page { margin: 0; font: 400 15px/1.7 var(--ev-font); color: var(--ev-ink); background: var(--ev-bg); }
.ev-app a, .ev-auth-page a { text-decoration: none; color: inherit; }
.ev-app :where(button,input,select,textarea), .ev-auth-page :where(button,input,select,textarea) { font: inherit; }
.ev-app :focus-visible, .ev-auth-page :focus-visible { outline: 3px solid var(--ev-teal); outline-offset: 3px; }
.ev-app [hidden], .ev-auth-page [hidden] { display: none !important; }
.ev-app bdi, .ev-app time { font-variant-numeric: tabular-nums; }
.ev-muted { color: var(--ev-muted); }
.ev-skip { position: fixed; inset-block-start: 12px; inset-inline-start: 12px; z-index: 10000; transform: translateY(-160%); padding: 10px 16px; border-radius: 10px; color: white !important; background: var(--ev-navy); }
.ev-skip:focus { transform: translateY(0); }
.ev-brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.ev-brand img { flex: none; border-radius: 12px; }
.ev-brand-name { line-height: 1.2; min-width: 0; }
.ev-brand strong { font-size: 1.55rem; font-weight: 700; }
.ev-brand-name > span { margin-inline-start: 5px; font-size: .75rem; letter-spacing: .07em; font-weight: 500; }
.ev-brand small { display: block; margin-block-start: 5px; font-size: .69rem; font-weight: 500; color: var(--ev-muted); }
.ev-shell { display: grid; grid-template-columns: var(--ev-rail-width) minmax(0, 1fr); min-height: 100vh; }
.ev-rail { display: flex; flex-direction: column; position: sticky; inset-block-start: 0; height: 100dvh; overflow: auto; scrollbar-width: thin; background: #fbfcfd; border-inline-end: 1px solid var(--ev-line); padding: 20px 14px 14px; }
.ev-rail-brand { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-inline: 5px; margin-block-end: 20px; }
.ev-tenant { display: flex; align-items: center; gap: 9px; padding: 10px; border: 1px solid var(--ev-line); border-radius: 10px; background: var(--ev-bg); line-height: 1.4; overflow-wrap: anywhere; }
.ev-tenant strong, .ev-tenant small { display: block; }
.ev-tenant strong { font-size: .9rem; }
.ev-tenant small { color: var(--ev-muted); font-size: .78rem; margin-block-start: 4px; }
.ev-nav { display: grid; align-content: start; gap: 2px; margin-block: 8px 16px; }
.ev-nav-label small { display: block; font-weight: 400; }
.ev-nav-label { display: block; color: var(--ev-muted); font-size: .75rem; font-weight: 600; margin: 12px 10px 4px; }
.ev-nav a, .ev-nav summary { display: flex; min-height: 39px; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 7px; color: var(--ev-muted); font-weight: 600; font-size: .89rem; }
.ev-nav a:hover, .ev-nav summary:hover { color: var(--ev-blue); background: var(--ev-bg); }
.ev-nav a[aria-current] { color: var(--ev-teal); background: var(--ev-selected); box-shadow: inset -2px 0 0 var(--ev-teal); }
.ev-nav :is(a,summary) svg { width: 18px; height: 18px; flex: none; }
.ev-nav summary { cursor: pointer; }
.ev-nav summary > svg:last-child { margin-inline-start: auto; width: 14px; }
.ev-nav-group[open] summary > svg:last-child { transform: rotate(180deg); }
.ev-nav-group a { margin-inline-start: 18px; }
.ev-rail-foot { display: grid; justify-items: start; gap: 6px; margin-block-start: auto; padding: 12px; border: 1px solid var(--ev-line); background: var(--ev-bg); border-radius: 13px; color: var(--ev-muted); font-size: .8rem; }

/* School management navigation */
.ev-rail--management { background: var(--ev-paper); overscroll-behavior: contain; }
.ev-rail--management .ev-rail-brand { margin-block-end: 16px; }
.ev-rail--management .ev-tenant {
  position: relative; isolation: isolate; overflow: hidden; min-height: 62px; flex: none;
  padding: 11px 10px; background: var(--ev-gradient); border: 0; color: white;
}
.ev-rail--management .ev-tenant::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .11;
  background: url(../brand/evalia-e-monogram-light.svg) left -12px center / 82px no-repeat;
}
.ev-rail--management .ev-tenant .ev-icon-tile { width: 33px; height: 33px; border-radius: 7px; color: var(--ev-accent); background: #ffffff16; }
.ev-rail--management .ev-tenant small { color: #d7e8ee; }
.ev-rail--management .ev-tenant > div { min-width: 0; }
.ev-rail--management .ev-nav-label { color: var(--ev-muted); font-weight: 700; }
.ev-rail--management .ev-nav-label--personal { margin: 8px 0 3px; border-block-start: 1px solid var(--ev-line); padding: 11px 10px 0; }
.ev-rail--management .ev-nav :is(a, summary) { color: var(--ev-ink); }
.ev-rail--management .ev-nav :is(a, summary) > svg { color: var(--ev-muted); }
.ev-rail--management .ev-nav :is(a, summary):focus-visible { outline-offset: -2px; }
.ev-rail--management .ev-nav a[aria-current], .ev-rail--management .ev-nav a[aria-current] > svg { color: var(--ev-teal); }
.ev-rail--management .ev-nav a[aria-current] { font-weight: 700; }
.ev-rail--management .ev-nav-group[open] { background: var(--ev-bg); border-radius: 8px; }
.ev-rail--management .ev-nav-group[open] > summary { font-weight: 700; }
.ev-nav-submenu { display: grid; gap: 2px; margin: 0 8px 7px; padding-inline-start: 6px; border-inline-start: 1px solid var(--ev-line); }
.ev-rail--management .ev-nav-submenu a { margin: 0; min-height: 36px; padding-inline: 6px; font-size: .84rem; line-height: 1.45; }
.ev-rail--management .ev-nav-submenu a > svg { width: 15px; height: 15px; }
.ev-rail--management .ev-rail-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; padding: 9px; border-radius: 8px; }
.ev-main { min-width: 0; width: 100%; max-width: 1680px; margin-inline: auto; }
.ev-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px var(--ev-space); min-height: 76px; }
.ev-top-context, .ev-top-actions { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ev-top-actions { flex: none; }
.ev-crumb { display: block; color: var(--ev-muted); font-size: .77rem; overflow-wrap: anywhere; }
.ev-crumb span { margin-inline: 3px; }
.ev-top h1 { margin: 3px 0 0; font-weight: 700; font-size: clamp(1.17rem, 2vw, 1.6rem); line-height: 1.3; }
.ev-icon-button { display: inline-grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--ev-line); border-radius: var(--ev-control-radius); background: var(--ev-paper); color: var(--ev-navy); flex: none; cursor: pointer; }
.ev-account { position: relative; }
.ev-account summary { display: flex; align-items: center; gap: 9px; background: var(--ev-paper); border: 1px solid var(--ev-line); padding: 5px 8px; border-radius: 13px; cursor: pointer; }
.ev-account summary::marker, .ev-nav summary::marker { content: ""; }
.ev-account summary::-webkit-details-marker, .ev-nav summary::-webkit-details-marker { display: none; }
.ev-account summary > svg { width: 14px; }
.ev-account-label { display: grid; line-height: 1.35; font-size: .79rem; }
.ev-account-label strong { max-width: 135px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-account-label small { color: var(--ev-muted); font-size: .72rem; }
.ev-avatar { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: #e4eff5; color: var(--ev-petrol); font-weight: 700; }
.ev-account-menu { position: absolute; inset-inline-end: 0; inset-block-start: calc(100% + 7px); z-index: 15; min-width: 190px; padding: 5px; background: var(--ev-paper); border: 1px solid var(--ev-line); border-radius: 12px; box-shadow: var(--ev-shadow); }
.ev-account-menu a, .ev-account-menu button { display: block; width: 100%; padding: 8px; text-align: start; background: none; border: 0; color: var(--ev-ink); cursor: pointer; }
.ev-account-menu a:hover, .ev-account-menu button:hover { background: var(--ev-soft); }
.ev-content { min-width: 0; padding: 0 var(--ev-space) 28px; }
.ev-footer { display: flex; gap: 10px; justify-content: space-between; padding: 14px var(--ev-space) 25px; border-top: 1px solid var(--ev-line); color: var(--ev-muted); font-size: .79rem; }
.ev-mobile-only, .ev-scrim { display: none; }
.ev-hero { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr) minmax(155px, 230px); gap: 20px; align-items: center; overflow: hidden; min-height: 164px; padding: clamp(18px, 2vw, 28px); border-radius: var(--ev-radius); background: var(--ev-gradient); color: white; }
.ev-hero::before { content: ""; position: absolute; z-index: -1; pointer-events: none; inset: 0; background: url(../brand/evalia-e-monogram-light.svg) left -24px center / 240px no-repeat; opacity: .07; }
.ev-hero h2 { margin: 4px 0 5px; font-size: clamp(1.5rem, 2.65vw, 2.2rem); line-height: 1.3; }
.ev-hero p { margin: 0; max-width: 65ch; color: #e1edf5; }
.ev-kicker { display: inline-block; font-size: .79rem; font-weight: 700; color: var(--ev-petrol); }
.ev-hero .ev-kicker, .ev-auth-aside .ev-kicker { color: var(--ev-accent); }
.ev-hero-side { display: grid; align-content: center; justify-items: start; gap: 4px; padding: 12px 15px; border: 1px solid #ffffff32; border-inline-start: 2px solid var(--ev-accent); background: #102d4590; border-radius: 8px; overflow-wrap: anywhere; }
.ev-hero-side > span:not(.ev-badge), .ev-hero-side small { color: #d6e9f2; font-size: .82rem; }
.ev-hero-side > strong { font-size: 1.22rem; line-height: 1.35; }
.ev-hero .ev-actions { margin-block-start: 13px; }
.ev-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.ev-button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 40px; padding: 7px 14px; border: 1px solid transparent; border-radius: var(--ev-control-radius); font: 600 .9rem/1.35 var(--ev-font); text-align: center; cursor: pointer; }
.ev-button svg { flex: none; width: 15px; height: 15px; }
.ev-button--primary { background: var(--ev-navy); color: white !important; }
.ev-button--primary:hover { background: var(--ev-blue); }
.ev-button--light { background: #f3fbff; color: var(--ev-navy) !important; }
.ev-button--light:hover { background: #dbeff8; }
.ev-button--outline { background: transparent; color: white !important; border-color: #ffffff72; }
.ev-button--outline:hover { background: #ffffff26; }
.ev-button--secondary, .ev-button--quiet { color: var(--ev-blue) !important; border-color: var(--ev-line); background: var(--ev-bg); }
.ev-button--quiet { min-height: 35px; padding: 5px 11px; font-size: .83rem; }
.ev-button--secondary:hover, .ev-button--quiet:hover { background: #e4f0f7; }
.ev-button--danger { color: white !important; background: #9b303f; }
.ev-button:disabled { opacity: .58; cursor: not-allowed; }
.ev-link { color: var(--ev-blue) !important; text-decoration: underline !important; text-underline-offset: .22em; font-weight: 600; }
.ev-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-block: 15px 0; }
.ev-metric, .ev-panel { border: 1px solid var(--ev-line); background: var(--ev-paper); border-radius: var(--ev-radius); box-shadow: var(--ev-shadow); min-width: 0; }
.ev-metric { display: grid; align-content: start; gap: 2px; padding: 12px 15px; }
a.ev-metric:hover { border-color: #92b1c5; }
.ev-metric-top { display: flex; align-items: center; justify-content: space-between; gap: 5px; color: var(--ev-muted); font-weight: 600; font-size: .87rem; }
.ev-icon-tile { display: inline-grid; place-items: center; width: 37px; height: 37px; border-radius: 11px; background: #eaf3f7; color: var(--ev-blue); flex: none; }
.ev-icon-tile svg { width: 18px; height: 18px; }
.ev-metric strong { font-size: 1.9rem; line-height: 1.2; font-weight: 700; font-variant-numeric: tabular-nums; }
.ev-metric small { color: var(--ev-muted); font-size: .8rem; }
.ev-panel { padding: clamp(14px, 1.55vw, 21px); }
.ev-section { margin-block-start: 22px; min-width: 0; }
.ev-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-block-end: 11px; }
.ev-section-head h2, .ev-panel h2 { margin: 0; font-size: 1.21rem; line-height: 1.35; font-weight: 700; }
.ev-section-head p, .ev-panel p { margin: 4px 0 0; color: var(--ev-muted); }
.ev-cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 14px; }
.ev-stack { display: grid; align-content: start; gap: 14px; min-width: 0; }
.ev-rowlist { display: grid; margin-block-start: 10px; }
.ev-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 12px; border-top: 1px solid var(--ev-line); }
.ev-row > div:first-child { display: flex; gap: 10px; align-items: center; min-width: 0; }
.ev-row :is(strong,small) { display: block; overflow-wrap: anywhere; }
.ev-row small { color: var(--ev-muted); font-size: .8rem; margin-block-start: 2px; }
.ev-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 100px; line-height: 1.45; font-size: .78rem; font-weight: 600; width: fit-content; }
.ev-badge > span { width: 6px; height: 6px; flex: none; background: currentColor; border-radius: 50%; }
.ev-badge--neutral { color: #526679; background: #edf2f6; }
.ev-badge--info { color: #155175; background: #e7f1fa; }
.ev-badge--good { color: #19614f; background: #e7f3ef; }
.ev-badge--attention { color: #784c15; background: #fbf0df; }
.ev-badge--danger { color: #973745; background: #f9e9ed; }
.ev-progress { display: flex; align-items: center; gap: 7px; color: var(--ev-petrol); font-size: .8rem; font-weight: 600; }
.ev-progress progress { width: min(95px, 100%); min-width: 44px; height: 7px; background: #e6edf1; border: none; border-radius: 10px; overflow: hidden; accent-color: var(--ev-teal); direction: rtl; }
.ev-progress progress::-webkit-progress-bar { background: #e6edf1; }
.ev-progress progress::-webkit-progress-value { background: var(--ev-teal); border-radius: 10px; }
.ev-progress progress::-moz-progress-bar { background: var(--ev-teal); border-radius: 10px; }
.ev-empty { display: grid; justify-items: center; text-align: center; gap: 5px; padding: 25px 14px; }
.ev-empty p { max-width: 44ch; color: var(--ev-muted); margin: 0; }
.ev-table-wrap { overflow-x: auto; width: 100%; scrollbar-width: thin; }
.ev-table { border-spacing: 0; width: 100%; text-align: start; font-size: .88rem; }
.ev-table th { background: var(--ev-bg); color: var(--ev-muted); padding: 9px 12px; border-block-end: 1px solid var(--ev-line); font-weight: 600; text-align: start; }
.ev-table td { padding: 10px 12px; border-bottom: 1px solid var(--ev-line); overflow-wrap: anywhere; vertical-align: middle; }
.ev-table tbody tr:last-child td { border-bottom: 0; }
.ev-cell-person { display: flex; align-items: center; gap: 8px; }
.ev-cell-person > span:last-child { min-width: 0; }
.ev-cell-person small { display: block; color: var(--ev-muted); font-size: .77rem; }
.ev-form { display: grid; align-content: start; gap: 8px; }
.ev-form label, .ev-label { font-size: .88rem; color: var(--ev-ink); font-weight: 600; }
.ev-form :is(input:not([type="hidden"], [type="checkbox"], [type="radio"]), select, textarea) { display: block; width: 100%; min-height: 44px; border: 1px solid var(--ev-control-line); border-radius: var(--ev-control-radius); background: var(--ev-paper); color: var(--ev-ink); padding: 8px 11px; }
.ev-form label > :is(input, select, textarea) { margin-block-start: 5px; }
.ev-form small, .ev-form-hint { color: var(--ev-muted); font-size: .82rem; margin: 0; }
.ev-filters { display: grid; grid-template-columns: minmax(0, 1.55fr) repeat(2, minmax(0, 1fr)) auto; align-items: end; gap: 10px; }
.ev-filters--owner { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; }
.ev-filters > label { min-width: 0; }
.ev-filters .ev-button { min-height: 45px; }
.ev-notice { display: flex; align-items: flex-start; gap: 9px; padding: 10px 13px; margin-block-end: 14px; border: 1px solid #cbdfea; border-radius: 12px; background: #eaf3f9; color: #174465; }
.ev-notice svg { margin-block-start: 2px; flex: none; }
.ev-notice p { margin: 0; color: inherit; }
.ev-notice--attention { background: #fff3df; border-color: #eed4a9; color: #694412; }
.ev-notice--good { background: #e9f4ef; border-color: #cee3d8; color: #165443; }
.ev-notice--danger { background: #fbeef1; border-color: #f1ced5; color: #822b3c; }
.ev-steps { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.ev-steps li { display: flex; align-items: flex-start; gap: 9px; }
.ev-step-number { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-weight: 700; background: #e8f1f6; color: var(--ev-blue); }
.ev-steps [aria-current="step"] .ev-step-number { background: var(--ev-navy); color: white; }
.ev-step-copy { min-width: 0; }
.ev-step-copy strong, .ev-step-copy small { display: block; }
.ev-step-copy small { color: var(--ev-muted); font-size: .8rem; }
.ev-ring { --ev-fill: 0%; display: grid; place-items: center; flex: none; width: 112px; height: 112px; border-radius: 50%; background: conic-gradient(var(--ev-teal) var(--ev-fill), #e5edf4 0); }
.ev-ring > span { display: grid; place-items: center; align-content: center; width: 84px; height: 84px; border-radius: 50%; background: white; font-size: 1.65rem; font-weight: 700; line-height: 1.2; }
.ev-ring small { font-size: .68rem; color: var(--ev-muted); font-weight: 500; margin-block-start: 3px; }
.ev-ring-row { display: flex; gap: 14px; align-items: center; margin-block: 13px; }
.ev-dl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 7px 12px; margin: 12px 0; font-size: .9rem; }
.ev-dl dt { color: var(--ev-muted); }
.ev-dl dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.ev-detail { border: 1px solid var(--ev-line); border-radius: 13px; padding: 10px 13px; background: var(--ev-bg); }
.ev-detail > summary { cursor: pointer; font-weight: 600; color: var(--ev-blue); }
.ev-detail[open] > summary { margin-block-end: 10px; }

.ev-guidance.ev-detail {
  max-inline-size: 100%;
  margin-block-start: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ev-ink);
  overflow-wrap: anywhere;
}
.ev-guidance.ev-detail > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  inline-size: fit-content;
  max-inline-size: 100%;
  min-block-size: 40px;
  margin: 0;
  padding: 6px 10px;
  border: 1px solid var(--ev-line);
  border-radius: var(--ev-control-radius);
  background: var(--ev-paper);
  color: var(--ev-petrol);
  list-style: none;
  font-size: .9rem;
}
.ev-guidance > summary::-webkit-details-marker { display: none; }
.ev-guidance > summary svg { flex: none; inline-size: 16px; block-size: 16px; }
.ev-guidance.ev-detail > summary:hover,
.ev-guidance.ev-detail[open] > summary { background: var(--ev-selected); border-color: var(--ev-selected-line); color: var(--ev-teal); }
.ev-guidance[open] > summary svg:last-child { transform: rotate(180deg); }
.ev-guidance__body {
  display: grid;
  gap: 12px;
  margin-block-start: 8px;
  padding: clamp(12px, 2vw, 20px);
  border: 1px solid var(--ev-line);
  border-radius: var(--ev-radius);
  background: var(--ev-bg);
}
.ev-guidance h4 { margin: 0; color: var(--ev-navy); font-size: .96rem; font-weight: 700; }
.ev-guidance__body p { margin: 4px 0 0; font-size: .94rem; line-height: 1.75; }
.ev-guidance__selected {
  padding: 11px 12px;
  border: 1px solid var(--ev-selected-line);
  border-inline-start: 3px solid var(--ev-teal);
  border-radius: var(--ev-control-radius);
  background: var(--ev-paper);
}
.ev-guidance__level { display: inline-flex; align-items: center; gap: 6px; margin-block-start: 7px; color: var(--ev-teal); }
.ev-guidance__level bdi {
  min-inline-size: 24px;
  padding-inline: 5px;
  border-radius: 5px;
  background: var(--ev-selected);
  text-align: center;
}
.ev-guidance__baseline { margin-block-start: 10px; padding-block-start: 8px; border-block-start: 1px solid var(--ev-line); color: var(--ev-petrol); }
.ev-guidance__more { border-block-start: 1px solid var(--ev-line); padding-block-start: 4px; }
.ev-guidance__more summary { padding-block: 5px; color: var(--ev-petrol); cursor: pointer; font-weight: 600; }
.ev-guidance__more h4 { margin-block-start: 7px; }
.ev-guidance__level-option { margin-inline-start: 8px; padding-inline-start: 8px; border-inline-start: 1px solid var(--ev-line); }
.ev-guidance__level-option p { margin-block: 0 6px; }
.ev-guidance__body .ev-guidance__reference { margin: 0; color: var(--ev-muted); font-size: .83rem; }
.ev-guidance__more .ev-guidance__reference { margin-block-start: 8px; }
.ev-app .ev-guidance__reference a { display: inline-block; color: var(--ev-teal); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.ev-code { background: var(--ev-soft); border: 1px solid var(--ev-line); border-radius: 9px; padding: 8px 10px; white-space: pre-wrap; overflow-wrap: anywhere; text-align: left; direction: ltr; }
.ev-pagination { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-block-start: 14px; font-size: .84rem; }
.ev-dialog { width: min(470px, calc(100% - 32px)); border: 1px solid var(--ev-line); border-radius: var(--ev-radius); padding: 20px; color: var(--ev-ink); box-shadow: var(--ev-shadow); }
.ev-dialog::backdrop { background: #10243f70; }
.ev-dialog h2 { margin: 0; font-size: 1.2rem; }
.ev-dialog p { margin-block: 5px 14px; color: var(--ev-muted); }

/* Entry points share a responsive split surface. */
.ev-auth-page { min-height: 100vh; display: grid; align-content: center; padding: clamp(16px, 4vw, 60px); }
.ev-auth { display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(0, 1fr); width: min(100%, 1100px); margin-inline: auto; border: 1px solid var(--ev-line); border-radius: 20px; overflow: hidden; background: var(--ev-paper); box-shadow: 0 12px 36px #102d4510; }
.ev-auth-form { grid-column: 2; grid-row: 1; min-width: 0; padding: clamp(28px, 4.25vw, 60px); align-self: center; }
.ev-auth-form > .ev-kicker { border-inline-start: 2px solid var(--ev-teal); padding-inline-start: 9px; }
.ev-auth-form h1 { margin: 8px 0 7px; font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.24; }
.ev-auth-description { color: var(--ev-muted); margin: 0 0 22px; }
.ev-auth-form .ev-form input { min-height: 50px; }
.ev-auth-form .ev-form label:not(:first-child) { margin-block-start: 6px; }
.ev-auth-form .ev-button--primary { min-height: 48px; margin-block-start: 9px; justify-content: space-between; padding-inline: 16px; }
.ev-auth-links { display: flex; flex-wrap: wrap; gap: 7px 18px; margin-block-start: 16px; padding-block-start: 13px; border-block-start: 1px solid var(--ev-line); font-size: .85rem; color: var(--ev-muted); }
.ev-auth-links > span { flex-basis: 100%; }
.ev-password { position: relative; }
.ev-password input { padding-inline-end: 49px !important; }
.ev-password button { position: absolute; inset-inline-end: 4px; inset-block: 4px; width: 43px; display: grid; place-items: center; border: 0; border-radius: 8px; color: var(--ev-blue); background: transparent; cursor: pointer; }
.ev-password button:hover { background: var(--ev-soft); }
.ev-auth-aside { grid-column: 1; grid-row: 1; position: relative; isolation: isolate; overflow: hidden; min-height: 550px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; color: white; padding: clamp(28px, 4vw, 56px); background: var(--ev-gradient); }
.ev-auth-aside::before { content: ""; position: absolute; z-index: -1; pointer-events: none; inset: 0; background: url(../brand/evalia-e-monogram-light.svg) left -42px bottom 50px / 355px no-repeat; opacity: .13; }
.ev-auth-aside::after { content: ""; position: absolute; z-index: -1; pointer-events: none; inset: 0; background: linear-gradient(#b4e4ed0d 1px, transparent 1px), linear-gradient(90deg, #b4e4ed0d 1px, transparent 1px); background-size: 36px 36px; mask-image: linear-gradient(45deg, #000, transparent 76%); }
.ev-auth:has(#ownerEmail) .ev-auth-aside { background: linear-gradient(112deg, #263d59, #12243d 78%); }
.ev-auth:has(#ownerEmail) .ev-auth-aside .ev-kicker { color: #b9d8f3; }
.ev-auth-aside .ev-brand small { color: #d8eaf3; }
.ev-auth-aside .ev-brand img { width: 48px; height: 48px; }
.ev-auth-aside h2 { margin: 9px 0 12px; font-size: clamp(1.8rem, 3.15vw, 2.9rem); max-width: 13ch; line-height: 1.28; }
.ev-auth-aside p { margin: 0; max-width: 38ch; color: #e2edf5; }
.ev-auth-aside-footer { display: flex; align-items: center; gap: 9px; padding-block-start: 14px; border-block-start: 1px solid #ffffff45; color: #e2edf5; font-size: .84rem; }
.ev-auth-aside-footer svg { flex: none; }
.ev-auth-footer { width: min(100%, 1100px); margin: 14px auto 0; color: var(--ev-muted); font-size: .78rem; }
.ev-auth-mobile { display: none; }
.ev-error { width: min(100%, 530px); margin: auto; display: grid; gap: 14px; }
.ev-error h1 { margin: 0; font-size: 1.8rem; }

/* School profile and the published model library */
.ev-settings-intro { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.ev-settings-intro > .ev-icon-tile { background: var(--ev-selected); color: var(--ev-teal); }
.ev-settings-intro p { line-height: 1.55; }
.ev-school-layout { grid-template-columns: minmax(0, 2.15fr) minmax(220px, 1fr); align-items: start; }
.ev-school-intro { grid-template-columns: auto minmax(0, 1fr); }
.ev-school-form { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; margin-block-start: 20px; }
.ev-school-form :is(.ev-school-notes, .ev-school-save) { grid-column: 1 / -1; }
.ev-school-form textarea { resize: vertical; }
.ev-school-save { border-block-start: 1px solid var(--ev-line); padding-block-start: 13px; gap: 12px; }
.ev-school-guide { background: var(--ev-soft); }
.ev-school-guide h2 { margin-block-start: 8px; font-size: 1.08rem; }
.ev-school-guide ul { margin: 7px 0 0; padding-inline-start: 17px; color: var(--ev-muted); font-size: .88rem; }
.ev-school-guide li + li { margin-block-start: 4px; }

.ev-model-layout { display: grid; grid-template-columns: minmax(230px, .85fr) minmax(0, 2.2fr); gap: 14px; align-items: start; margin-block-start: 14px; }
.ev-model-roles { display: grid; gap: 3px; margin-block-start: 10px; }
.ev-model-roles a { display: flex; justify-content: space-between; align-items: center; gap: 6px; min-height: 42px; padding: 6px 8px; border: 1px solid transparent; border-radius: var(--ev-control-radius); font-weight: 600; font-size: .89rem; line-height: 1.4; }
.ev-model-roles a:hover { background: var(--ev-bg); }
.ev-model-roles a[aria-current] { background: var(--ev-selected); border-color: var(--ev-selected-line); color: var(--ev-teal); }
.ev-model-roles .ev-badge { flex: none; white-space: nowrap; }
.ev-model-charter { border-block-start: 1px solid var(--ev-line); margin-block-start: 13px; padding-block-start: 12px; }
.ev-model-charter h3, .ev-model-description h3 { margin: 0; color: var(--ev-blue); font-size: .94rem; }
.ev-model-charter p { margin-block: 4px 10px; font-size: .85rem; }
.ev-model-head { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: flex-start; gap: 8px; }
.ev-model-head h2 { margin-block-start: 3px; }
.ev-model-counts { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-block: 10px 11px; color: var(--ev-muted); font-size: .86rem; }
.ev-model-counts bdi { color: var(--ev-blue); font-weight: 700; }
.ev-model-items { border-block-start: 1px solid var(--ev-line); }
.ev-model-item { border-block-end: 1px solid var(--ev-line); }
.ev-model-item summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 10px; min-height: 48px; padding: 6px 9px; cursor: pointer; }
.ev-model-item summary::marker { content: ""; }
.ev-model-item summary::-webkit-details-marker { display: none; }
.ev-model-item summary:is(:hover, :focus-visible), .ev-model-item[open] summary { background: var(--ev-bg); }
.ev-model-item summary:focus-visible { outline-offset: -2px; }
.ev-model-item summary strong { font-size: .93rem; font-weight: 600; overflow-wrap: anywhere; }
.ev-model-item summary > svg { width: 15px; height: 15px; color: var(--ev-muted); }
.ev-model-item[open] summary > svg { transform: rotate(180deg); }
.ev-model-index, .ev-model-weight { display: grid; place-items: center; min-inline-size: 27px; padding: 3px 6px; border-radius: 5px; color: var(--ev-blue); background: var(--ev-soft); font-size: .8rem; font-weight: 600; }
.ev-model-weight { background: var(--ev-selected); color: var(--ev-teal); }
.ev-model-description { display: grid; gap: 10px; padding: 12px 14px; overflow-wrap: anywhere; }
.ev-model-description p { font-size: .9rem; }
.ev-panel .ev-model-note { margin-block-start: 10px; }

@media screen and (max-width: 760px) {
  .ev-school-layout, .ev-school-form, .ev-model-layout { grid-template-columns: minmax(0, 1fr); }
  .ev-settings-intro { align-items: start; }
  .ev-settings-intro > .ev-badge { grid-column: 2; }
  .ev-model-roles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ev-model-roles a { align-items: flex-start; flex-direction: column; justify-content: center; }
  .ev-rail--management .ev-nav-submenu a { min-height: 44px; }
  .ev-model-item summary { gap: 6px; padding-inline: 5px; }
}

/* Normalize legacy surfaces without changing their controls or AJAX selectors. */
.ev-legacy .ev-content :is(.card,.v3-panel,.v3-table-card,.soft-card,.info-card,.meyar-item-card,.meyar-panel-card,.section-card,.toolbar-card,.cycle-card,.v3-evidence-card,.sup-hero) { border-color: var(--ev-line); border-radius: var(--ev-radius); box-shadow: var(--ev-shadow); }
.ev-legacy .ev-content :is(.product-hero,.v3-hero,.meyar-hero,.meyar-home-hero) { color: white; background: var(--ev-gradient); border-radius: 22px; box-shadow: none; }
.ev-legacy .ev-content :is(.page-intro,.guide-card,.sup-hero) { background: var(--ev-paper); border: 1px solid var(--ev-line); }
.ev-legacy .ev-content :is(.btn-primary,.btn-dark) { background: var(--ev-navy); border-color: var(--ev-navy); color: white; box-shadow: none; }
.ev-legacy .ev-content :is(.btn-primary,.btn-dark):hover { background: var(--ev-blue); }
.ev-legacy .ev-content :is(.btn-light,.btn-ghost) { color: var(--ev-blue); border-color: var(--ev-line); background: var(--ev-bg); }
.ev-legacy .ev-content :is(.input,input:not([type]),select,textarea) { color: var(--ev-ink); border-color: #cbdce8; max-width: 100%; }
.ev-legacy .ev-content :is(.table-wrap,.table-scroll,.v3-table-wrap,.meyar-table-wrap) { max-width: 100%; overflow-x: auto; }
.ev-legacy .ev-content .meyar-rating-pill:has(input:focus-visible) > span { outline: 3px solid var(--ev-teal); outline-offset: 2px; }
.ev-readonly .ev-content form[method="post" i]:not([data-ev-account-action]):not([data-ev-read-action]),
.ev-readonly .ev-content [data-open-drawer]:not([data-ev-read-action]), .ev-readonly .ev-content [data-ev-write] { display: none !important; }

@media (max-width: 960px) {
  .ev-shell { display: block; }
  .ev-mobile-only { display: inline-grid; }
  .ev-rail { position: fixed; inset: 0 0 0 auto; width: min(320px, calc(100% - 44px)); z-index: 61; transform: translateX(100%); visibility: hidden; height: 100dvh; }
  .ev-menu-open .ev-rail { transform: none; visibility: visible; }
  .ev-menu-open { overflow: hidden; }
  .ev-menu-open .ev-scrim { display: block; position: fixed; inset: 0; z-index: 60; border: 0; background: #10243f75; }
  .ev-top { min-height: 76px; padding-block: 14px; }
}
@media (max-width: 640px) {
  .ev-top { min-height: 67px; }
  .ev-top-actions { gap: 4px; }
  .ev-top-notifications, .ev-account-label, .ev-account summary > svg { display: none; }
  .ev-account summary { padding: 3px; }
  .ev-icon-button { width: 37px; height: 37px; border-radius: 10px; }
  .ev-crumb { font-size: .72rem; }
  .ev-hero, .ev-cols { grid-template-columns: minmax(0, 1fr); }
  .ev-hero { gap: 14px; padding: 19px; border-radius: 19px; min-height: 0; }
  .ev-hero-side { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 8px; padding: 9px 11px; }
  .ev-hero-side strong { font-size: 1rem; }
  .ev-hero-side small { grid-column: 1 / -1; }
  .ev-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-block-start: 9px; }
  .ev-metric { padding: 10px; }
  .ev-metric-top { font-size: .8rem; }
  .ev-metric strong { font-size: 1.7rem; }
  .ev-icon-tile { width: 31px; height: 31px; border-radius: 9px; }
  .ev-icon-tile svg { width: 16px; height: 16px; }
  .ev-section { margin-block-start: 19px; }
  .ev-section-head { align-items: flex-start; }
  .ev-section-head h2 { font-size: 1.08rem; }
  .ev-section-head p { font-size: .83rem; }
  .ev-section-head .ev-button { flex: none; }
  .ev-row { gap: 7px; }
  .ev-row > :last-child { flex-shrink: 0; }
  .ev-table--cards thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .ev-table--cards, .ev-table--cards tbody, .ev-table--cards tr { display: block; }
  .ev-table--cards tr { margin-block: 7px; padding: 8px; border: 1px solid var(--ev-line); border-radius: 12px; }
  .ev-table--cards td { display: flex; align-items: center; justify-content: space-between; gap: 8px; text-align: end; padding: 6px 5px; }
  .ev-table--cards td:first-child { justify-content: flex-start; text-align: start; }
  .ev-table--cards td:not(:first-child)::before { content: attr(data-label); color: var(--ev-muted); text-align: start; flex: none; }
  .ev-table--cards .ev-progress progress { width: 64px; }
  .ev-filters, .ev-filters--owner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ev-filters > label:first-child { grid-column: 1 / -1; }
  .ev-footer { flex-wrap: wrap; font-size: .74rem; }
  .ev-auth-page { align-content: start; }
  .ev-auth { grid-template-columns: minmax(0, 1fr); border-radius: 21px; }
  .ev-auth-form { grid-column: 1; padding: 22px; }
  .ev-auth-mobile { display: block; margin-block-end: 20px; }
  .ev-auth-mobile .ev-brand img { width: 42px; height: 42px; }
  .ev-auth-aside { grid-row: 2; padding: 19px 22px; min-height: 0; }
  .ev-auth-aside > .ev-brand, .ev-auth-story { display: none; }
  .ev-auth-aside-footer { margin: 0; }
}
@media print {
  @page { size: A4 portrait; margin: 12mm; }
  body.ev-app { background: white; color: black; }
  .ev-rail, .ev-top, .ev-footer, .ev-scrim, .ev-actions, .ev-icon-button, .ev-filters, .ev-pagination { display: none !important; }
  .ev-shell { display: block; }
  .ev-content { padding: 0; }
  .ev-panel, .ev-metric { box-shadow: none; }
  .ev-table-wrap { overflow: visible; }
  .ev-table tr, .ev-metric { break-inside: avoid; }
}

.ev-hero--compact { min-height: 178px; padding-block: 23px; }
.ev-steps--cycle { grid-template-columns: repeat(4,minmax(0,1fr)); text-align: center; gap: 5px; }
.ev-steps--cycle li small { font-size: .71rem; color: var(--ev-muted); }
.ev-steps--cycle li { flex-direction: column; align-items: center; font-size: .78rem; gap: 4px; }

.ev-onboarding { grid-template-columns: minmax(205px,.63fr) minmax(0,1.6fr); align-items: start; }
.ev-domain-choices { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-block-start: 9px; }
.ev-action-form { margin-block-start: 12px; }
@media (max-width: 640px) { .ev-onboarding, .ev-domain-choices { grid-template-columns: minmax(0,1fr); } }

.ev-record { padding-block: 11px; border-top: 1px solid var(--ev-line); }
.ev-record h3 { font-size: 1rem; margin: 0; }
.ev-record p { overflow-wrap: anywhere; }
.ev-record small { color: var(--ev-muted); }
.ev-legacy .ev-content .meyar-workspace { grid-template-columns: minmax(0,1.85fr) minmax(210px,1fr); gap: 14px; }
.ev-legacy .ev-content .meyar-workspace > * { min-width: 0; }
.ev-legacy .ev-content .meyar-policy-strip { background: var(--ev-soft); color: var(--ev-blue); border-color: var(--ev-line); }
.ev-legacy .ev-content :is(.meyar-item-index,.v3-step-no) { background: var(--ev-petrol); color: white; box-shadow: none; }
.ev-legacy .ev-content .meyar-item-state > div { background: var(--ev-bg); border-color: var(--ev-line); }
.ev-legacy .ev-content .meyar-evidence-box { border-color: var(--ev-line); }
@media (max-width: 1050px) { .ev-legacy .ev-content .meyar-workspace { grid-template-columns: minmax(0,1fr); } }
@media (max-width: 640px) {
  .ev-legacy .ev-content :is(.meyar-item-state,.meyar-kpis) { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .ev-legacy .ev-content :is(.meyar-evaluate-form,.meyar-upload-form,.v3-inline-form) { grid-template-columns: minmax(0,1fr) !important; }
}

.ev-progress bdi { white-space: nowrap; flex: none; }
.ev-mobile-brand { display: none; }
.ev-legacy .ev-content .v3-drawer:not(.is-open) { display: none; }
.ev-legacy .v3-media-preview { display: grid; gap: 12px; justify-items: start; }
.ev-legacy .v3-media-preview img { max-width: 100%; max-height: 65vh; object-fit: contain; }
@media (max-width: 640px) {
  .ev-mobile-brand { display: inline-block; vertical-align: middle; margin-inline-end: 3px; border-radius: 6px; }
}

.ev-legacy .meyar-rating-pill { position: relative; }
.ev-legacy .meyar-rating-pill input {
  inset-inline-start: 8px;
  inset-block-start: 8px;
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  margin: 0;
}
#identity:placeholder-shown { direction: rtl; }

.ev-legacy .ev-content .ev-assessment-status .meyar-progress { width: 100%; margin: 1px 0; }
.ev-legacy .ev-content .meyar-kpis article strong span { display: inline; font: inherit; color: inherit; }
.ev-legacy .ev-content .meyar-item-state strong[dir="ltr"] { text-align: end; }
@media (max-width: 640px) {
  .ev-assessment-hero .ev-hero-side { grid-template-columns: minmax(0,1fr) auto; }
  .ev-assessment-status .meyar-progress { grid-column: 1 / -1; }
}

@media screen {
  .ev-app :is(.ev-button, .ev-icon-button, .ev-nav a, .ev-nav summary, .ev-account summary, .ev-metric),
  .ev-auth-page :is(.ev-button, .ev-password button),
  .ev-form :is(input, select, textarea) {
    transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
  }
  .ev-app :is(.ev-icon-button, .ev-account summary):hover { background: var(--ev-soft); }
  .ev-hero :focus-visible, .ev-auth-aside :focus-visible { outline-color: var(--ev-accent); }
  .ev-form :is(input, select, textarea):focus { border-color: var(--ev-teal); }
  .ev-app :is([type="checkbox"], [type="radio"]), .ev-auth-page :is([type="checkbox"], [type="radio"]) { accent-color: var(--ev-teal); }
  .ev-app :is(input, textarea)::placeholder, .ev-auth-page input::placeholder { color: var(--ev-muted); opacity: 1; }
  .ev-app :is([type="email"], [type="number"], [type="date"]), .ev-auth-page :is([type="email"], [type="password"]) { font-variant-numeric: tabular-nums; }
  .ev-app input[type="file"] { max-inline-size: 100%; }
  .ev-app input::file-selector-button { margin-inline-end: 8px; padding: 6px 10px; border: 1px solid var(--ev-control-line); border-radius: var(--ev-control-radius); background: var(--ev-soft); color: var(--ev-blue); font: inherit; }
  .ev-table tbody tr:hover { background: #f6f9fb; }
  .ev-table th:first-child { border-start-start-radius: 7px; }
  .ev-table th:last-child { border-start-end-radius: 7px; }
  .ev-table-wrap:focus-visible { outline-offset: -2px; }
  .ev-empty { border-radius: var(--ev-control-radius); background: var(--ev-bg); margin-block-start: 10px; }
  .ev-empty .ev-icon-tile { width: 32px; height: 32px; }

  /* The overview reads as a decision summary followed by the work queue. */
  .ev-hero[aria-labelledby="overviewTitle"] { padding-block: 20px; }
  .ev-hero[aria-labelledby="overviewTitle"] ~ .ev-metrics { gap: 1px; border: 1px solid var(--ev-line); border-radius: var(--ev-radius); overflow: hidden; background: var(--ev-line); }
  .ev-hero[aria-labelledby="overviewTitle"] ~ .ev-metrics .ev-metric { border: 0; border-radius: 0; box-shadow: none; }
  .ev-hero[aria-labelledby="overviewTitle"] ~ .ev-metrics .ev-metric:focus-visible { outline-offset: -3px; }
  .ev-hero[aria-labelledby="overviewTitle"] ~ .ev-metrics .ev-metric:hover { background: var(--ev-soft); }
  .ev-hero[aria-labelledby="overviewTitle"] ~ .ev-metrics .ev-metric:nth-child(2) { background: #f1faf8; }
  .ev-hero[aria-labelledby="overviewTitle"] ~ .ev-metrics .ev-metric:nth-child(2):hover { background: var(--ev-selected); }
  .ev-hero[aria-labelledby="overviewTitle"] ~ .ev-metrics .ev-metric:nth-child(2) :is(strong, .ev-icon-tile) { color: var(--ev-teal); }
  [aria-labelledby="priorityTitle"] .ev-row strong > bdi { display: inline-block; min-inline-size: 1.55em; margin-inline-end: 4px; text-align: center; color: var(--ev-teal); background: var(--ev-selected); border-radius: 5px; }
  [aria-labelledby="priorityTitle"] .ev-row:first-child .ev-button { background: var(--ev-selected); border-color: var(--ev-selected-line); }
  [aria-labelledby="priorityTitle"] .ev-row:first-child .ev-button:hover { background: #cde9e4; }
  .ev-ring { width: 74px; height: 74px; }
  .ev-ring > span { width: 60px; height: 60px; font-size: 1.25rem; }

  /* Legacy evaluation views keep their existing form and AJAX states. */
  .ev-legacy .ev-content :is(.field input:not([type="hidden"], [type="checkbox"], [type="radio"]), .field textarea, .input, select, textarea) {
    min-height: 42px; padding: 8px 10px; border-color: var(--ev-control-line); border-radius: var(--ev-control-radius); color: var(--ev-ink);
  }
  .ev-legacy .ev-content :is(input, select, textarea):focus-visible { outline: 2px solid var(--ev-teal); outline-offset: 2px; }
  .ev-legacy .ev-content .btn { border-radius: var(--ev-control-radius); font-weight: 600; }
  .ev-legacy .ev-content :is(.table-wrap, .table-scroll, .v3-table-wrap, .meyar-table-wrap) { scrollbar-width: thin; }
  .ev-legacy .ev-content :is(.table-wrap, .table-scroll, .v3-table-wrap, .meyar-table-wrap) thead th { background: var(--ev-bg); color: var(--ev-muted); border-color: var(--ev-line); font-weight: 600; }
  .ev-legacy .ev-content :is(.meyar-main-panel, .meyar-panel-card, .meyar-item-card, .meyar-kpis article) { background: var(--ev-paper); border-color: var(--ev-line); border-radius: var(--ev-radius); box-shadow: var(--ev-shadow); }
  .ev-legacy .ev-content .meyar-item-card.is-missing-evidence { background: #fffdf8; border-color: #d9b579; }
  .ev-legacy .ev-content .meyar-item-card.is-saved { animation: none; border-color: var(--ev-selected-line); box-shadow: 0 0 0 2px var(--ev-selected); }
  .ev-legacy .ev-content :is(.meyar-item-card h3, .meyar-section-head h2, .meyar-panel-card h2) { font-weight: 700; color: var(--ev-ink); line-height: 1.4; }
  .ev-legacy .ev-content :is(.meyar-section-head p, .meyar-item-card p) { color: var(--ev-muted); font-weight: 400; }
  .ev-legacy .ev-content .meyar-item-meta span { max-inline-size: 100%; overflow-wrap: anywhere; font-weight: 600; border-radius: 5px; }
  .ev-legacy .ev-content .meyar-item-state { gap: 7px; margin-block: 11px; }
  .ev-legacy .ev-content .meyar-item-state > div { min-width: 0; border-radius: var(--ev-control-radius); padding: 8px 10px; }
  .ev-legacy .ev-content .meyar-item-state span { font-weight: 600; }
  .ev-legacy .ev-content .meyar-item-state strong { margin-block-start: 2px; font-size: .94rem; line-height: 1.45; font-weight: 700; }
  .ev-legacy .ev-content .meyar-item-state :is(strong, span) { overflow-wrap: anywhere; }
  .ev-legacy .ev-content .meyar-kpis article { min-width: 0; padding: 10px 14px; }
  .ev-legacy .ev-content .meyar-kpis article strong { font-size: 1.55rem; font-weight: 700; }
  .ev-legacy .ev-content .meyar-evidence-box { border-style: solid; border-radius: var(--ev-control-radius); padding: 10px 12px; }
  .ev-legacy .ev-content .meyar-file-pill { margin: 0; border-radius: 7px; font-weight: 600; white-space: normal; overflow-wrap: anywhere; }
  .ev-legacy .ev-content .meyar-rating-pill span { border-color: var(--ev-control-line); border-radius: var(--ev-control-radius); font-weight: 700; transition: background-color 140ms ease, border-color 140ms ease; }
  .ev-legacy .ev-content .meyar-rating-pill input:enabled:not(:checked) + span:hover { background: var(--ev-soft); border-color: var(--ev-teal); }
  .ev-legacy .ev-content .meyar-rating-pill input:checked + span { background: var(--ev-teal); color: white; border-color: var(--ev-teal); box-shadow: none; }
  .ev-legacy .ev-content .meyar-rating-pill input:disabled + span { opacity: .65; cursor: not-allowed; }
  .ev-legacy .meyar-toast { border-radius: 9px; font-weight: 600; box-shadow: 0 4px 14px #102d4520; }
  .ev-legacy .ev-content .ev-assessment-status .meyar-progress { background: #ffffff42; }
  .ev-legacy .ev-content .ev-assessment-status .meyar-progress i { background: var(--ev-accent); }
  .ev-legacy .ev-content .meyar-hero__content > .ev-actions:empty { display: none; }
  .ev-legacy .ev-content form:has(> #employeeAssessmentSelector) { margin-block-end: 10px; }
  .ev-legacy .ev-content #employeeAssessmentSelector { min-width: 0; max-width: 100%; }

  .ev-content .review-header { background: var(--ev-paper); border-inline-start: 3px solid var(--ev-teal); }
  .ev-content .review-items a[aria-current] { background: var(--ev-selected); }
  .ev-content .review-items a:focus-visible { outline-offset: -2px; }
  .ev-content .review-items [title] > svg { color: var(--ev-teal); }
  .ev-content .review-item > .ev-section-head { align-items: flex-start; flex-wrap: wrap; }
  .ev-content .review-item .meyar-item-state strong { direction: ltr; unicode-bidi: isolate; text-align: right; }
  .ev-legacy .ev-content .review-item .meyar-item-state > div:has([data-manager-rating-text]) { border-color: var(--ev-selected-line); background: #f1faf8; }
  .ev-content .review-grade textarea { min-height: 72px; }
  .ev-content .review-evidence :is(img, iframe) { background: var(--ev-soft); }
  .ev-content .review-evidence > .ev-muted { padding-block: 8px; }

  /* Keep each administrative goal and its measurement fields together. */
  #adminCharterForm { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 12px; }
  #adminCharterForm > :not(.field, button[type="submit"]) { grid-column: 1 / -1; }
  #adminCharterForm > .field:has(textarea) { grid-column: 1 / -1; }
  #adminCharterForm > h3 { margin: 8px 0 0; padding-block-start: 13px; border-block-start: 1px solid var(--ev-line); font-size: 1.12rem; }
  #adminCharterForm > h3:first-of-type { border: 0; padding: 0; margin: 0; }
  #adminGoals, #adminCompetencies { display: grid; gap: 10px; }
  #adminCharterForm fieldset { min-inline-size: 0; margin: 0; padding: 10px 13px 12px; background: var(--ev-bg); box-shadow: none; }
  #adminCharterForm fieldset legend { padding-inline: 6px; font-weight: 700; color: var(--ev-blue); }
  [data-admin-goal], [data-admin-competency] { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; gap: 8px 12px; }
  [data-admin-goal] > label { grid-column: 1 / -1; }
  :is([data-admin-goal], [data-admin-competency]) label { font-size: .88rem; font-weight: 600; }
  [data-admin-goal] > label > select { display: block; width: 100%; margin-block-start: 4px; }
  .ev-content .ev-panel:has(> article.ev-panel > details) > article.ev-panel { margin-block-start: 9px; background: var(--ev-bg); box-shadow: none; }
  .ev-content .ev-panel:has(> article.ev-panel > details) h4 { margin: 0; color: var(--ev-blue); font-size: 1rem; }
  .ev-content .ev-panel:has(> article.ev-panel > details) details { margin-block-start: 9px; }
  .ev-content .ev-panel:has(> article.ev-panel > details) summary { cursor: pointer; color: var(--ev-teal); font-weight: 600; }
  .ev-content .ev-panel:has(> article.ev-panel > details) form > label > :is(input, textarea, select) { display: block; width: 100%; }
}

@media screen and (max-width: 640px) {
  .ev-nav a, .ev-nav summary, .ev-actions .ev-button, .ev-row .ev-button, .ev-icon-button { min-height: 44px; }
  .ev-icon-button { width: 44px; }
  .ev-auth { border-radius: 15px; }
  .ev-auth-page { padding: 14px; }
  .ev-auth-form { padding: 20px; }
  .ev-auth-mobile { margin-block: -20px 19px; margin-inline: -20px; padding: 16px 20px; background: var(--ev-gradient); color: white; }
  .ev-auth-mobile .ev-brand small { color: #d8eaf3; }
  .ev-auth:has(#ownerEmail) .ev-auth-mobile { background: #12243d; }
  .ev-auth-aside { padding: 14px 20px; }
  .ev-auth-aside::before, .ev-auth-aside::after { display: none; }
  .ev-auth-aside-footer { padding: 0; border: 0; }
  .ev-hero-side { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
  .ev-hero-side > strong { justify-self: end; }
  .ev-table--cards td { min-width: 0; }
  .ev-table--cards td:not(:first-child)::before { flex: 0 1 auto; }
  .ev-table--cards td:has(> small) { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 3px 8px; }
  .ev-table--cards td:has(> small) > * { grid-column: 2; justify-self: end; }
  .ev-legacy .ev-content .meyar-item-card__head { grid-template-columns: auto minmax(0, 1fr); gap: 9px; }
  .ev-legacy .ev-content .meyar-rating-pills { gap: 5px; }
  .ev-legacy .ev-content .meyar-rating-pill span { height: 44px; }
  .ev-legacy .ev-content .meyar-evidence-box__head { flex-wrap: wrap; gap: 6px; }
  .ev-content .review-items a { min-height: 44px; }
  #adminCharterForm { grid-template-columns: minmax(0, 1fr); }
  [data-admin-goal] > .field:nth-of-type(-n+2), [data-admin-competency] > :is(label, button) { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  :is(.ev-app, .ev-auth-page) *, :is(.ev-app, .ev-auth-page) *::before, :is(.ev-app, .ev-auth-page) *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
