/*
 * Readability layer for the teacher-first audience (laptops, often weaker eyesight).
 * Loaded after the compiled app.css; selectors are prefixed with .shell-body so they also win over page CSS
 * (editor.css, assignments.css, groups.css) that templates load later in the document.
 * Rules: informational text >= 14px (.875rem), actions/navigation >= 15px, coloured text meets WCAG AA.
 */
:root{--ui-primary-text:#3f58d4;--ui-success-text:#15803d;--ui-warning-text:#b45309;--ui-danger-text:#b42318;--ui-info-text:#0369a1}
.dark{--ui-primary-text:#a0adff;--ui-success-text:#4ade80;--ui-warning-text:#fbbf24;--ui-danger-text:#fb7185;--ui-info-text:#38bdf8}

/* Coloured text on soft backgrounds: darker shades for contrast */
.shell-body .shell-sidebar-nav a.is-active,.shell-body .shell-sidebar-nav a:hover,.shell-body .shell-collapse:hover{color:var(--ui-primary-text)}
.shell-body .shell-subscription-chip{font-size:.875rem;color:var(--ui-primary-text)}
.shell-body .shell-subscription-chip.is-warning{color:var(--ui-warning-text)}
.shell-body .ui-badge{font-size:.875rem}
.shell-body .ui-badge-success{color:var(--ui-success-text)}
.shell-body .ui-badge-warning{color:var(--ui-warning-text)}
.shell-body .ui-badge-danger{color:var(--ui-danger-text)}
.shell-body .ui-badge-info{color:var(--ui-info-text)}
.shell-body time.is-warning,.shell-body .is-warning>time{color:var(--ui-warning-text)}

/* Dashboard */
.shell-body .teacher-assignment-top small,.shell-body .teacher-assignment-top time,.shell-body .teacher-assignment-progress span,
.shell-body .teacher-recent-list small,.shell-body .teacher-recent-list time,.shell-body .teacher-onboarding li,
.shell-body .teacher-attention-list li,.shell-body .teacher-panel-head a{font-size:.9rem}
.shell-body .teacher-recent-list strong{font-size:.95rem}
.shell-body .teacher-onboarding p{font-size:.95rem;color:var(--ui-text)}
.shell-body .teacher-assignment-actions,.shell-body .teacher-assignment-actions .ui-button{font-size:.9rem}

/* App shell */
.shell-body .shell-languages a{font-size:.875rem;min-width:44px;min-height:44px}
.shell-body .shell-toast button{min-width:44px;min-height:44px;font-size:.95rem;font-weight:600;color:var(--ui-text);padding:0 10px;border-radius:8px}
.shell-body .shell-toast button:hover{background:var(--ui-primary-soft)}
.shell-body .shell-toast{font-size:1rem}
.shell-body .shell-user-chevron{width:14px;height:14px;color:var(--ui-muted)}
.shell-body .shell-sidebar-logout{margin:auto 0 4px}
.shell-body .shell-sidebar-logout+.shell-collapse{margin-top:0}
.shell-body .shell-sidebar-logout button{display:flex;align-items:center;gap:12px;width:100%;min-height:44px;padding:10px 12px;border:0;border-radius:10px;background:transparent;color:var(--ui-muted);font-weight:500;text-align:left}
.shell-body .shell-sidebar-logout button:hover{color:var(--ui-danger-text);background:var(--ui-danger-soft)}
.shell-collapsed .shell-sidebar-logout span{display:none}
.shell-collapsed .shell-collapse svg{transform:rotate(180deg)}
.shell-body .shell-sidebar-nav a{font-size:1rem}
.shell-body .public-eyebrow{font-size:.875rem;text-transform:none;letter-spacing:0}

/* Forms and lists */
.shell-body .assignment-field p,.shell-body .assignment-review dt,.shell-body .group-card dt{font-size:.9rem}
.shell-body .group-bulk-bar .btn{font-size:.95rem}
.shell-body .form-text{font-size:.9rem}

/* Exam editor */
.shell-body .ed-tools .btn{font-size:.875rem}
.shell-body .ed-hint{font-size:.9rem}
@media(min-width:1200px){.shell-body .ed-layout{grid-template-columns:160px minmax(0,1fr) 104px}.shell-body .ed-outline{display:block;position:sticky;top:160px}.shell-body .ed-paper{grid-column:2}}
@media(hover:hover){.shell-body .ed-remove-option{opacity:.55}.shell-body .ed-option:hover .ed-remove-option,.shell-body .ed-option:focus-within .ed-remove-option{opacity:1}}
.shell-body .ed-correct-label{display:inline-flex;align-items:center;gap:6px;font-size:.875rem;font-weight:600;color:var(--ui-muted);cursor:pointer;white-space:nowrap}
.shell-body .ed-option.is-correct .ed-correct-label{color:var(--ui-success-text)}
.shell-body .ed-option-letter{font-weight:700;min-width:1.4em;color:var(--ui-muted)}

/* Public site */
.brand-public-body .brand-eyebrow{font-size:.875rem;text-transform:none;letter-spacing:0}
.brand-public-body .brand-header nav a{font-size:.95rem}
.brand-public-body .brand-hero-note,.brand-public-body .brand-pill,.brand-public-body .brand-audience>.brand-text-link{font-size:.875rem}
.public-auth-forgot{margin:-4px 0 12px;text-align:right}
.public-auth-forgot a{font-size:.95rem}

/* Visible "Düzgün" (correct) label with option letters A, B, C... next to each answer option */
.shell-body [data-options]{counter-reset:ed-option}
.shell-body [data-options]>.ed-option{counter-increment:ed-option}
.shell-body .ed-option:has(>.ed-correct-label){grid-template-columns:auto minmax(0,1fr) 44px 44px}
.shell-body .ed-correct-label::before{content:counter(ed-option,upper-alpha) ".";font-weight:700;color:var(--ui-text);min-width:1.3em}
.shell-body .ed-correct-label input{width:22px;height:22px;margin:0}
.shell-body .ed-correct-label:has(>input[hidden]) span,.shell-body .ed-correct-label:has(>input[hidden])::before{display:none}

/* Assignment actions: the two everyday actions stay visible, the rest sit under "Digər əməliyyatlar" */
.shell-body .assignment-actions{display:grid;gap:8px}
.shell-body .assignment-actions-main{display:flex;flex-wrap:wrap;gap:8px}
.shell-body .assignment-actions-main .btn{min-height:44px;font-size:.95rem}
.shell-body .assignment-extend{display:grid;gap:8px}
.shell-body .assignment-extend-presets{display:flex;flex-wrap:wrap;gap:6px}
.shell-body .assignment-not-started{margin:12px 0;padding:12px 14px;border:1px solid var(--ui-warning);border-radius:10px;background:var(--ui-warning-soft)}
.shell-body .assignment-not-started h3{color:var(--ui-warning-text);margin-bottom:6px}
.shell-body .assignment-not-started ul{columns:2 14rem;margin:0 0 10px;padding-left:1.2rem}

/* Exam editor: published state next step */
.shell-body .ed-next-step{margin-bottom:16px;padding:20px;border-left:4px solid var(--ui-success)}
.shell-body .ui-empty-next{display:grid;gap:10px;justify-items:start;font-size:1rem}

/* Teacher without an active plan: explain the next step instead of a dead end */
.shell-body .teacher-access-banner{display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap;padding:18px 20px;margin-bottom:16px;border-left:4px solid var(--ui-warning)}
.shell-body .teacher-access-banner h2{font-size:1.1rem;margin:0 0 4px}
.shell-body .teacher-access-banner p{margin:0;max-width:60ch}
.shell-body .teacher-access-actions{display:flex;gap:10px;flex-wrap:wrap}
.shell-body .account-lock-steps{text-align:left;max-width:34rem;margin:8px auto 20px;font-size:1rem;line-height:1.7}

/* Filter bars (assignments, results): one card, labels on one line, controls aligned at the bottom */
.shell-body .ui-filter-card{margin-inline:0;padding:16px 8px 16px;background:var(--ui-surface);border:1px solid var(--ui-border);border-radius:var(--ui-radius-card);box-shadow:var(--ui-shadow);align-items:end}
.shell-body .ui-filter-card label{display:block;margin-bottom:6px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.shell-body .ui-filter-card .btn{min-height:44px;width:100%}

/* Bootstrap's outline-primary buttons still used the default #0d6efd blue; map them to the brand tokens. */
.btn-outline-primary{--bs-btn-color:var(--ui-primary-text);--bs-btn-border-color:var(--ui-primary);--bs-btn-hover-color:#fff;--bs-btn-hover-bg:var(--ui-primary);--bs-btn-hover-border-color:var(--ui-primary);--bs-btn-active-color:#fff;--bs-btn-active-bg:var(--ui-primary);--bs-btn-active-border-color:var(--ui-primary);--bs-btn-focus-shadow-rgb:79,107,237}
.dark .btn-outline-primary{--bs-btn-hover-color:#0f1420;--bs-btn-active-color:#0f1420}
.dark .btn-primary{--bs-btn-color:#0f1420;--bs-btn-hover-color:#0f1420;--bs-btn-active-color:#0f1420}

/* Public footer and header: no text under 14px */
.brand-public-body .brand-footer{font-size:.95rem}
.brand-public-body .brand-footer-caption,.brand-public-body .brand-footer-bottom,.brand-public-body .brand-footer-contact label,.brand-public-body .brand-footer-contact select{font-size:.875rem}
.brand-public-body .brand-header .brand-button{font-size:.9rem}

/* Text links that act as buttons get a 44px touch area */
.public-auth-forgot a,.shell-body .teacher-onboarding a,.shell-body .teacher-panel-head a,.public-auth-choice a,.shell-body .shell-page-header nav a{display:inline-flex;align-items:center;min-height:44px}
.shell-body .ui-filter-card{margin-top:16px}
.shell-body .ui-filter-card .form-control,.shell-body .ui-filter-card .form-select{min-height:44px}

/* Password show/hide: centre the eye icon inside its button (it sat at the bottom edge, below the field) */
.ui-input-action>button{display:grid;place-items:center;padding:0;line-height:0}
.ui-input-action>button svg{display:block}
/* Dark mode: Bootstrap draws the select chevron in dark grey; use a light one */
.dark .form-select{--bs-form-select-bg-img:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23c8cfdc' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e")}
.dark .btn-close{filter:invert(1) grayscale(100%) brightness(200%)}

/* Exam list and assignment wizard: secondary text was .78-.86rem */
.shell-body .exam-filter-row label,.shell-body .exam-card-meta dt,.shell-body .exam-edited,.shell-body .exam-subject,.shell-body .exam-status,.shell-body .exam-actions summary,.shell-body .exam-publish a,
.shell-body .assignment-exam-card p,.shell-body .assignment-field-error,.shell-body .assignment-timezone,.shell-body .assignment-badge,.shell-body .assignment-landing-meta dt,.shell-body .assignment-stepper button{font-size:.9rem}
.shell-body .exam-subject,.shell-body .exam-status{color:var(--ui-primary-text)}
