:root {
    --moe-blue: #14254A;
    --moe-blue-hover: #1e3566;
    --moe-blue-active: #0f1b3a;
    --moe-gold: #FEDB73;
    --ev-primary: var(--moe-blue);
    --ev-primary-soft: #2c3e73;
    --ev-accent: #0f7b6c;
    --ev-danger: #b3261e;
    --ev-warning: #9a6700;
    --ev-info: #1d5fa8;
    --ev-bg: #f3f5f9;
    --ev-card: #ffffff;
    --ev-border: #d9dee8;
    --ev-text: #1c2333;
    --ev-muted: #5d6679;
    --ev-radius: 12px;
}

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body.ev-body {
    margin: 0;
    background: var(--ev-bg);
    color: var(--ev-text);
    font-family: "Segoe UI", Tahoma, "Noto Naskh Arabic", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    direction: rtl;
}

body.ev-body .ui-widget,
body.ev-body .ui-widget .ui-widget,
body.ev-body input,
body.ev-body select,
body.ev-body textarea,
body.ev-body button {
    font-family: inherit;
    font-size: 1rem;
}

.ev-skip {
    position: absolute;
    top: -60px;
    right: 8px;
    background: var(--ev-primary);
    color: #fff;
    padding: 8px 14px;
    border-radius: 8px;
    z-index: 2000;
}

.ev-skip:focus {
    top: 8px;
}

.ev-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.ev-topbar {
    position: sticky;
    top: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: var(--ev-primary);
    color: #fff;
}

.ev-topbar a {
    color: #fff;
    text-decoration: none;
}

.ev-brand {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.ev-brand-title {
    font-weight: 700;
    font-size: 1.1rem;
}

.ev-brand-subtitle {
    font-size: 0.85rem;
    opacity: 0.85;
}

.ev-topbar-spacer {
    flex: 1;
}

.ev-system-chip {
    background: rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 0.85rem;
}

.ev-profile-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
}

.ev-profile-chip span {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.ev-profile-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.ev-profile-role {
    font-size: 0.78rem;
    opacity: 0.85;
}

.ev-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 0;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
    font-size: 1.1rem;
}

.ev-menu-toggle {
    display: none;
}

.ev-layout {
    flex: 1;
    display: flex;
    align-items: stretch;
}

.ev-sidebar {
    width: 270px;
    flex: 0 0 270px;
    background: var(--ev-card);
    border-left: 1px solid var(--ev-border);
    padding: 14px 10px;
}

.ev-nav-title {
    margin: 14px 10px 4px;
    color: var(--ev-muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.ev-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--ev-text);
    text-decoration: none;
    font-size: 0.98rem;
}

.ev-nav-link:hover,
.ev-nav-link:focus {
    background: #eef1f8;
}

.ev-main {
    flex: 1;
    min-width: 0;
    padding: 18px;
}

.ev-page-head h1 {
    margin: 0;
    font-size: 1.45rem;
    color: var(--ev-primary);
}

.ev-page-head p {
    margin: 2px 0 14px;
    color: var(--ev-muted);
}

.ev-footer {
    text-align: center;
    padding: 10px;
    color: var(--ev-muted);
    font-size: 0.85rem;
}

.ev-card {
    background: var(--ev-card);
    border: 1px solid var(--ev-border);
    border-radius: var(--ev-radius);
    padding: 16px;
    margin-bottom: 16px;
}

.ev-card h2 {
    margin: 0 0 12px;
    font-size: 1.12rem;
    color: var(--ev-primary);
}

.ev-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
    justify-content: flex-start;
}

.ev-filters > .ev-field {
    flex: 0 1 260px;
    max-width: 100%;
}

.ev-filters > .ev-field.ev-field-wide {
    flex-basis: 320px;
}

.ev-filters > .ev-field.ev-field-date {
    flex-basis: 240px;
}

.ev-filters > .ev-field.ev-field-full {
    flex: 1 1 100%;
}

.ev-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.ev-field label,
.ev-label {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--ev-muted);
}

.ev-field .ui-inputfield,
.ev-field .ui-selectonemenu,
.ev-field .ui-calendar,
.ev-field .p-datepicker,
.ev-field input[type="text"],
.ev-field input[type="time"],
.ev-field input[type="number"],
.ev-field select,
.ev-field textarea {
    width: 100%;
    box-sizing: border-box;
}

.ev-field .ui-inputfield,
.ev-field input[type="text"],
.ev-field input[type="time"],
.ev-field input[type="number"],
.ev-field select {
    min-height: 40px;
    height: 40px;
    font-size: 15px;
}

.ev-field .ui-selectonemenu {
    display: flex;
    align-items: center;
    min-height: 40px;
    height: 40px;
    font-size: 15px;
}

.ev-field .ui-selectonemenu .ui-selectonemenu-label {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0 10px 0 34px;
    line-height: 38px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ev-field .ui-selectonemenu .ui-selectonemenu-trigger {
    width: 30px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ev-field .ui-calendar {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: stretch;
    min-height: 40px;
}

.ev-field .ui-calendar input[type="text"],
.ev-field .ui-calendar .ui-inputfield {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    direction: ltr;
    text-align: right;
}

.ev-field .ui-calendar .ui-datepicker-trigger {
    flex: 0 0 40px;
    width: 40px;
    min-width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
}

body.ev-body .ui-selectonemenu-panel {
    max-width: calc(100vw - 24px);
}

body.ev-body .ui-selectonemenu-panel .ui-selectonemenu-item {
    white-space: normal;
    overflow-wrap: anywhere;
}

.ev-row-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.ev-input,
input.ev-input,
textarea.ev-input,
select.ev-input {
    border: 1px solid var(--ev-border);
    border-radius: 8px;
    padding: 9px 10px;
    min-height: 40px;
    background: #fff;
    color: var(--ev-text);
}

.ev-input:focus {
    outline: 2px solid var(--ev-primary-soft);
    outline-offset: 1px;
}

.ev-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 14px;
}

.ev-actions-sticky {
    position: sticky;
    bottom: 0;
    background: var(--ev-card);
    border-top: 1px solid var(--ev-border);
    padding: 12px 0 4px;
    z-index: 5;
}

body.ev-body .ui-button,
body.ev-body .ui-button.ev-primary,
body.ev-body .ui-button.ev-success,
body.ev-body .ui-button.ev-secondary,
body.ev-body input[type="submit"],
body.ev-body input[type="button"],
body.ev-body .ev-actions > a {
    min-height: 42px;
    border: 1px solid var(--moe-blue);
    border-radius: 8px;
    background: var(--moe-blue);
    background-image: none;
    color: #fff;
    text-decoration: none;
    box-shadow: none;
}

body.ev-body .ev-actions > a {
    display: inline-flex;
    align-items: center;
    padding: 0 18px;
    font-weight: 600;
}

body.ev-body .ui-button .ui-button-text,
body.ev-body .ui-button .ui-icon,
body.ev-body .ui-button .pi,
body.ev-body .ui-button .ui-button-icon-left,
body.ev-body .ui-button .ui-button-icon-right {
    color: #fff;
}

body.ev-body .ui-button:enabled:hover,
body.ev-body .ui-button.ev-primary:enabled:hover,
body.ev-body .ui-button.ev-success:enabled:hover,
body.ev-body .ui-button.ev-secondary:enabled:hover,
body.ev-body input[type="submit"]:enabled:hover,
body.ev-body input[type="button"]:enabled:hover,
body.ev-body .ev-actions > a:hover {
    border-color: var(--moe-blue-hover);
    background: var(--moe-blue-hover);
    color: #fff;
}

body.ev-body .ui-button:enabled:active,
body.ev-body .ui-button.ui-state-active,
body.ev-body input[type="submit"]:enabled:active,
body.ev-body input[type="button"]:enabled:active,
body.ev-body .ev-actions > a:active {
    border-color: var(--moe-blue-active);
    background: var(--moe-blue-active);
    color: #fff;
}

body.ev-body .ui-button:enabled:focus,
body.ev-body .ui-button:focus-visible,
body.ev-body input[type="submit"]:focus-visible,
body.ev-body input[type="button"]:focus-visible,
body.ev-body .ev-actions > a:focus-visible {
    outline: 3px solid var(--moe-gold);
    outline-offset: 2px;
    box-shadow: none;
}

body.ev-body .ui-button.ui-state-disabled,
body.ev-body .ui-button:disabled,
body.ev-body input[type="submit"]:disabled,
body.ev-body input[type="button"]:disabled {
    border-color: var(--moe-blue);
    background: var(--moe-blue);
    color: #fff;
    opacity: 0.55;
}

body.ev-body .ui-button.ev-danger {
    border-color: var(--ev-danger);
    background: var(--ev-danger);
    color: #fff;
}

body.ev-body .ui-button.ev-danger:enabled:hover,
body.ev-body .ui-button.ev-danger:enabled:active {
    border-color: #921d17;
    background: #921d17;
    color: #fff;
}

.ev-filters > .ev-student-field {
    flex-basis: 420px;
}

.ev-filters > .ev-compact-field {
    flex-basis: 280px;
}

.ev-table-scroll {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.ev-table-scroll .ui-datatable table {
    min-width: 640px;
}

.ev-day-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 18px 0 8px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ev-primary);
}

.ev-day-title:first-child {
    margin-top: 0;
}

.ev-day-title i {
    color: var(--moe-gold, #FEDB73);
}

.ev-count {
    display: inline-block;
    min-width: 34px;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--moe-blue, #14254A);
    color: #ffffff;
    font-weight: 700;
    text-align: center;
}

.ev-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 14px;
}

.ev-tile {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px;
    border-radius: var(--ev-radius);
    border: 1px solid var(--ev-border);
    background: var(--ev-card);
    color: var(--ev-text);
    text-decoration: none;
    min-height: 120px;
}

.ev-tile:hover,
.ev-tile:focus {
    border-color: var(--ev-primary-soft);
    box-shadow: 0 4px 14px rgba(25, 36, 70, 0.12);
}

.ev-tile i {
    font-size: 1.6rem;
    color: var(--ev-primary-soft);
}

.ev-tile strong {
    font-size: 1.05rem;
}

.ev-tile span {
    color: var(--ev-muted);
    font-size: 0.9rem;
}

.ev-lessons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}

.ev-lesson {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    text-align: right;
    padding: 14px;
    border-radius: var(--ev-radius);
    border: 2px solid var(--ev-border);
    background: #fff;
    color: var(--ev-text);
    cursor: pointer;
    text-decoration: none;
}

.ev-lesson:hover,
.ev-lesson:focus {
    border-color: var(--ev-primary-soft);
}

.ev-lesson.is-recorded {
    border-color: var(--ev-accent);
}

.ev-lesson.is-not-held {
    border-color: var(--ev-warning);
    background: #fff9ed;
}

.ev-lesson-number {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--ev-primary);
}

.ev-lesson-time {
    color: var(--ev-muted);
    font-size: 0.92rem;
}

.ev-lesson-title {
    font-weight: 600;
}

.ev-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-bottom: 12px;
}

.ev-summary div {
    display: flex;
    gap: 6px;
}

.ev-summary span {
    color: var(--ev-muted);
}

.ev-roster {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ev-row {
    display: grid;
    grid-template-columns: minmax(200px, 2fr) repeat(3, minmax(150px, 1fr)) minmax(170px, 1.5fr);
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--ev-border);
    border-radius: 10px;
    background: #fff;
}

.ev-row.is-absent {
    background: #fdf1f0;
    border-color: #efc1bd;
}

.ev-row.is-flagged {
    background: #fff9ed;
    border-color: #ecd9a8;
}

.ev-row.is-hidden {
    display: none;
}

.ev-student {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ev-student strong {
    font-size: 1rem;
    overflow-wrap: anywhere;
}

.ev-student small {
    color: var(--ev-muted);
    font-size: 0.85rem;
}

.ev-check {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.ev-check input[type="checkbox"] {
    width: 22px;
    height: 22px;
    accent-color: var(--ev-primary);
}

.ev-check label {
    font-weight: 600;
}

.ev-check input[type="time"] {
    min-width: 110px;
}

.ev-row.is-absent .ev-when-present {
    opacity: 0.35;
    pointer-events: none;
}

.ev-eval-student {
    border: 1px solid var(--ev-border);
    border-radius: 10px;
    background: #fff;
    padding: 12px;
}

.ev-eval-student.is-locked {
    background: #f6f7fa;
}

.ev-eval-head {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.ev-criteria {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 8px 14px;
}

.ev-criterion {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px 8px;
    border-radius: 8px;
    background: #f7f8fb;
}

.ev-criterion-name {
    font-size: 0.92rem;
    font-weight: 600;
}

.ev-criterion-meta {
    font-size: 0.8rem;
    color: var(--ev-muted);
}

body.ev-body .ui-rating .ui-rating-star a,
body.ev-body .ui-rating .ui-rating-cancel a {
    width: 30px;
    height: 30px;
    font-size: 1.35rem;
}

.ev-stars {
    color: #d99a00;
    font-size: 1.05rem;
    letter-spacing: 2px;
}

.tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
}

.tag-muted {
    background: #eceff4;
    color: var(--ev-muted);
}

.tag-info {
    background: #e2eefb;
    color: var(--ev-info);
}

.tag-success {
    background: #dff3ee;
    color: var(--ev-accent);
}

.tag-danger {
    background: #fbe3e1;
    color: var(--ev-danger);
}

.tag-warning {
    background: #fdf0d2;
    color: var(--ev-warning);
}

.ev-events {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ev-events li {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.ev-empty {
    padding: 22px;
    text-align: center;
    color: var(--ev-muted);
    border: 1px dashed var(--ev-border);
    border-radius: var(--ev-radius);
    background: #fff;
}

.ev-note {
    padding: 10px 12px;
    border-radius: 10px;
    background: #eef3fb;
    color: var(--ev-info);
    margin-bottom: 12px;
}

.ev-note.is-warning {
    background: #fdf0d2;
    color: var(--ev-warning);
}

.ev-json {
    direction: ltr;
    text-align: left;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    background: #f6f7fa;
    border: 1px solid var(--ev-border);
    border-radius: 8px;
    padding: 10px;
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.88rem;
    max-height: 320px;
    overflow: auto;
}

.ev-split {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}

body.ev-body .ui-datatable table {
    font-size: 0.96rem;
}

body.ev-body .ui-datatable thead th {
    background: #eef1f8;
    color: var(--ev-primary);
}

body.ev-body .ui-datatable tbody td {
    padding: 10px 8px;
}

.ev-loading {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(25, 36, 70, 0.28);
    z-index: 3000;
    place-items: center;
}

.ev-loading-card {
    background: #fff;
    border-radius: var(--ev-radius);
    padding: 18px 26px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.ev-spinner {
    width: 26px;
    height: 26px;
    border: 3px solid #d9dee8;
    border-top-color: var(--ev-primary);
    border-radius: 50%;
    animation: ev-spin 0.8s linear infinite;
}

@keyframes ev-spin {
    to {
        transform: rotate(360deg);
    }
}

.ev-field-button {
    justify-content: flex-end;
}

.ev-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-top: 14px;
    font-size: 0.9rem;
}

.ev-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--ev-border);
    background: #f5f6f8;
    color: #4d5566;
}

.ev-legend-item.is-recorded-clear,
.ev-mon-card.is-recorded-clear .ev-mon-status {
    background: #e6f2fc;
    border-color: #b9d9f3;
    color: #0f4c81;
}

.ev-legend-item.is-recorded-absent,
.ev-mon-card.is-recorded-absent .ev-mon-status {
    background: #fdecec;
    border-color: #f3b9b9;
    color: #a3211b;
}

.ev-mon-group {
    margin-top: 14px;
}

.ev-mon-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    font-size: 1.1rem;
}

.ev-mon-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.ev-mon-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid var(--ev-border);
    border-right: 4px solid #9aa3b2;
    border-radius: 10px;
    background: #fff;
}

.ev-mon-card.is-recorded-clear {
    border-right-color: #2f7fc1;
}

.ev-mon-card.is-recorded-absent {
    border-right-color: #d8433c;
}

.ev-mon-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: var(--ev-muted);
}

.ev-mon-no {
    font-weight: 700;
    color: var(--ev-primary);
}

.ev-mon-time {
    direction: ltr;
    white-space: nowrap;
}

.ev-mon-subject {
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--ev-text);
}

.ev-mon-teacher {
    font-size: 0.88rem;
    color: var(--ev-muted);
}

.ev-mon-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    padding: 4px 10px;
    border: 1px solid var(--ev-border);
    border-radius: 999px;
    background: #f5f6f8;
    color: #4d5566;
    font-size: 0.86rem;
    font-weight: 700;
}

.ev-mon-main {
    font-weight: 700;
    color: #0f4c81;
}

.ev-mon-hint {
    font-size: 0.85rem;
    color: var(--ev-muted);
}

.ev-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ev-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid var(--ev-border);
    background: #f5f6f8;
    color: var(--ev-text);
    font-size: 0.84rem;
}

.ev-chip.is-absent {
    background: #fdecec;
    border-color: #f3b9b9;
    color: #8f1c17;
}

.ev-chip.is-daily {
    background: #fff4e5;
    border-color: #f5d3a1;
    color: #8a4b00;
}

.ev-chip-label {
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.06);
    font-weight: 700;
}

.ev-mon-actions {
    margin-top: auto;
    padding-top: 6px;
}

.ev-mon-actions .ui-button {
    font-size: 0.86rem;
    padding: 6px 12px;
}

.ev-roster-panel {
    margin-top: 14px;
}

.ev-roster-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ev-roster-head h2 {
    margin: 0;
}

.ev-roster-absent td {
    background: #fdecec;
}

.ev-week-wrap {
    width: 100%;
    overflow-x: auto;
}

.ev-week-grid {
    width: 100%;
    min-width: 760px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

.ev-week-grid th,
.ev-week-grid td {
    padding: 8px;
    border: 1px solid var(--ev-border);
    vertical-align: top;
    text-align: right;
}

.ev-week-grid thead th {
    background: var(--ev-primary);
    color: #fff;
    font-weight: 700;
    text-align: center;
}

.ev-week-corner,
.ev-week-lesson {
    width: 120px;
    background: #f5f6f8;
}

.ev-week-no {
    display: block;
    font-weight: 700;
    color: var(--ev-primary);
}

.ev-week-time {
    display: block;
    direction: ltr;
    text-align: right;
    font-size: 0.82rem;
    color: var(--ev-muted);
}

.ev-week-card {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 6px;
    padding: 8px 10px;
    border-right: 3px solid var(--ev-primary);
    border-radius: 8px;
    background: #eef4fb;
    font-size: 0.9rem;
}

.ev-week-card:last-child {
    margin-bottom: 0;
}

.ev-week-card strong {
    color: var(--ev-text);
}

.ev-week-card span {
    color: var(--ev-muted);
    font-size: 0.85rem;
}

.ev-week-teacher {
    color: #0f4c81;
    font-size: 0.84rem;
}

.ev-week-days {
    display: none;
}

.ev-week-day h3 {
    margin: 14px 0 8px;
    font-size: 1rem;
    color: var(--ev-primary);
}

.ev-week-day-empty {
    padding: 8px 10px;
    color: var(--ev-muted);
    font-size: 0.88rem;
}

.ev-week-card.is-row {
    margin-bottom: 8px;
}

@media (max-width: 1100px) {
    .ev-mon-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ev-row {
        grid-template-columns: 1fr 1fr;
    }

    .ev-row .ev-student {
        grid-column: 1 / -1;
    }
}

@media (max-width: 900px) {
    .ev-week-wrap {
        display: none;
    }

    .ev-week-days {
        display: block;
    }

    .ev-menu-toggle {
        display: inline-flex;
    }

    .ev-sidebar {
        position: fixed;
        top: 62px;
        bottom: 0;
        right: 0;
        transform: translateX(105%);
        transition: transform 0.2s ease;
        z-index: 950;
        overflow-y: auto;
        box-shadow: -6px 0 24px rgba(0, 0, 0, 0.18);
    }

    .ev-sidebar.is-open {
        transform: translateX(0);
    }

    .ev-main {
        padding: 12px;
    }

    .ev-system-chip,
    .ev-profile-chip span {
        display: none;
    }
}

@media (max-width: 600px) {
    .ev-mon-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .ev-filters {
        gap: 12px;
    }

    .ev-filters > .ev-field,
    .ev-filters > .ev-field.ev-field-wide,
    .ev-filters > .ev-field.ev-field-date,
    .ev-filters > .ev-student-field,
    .ev-filters > .ev-compact-field {
        flex: 1 1 100%;
    }

    .ev-row {
        grid-template-columns: 1fr;
    }

    .ev-page-head h1 {
        font-size: 1.25rem;
    }

    .ev-actions .ui-button {
        flex: 1 1 100%;
    }
}

.ev-scale {
    display: flex;
    flex-direction: column;
    gap: 2px;
    --ev-scale-fill: #e9ebef;
    --ev-scale-stroke: #9aa1ad;
    --ev-scale-feature: #6b7280;
    --ev-scale-on-fill: #FFD54F;
    --ev-scale-on-stroke: #F4B400;
    --ev-scale-on-feature: #2b3040;
}

.ev-scale-items {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 4px;
    align-items: flex-start;
}

.ev-scale-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding: 2px;
    margin: 0;
    border: 0;
    background: transparent;
    cursor: default;
    min-width: 40px;
    border-radius: 8px;
    color: var(--ev-muted);
    font: inherit;
}

.ev-scale.is-editable .ev-scale-item {
    cursor: pointer;
}

.ev-scale.is-editable .ev-scale-item:hover,
.ev-scale.is-editable .ev-scale-item:focus-visible {
    background: #fff8dc;
    outline: none;
}

.ev-scale-svg {
    width: 34px;
    height: 34px;
    display: block;
}

.ev-scale.is-compact .ev-scale-svg {
    width: 22px;
    height: 22px;
}

.ev-scale.is-compact .ev-scale-item {
    min-width: 24px;
    padding: 0;
}

.ev-scale.is-compact .ev-scale-num,
.ev-scale.is-compact .ev-scale-text {
    display: none;
}

.ev-scale-fill {
    fill: var(--ev-scale-fill);
}

.ev-scale-stroke {
    stroke: var(--ev-scale-stroke);
    stroke-width: 2;
    stroke-linejoin: round;
}

.ev-scale-feature {
    fill: none;
    stroke: var(--ev-scale-feature);
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ev-scale-dot {
    fill: var(--ev-scale-feature);
}

.ev-scale-item.is-on .ev-scale-fill {
    fill: var(--ev-scale-on-fill);
}

.ev-scale-item.is-on .ev-scale-stroke {
    stroke: var(--ev-scale-on-stroke);
}

.ev-scale-item.is-on .ev-scale-feature {
    stroke: var(--ev-scale-on-feature);
}

.ev-scale-item.is-on .ev-scale-dot {
    fill: var(--ev-scale-on-feature);
}

.ev-scale-item.is-on .ev-scale-mouth-open {
    fill: var(--ev-scale-on-feature);
}

.ev-scale-faces .ev-scale-item.is-on .ev-scale-svg {
    filter: drop-shadow(0 0 5px rgba(244, 180, 0, 0.75));
}

.ev-scale-num {
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1;
}

.ev-scale-item.is-on .ev-scale-num {
    color: #b58600;
}

.ev-scale-faces .ev-scale-item:not(.is-on) .ev-scale-num,
.ev-scale-stars .ev-scale-item:not(.is-on) .ev-scale-num {
    color: var(--ev-muted);
}

.ev-scale-text {
    font-size: 0.82rem;
    color: var(--ev-muted);
}

@media (max-width: 480px) {
    .ev-scale-svg {
        width: 30px;
        height: 30px;
    }

    .ev-scale-item {
        min-width: 34px;
    }
}

body.ev-body textarea.ev-meeting-agenda {
    display: block;
    width: 100%;
    max-width: 640px;
    min-height: 150px;
    box-sizing: border-box;
    padding: 12px;
    font-size: 16px;
    line-height: 1.6;
    resize: vertical;
    overflow-x: hidden;
    margin-inline-start: 0;
    margin-inline-end: auto;
    direction: rtl;
    text-align: right;
}

@media (max-width: 600px) {
    body.ev-body textarea.ev-meeting-agenda {
        max-width: 100%;
    }
}