* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    user-select: none;
}

body {
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    background: radial-gradient(circle at center, #238bb9 0%, #0d4669 60%, #062740 100%);
    position: relative;
    color: white;
}

body[data-wallpaper="forest"] {
    background: radial-gradient(circle at 30% 25%, #4b9a72 0%, #1e604d 48%, #10392f 100%);
}

body[data-wallpaper="sunset"] {
    background: radial-gradient(circle at 72% 22%, #f5ba72 0%, #ca6b68 42%, #4a3e75 100%);
}

body[data-wallpaper="color"] {
    background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--desktop-wallpaper-color) 78%, white), var(--desktop-wallpaper-color) 58%, color-mix(in srgb, var(--desktop-wallpaper-color) 35%, black));
}

body.has-custom-wallpaper {
    background-color: #18324b;
    background-image: linear-gradient(rgba(9, 28, 47, 0.08), rgba(9, 28, 47, 0.08)), var(--desktop-wallpaper-image);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

body.clock-hidden .clock-widget {
    display: none;
}

body:not(.authenticated) .desktop,
body:not(.authenticated) .taskbar,
body:not(.authenticated) .logout-button {
    visibility: hidden;
}

.auth-gate {
    position: fixed;
    z-index: 1000;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, rgba(6, 39, 64, 0.94), rgba(13, 70, 105, 0.94));
}

body.authenticated .auth-gate {
    display: none;
}

.login-card {
    display: flex;
    width: min(360px, 100%);
    flex-direction: column;
    gap: 10px;
    padding: 30px;
    border: 1px solid #c4d4e7;
    border-radius: 8px;
    background: #f7faff;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
    color: #24364b;
}

.login-card .login-icon {
    width: 44px;
    height: 44px;
}

.login-card h1 {
    font-size: 21px;
}

.login-card p {
    margin: -5px 0 8px;
    color: #63758b;
    font-size: 13px;
}

.login-card label {
    font-size: 13px;
    font-weight: 600;
}

.login-card input {
    height: 38px;
    padding: 7px 10px;
    border: 1px solid #a9bcd1;
    border-radius: 3px;
    background: #fff;
    color: #172333;
    user-select: text;
}

.login-card button,
.student-form-actions button,
.classroom-form-footer button {
    min-height: 34px;
    padding: 6px 16px;
    border: 1px solid #8aa9ce;
    border-radius: 3px;
    background: linear-gradient(#fff, #dce8f6);
    color: #183c65;
    cursor: pointer;
}

.login-card button:disabled {
    cursor: wait;
    opacity: 0.65;
}

.login-error,
.student-form-error {
    min-height: 18px;
    color: #bd2929;
    font-size: 12px;
}

.notification-overlay[hidden] {
    display: none;
}

.notification-overlay {
    position: fixed;
    z-index: 2000;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(20, 31, 43, 0.28);
    color: #111;
    font-family: Tahoma, "Segoe UI", sans-serif;
    user-select: text;
}

.notification-box {
    width: min(360px, 100%);
    border: 1px solid #8199b5;
    border-radius: 5px;
    background: #cfdbeb;
    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.35);
    color: #111;
    font: 14px Tahoma, "Segoe UI", sans-serif;
}

.notification-box * {
    font-family: Tahoma, "Segoe UI", sans-serif;
}

.notification-header {
    display: flex;
    height: 31px;
    align-items: center;
    justify-content: space-between;
    padding: 0 5px 0 8px;
    color: #07518d;
    font-weight: bold;
}

.notification-close {
    width: 19px;
    height: 19px;
    border: 1px solid #8ba4c1;
    border-radius: 3px;
    background: linear-gradient(#fff, #dce8f6);
    color: #365b82;
    font: bold 16px/15px Arial, sans-serif;
    cursor: pointer;
}

.notification-box p {
    min-height: 46px;
    padding: 10px 17px 5px;
    line-height: 1.4;
}

.notification-box footer {
    display: flex;
    justify-content: center;
    padding: 4px 8px 4px;
}

.notification-ok {
    min-width: 94px;
    height: 28px;
    border: 1px solid #9bb9dd;
    border-radius: 3px;
    background: linear-gradient(#fff, #c4dcf7);
    color: #173b61;
    font: 13px Tahoma, "Segoe UI", sans-serif;
    cursor: pointer;
}

.notification-close:focus-visible,
.notification-ok:focus-visible {
    outline: 2px solid #397db9;
    outline-offset: 1px;
}

.logout-button {
    height: 26px;
    margin: 0 7px;
    padding: 3px 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font: 11px 'Segoe UI', Tahoma, sans-serif;
    cursor: pointer;
}

/* Abstract Background Bubbles */
body::before {
    content: '';
    position: absolute;
    top: 30%;
    left: 30%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    box-shadow: inset 0 0 50px rgba(255,255,255,0.2), 0 0 20px rgba(0, 183, 255, 0.4);
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: absolute;
    top: 40%;
    left: 55%;
    width: 200px;
    height: 100px;
    background: radial-gradient(ellipse, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    transform: rotate(-20deg);
    box-shadow: inset 0 0 30px rgba(255,255,255,0.15), 0 0 15px rgba(0, 183, 255, 0.3);
    pointer-events: none;
    z-index: 0;
}

.desktop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 40px; /* Taskbar height */
    z-index: 1;
    display: flex;
    flex-direction: column;
}

.desktop-context-menu[hidden] {
    display: none;
}

.desktop-context-menu {
    position: fixed;
    z-index: 1800;
    width: 220px;
    padding: 5px;
    border: 1px solid #7289a5;
    border-radius: 4px;
    background: #f4f7fb;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    color: #1b2f46;
    font: 13px Tahoma, Arial, sans-serif;
}

.desktop-context-menu button {
    display: flex;
    width: 100%;
    min-height: 30px;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    border: 0;
    border-radius: 2px;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.desktop-menu-icon {
    display: inline-flex;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    align-items: center;
    justify-content: center;
    color: #3a628a;
    font: bold 16px/1 "Segoe UI Symbol", "Segoe UI", sans-serif;
}

.desktop-context-menu button[data-desktop-restart] .desktop-menu-icon {
    color: #337a54;
    font-size: 19px;
}

.desktop-context-menu button[data-wallpaper-upload] .desktop-menu-icon {
    border: 1px solid #a7bad0;
    border-radius: 3px;
    background: #e7f0fa;
    font-size: 18px;
}

.desktop-context-menu button[data-toggle-clock][aria-checked="true"] .desktop-menu-icon {
    color: #247345;
}

.desktop-context-menu button:hover,
.desktop-context-menu button:focus-visible {
    outline: none;
    background: #dce9f8;
}

.desktop-context-heading {
    padding: 5px 8px 2px;
    color: #63768b;
    font-size: 11px;
    font-weight: 600;
}

.desktop-context-separator {
    height: 1px;
    margin: 4px 3px;
    background: #d1dae5;
}

.wallpaper-swatch {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    border: 1px solid rgba(30, 48, 67, 0.35);
    border-radius: 3px;
}

.desktop-context-menu input[data-wallpaper-color] {
    position: fixed;
    left: -40px;
    top: -40px;
    width: 1px;
    height: 1px;
    padding: 0;
    border: 0;
    opacity: 0;
}

.wallpaper-ocean {
    background: linear-gradient(135deg, #238bb9, #062740);
}

.wallpaper-forest {
    background: linear-gradient(135deg, #4b9a72, #10392f);
}

.wallpaper-sunset {
    background: linear-gradient(135deg, #f5ba72, #4a3e75);
}

.wallpaper-color-preview {
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--desktop-wallpaper-color, #238bb9);
    box-shadow: 0 0 0 1px #7289a5;
}

.desktop-icon {
    flex: 0 0 auto;
    width: 96px;
    height: 104px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 5px;
    margin: 0;
    border: 1px solid transparent;
    border-radius: 3px;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.1s, border-color 0.1s;
}

.desktop-icon[hidden],
.start-menu [data-app][hidden],
.quick-launch [data-app][hidden] {
    display: none !important;
}

.desktop-icon:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.desktop-icon.active {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 5px rgba(0,0,0,0.3);
}

.desktop-icon img {
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    margin-bottom: 5px;
    filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.5));
}

.desktop-icon .data-integration-desktop-icon {
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    margin-bottom: 5px;
    filter: drop-shadow(1px 2px 3px rgba(0, 0, 0, 0.35));
}

.desktop-icon span {
    font-size: 11px;
    line-height: 1.2;
    text-shadow: 1px 1px 2px black, 0 0 1em black;
    overflow-wrap: anywhere;
    width: 100%;
}

.top-icons {
    display: flex;
    padding: 10px;
    align-items: flex-start;
}

.desktop-icons-left {
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(auto-fill, 104px);
    grid-auto-columns: 96px;
    position: absolute;
    z-index: 2;
    top: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    gap: 2px;
    padding: 4px;
    align-content: start;
    justify-content: start;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.5) transparent;
}

.desktop-icons-left::-webkit-scrollbar {
    height: 6px;
}

.desktop-icons-left::-webkit-scrollbar-thumb {
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.5);
}

/* Taskbar */
.taskbar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: linear-gradient(to bottom, #2b618a 0%, #153c5a 50%, #0d2940 100%);
    display: flex;
    align-items: center;
    z-index: 100;
    border-top: 1px solid #4892c5;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.5);
}

body[data-wallpaper="ocean"] .taskbar {
    background: linear-gradient(to bottom, #2b618a 0%, #153c5a 50%, #0d2940 100%);
    border-top-color: #4892c5;
}

body[data-wallpaper="forest"] .taskbar {
    background: linear-gradient(to bottom, #34795e 0%, #205541 50%, #123b31 100%);
    border-top-color: #69ad83;
}

body[data-wallpaper="sunset"] .taskbar {
    background: linear-gradient(to bottom, #8c5969 0%, #553f61 50%, #322e50 100%);
    border-top-color: #d08b79;
}

body[data-wallpaper="color"] .taskbar {
    background: linear-gradient(to bottom, color-mix(in srgb, var(--desktop-wallpaper-color) 76%, white), color-mix(in srgb, var(--desktop-wallpaper-color) 50%, black) 50%, color-mix(in srgb, var(--desktop-wallpaper-color) 32%, black));
    border-top-color: color-mix(in srgb, var(--desktop-wallpaper-color) 72%, white);
}

body.has-custom-wallpaper .taskbar {
    background: linear-gradient(to bottom, rgba(34, 58, 81, 0.96), rgba(14, 29, 47, 0.98));
    border-top-color: rgba(190, 215, 238, 0.62);
}

.start-btn {
    width: 92px;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    border-right: 1px solid rgba(255,255,255,0.1);
}

.start-btn:hover {
    background-color: rgba(255,255,255,0.1);
}

.start-btn img {
    width: 26px;
    height: 26px;
}

.start-btn span {
    margin-left: 5px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}

.quick-launch {
    display: flex;
    align-items: center;
    padding: 0 10px;
    border-right: 1px solid rgba(255,255,255,0.1);
    height: 100%;
}

.quick-launch img {
    width: 24px;
    height: 24px;
    margin: 0 5px;
    cursor: pointer;
}

.quick-launch img:hover {
    background-color: rgba(255,255,255,0.1);
    border-radius: 3px;
}

.open-apps {
    flex-grow: 1;
    min-width: 0;
    display: flex;
    height: 100%;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
}

.system-tray {
    display: flex;
    align-items: center;
    padding: 0 10px;
    height: 100%;
    border-left: 1px solid rgba(255,255,255,0.1);
    background-color: rgba(0,0,0,0.1);
}

.tray-icon {
    width: 16px;
    height: 16px;
    margin: 0 5px;
    cursor: pointer;
}

.time-date {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    margin-left: 10px;
    font-size: 11px;
    line-height: 1.2;
    cursor: pointer;
}

.time-date:hover {
    background-color: rgba(255,255,255,0.1);
}

/* Analog Clock Widget */
.clock-widget {
    position: absolute;
    top: 20px;
    right: 20px;
}

.clock {
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, #f0f0f0, #c0c0c0);
    border: 8px solid #a0a0a0;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5), inset 0 0 15px rgba(0,0,0,0.2), inset 0 0 0 2px #fff;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.clock::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.3);
    z-index: 10;
}

.hand {
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform-origin: bottom;
    z-index: 5;
    border-radius: 10px;
}

.hour {
    width: 6px;
    height: 35px;
    background-color: #333;
    margin-left: -3px;
}

.minute {
    width: 4px;
    height: 50px;
    background-color: #555;
    margin-left: -2px;
}

.second {
    width: 2px;
    height: 60px;
    background-color: #ff3333;
    margin-left: -1px;
    z-index: 6;
}

.second::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 10px;
    background-color: #ff3333;
}

.center-dot {
    position: absolute;
    width: 12px;
    height: 12px;
    background-color: #333;
    border-radius: 50%;
    z-index: 7;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid #fff;
}

.numbers {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.numbers span {
    position: absolute;
    inset: 10px;
    text-align: center;
    transform: rotate(calc(30deg * var(--i)));
    color: #333;
    font-size: 14px;
    font-family: serif;
}

.numbers span b {
    display: inline-block;
    transform: rotate(calc(-30deg * var(--i)));
}

/* Windows Container */
#windows-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

/* OS Window Styles */
.os-window {
    position: absolute;
    top: 50px;
    left: 50px;
    width: 600px;
    height: 400px;
    background-color: #f0f0f0;
    border: 1px solid #0054e3;
    border-radius: 8px 8px 0 0;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    pointer-events: auto;
    color: black;
    resize: both;
    overflow: hidden;
    z-index: 11;
    transition: width 0.2s, height 0.2s, top 0.2s, left 0.2s;
}

.os-window.maximized {
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border-radius: 0;
    resize: none;
}

.os-window.compact-centered:not(.maximized) {
    position: fixed;
    top: 50% !important;
    left: 50% !important;
    width: min(620px, calc(100vw - 32px)) !important;
    height: auto !important;
    max-height: calc(100vh - 80px);
    transform: translate(-50%, -50%);
    resize: none;
}

.compact-centered .window-content {
    min-height: 0;
    padding: 14px;
}

.window-header {
    background: linear-gradient(to bottom, #7b9ed9 0%, #3e6ebb 50%, #2053a6 51%, #3567b4 100%);
    height: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5px;
    color: white;
    font-weight: bold;
    font-size: 13px;
    user-select: none;
    cursor: move;
}

.window-title {
    display: flex;
    align-items: center;
}

.window-title img {
    width: 16px;
    height: 16px;
    margin-right: 5px;
}

.window-controls {
    display: flex;
    gap: 2px;
}

.win-btn {
    width: 24px;
    height: 20px;
    background: linear-gradient(to bottom, #d4e2f6 0%, #a4bee8 100%);
    border: 1px solid #fff;
    border-radius: 3px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    color: #000;
    box-shadow: inset 0 0 1px #fff, 0 1px 2px rgba(0,0,0,0.3);
}

.win-btn.close-btn {
    background: linear-gradient(to bottom, #e3837f 0%, #d8453f 100%);
    color: white;
}

.win-btn:hover {
    filter: brightness(1.1);
}

.window-content {
    flex-grow: 1;
    background-color: #fff;
    padding: 10px;
    overflow: auto;
}

/* Taskbar App Button */
.taskbar-app {
    display: flex;
    flex: 0 0 145px;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    padding: 2px 10px;
    margin: 0 2px;
    height: 30px;
    cursor: pointer;
    min-width: 0;
    max-width: 145px;
    color: white;
}

.taskbar-app:hover, .taskbar-app.active {
    background-color: rgba(255, 255, 255, 0.3);
    box-shadow: inset 0 0 5px rgba(255,255,255,0.5);
}

.taskbar-app img {
    width: 16px;
    height: 16px;
    margin-right: 5px;
}

.taskbar-app span {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* App specific forms basic styling - Modernized */
.app-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    max-width: 500px;
    margin: 20px auto;
}
.app-form label {
    font-weight: 600;
    font-size: 13px;
    color: #444;
    margin-bottom: -5px;
}
.app-form input, .app-form select {
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    transition: all 0.2s ease;
    outline: none;
}
.app-form input:focus, .app-form select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}
.app-form button {
    padding: 10px 20px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.2s;
    align-self: flex-start;
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2);
}
.app-form button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(37, 99, 235, 0.3);
}
.app-form button:active {
    transform: translateY(1px);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 13px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.data-table th, .data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}
.data-table th {
    background-color: #f8fafc;
    color: #475569;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}
.data-table tr:hover {
    background-color: #f1f5f9;
}
.data-table input[type="text"] {
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 6px;
    text-align: center;
    transition: all 0.2s;
}
.data-table input[type="text"]:focus {
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

/* 3-Pane Profile Layout - Premium Design */
.profile-layout {
    display: flex;
    height: 100%;
    width: 100%;
    background: #f1f5f9;
    font-size: 12px;
}

.pane-left {
    width: 220px;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    box-shadow: 2px 0 5px rgba(0,0,0,0.02);
    z-index: 2;
}

.pane-middle {
    width: 280px;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    z-index: 1;
}

.pane-right {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: #f8fafc;
    padding: 15px;
    overflow: hidden;
}

.tree-view {
    flex-grow: 1;
    overflow-y: auto;
    border-bottom: 1px solid #e2e8f0;
    padding: 10px 5px;
}

.tree-item {
    padding: 6px 10px;
    margin: 2px 5px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: #334155;
    transition: all 0.2s;
}
.tree-item:hover { 
    background: #e0e7ff; 
    color: #4f46e5;
}
.tree-item.indent-1 { margin-left: 15px; }
.tree-item.indent-2 { margin-left: 30px; }
.tree-item.active { 
    background: #4f46e5; 
    color: white; 
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.3);
}

.left-actions {
    padding: 15px 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #f8fafc;
}
.left-actions button {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    padding: 8px 12px;
    border-radius: 6px;
    text-align: left;
    cursor: pointer;
    color: #334155;
    font-weight: 500;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}
.left-actions button:hover { 
    background: #f1f5f9; 
    border-color: #94a3b8;
    color: #0f172a;
}

.middle-table-container {
    flex-grow: 1;
    overflow-y: auto;
}

.middle-table {
    width: 100%;
    border-collapse: collapse;
}
.middle-table th, .middle-table td {
    border-bottom: 1px solid #f1f5f9;
    padding: 10px 12px;
}
.middle-table th { 
    background: #f8fafc; 
    color: #64748b; 
    position: sticky; 
    top: 0;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.5px;
}
.middle-table tr:hover {
    background: #f8fafc;
}

.middle-actions {
    padding: 15px;
    text-align: center;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
}
.status-filters {
    display: flex;
    justify-content: space-around;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 11px;
}
.status-filters span { cursor: pointer; padding: 4px 8px; border-radius: 4px; transition: background 0.2s; }
.status-filters span:hover { background: #f1f5f9; }
.status-filters .active-text { color: #ef4444; background: #fef2f2; }

/* Beautiful Right Tabs */
.right-tabs {
    display: flex;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 15px;
    gap: 5px;
}
.right-tab {
    padding: 10px 20px;
    background: transparent;
    border: none;
    margin-bottom: -2px;
    cursor: pointer;
    color: #64748b;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s;
    border-bottom: 2px solid transparent;
}
.right-tab:hover {
    color: #3b82f6;
}
.right-tab.active {
    color: #2563eb;
    border-bottom: 2px solid #2563eb;
}
.right-content {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

/* Form Styles inside right content */
.form-row {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 20px;
    flex-wrap: wrap;
}
.form-group {
    display: flex;
    align-items: center;
    gap: 10px;
}
.form-group label {
    white-space: nowrap;
    color: #475569;
    font-weight: 500;
}
.form-group input[type="text"], .form-group select {
    border: 1px solid #cbd5e1;
    padding: 8px 12px;
    border-radius: 6px;
    outline: none;
    transition: all 0.2s;
    background: #ffffff;
}
.form-group input[type="text"]:focus, .form-group select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.form-group input[type="radio"], .form-group input[type="checkbox"] { 
    margin: 0 5px 0 0; 
    accent-color: #3b82f6;
}

.fieldset {
    border: 1px solid #e2e8f0;
    padding: 20px 15px 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    position: relative;
    background: #fafafa;
}
.fieldset legend {
    color: #3b82f6;
    background: #e0f2fe;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bottom-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}
.bottom-actions button {
    padding: 10px 25px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}
.bottom-actions button:nth-child(1) { /* Thêm */
    background: #10b981;
    color: white;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.2);
}
.bottom-actions button:nth-child(1):hover { background: #059669; }
.bottom-actions button:nth-child(2) { /* Lưu */
    background: #3b82f6;
    color: white;
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.2);
}
.bottom-actions button:nth-child(2):hover { background: #2563eb; }
.bottom-actions button:nth-child(3) { /* Xóa */
    background: #ef4444;
    color: white;
    box-shadow: 0 4px 6px rgba(239, 68, 68, 0.2);
}
.bottom-actions button:nth-child(3):hover { background: #dc2626; }

/* Styles for Nhap Diem Layout */
.section-title {
    background: #e2effd;
    padding: 6px 10px;
    color: #333;
    border-bottom: 1px solid #ccc;
    font-weight: 600;
}
.active-blue {
    background: #99d6ff !important;
    color: #000 !important;
}
.tool-btn {
    background: #fff;
    border: 1px solid #ccc;
    padding: 3px 6px;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 12px;
}
.tool-btn:hover { background: #e0e0e0; }
.divider {
    width: 1px;
    height: 20px;
    background: #ccc;
    margin: 0 5px;
}
.grade-table {
    width: 100%;
    border-collapse: collapse;
}
.grade-table th, .grade-table td {
    border: 1px solid #a0b9d6;
    padding: 6px;
}
.grade-table th {
    background: #e6f0fa;
    text-align: center;
    font-weight: bold;
    color: #333;
}
.grade-table td.text-center { text-align: center; }
.grade-table td.font-bold { font-weight: bold; }
.row-alt { background: #f9f9f9; }

/* Classroom list window */
.classroom-manager {
    display: flex;
    flex-direction: column;
    width: calc(100% + 20px);
    height: calc(100% + 20px);
    min-height: 0;
    margin: -10px;
    overflow: hidden;
    background: #fff;
    color: #111;
    font: 12px Tahoma, Arial, sans-serif;
}

.classroom-toolbar {
    display: flex;
    min-height: 38px;
    align-items: center;
    gap: 12px;
    padding: 3px 8px;
    border-bottom: 1px solid #9eb9d7;
    background: linear-gradient(#e8f0fa, #d5e2f2);
    white-space: nowrap;
}

.classroom-filters,
.classroom-actions,
.classroom-menus {
    display: flex;
    align-items: center;
    gap: 5px;
}

.classroom-filters {
    flex: 1 1 auto;
    min-width: 0;
}

.classroom-filters label {
    flex: 0 0 auto;
}

.classroom-filters select,
.classroom-search input {
    height: 25px;
    border: 1px solid #a9bcd1;
    border-radius: 2px;
    background: #fff;
    color: #111;
    font: inherit;
}

.classroom-filters select {
    width: 155px;
    padding: 2px 5px;
}

#classroom-grade {
    width: 125px;
}

.classroom-search {
    display: flex;
    width: min(240px, 20vw);
    min-width: 130px;
    height: 25px;
    border: 1px solid #a9bcd1;
    background: #fff;
}

.classroom-search input {
    width: 100%;
    min-width: 0;
    padding: 2px 6px;
    border: 0;
    outline: 0;
}

.classroom-search span {
    width: 26px;
    flex: 0 0 26px;
    color: #637f9f;
    font: bold 22px/20px Arial, sans-serif;
    text-align: center;
}

.classroom-actions button,
.classroom-menus button {
    display: inline-flex;
    height: 27px;
    align-items: center;
    gap: 4px;
    padding: 2px 5px;
    border: 1px solid transparent;
    border-radius: 2px;
    background: transparent;
    color: #182433;
    font: inherit;
    cursor: pointer;
}

.classroom-actions button:hover,
.classroom-menus button:hover {
    border-color: #9bb9d9;
    background: #f7fbff;
}

.action-icon,
.menu-icon {
    display: inline-flex;
    width: 18px;
    height: 18px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font: bold 14px/1 Arial, sans-serif;
}

.save-icon { color: #52769b; }
.add-icon { background: #50b657; color: #fff; }
.edit-icon { color: #d28c29; }
.delete-icon { background: #e15b53; color: #fff; }
.menu-icon { color: #1788d0; }
.menu-caret { margin-left: -2px; font-size: 10px; }
.classroom-menus { margin-left: auto; }

.classroom-table-wrap {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    background: #fff;
}

.classroom-empty-message {
    padding: 18px;
    color: #61748a;
    text-align: center;
}

.classroom-table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    color: #080808;
    font: inherit;
}

.classroom-table th,
.classroom-table td {
    height: 29px;
    padding: 3px 7px;
    overflow: visible;
    border-right: 1px solid #d3d3d3;
    border-bottom: 1px solid #e5e5e5;
    text-align: left;
    white-space: nowrap;
}

.classroom-table th {
    position: sticky;
    z-index: 1;
    top: 0;
    height: 29px;
    border-bottom-color: #b8b8b8;
    background: linear-gradient(#f8f8f8, #e1e1e1);
    font-weight: 400;
}

.classroom-table tbody tr:nth-child(even) {
    background: #f8f8f8;
}

.classroom-table tbody tr:hover {
    background: #edf4fc;
}

.classroom-table tbody tr.selected,
.classroom-table tbody tr.selected:hover {
    background: #dce7f7;
}

.classroom-table tbody tr:hover td {
    background: #edf4fc;
}

.classroom-table tbody tr.selected td,
.classroom-table tbody tr.selected:hover td {
    background: #dce7f7;
}

.classroom-table td:first-child,
.classroom-table th:first-child,
.classroom-table td:nth-child(4),
.classroom-table th:nth-child(4),
.classroom-table td:nth-child(n+7),
.classroom-table th:nth-child(n+7) {
    text-align: center;
}

.classroom-number { min-width: 62px; }
.classroom-grade { min-width: 100px; }
.classroom-size { min-width: 58px; }
.classroom-link { min-width: 72px; }

.classroom-link-button {
    display: inline-flex;
    width: 22px;
    height: 21px;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.classroom-link-button:hover {
    background: #dceafa;
    outline: 1px solid #aac6e6;
}

.classroom-link-button img {
    display: block;
    width: 16px;
    height: 16px;
}

.classroom-manager,
.students-manager {
    position: relative;
}

.classroom-form-overlay,
.student-form-overlay {
    position: absolute;
    z-index: 5;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: rgba(40, 55, 72, 0.28);
}

.classroom-form-dialog {
    display: flex;
    width: min(1180px, 100%);
    height: min(660px, 100%);
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #789ac2;
    border-radius: 5px;
    background: #dce8f7;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    color: #15263b;
    font: 13px Tahoma, Arial, sans-serif;
}

.classroom-form-dialog > header {
    display: flex;
    min-height: 34px;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    border-bottom: 1px solid #a8bfdc;
    color: #164576;
}

.classroom-form-dialog > header button {
    width: 21px;
    height: 21px;
    border: 1px solid #89a6ca;
    border-radius: 3px;
    background: #eef5ff;
    color: #24527f;
    font-size: 18px;
    line-height: 16px;
    cursor: pointer;
}

.classroom-form-scroll {
    display: grid;
    flex: 1 1 auto;
    min-height: 0;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    overflow: auto;
    padding: 12px 16px;
}

.classroom-form-scroll fieldset {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-content: start;
    gap: 7px;
    padding: 10px 12px 14px;
    border: 1px solid #a5bad3;
}

.classroom-form-scroll legend {
    padding: 0 5px;
    color: #294b70;
}

.classroom-form-scroll fieldset > label {
    display: grid;
    min-height: 29px;
    grid-template-columns: 112px minmax(0, 1fr);
    align-items: center;
    gap: 6px;
}

.classroom-form-scroll input:not([type="checkbox"]),
.classroom-form-scroll select {
    width: 100%;
    min-width: 0;
    height: 28px;
    padding: 3px 6px;
    border: 1px solid #b3c2d5;
    background: #fff;
    color: #24364b;
    font: inherit;
}

.classroom-form-scroll input[type="checkbox"] {
    justify-self: start;
    accent-color: #3878bc;
}

.classroom-form-scroll .check-field {
    grid-template-columns: 112px 24px minmax(0, 1fr);
}

.classroom-form-scroll .check-field span {
    justify-self: end;
}

.classroom-form-note {
    margin: -5px 0 0 112px;
    padding: 6px;
    border-radius: 3px;
    background: #eef5ff;
    color: #344a61;
    font-size: 12px;
    line-height: 1.4;
}

.classroom-checkboxes {
    display: grid;
    gap: 5px;
    padding-top: 4px;
}

.classroom-checkboxes label {
    display: flex;
    align-items: center;
    gap: 5px;
}

.classroom-form-footer {
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 5px 14px;
    border-top: 1px solid #a8bfdc;
}

.classroom-form-footer button:first-child,
.student-form-actions button:first-child {
    border-color: #72a975;
    background: linear-gradient(#fff, #e0f0e0);
}

.classroom-form-footer button:last-child,
.student-form-actions button:last-child {
    border-color: #bd8585;
    background: linear-gradient(#fff, #f5e4e4);
}

.students-manager {
    position: relative;
    display: flex;
    width: calc(100% + 20px);
    height: calc(100% + 20px);
    flex-direction: column;
    margin: -10px;
    overflow: hidden;
    background: #fff;
    color: #111;
    font: 12px Tahoma, Arial, sans-serif;
}

.students-toolbar {
    display: flex;
    min-height: 36px;
    align-items: center;
    justify-content: space-between;
    padding: 4px 8px;
    border-bottom: 1px solid #a0b9d6;
    background: #dbe8f5;
}

.students-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 5px;
}

.students-actions button {
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border: 1px solid #a9bdd5;
    border-radius: 3px;
    background: linear-gradient(#fff, #e4edf8);
    color: #172d45;
    cursor: pointer;
}

.student-action-icon {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.students-actions [data-student-add] .student-action-icon {
    color: #267642;
}

.students-actions [data-student-edit] .student-action-icon {
    color: #316fa8;
}

.students-actions [data-student-delete] .student-action-icon {
    color: #a43b3b;
}

.students-actions [data-student-transfer] .student-action-icon {
    color: #217346;
}

.students-table-wrap {
    flex: 1 1 auto;
    overflow: auto;
}

.students-table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    color: #111;
    font: inherit;
}

.students-table th,
.students-table td {
    height: 29px;
    padding: 4px 7px;
    border-right: 1px solid #d8d8d8;
    border-bottom: 1px solid #e6e6e6;
    text-align: left;
    white-space: nowrap;
}

.students-table th {
    position: sticky;
    top: 0;
    background: linear-gradient(#f8f8f8, #e1e1e1);
    font-weight: 400;
}

.students-table tbody tr:nth-child(even) {
    background: #f8f8f8;
}

.students-table tbody tr.selected {
    background: #dce7f7;
}

.students-message {
    padding: 5px 9px;
    color: #5c6d80;
}

.student-form {
    display: grid;
    width: min(520px, 100%);
    max-height: 100%;
    grid-template-columns: 1fr 1fr;
    align-content: start;
    gap: 10px;
    overflow: auto;
    padding: 18px;
    border: 1px solid #8ba8c9;
    border-radius: 5px;
    background: #f4f8fd;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    color: #24364b;
    font: 13px Tahoma, Arial, sans-serif;
}

.student-form h2,
.student-form-error,
.student-form-actions {
    grid-column: 1 / -1;
}

.student-form h2 {
    margin-bottom: 3px;
    font-size: 17px;
}

.student-form > label {
    display: grid;
    gap: 4px;
}

.student-form input,
.student-form select {
    width: 100%;
    min-width: 0;
    height: 29px;
    padding: 4px 6px;
    border: 1px solid #b3c2d5;
    background: #fff;
    color: #24364b;
    font: inherit;
    user-select: text;
}

.student-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.student-profile {
    display: flex;
    width: calc(100% + 20px);
    height: calc(100% + 20px);
    min-height: 0;
    flex-direction: column;
    margin: -10px;
    overflow: hidden;
    background: #dce8f7;
    color: #172b43;
    font: 13px Tahoma, Arial, sans-serif;
}

.student-profile-tabs {
    display: flex;
    min-height: 37px;
    align-items: end;
    gap: 3px;
    padding: 4px 7px 0;
    border-bottom: 1px solid #91acd0;
    background: linear-gradient(#edf4fd, #d7e4f4);
}

.student-profile-tabs button {
    min-height: 28px;
    padding: 5px 12px;
    border: 1px solid #a7bfdc;
    border-bottom: 0;
    border-radius: 5px 5px 0 0;
    background: linear-gradient(#edf4fc, #dce8f7);
    color: #244c77;
    font: bold 13px Tahoma, Arial, sans-serif;
    cursor: pointer;
}

.student-profile-tabs button.active {
    position: relative;
    z-index: 1;
    bottom: -1px;
    background: #f9fbff;
    color: #17518a;
}

.student-profile-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 8px 7px;
    background: #dce8f7;
}

.student-profile-page {
    display: none;
    min-height: 100%;
    padding: 9px 10px;
    border: 1px solid #a4bad5;
    background: #e7effa;
}

.student-profile-page.active {
    display: block;
}

.student-profile-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-content: start;
    gap: 7px 12px;
}

.student-field {
    display: grid;
    min-width: 0;
    min-height: 28px;
    grid-template-columns: minmax(94px, 39%) minmax(0, 1fr);
    align-items: center;
    gap: 5px;
}

.student-field > span,
.student-address-row > label,
.student-photo-field > label {
    min-width: 0;
    color: #1c2e43;
    white-space: nowrap;
}

.student-field input,
.student-field select,
.student-field textarea,
.student-address-row input,
.student-address-row select,
.student-photo-field input {
    width: 100%;
    min-width: 0;
    height: 28px;
    padding: 3px 6px;
    border: 1px solid #aabbd0;
    border-radius: 1px;
    background: #fff;
    box-shadow: inset 0 1px 2px rgba(39, 66, 99, 0.08);
    color: #273b52;
    font: 13px Tahoma, Arial, sans-serif;
    user-select: text;
}

.student-field input:focus,
.student-field select:focus,
.student-field textarea:focus,
.student-address-row input:focus,
.student-address-row select:focus {
    border-color: #4e8dc9;
    outline: 1px solid rgba(70, 137, 197, 0.25);
}

.student-field input::placeholder,
.student-address-row input::placeholder {
    color: #7d8998;
}

.student-field.required > span {
    color: #bd2626;
}

.student-field.span-2 {
    grid-column: span 2;
}

.student-field textarea {
    min-height: 42px;
    resize: vertical;
}

.student-address-row {
    display: grid;
    min-width: 0;
    grid-column: 1 / -1;
    grid-template-columns: minmax(124px, 0.75fr) repeat(2, minmax(120px, 1fr)) minmax(170px, 1.35fr) minmax(130px, 0.8fr);
    align-items: center;
    gap: 7px;
}

.student-address-row .span-2 {
    grid-column: span 2;
}

.student-photo-field {
    display: grid;
    min-width: 0;
    grid-column: span 3;
    grid-template-columns: minmax(94px, 17%) minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
}

.student-photo-field button {
    height: 28px;
    padding: 3px 10px;
    border: 1px solid #a9bbd1;
    border-radius: 3px;
    background: linear-gradient(#fff, #e2eaf4);
    color: #334a64;
    font: inherit;
    white-space: nowrap;
}

.student-notes {
    grid-column: span 2;
    align-items: start;
}

.student-notes textarea {
    min-height: 62px;
}

.student-disability {
    display: flex;
    grid-column: span 2;
    align-items: flex-start;
    gap: 6px;
    padding: 4px;
    line-height: 1.35;
}

.student-disability input {
    flex: 0 0 auto;
    margin-top: 2px;
}

.student-disability strong {
    display: block;
    color: #cf2020;
    font-weight: 400;
}

.student-profile-footer {
    display: flex;
    min-height: 43px;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 5px 12px;
    border-top: 1px solid #a4bad5;
    background: #d4e1f1;
}

.student-profile-footer button {
    min-width: 92px;
    height: 30px;
    padding: 4px 10px;
    border: 1px solid #a9b7c9;
    border-radius: 3px;
    background: linear-gradient(#fff, #e2e8ef);
    color: #21354c;
    font: 13px Tahoma, Arial, sans-serif;
    cursor: pointer;
}

.student-profile-footer .student-update {
    border-color: #8daE9a;
    background: linear-gradient(#fff, #e5f1e6);
}

.student-profile-footer .student-cancel {
    border-color: #d1a3a3;
}

@media (max-width: 1100px) {
    .classroom-toolbar {
        flex-wrap: wrap;
        gap: 2px 8px;
    }

    .classroom-filters {
        flex-basis: 100%;
    }

    .classroom-search {
        width: min(220px, 30vw);
    }

    .classroom-menus {
        margin-left: auto;
    }

    .classroom-form-scroll {
        grid-template-columns: 1fr;
    }

    .student-profile-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .student-address-row {
        grid-template-columns: minmax(110px, 0.7fr) repeat(2, minmax(100px, 1fr)) minmax(140px, 1.2fr);
    }

    .student-address-row select:last-child {
        grid-column: 2 / -1;
    }
}

@media (max-width: 680px) {
    .student-profile-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .student-field.span-2,
    .student-photo-field,
    .student-notes,
    .student-disability {
        grid-column: 1;
    }

    .student-address-row {
        grid-template-columns: minmax(105px, 0.7fr) minmax(0, 1fr);
    }

    .student-address-row input,
    .student-address-row select,
    .student-address-row .span-2,
    .student-address-row select:last-child {
        grid-column: 2;
    }
}

.attendance-manager {
    position: relative;
    display: flex;
    width: calc(100% + 20px);
    height: calc(100% + 20px);
    min-height: 0;
    flex-direction: column;
    margin: -10px;
    overflow: hidden;
    background: #fff;
    color: #111;
    font: 12px Tahoma, Arial, sans-serif;
}

.attendance-toolbar {
    display: flex;
    min-height: 36px;
    flex: 0 0 auto;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 4px 7px;
    border-bottom: 1px solid #a0b9d6;
    background: linear-gradient(#e8f0fa, #d8e5f5);
    white-space: normal;
}

.attendance-toolbar > label {
    display: flex;
    flex: 0 1 auto;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.attendance-toolbar select {
    width: clamp(96px, 10vw, 138px);
    min-width: 0;
    height: 25px;
    padding: 2px 5px;
    border: 1px solid #aabbd0;
    background: #fff;
    color: #172d45;
    font: inherit;
}

.attendance-toolbar [data-attendance-month] {
    width: clamp(128px, 11vw, 148px);
}

.attendance-actions {
    display: flex;
    flex: 1 1 100%;
    flex-wrap: wrap;
    min-width: 0;
    justify-content: flex-start;
    gap: 3px;
}

.attendance-actions button {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 26px;
    padding: 3px 6px;
    border: 1px solid transparent;
    border-radius: 2px;
    background: transparent;
    color: #1b3048;
    font: inherit;
    cursor: pointer;
}

.attendance-actions button:hover {
    border-color: #a7bfdc;
    background: #f7fbff;
}

.attendance-action-icon {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.attendance-actions [data-attendance-save] .attendance-action-icon {
    color: #267642;
}

.attendance-actions [data-attendance-lock] .attendance-action-icon {
    color: #87620d;
}

.attendance-actions [data-attendance-refresh] .attendance-action-icon {
    color: #316fa8;
}

.attendance-export-menu {
    position: absolute;
    z-index: 10;
    display: flex;
    width: max-content;
    max-width: min(220px, calc(100% - 16px));
    flex-direction: column;
    padding: 4px;
    border: 1px solid #9fb6d1;
    background: #fff;
    box-shadow: 0 3px 8px rgba(20, 44, 72, 0.2);
}

.attendance-export-menu button {
    display: flex;
    width: 100%;
    min-height: 34px;
    align-items: center;
    gap: 9px;
    padding: 6px 10px;
    border: 0;
    background: #fff;
    color: #21364d;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.attendance-export-menu button:hover {
    background: #eaf2fc;
}

.excel-menu-icon {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    overflow: visible;
    fill: none;
    stroke: #27834a;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.35;
}

.excel-menu-icon .excel-sheet {
    fill: #e5f4e9;
}

.excel-menu-icon .excel-mark {
    fill: #217346;
    stroke: #fff;
    stroke-width: 1;
}

.attendance-caption {
    display: flex;
    min-height: 31px;
    align-items: center;
    gap: 22px;
    padding: 4px 10px;
    border-bottom: 1px solid #d5dce5;
    background: #fff;
    white-space: nowrap;
}

.attendance-caption strong {
    color: #25415f;
}

.attendance-caption b {
    color: #345a83;
    font-weight: 600;
}

.attendance-dirty.is-dirty {
    color: #bd5c00;
    font-weight: bold;
}

.attendance-grid-wrap {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    background: #fff;
}

.attendance-table {
    width: max-content;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    color: #111;
    font: 12px Tahoma, Arial, sans-serif;
}

.attendance-table th,
.attendance-table td {
    height: 25px;
    padding: 2px 5px;
    border-right: 1px solid #d2d7dd;
    border-bottom: 1px solid #d2d7dd;
    background: #fff;
    text-align: center;
    white-space: nowrap;
}

.attendance-table thead th {
    position: sticky;
    z-index: 3;
    top: 0;
    height: 27px;
    background: #f0f2f5;
    font-weight: 600;
}

.attendance-table thead tr:nth-child(2) th {
    top: 27px;
    height: 36px;
    font-weight: 400;
}

.attendance-table .attendance-sticky-1,
.attendance-table .attendance-sticky-2,
.attendance-table .attendance-sticky-3,
.attendance-table .attendance-sticky-4 {
    position: sticky;
    z-index: 2;
    left: 0;
    background: #fff;
    text-align: left;
}

.attendance-table .attendance-sticky-1 { min-width: 36px; left: 0; text-align: center; }
.attendance-table .attendance-sticky-2 { min-width: 88px; left: 36px; }
.attendance-table .attendance-sticky-3 { min-width: 125px; left: 124px; }
.attendance-table .attendance-sticky-4 { min-width: 72px; left: 249px; }

.attendance-table thead .attendance-sticky-1,
.attendance-table thead .attendance-sticky-2,
.attendance-table thead .attendance-sticky-3,
.attendance-table thead .attendance-sticky-4 {
    z-index: 5;
    background: #eef1f5;
}

.attendance-table .attendance-day-heading {
    min-width: 43px;
    padding: 2px;
}

.attendance-day-heading span,
.attendance-day-heading small {
    display: block;
    line-height: 14px;
}

.attendance-table tbody tr:nth-child(even) td:not(.attendance-sticky-1):not(.attendance-sticky-2):not(.attendance-sticky-3):not(.attendance-sticky-4) {
    background: #fcfcfc;
}

.attendance-table td.attendance-cell {
    width: 43px;
    min-width: 43px;
    padding: 0;
    font-weight: bold;
    cursor: pointer;
}

.attendance-code-input {
    display: block;
    box-sizing: border-box;
    width: 100%;
    height: 25px;
    padding: 1px;
    border: 0;
    outline: 0;
    background: transparent;
    color: #34475b;
    font: 700 11px Tahoma, Arial, sans-serif;
    text-align: center;
    text-transform: uppercase;
}

.attendance-code-input:focus {
    box-shadow: inset 0 0 0 2px #397db9;
}

.attendance-code-input[aria-invalid="true"] {
    background: #ffe4e4;
    color: #a51d2d;
}

.attendance-table td.attendance-cell:hover {
    outline: 1px solid #4d8ec8;
    outline-offset: -1px;
}

.attendance-cell[data-status="P"],
.attendance-cell[data-status="SPCP"] {
    background: #eff7a8 !important;
}

.attendance-cell[data-status="KP"],
.attendance-cell[data-status="SKCK"] {
    background: #f5a9ad !important;
}

.attendance-cell[data-status="BT"] {
    background: #f8d8a4 !important;
}

.attendance-summary-heading,
.attendance-summary-subheading {
    min-width: 43px;
    background: #e8edf3 !important;
}

.attendance-summary-heading {
    color: #263f5a;
}

.attendance-table td.attendance-total-cell {
    min-width: 43px;
    background: #f5f7fa;
    color: #263f5a;
    font-weight: 700;
}

.attendance-table tbody tr.attendance-row-selected td:not(.attendance-cell) {
    background: #dce7f7;
}

.attendance-table tbody tr.attendance-row-selected td.attendance-cell:not([data-status="P"]):not([data-status="KP"]):not([data-status="SPCP"]):not([data-status="SKCK"]):not([data-status="BT"]) {
    background: #dce7f7 !important;
}

.attendance-cell.is-selected {
    box-shadow: inset 0 0 0 2px #397db9;
}

.attendance-sunday {
    background-color: #fff0f0 !important;
}

.attendance-saturday {
    background-color: #f4f8ff !important;
}

.attendance-cell.attendance-locked {
    cursor: not-allowed;
    background-image: repeating-linear-gradient(135deg, transparent 0 5px, rgba(90, 100, 112, 0.08) 5px 8px);
}

.attendance-legend {
    display: flex;
    min-height: 31px;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 16px;
    padding: 4px 8px;
    border-top: 1px solid #d6dce5;
    background: #f4f6f8;
    color: #3d4856;
    font-size: 11px;
}

.attendance-legend b {
    display: inline-block;
    min-width: 17px;
    padding: 1px 3px;
    border-radius: 2px;
    text-align: center;
}

.legend-present { background: #e9f5e7; color: #318842; }
.legend-excused { background: #eff7a8; color: #5c6419; }
.legend-unexcused { background: #f5a9ad; color: #8d252c; }
.legend-late { background: #f8d8a4; color: #855408; }

.attendance-status {
    min-height: 19px;
    padding: 2px 8px;
    color: #53677e;
    background: #f4f6f8;
}

.start-menu[hidden] {
    display: none;
}

.start-menu {
    position: absolute;
    z-index: 150;
    bottom: 40px;
    left: 0;
    width: min(280px, calc(100vw - 12px));
    max-height: min(560px, calc(100vh - 54px));
    overflow: auto;
    border: 1px solid #8eaccb;
    background: #eaf1fa;
    box-shadow: 0 7px 24px rgba(0, 0, 0, 0.4);
    color: #25384d;
}

.start-menu-profile {
    display: flex;
    min-height: 86px;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-bottom: 1px solid #c0d0e2;
    background: linear-gradient(115deg, #d7e5f5, #f3f7fc);
}

.start-menu-profile img {
    width: 56px;
    height: 56px;
    padding: 3px;
    border: 1px solid #c5d4e4;
    border-radius: 4px;
    background: #fff;
}

.start-menu-profile div {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.start-menu-profile strong {
    font-size: 16px;
}

.start-menu-profile span {
    color: #62758a;
    font-size: 12px;
}

.start-menu-columns {
    display: grid;
    min-height: 310px;
    grid-template-columns: 1fr;
}

.start-menu-apps {
    display: flex;
    flex-direction: column;
    padding: 7px;
    background: #f5f8fc;
}

.start-menu-apps button {
    display: flex;
    min-height: 39px;
    align-items: center;
    gap: 9px;
    padding: 5px 8px;
    border: 0;
    background: transparent;
    color: #26394d;
    font: 13px "Segoe UI", Tahoma, sans-serif;
    text-align: left;
    cursor: pointer;
}

.start-menu-apps button:hover {
    background: #d6e5f6;
}

.start-menu-apps img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.start-menu-apps button span {
    margin-left: auto;
    color: #3587cf;
    font-size: 20px;
    font-weight: 700;
}

.discipline-manager,
.criteria-manager {
    display: flex;
    width: calc(100% + 20px);
    height: calc(100% + 20px);
    flex-direction: column;
    margin: -10px;
    overflow: hidden;
    background: #fff;
    color: #172536;
    font: 12px Tahoma, Arial, sans-serif;
}

.discipline-toolbar {
    display: flex;
    min-height: 39px;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px 12px;
    padding: 5px 9px;
    border-bottom: 1px solid #a9bfd8;
    background: linear-gradient(#edf4fc, #d9e7f6);
}

.discipline-toolbar label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.discipline-toolbar select,
.discipline-toolbar input {
    min-width: 112px;
    height: 26px;
    padding: 3px 5px;
    border: 1px solid #9eb1c7;
    background: #fff;
    color: #182b3d;
    font: inherit;
}

.discipline-toolbar strong {
    margin-right: auto;
    color: #2d4d70;
    font-size: 13px;
}

.discipline-primary,
.discipline-detail,
.discipline-delete,
.discipline-dialog-actions button {
    min-height: 27px;
    padding: 4px 9px;
    border: 1px solid #9eb4cc;
    border-radius: 3px;
    background: linear-gradient(#fff, #e2edf8);
    color: #234361;
    font: inherit;
    cursor: pointer;
}

.discipline-primary {
    border-color: #70a37c;
    background: linear-gradient(#fff, #e1f0e4);
    color: #216236;
    font-weight: 600;
}

.discipline-table-wrap {
    flex: 1 1 auto;
    overflow: auto;
}

.discipline-table {
    width: max-content;
    min-width: 0;
    border-collapse: collapse;
    table-layout: auto;
    color: #111;
    font: inherit;
}

.discipline-table th,
.discipline-table td {
    height: 30px;
    padding: 5px 8px;
    border-right: 1px solid #d9d9d9;
    border-bottom: 1px solid #e5e5e5;
    text-align: left;
    white-space: nowrap;
}

.discipline-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: linear-gradient(#f8f8f8, #e1e1e1);
    font-weight: 400;
    white-space: nowrap;
}

.discipline-table tbody tr:nth-child(even) {
    background: #f7f9fc;
}

.discipline-table tbody tr:hover {
    background: #edf4fc;
}

.discipline-table tbody tr.selected {
    background: #dce7f7;
}

.criteria-toolbar {
    display: flex;
    min-height: 39px;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 12px;
    padding: 4px 8px;
    border-bottom: 1px solid #a9bfd8;
    background: linear-gradient(#edf4fc, #d9e7f6);
}

.criteria-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.criteria-toolbar button {
    min-height: 27px;
    padding: 3px 8px;
    border: 1px solid #a9bdd5;
    border-radius: 3px;
    background: linear-gradient(#fff, #e4edf8);
    color: #172d45;
    font: 12px Tahoma, Arial, sans-serif;
    cursor: pointer;
}

.criteria-toolbar label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #21364d;
}

.criteria-toolbar select {
    width: min(210px, 40vw);
    height: 27px;
    padding: 3px 6px;
    border: 1px solid #9eb1c7;
    background: #fff;
    color: #182b3d;
    font: 12px Tahoma, Arial, sans-serif;
}

.criteria-toolbar-spacer {
    flex: 1 1 auto;
}

.criteria-manager .discipline-table th:first-child,
.criteria-manager .discipline-table td:first-child {
    min-width: 42px;
    text-align: center;
}

.criteria-manager .discipline-table th:nth-child(2),
.criteria-manager .discipline-table td:nth-child(2) {
    min-width: 82px;
    text-align: center;
}

.criteria-manager .discipline-table th:nth-child(n+4),
.criteria-manager .discipline-table td:nth-child(n+4) {
    min-width: 110px;
    text-align: center;
}

.criteria-manager .discipline-table td:nth-child(3) {
    min-width: 150px;
}

.student-groups-manager .discipline-toolbar select {
    width: auto;
    max-width: min(240px, 32vw);
}

.student-groups-manager .discipline-toolbar {
    flex-wrap: wrap;
    gap: 7px 10px;
}

.student-groups-manager .discipline-toolbar button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.student-groups-manager .discipline-table th:first-child,
.student-groups-manager .discipline-table td:first-child {
    width: 34px;
    min-width: 34px;
    text-align: center;
}

.student-groups-manager .discipline-table th:first-child,
.student-groups-manager .discipline-table td:first-child {
    padding-right: 4px;
    padding-left: 4px;
}

.student-groups-manager .discipline-table th:nth-child(2),
.student-groups-manager .discipline-table td:nth-child(2) {
    min-width: 48px;
    text-align: center;
}

.student-groups-manager .discipline-table th:nth-child(3),
.student-groups-manager .discipline-table td:nth-child(3) {
    min-width: 110px;
}

.student-groups-manager .discipline-table th:nth-child(4),
.student-groups-manager .discipline-table td:nth-child(4) {
    min-width: 180px;
}

.student-groups-manager .discipline-table th:nth-child(5),
.student-groups-manager .discipline-table td:nth-child(5) {
    min-width: 100px;
}

.student-groups-manager .discipline-table th:nth-child(6),
.student-groups-manager .discipline-table td:nth-child(6) {
    min-width: 140px;
}

.student-groups-manager input[type="checkbox"] {
    accent-color: #3278b8;
    cursor: pointer;
}

.student-group-assignment {
    min-width: 125px;
    height: 26px;
    padding: 2px 5px;
    border: 1px solid #9eb1c7;
    background: #fff;
    color: #182b3d;
    font: inherit;
}

.student-groups-empty {
    padding: 16px !important;
    color: #53677e;
    text-align: center !important;
}

.student-group-dialog-overlay {
    position: absolute;
    z-index: 10;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(27, 42, 59, 0.38);
}

.student-group-dialog-overlay[hidden] {
    display: none;
}

.student-group-dialog {
    display: grid;
    width: min(390px, 100%);
    gap: 14px;
    padding: 18px;
    border: 1px solid #8ca9ca;
    border-radius: 6px;
    background: #f7faff;
    box-shadow: 0 8px 26px rgba(12, 29, 49, 0.28);
    color: #20354d;
}

.student-group-dialog h2 {
    margin: 0;
    color: #174b7f;
    font-size: 17px;
}

.student-group-dialog label {
    display: grid;
    gap: 6px;
}

.student-group-dialog input {
    width: 100%;
    height: 34px;
    box-sizing: border-box;
    padding: 6px 9px;
    border: 1px solid #a8bbd1;
    border-radius: 3px;
    font: inherit;
}

.student-group-dialog-error {
    min-height: 18px;
    color: #a33030;
}

.student-group-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.student-group-dialog-actions button {
    min-height: 30px;
    padding: 4px 12px;
    border: 1px solid #a5b8cd;
    border-radius: 3px;
    background: #fff;
    color: #1e3855;
    cursor: pointer;
}

.criteria-manager .discipline-dialog {
    width: min(680px, 100%);
    gap: 7px 12px;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.criteria-manager .discipline-dialog h2,
.criteria-manager .discipline-dialog > label:nth-of-type(1),
.criteria-manager .discipline-dialog > label:nth-of-type(2),
.criteria-manager .discipline-dialog-actions {
    grid-column: 1 / -1;
}

.criteria-manager .discipline-dialog > label:nth-of-type(2) textarea {
    min-height: 86px;
}

.conduct-rating-manager {
    padding: 20px;
    color: #21364d;
}

.conduct-rating-form {
    display: grid;
    gap: 12px;
    max-width: 560px;
    margin: 0 auto;
    padding: 14px;
    border: 1px solid #b6c8dc;
    border-radius: 5px;
    background: #f8fbff;
}

.conduct-rating-description {
    margin: 0;
    line-height: 1.5;
}

.conduct-rating-scope {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.conduct-rating-scope label,
.conduct-rating-base {
    display: grid;
    gap: 5px;
    font-weight: 600;
}

.conduct-rating-scope select,
.conduct-rating-base input {
    box-sizing: border-box;
    width: 100%;
    min-height: 32px;
    padding: 5px 7px;
    border: 1px solid #9eb1c7;
    border-radius: 3px;
    background: #fff;
    font: 13px Tahoma, Arial, sans-serif;
}

.conduct-rating-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: 14px;
}

.conduct-rating-fields label {
    display: grid;
    gap: 6px;
    font-weight: 600;
}

.conduct-rating-fields input {
    box-sizing: border-box;
    width: 100%;
    min-height: 34px;
    padding: 6px 8px;
    border: 1px solid #9eb1c7;
    border-radius: 3px;
    font: 14px Tahoma, Arial, sans-serif;
}

.conduct-rating-scope [hidden] {
    display: none;
}

.conduct-rating-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.conduct-rating-actions .discipline-status {
    flex: 1 1 240px;
}

.conduct-results-toolbar {
    flex: 0 0 auto;
}

.conduct-results-actions {
    flex: 1 1 100%;
}

.conduct-results-manager {
    display: flex;
    height: 100%;
    min-height: 0;
    flex-direction: column;
}

.conduct-results-table {
    width: max-content;
    min-width: 0;
    table-layout: auto;
}

.conduct-results-table-wrap {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-x: auto;
}

.conduct-results-table th,
.conduct-results-table td {
    box-sizing: border-box;
    height: 25px;
    min-width: 0;
    padding: 2px 6px;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
    line-height: normal;
}

.conduct-results-table .attendance-sticky-1 {
    width: 36px;
    min-width: 36px;
    max-width: 36px;
}

.conduct-results-table .attendance-sticky-2 {
    width: 88px;
    min-width: 88px;
    max-width: 88px;
}

.conduct-results-table .attendance-sticky-3 {
    min-width: 125px;
}

.conduct-results-table tbody .attendance-sticky-3 {
    white-space: nowrap;
}

.conduct-results-table thead tr:nth-child(2) th {
    top: 27px;
    height: 30px;
    min-width: 54px;
    padding: 2px 5px;
}

.conduct-results-table tbody tr:hover td {
    background: #dce7f7;
}

.conduct-results-table tbody td:hover {
    background: #bcd5f2 !important;
    outline: 1px solid #4d8ec8;
    outline-offset: -1px;
}

.conduct-results-table .conduct-results-empty {
    height: 52px;
    color: #53677e;
    font-style: italic;
    text-align: center;
}

.conduct-comments-manager {
    display: flex;
    height: 100%;
    min-height: 0;
    flex-direction: column;
}

.conduct-comments-manager .conduct-results-actions {
    flex: 1 1 100%;
}

.conduct-comments-table {
    width: max-content;
    min-width: min(100%, 760px);
    table-layout: auto;
}

.conduct-comments-table th,
.conduct-comments-table td {
    vertical-align: top;
}

.conduct-comments-table th:first-child,
.conduct-comments-table td:first-child {
    width: 42px;
    min-width: 42px;
    text-align: center;
}

.conduct-comments-table th:nth-child(2),
.conduct-comments-table td:nth-child(2) {
    min-width: 110px;
}

.conduct-comments-table th:nth-child(3),
.conduct-comments-table td:nth-child(3) {
    min-width: 190px;
}

.conduct-comments-table th:nth-child(4),
.conduct-comments-table td:nth-child(4) {
    min-width: 110px;
    text-align: center;
}

.conduct-comments-table th:nth-child(5),
.conduct-comments-table td:nth-child(5) {
    width: min(560px, 42vw);
    min-width: 360px;
    white-space: normal;
}

.conduct-comment-input {
    display: block;
    width: 100%;
    min-height: 72px;
    resize: vertical;
    padding: 6px 8px;
    border: 1px solid #aabbd0;
    border-radius: 3px;
    background: #fff;
    color: #172d45;
    font: 12px/1.45 Tahoma, Arial, sans-serif;
    user-select: text;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.conduct-comment-input:focus {
    border-color: #4f8bc5;
    outline: 2px solid rgba(79, 139, 197, 0.18);
}

.has-unsaved-comments [data-comments-save] {
    border-color: #bb8434;
    background: linear-gradient(#fff, #fff0d4);
}

.criteria-group-field {
    display: flex;
    gap: 7px;
}

.criteria-group-field select {
    flex: 1 1 auto;
    min-width: 0;
}

.criteria-group-field button {
    flex: 0 0 auto;
    padding: 4px 8px;
    border: 1px solid #9eb4cc;
    border-radius: 3px;
    background: linear-gradient(#fff, #e2edf8);
    color: #234361;
    font: 12px Tahoma, Arial, sans-serif;
    cursor: pointer;
}

.discipline-status {
    min-height: 22px;
    padding: 4px 9px;
    background: #f4f6f8;
    color: #53677e;
}

@media (max-width: 600px) {
    .conduct-rating-scope,
    .conduct-rating-fields {
        grid-template-columns: 1fr;
    }
}

.discipline-dialog-overlay {
    position: absolute;
    z-index: 20;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    background: rgba(23, 36, 51, 0.32);
}

.discipline-dialog {
    display: flex;
    width: min(440px, 100%);
    max-height: 100%;
    flex-direction: column;
    gap: 10px;
    overflow: auto;
    padding: 17px;
    border: 1px solid #8aa6c5;
    border-radius: 4px;
    background: #f6f9fd;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.25);
    color: #24364b;
    font: 13px Tahoma, Arial, sans-serif;
}

.discipline-dialog h2 {
    margin-bottom: 2px;
    color: #2c527b;
    font-size: 16px;
}

.discipline-dialog > label {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.discipline-dialog input,
.discipline-dialog select,
.discipline-dialog textarea {
    width: 100%;
    min-height: 32px;
    padding: 6px 8px;
    border: 1px solid #aabbd0;
    border-radius: 2px;
    background: #fff;
    color: #172536;
    font: inherit;
}

.discipline-dialog textarea {
    resize: vertical;
}

.discipline-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 7px;
    margin-top: 3px;
}

.discipline-record-dialog {
    width: min(620px, 100%);
}

.discipline-record-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow: auto;
}

.discipline-record-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px;
    border: 1px solid #d5e0ec;
    background: #fff;
}

.discipline-record-item p {
    margin-top: 4px;
    color: #62758a;
}

.discipline-detail:disabled {
    color: #667b69;
    cursor: default;
}

@media (max-width: 600px) {
    .start-menu-columns {
        grid-template-columns: 1fr;
    }

    .discipline-toolbar label {
        flex: 1 1 44%;
        justify-content: space-between;
    }

    .discipline-toolbar select,
    .discipline-toolbar input {
        min-width: 0;
        width: 56%;
    }
}

@media (max-width: 1250px) {
    .attendance-toolbar {
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 6px;
    }

    .attendance-toolbar > label {
        flex: 1 1 220px;
        min-width: 0;
        justify-content: space-between;
    }

    .attendance-toolbar select,
    .attendance-toolbar [data-attendance-month] {
        flex: 0 1 148px;
        width: min(148px, 52%);
    }

    .attendance-actions {
        flex: 1 1 100%;
        justify-content: flex-start;
        overflow: visible;
    }

    .attendance-caption {
        flex-wrap: wrap;
        gap: 4px 16px;
    }
}

@media (max-width: 520px) {
    .attendance-toolbar > label {
        flex-basis: 100%;
    }

    .attendance-toolbar select,
    .attendance-toolbar [data-attendance-month] {
        flex: 1 1 0;
        width: 0;
    }

    .attendance-actions button {
        min-height: 30px;
        padding: 4px 5px;
    }
}

.account-manager,
.group-workspace,
.student-dashboard {
    width: calc(100% + 20px);
    height: calc(100% + 20px);
    margin: -10px;
    overflow: auto;
    padding: 14px;
    background: #f6f9fd;
    color: #20364d;
    font: 13px Tahoma, Arial, sans-serif;
}

.account-manager h2,
.student-dashboard h2 {
    margin-bottom: 6px;
    font-size: 18px;
}

.account-manager-description,
.account-manager-hint {
    margin: 6px 0 10px;
    color: #536981;
    line-height: 1.45;
}

.account-tabs {
    display: flex;
    gap: 4px;
    margin: 10px 0;
    border-bottom: 1px solid #aec3dc;
}

.account-tabs button {
    min-width: 120px;
    padding: 8px 16px;
    border: 1px solid #b6c9df;
    border-bottom: 0;
    border-radius: 5px 5px 0 0;
    background: linear-gradient(#fff, #e4edf8);
    color: #365878;
    font: inherit;
    cursor: pointer;
}

.account-tabs button[aria-selected="true"] {
    background: #2d6fa8;
    color: #fff;
    font-weight: 700;
}

.account-manager fieldset {
    margin: 10px 0;
    padding: 10px;
    border: 1px solid #b6c9df;
    background: #fff;
}

.account-manager legend {
    padding: 0 5px;
    font-weight: 700;
}

.account-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(150px, 1fr));
    gap: 9px;
}

.account-form-grid label {
    display: grid;
    gap: 4px;
}

.account-manager input:not([type="checkbox"]),
.account-manager select,
.group-workspace input,
.group-workspace select,
.group-workspace textarea {
    min-width: 0;
    min-height: 28px;
    padding: 4px 6px;
    border: 1px solid #afc0d3;
    background: #fff;
    color: #20364d;
    font: inherit;
    user-select: text;
}

.account-permission-grid {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 65px 90px;
    align-items: center;
    gap: 6px;
}

.account-permission-grid > :nth-child(3n + 2),
.account-permission-grid > :nth-child(3n + 3) {
    justify-self: center;
}

.account-permission-grid input {
    width: 16px;
    height: 16px;
    accent-color: #2874b8;
}

.account-form-actions {
    display: flex;
    min-height: 36px;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.account-manager [hidden] {
    display: none !important;
}

.account-manager .discipline-table-wrap {
    max-height: 260px;
}

.account-manager .account-student-list {
    max-height: min(38vh, 330px);
    margin: 8px 0 16px;
}

.account-student-bulk-controls {
    grid-template-columns: repeat(4, minmax(130px, 1fr));
}

.account-manager [data-bulk-student],
.account-manager [data-bulk-select-all] {
    width: 16px;
    height: 16px;
    accent-color: #2874b8;
}

.group-workspace .discipline-toolbar {
    flex-wrap: wrap;
}

.group-workspace [data-group-roster] textarea {
    width: 210px;
    min-height: 48px;
    resize: vertical;
}

.student-dashboard {
    color: #20364d;
}

.student-dashboard section {
    margin: 12px 0;
    padding: 10px;
    border: 1px solid #bdcddd;
    background: #fff;
}

.student-dashboard h3 {
    margin-bottom: 7px;
    font-size: 14px;
}

.student-dashboard li {
    margin: 5px 0 5px 18px;
    overflow-wrap: anywhere;
}

@media (max-width: 760px) {
    .account-form-grid {
        grid-template-columns: repeat(2, minmax(120px, 1fr));
    }

    .account-permission-grid {
        grid-template-columns: minmax(140px, 1fr) 48px 78px;
    }
}

.invitation-form-overlay {
    position: absolute;
    z-index: 8;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background: rgba(26, 41, 58, 0.52);
}

.invitation-dialog {
    display: flex;
    width: min(1280px, 100%);
    height: min(850px, 100%);
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #789ac2;
    border-radius: 5px;
    background: #edf3fa;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.32);
    color: #20364d;
    font: 13px Tahoma, Arial, sans-serif;
}

.invitation-dialog > header {
    display: flex;
    min-height: 38px;
    align-items: center;
    justify-content: space-between;
    padding: 4px 12px;
    border-bottom: 1px solid #a8bfdc;
    background: #dbe8f5;
}

.invitation-dialog > header h2 {
    margin: 0;
    font-size: 16px;
}

.invitation-dialog > header button {
    width: 26px;
    height: 26px;
    border: 1px solid #89a6ca;
    border-radius: 3px;
    background: #fff;
    color: #24527f;
    font-size: 20px;
    cursor: pointer;
}

.invitation-dialog-body {
    display: grid;
    min-height: 0;
    flex: 1 1 auto;
    grid-template-columns: minmax(300px, 0.82fr) minmax(390px, 1.18fr);
    gap: 12px;
    overflow: auto;
    padding: 12px;
}

.invitation-form {
    display: grid;
    align-content: start;
    gap: 9px;
    min-width: 0;
}

.invitation-form > label,
.invitation-fields-row > label {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.invitation-form input:not([type="file"]),
.invitation-form select {
    width: 100%;
    min-width: 0;
    height: 30px;
    padding: 4px 6px;
    border: 1px solid #adbed1;
    border-radius: 2px;
    background: #fff;
    color: #20364d;
    font: inherit;
}

.invitation-fields-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.invitation-signature-field {
    min-width: 0;
    margin: 0;
    padding: 8px;
    border: 1px solid #b6c9df;
    background: #fff;
}

.invitation-signature-field legend {
    padding: 0 4px;
    font-weight: 700;
}

.invitation-signature-field canvas {
    display: block;
    width: 100%;
    height: 90px;
    border: 1px dashed #9aa9b8;
    background: #fff;
    cursor: crosshair;
    touch-action: none;
}

.invitation-signature-field > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 7px;
}

.invitation-signature-field > div label {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.invitation-form button {
    min-height: 30px;
    padding: 4px 9px;
    border: 1px solid #98aec8;
    border-radius: 3px;
    background: linear-gradient(#fff, #e5edf7);
    color: #20364d;
    font: inherit;
    cursor: pointer;
}

.invitation-form button[type="submit"] {
    border-color: #4a8d60;
    background: linear-gradient(#fff, #e1f0e3);
    font-weight: 700;
}

.invitation-form button:disabled {
    cursor: wait;
    opacity: 0.65;
}

.invitation-form > footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.invitation-form-error {
    color: #a32929;
    font-weight: 700;
}

.invitation-preview-panel {
    min-width: 0;
    overflow: auto;
}

.invitation-preview-panel > h3 {
    margin: 0 0 8px;
    color: #304e6d;
    font-size: 13px;
}

.invitation-preview {
    min-height: 520px;
    padding: 12px;
    background: #d6dce4;
}

.invitation-preview-border {
    min-height: 500px;
    padding: 24px 20px;
    border: 4px double #174e78;
    background: #fff;
    color: #17202a;
    font: 11px Georgia, "Times New Roman", serif;
}

.invitation-preview-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    text-align: center;
    font-size: 9px;
}

.invitation-preview-border > h2 {
    margin: 30px 0 24px;
    color: #c62828;
    font-size: 23px;
    text-align: center;
}

.invitation-preview-border > p {
    margin: 12px 0;
    line-height: 1.5;
}

.invitation-preview-border .invitation-preview-closing {
    margin-top: 24px;
    font-weight: 700;
}

.invitation-preview-border .invitation-preview-issued {
    margin-top: 28px;
    text-align: right;
    font-style: italic;
}

.invitation-preview-sign {
    width: 52%;
    min-height: 90px;
    margin: 18px 0 0 auto;
    text-align: center;
}

.invitation-preview-sign img {
    display: block;
    max-width: 120px;
    max-height: 48px;
    margin: 4px auto 0;
}

.invitation-preview-sign [data-preview-signature-space] {
    height: 54px;
}

.invitation-preview-sign [data-preview-teacher] {
    display: block;
    font-style: italic;
}

@media (max-width: 900px) {
    .invitation-dialog-body {
        grid-template-columns: minmax(0, 1fr);
    }

    .invitation-preview {
        min-height: 440px;
    }

    .invitation-preview-border {
        min-height: 420px;
    }
}

.invitation-launcher {
    width: min(760px, calc(100% - 32px));
    margin: 26px auto;
    padding: 24px;
    border: 1px solid #d7e1ed;
    border-radius: 16px;
    background: linear-gradient(145deg, #fff, #f1f6fc);
    box-shadow: 0 12px 32px rgba(30, 57, 91, 0.13);
    color: #20364d;
    font: 14px Tahoma, Arial, sans-serif;
}

.invitation-launcher-hero {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
}

.invitation-launcher-hero > span {
    display: grid;
    width: 62px;
    height: 62px;
    flex: 0 0 62px;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(140deg, #7555c7, #ed7791);
    box-shadow: 0 8px 18px rgba(117, 85, 199, 0.25);
    color: #fff;
    font-size: 31px;
}

.invitation-launcher-hero h2 {
    margin: 0 0 6px;
    color: #243b64;
    font-size: 22px;
}

.invitation-launcher-hero p {
    margin: 0;
    color: #62758d;
    line-height: 1.5;
}

.invitation-launcher-form {
    display: grid;
    gap: 12px;
}

.invitation-launcher-form > label {
    display: grid;
    gap: 7px;
    font-weight: 700;
}

.invitation-launcher-form select {
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid #bdcce0;
    border-radius: 8px;
    background: #fff;
    color: #20364d;
    font: inherit;
}

.invitation-launcher-summary {
    min-height: 24px;
    color: #5e7189;
    line-height: 1.5;
}

.invitation-launcher-form > button {
    min-height: 44px;
    border: 0;
    border-radius: 9px;
    background: linear-gradient(110deg, #6652ba, #c25185);
    box-shadow: 0 6px 14px rgba(102, 82, 186, 0.2);
    color: #fff;
    font: 700 14px Tahoma, Arial, sans-serif;
    cursor: pointer;
}

.invitation-launcher-form > button:hover {
    filter: brightness(1.06);
}

.invitation-launcher-themes {
    margin-top: 22px;
    color: #435b78;
}

.invitation-launcher-themes > div {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.invitation-launcher-themes span {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 6px;
    padding: 7px;
    border: 1px solid #e1e7ef;
    border-radius: 7px;
    background: #fff;
    font-size: 10px;
}

.invitation-launcher-themes i,
.invitation-theme-field button i {
    display: inline-block;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    border: 3px solid var(--theme-primary);
    border-radius: 50%;
    background: var(--theme-accent);
}

.invitation-theme-field {
    min-width: 0;
    margin: 0;
    padding: 8px;
    border: 1px solid #d9e1eb;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.72);
}

.invitation-theme-field legend {
    padding: 0 5px;
    color: #425b76;
    font-weight: 700;
}

.invitation-theme-field > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.invitation-theme-field button {
    display: flex;
    min-width: 0;
    min-height: 34px;
    align-items: center;
    gap: 7px;
    padding: 4px 7px;
    border: 1px solid #d8e0e9;
    border-radius: 6px;
    background: #fff;
    color: #344960;
    font: 11px Tahoma, Arial, sans-serif;
    text-align: left;
    cursor: pointer;
}

.invitation-theme-field button.active {
    border-color: var(--theme-primary);
    box-shadow: inset 0 0 0 1px var(--theme-primary), 0 2px 6px rgba(30, 50, 80, 0.12);
    font-weight: 700;
}

.invitation-preview-border {
    position: relative;
    overflow: hidden;
    border-color: var(--invitation-primary, #174e78);
    background:
        radial-gradient(circle at 100% 0, color-mix(in srgb, var(--invitation-primary, #174e78) 9%, transparent), transparent 28%),
        radial-gradient(circle at 0 100%, color-mix(in srgb, var(--invitation-accent, #c62828) 8%, transparent), transparent 25%),
        #fff;
}

.invitation-preview-border::before,
.invitation-preview-border::after {
    position: absolute;
    color: var(--invitation-primary, #174e78);
    content: "❧";
    font-size: 30px;
    line-height: 1;
}

.invitation-preview-border::before {
    top: 5px;
    left: 7px;
}

.invitation-preview-border::after {
    right: 7px;
    bottom: 5px;
    transform: rotate(180deg);
}

.invitation-preview-border[data-frame="solid"] {
    border-style: solid;
    border-width: 3px;
    box-shadow: inset 0 0 0 4px #fff, inset 0 0 0 5px var(--invitation-primary, #174e78);
}

.invitation-preview-border > h2 {
    color: var(--invitation-accent, #c62828);
}

.invitation-preview-header > div:first-child {
    color: var(--invitation-primary, #174e78);
}

.invitation-preview-sign > b:first-child {
    color: var(--invitation-primary, #174e78);
}

@media (max-width: 600px) {
    .invitation-launcher {
        width: calc(100% - 20px);
        margin: 12px auto;
        padding: 16px;
    }

    .invitation-launcher-themes > div {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.data-integration-placeholder {
    display: flex;
    width: min(560px, calc(100% - 32px));
    min-height: 320px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 35px auto;
    padding: 32px;
    border: 1px solid #dce6f1;
    border-radius: 18px;
    background:
        radial-gradient(circle at 15% 10%, rgba(74, 151, 206, 0.14), transparent 35%),
        radial-gradient(circle at 90% 90%, rgba(141, 101, 199, 0.14), transparent 38%),
        #fff;
    box-shadow: 0 14px 36px rgba(37, 68, 105, 0.12);
    color: #314964;
    font-family: Tahoma, Arial, sans-serif;
    text-align: center;
}

.data-integration-icon {
    display: grid;
    width: 88px;
    height: 88px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 27px;
    background: linear-gradient(145deg, #47a3cb, #745bc2);
    box-shadow: 0 12px 25px rgba(88, 113, 191, 0.25);
    color: #fff;
    font-size: 54px;
    line-height: 1;
}

.data-integration-placeholder h2 {
    margin: 22px 0 8px;
    color: #243b5d;
    font-size: 24px;
}

.data-integration-placeholder p {
    margin: 0 0 8px;
    color: #7152b5;
    font-size: 18px;
    font-weight: 700;
}

.data-integration-placeholder > span {
    color: #718198;
    font-size: 13px;
}

.news-manager {
    width: 100%;
    height: 100%;
    overflow: auto;
    padding: 22px;
    background: #dce9f8;
    color: #183858;
    font: 13px Tahoma, Arial, sans-serif;
}

.news-manager-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border: 1px solid #afc5df;
    border-radius: 3px;
    background: #eaf2fc;
}

.news-manager-header > div > span,
.news-editor > header > div > span {
    color: #5575aa;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.4px;
}

.news-manager-header h2 {
    margin: 5px 0;
    color: #263c60;
    font-size: 23px;
}

.news-manager-header p {
    margin: 0;
    color: #718198;
}

.news-create-button,
.news-editor > footer button[type="submit"] {
    min-height: 38px;
    padding: 8px 15px;
    border: 0;
    border-radius: 3px;
    background: #2f6598;
    box-shadow: none;
    color: #fff;
    font: 700 13px Tahoma, Arial, sans-serif;
    cursor: pointer;
}

.news-status {
    min-height: 28px;
    padding: 8px 3px;
    color: #657890;
}

.news-status:not(:empty) {
    color: #a33d42;
}

.news-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    align-items: start;
    gap: 16px;
}

.news-empty {
    grid-column: 1 / -1;
    padding: 36px 18px;
    border: 1px dashed #9fb8d4;
    border-radius: 3px;
    background: #edf4fc;
    color: #708198;
    text-align: center;
}

.news-card {
    overflow: hidden;
    border: 1px solid #afc5df;
    border-radius: 3px;
    background: #edf4fc;
    box-shadow: 0 2px 5px rgba(37, 62, 96, 0.08);
}

.news-card-image {
    display: block;
    width: 100%;
    max-height: 240px;
    object-fit: cover;
    background: #edf1f6;
}

.news-card-body {
    padding: 15px;
}

.news-card-body h3 {
    margin: 0 0 5px;
    color: #263e63;
    font-size: 17px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.news-card-body time {
    color: #8090a4;
    font-size: 11px;
}

.news-card-content {
    max-height: 180px;
    overflow: hidden;
    margin: 12px 0;
    color: #485b72;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.news-card-content > :first-child {
    margin-top: 0;
}

.news-card-content > :last-child {
    margin-bottom: 0;
}

.news-card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 7px;
}

.news-card-actions button,
.news-toolbar button,
.news-toolbar select,
.news-editor > footer button {
    min-height: 30px;
    padding: 5px 9px;
    border: 1px solid #afc5df;
    border-radius: 2px;
    background: #f8fbff;
    color: #315a83;
    font: inherit;
    cursor: pointer;
}

.news-card-actions button:last-child {
    color: #a33d42;
}

.news-editor-overlay {
    position: absolute;
    z-index: 10;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background: rgba(29, 50, 75, 0.4);
}

.news-editor {
    display: flex;
    width: min(1120px, 100%);
    height: min(760px, 100%);
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #9db7d3;
    border-radius: 3px;
    background: #dce9f8;
    box-shadow: 0 8px 24px rgba(23, 43, 67, 0.2);
    color: #183858;
    font: 13px Tahoma, Arial, sans-serif;
}

.news-editor > header,
.news-editor > footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 16px;
    border-bottom: 1px solid #afc5df;
    background: #e7f0fb;
}

.news-editor > header h2 {
    margin: 4px 0 0;
    color: #234d78;
    font-size: 19px;
}

.news-editor > header > button {
    width: 32px;
    height: 32px;
    border: 1px solid #afc5df;
    border-radius: 3px;
    background: #f8fbff;
    color: #315a83;
    font-size: 22px;
    cursor: pointer;
}

.news-editor-scroll {
    min-height: 0;
    flex: 1 1 auto;
    overflow: auto;
    padding: 14px;
}

.news-editor-layout {
    display: grid;
    grid-template-columns: minmax(280px, 0.8fr) minmax(420px, 1.5fr);
    align-items: stretch;
    gap: 12px;
}

.news-editor-section {
    min-width: 0;
    margin: 0;
    padding: 14px;
    border: 1px solid #a9bfd9;
    background: rgba(237, 244, 252, 0.52);
}

.news-editor-section legend {
    padding: 0 7px;
    color: #315a83;
    font-size: 14px;
}

.news-title-field,
.news-image-field {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    margin: 4px 0 10px;
    color: #183858;
    font-weight: 400;
}

.news-title-field input {
    min-width: 0;
    min-height: 35px;
    padding: 6px 9px;
    border: 1px solid #afc5df;
    border-radius: 2px;
    background: #fff;
    color: #183858;
    font: 14px Tahoma, Arial, sans-serif;
}

.news-image-field input {
    min-width: 0;
    padding: 8px;
    border: 1px solid #afc5df;
    border-radius: 2px;
    background: #fff;
}

.news-image-field small {
    grid-column: 2;
    color: #74869c;
    font-weight: 400;
}

.news-image-preview-wrap:has(img[hidden]) {
    display: none;
}

.news-image-preview-wrap {
    margin-left: 120px;
}

.news-image-preview-wrap img {
    display: block;
    max-width: 100%;
    max-height: 190px;
    border: 1px solid #afc5df;
    border-radius: 2px;
    object-fit: contain;
    background: #e9eef4;
}

.news-image-preview-wrap label {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 6px;
    color: #a33d42;
}

.news-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 7px;
    border: 1px solid #afc5df;
    border-radius: 2px 2px 0 0;
    background: #e7eff9;
}

.news-toolbar button {
    min-width: 32px;
    background: #fff;
}

.news-toolbar button:hover,
.news-card-actions button:hover {
    border-color: #8da8c9;
    background: #eef4fd;
}

.news-rich-editor {
    min-height: 280px;
    flex: 1 1 auto;
    padding: 12px;
    border: 1px solid #afc5df;
    border-top: 0;
    border-radius: 0 0 2px 2px;
    background: #fff;
    color: #26384e;
    font: 14px/1.65 Tahoma, Arial, sans-serif;
    outline: none;
    overflow-wrap: anywhere;
}

.news-rich-editor:focus {
    border-color: #7899c2;
    box-shadow: 0 0 0 2px rgba(90, 127, 181, 0.12);
}

.news-rich-editor:empty::before {
    color: #9aa8b9;
    content: "Viết nội dung tin tức tại đây...";
    pointer-events: none;
}

.news-rich-editor blockquote,
.news-card-content blockquote {
    margin: 8px 0;
    padding: 6px 12px;
    border-left: 3px solid #829ac4;
    background: #f4f6fb;
    color: #5a6e86;
}

.news-editor-error {
    min-height: 18px;
    padding: 5px 2px 0;
    color: #ad3439;
    font-weight: 700;
}

.news-editor > footer {
    justify-content: flex-end;
    border-top: 1px solid #afc5df;
    border-bottom: 0;
}

.news-editor > footer button[type="submit"]:disabled {
    cursor: wait;
    opacity: 0.65;
}

@media (max-width: 600px) {
    .news-manager {
        padding: 12px;
    }

    .news-manager-header {
        align-items: flex-start;
        flex-direction: column;
        padding: 16px;
    }

    .news-editor-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .news-editor-scroll {
        padding: 12px;
    }

    .news-title-field,
    .news-image-field {
        grid-template-columns: minmax(0, 1fr);
    }

    .news-image-field small {
        grid-column: 1;
    }

    .news-image-preview-wrap {
        margin-left: 0;
    }
}

@media (min-width: 601px) and (max-width: 900px) {
    .news-editor-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}
