@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
    --navy: #111b35;
    --blue: #4568e8;
    --cyan: #4dc6d8;
    --muted: #77839b;
    --light: #f4f7fc;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'DM Sans', sans-serif;
    color: var(--navy);
    background: var(--light);
}

.topbar {
    height: 82px;
    padding: 0 7%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    border-bottom: 1px solid #e9edf5;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--navy);
    font-family: Manrope, sans-serif;
    font-size: 23px;
    font-weight: 800;
    letter-spacing: 1px;
}

.brand-icon, .login-logo {
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #4568e8, #53c6d9);
    color: white;
    font-weight: 800;
    border-radius: 13px;
    width: 39px;
    height: 39px;
}

.admin-link {
    color: #596780;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.hero {
    max-width: 1250px;
    margin: auto;
    padding: 105px 35px 80px;
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    align-items: center;
    gap: 60px;
}

.eyebrow {
    color: var(--blue);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 22px;
}

h1 {
    font-family: Manrope, sans-serif;
    font-size: clamp(38px, 5vw, 59px);
    line-height: 1.16;
    letter-spacing: -2px;
    margin: 0;
}

h1 span { color: var(--blue); }

.hero-description {
    color: var(--muted);
    font-size: 16px;
    line-height: 1.8;
    max-width: 540px;
    margin: 25px 0 32px;
}

.login-options { display: grid; gap: 14px; }

.login-card {
    display: flex;
    align-items: center;
    gap: 17px;
    padding: 19px;
    border-radius: 17px;
    background: white;
    border: 1px solid #e9edf5;
    text-decoration: none;
    color: var(--navy);
    transition: .2s;
}

.login-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px #263c6814;
    border-color: #b9c8fa;
}

.card-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: #edf1ff;
    color: var(--blue);
    font-size: 25px;
}

.student .card-icon { background: #e6f8fa; color: #239cae; }

.login-card h2 { font-size: 16px; margin: 0 0 5px; }
.login-card p { font-size: 12px; color: var(--muted); margin: 0; }
.arrow { margin-left: auto; color: var(--blue); font-size: 24px; }

.hero-footer {
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
    margin-top: 27px;
    color: #75829a;
    font-size: 12px;
}

.hero-visual {
    position: relative;
    min-height: 390px;
    display: grid;
    place-items: center;
}

.visual-circle {
    position: absolute;
    width: 330px;
    height: 330px;
    border-radius: 50%;
    background: linear-gradient(145deg, #e1e9ff, #dff8f8);
}

.math-card {
    position: relative;
    width: min(350px, 100%);
    padding: 35px 28px;
    background: white;
    border: 1px solid #e7edf8;
    border-radius: 23px;
    box-shadow: 0 25px 65px #253b7020;
    transform: rotate(-4deg);
}

.math-label { color: var(--muted); font-size: 12px; }
.formula { font-family: Manrope, sans-serif; font-size: 26px; font-weight: 800; margin: 32px 0; }
.formula-line { height: 5px; width: 75%; background: linear-gradient(90deg, var(--blue), var(--cyan)); border-radius: 8px; }
.math-bottom { margin-top: 25px; font-size: 12px; color: var(--muted); }

.floating-symbol {
    position: absolute;
    display: grid;
    place-items: center;
    width: 55px;
    height: 55px;
    border-radius: 16px;
    background: white;
    box-shadow: 0 10px 30px #253b701c;
    color: var(--blue);
    font-size: 27px;
    font-weight: 700;
}

.symbol-one { top: 25px; right: 12%; }
.symbol-two { bottom: 45px; left: 5%; }
.symbol-three { top: 45%; right: 0; }

footer {
    text-align: center;
    padding: 25px;
    color: #929db0;
    font-size: 12px;
}

.login-page { background: linear-gradient(135deg, #f4f7ff, #e8f5fa); }
.login-wrapper { min-height: calc(100vh - 82px); display: grid; place-items: center; padding: 35px 20px; }

.login-box {
    width: min(440px, 100%);
    background: white;
    border: 1px solid #e8edf5;
    padding: 42px;
    border-radius: 23px;
    box-shadow: 0 20px 60px #253b7012;
}

.login-logo { width: 55px; height: 55px; font-size: 25px; margin-bottom: 28px; }
.login-box h1 { font-size: 29px; letter-spacing: -1px; }
.login-subtitle { color: var(--muted); font-size: 14px; margin-bottom: 30px; }

.login-box label { display: block; font-size: 13px; font-weight: 700; margin: 18px 0 8px; }

.login-box input {
    width: 100%;
    padding: 14px;
    border: 1px solid #dfe5ef;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
}

.login-box input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px #4568e81a; }

.submit-button {
    width: 100%;
    margin-top: 27px;
    padding: 15px;
    border: 0;
    border-radius: 11px;
    background: linear-gradient(100deg, #4568e8, #527de9);
    color: white;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.submit-button span { float: right; font-size: 18px; }
.login-note { color: #929db0; font-size: 11px; line-height: 1.7; margin-top: 25px; }

.notice { padding: 12px; margin: 15px 0; border-radius: 9px; font-size: 13px; }
.notice.error { background: #fff0f0; color: #bd4141; }
.notice.success { background: #eaf8ef; color: #24824b; }

.dashboard { max-width: 1100px; margin: auto; padding: 85px 30px; }
.dashboard h1 { font-size: 42px; }
.dashboard-card { margin-top: 35px; padding: 35px; background: white; border: 1px solid #e8edf5; border-radius: 18px; }
.dashboard-card h2 { font-size: 22px; }
.dashboard-card p { color: var(--muted); }

@media (max-width: 800px) {
    .hero { grid-template-columns: 1fr; padding-top: 65px; gap: 20px; }
    .hero-visual { min-height: 340px; }
    .hero-footer { gap: 12px; }
}

@media (max-width: 480px) {
    .topbar { padding: 0 20px; }
    .hero { padding: 50px 20px; }
    .login-box { padding: 28px 22px; }
    h1 { letter-spacing: -1px; }
}

/* MATURA ADMINISZTRÁCIÓ */

.admin-page { background: #f4f7fc; }

.admin-header-right {
    display: flex;
    align-items: center;
    gap: 25px;
    color: #77839b;
    font-size: 13px;
}

.admin-container {
    max-width: 1200px;
    margin: auto;
    padding: 65px 30px 90px;
}

.admin-welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 35px;
}

.admin-welcome h1 { font-size: 39px; }
.admin-welcome p { color: var(--muted); margin-top: 12px; }

.primary-action {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 13px 20px;
    background: linear-gradient(100deg, #4568e8, #527de9);
    color: white;
    border: 0;
    border-radius: 10px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 17px;
    margin-bottom: 30px;
}

.stat-card {
    padding: 25px;
    background: white;
    border: 1px solid #e8edf5;
    border-radius: 16px;
}

.stat-card span, .stat-card small {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.stat-card strong {
    display: block;
    font-family: Manrope, sans-serif;
    font-size: 37px;
    margin: 13px 0 8px;
}

.admin-section {
    background: white;
    border: 1px solid #e8edf5;
    border-radius: 17px;
    padding: 28px;
    margin-top: 22px;
}

.admin-section h2 { font-size: 19px; margin: 0 0 22px; }

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-heading h2 { margin: 0 0 5px; }
.section-heading p, .muted { color: var(--muted); font-size: 13px; }
.section-heading a { color: var(--blue); text-decoration: none; font-size: 13px; font-weight: 700; }

.teacher-row {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #edf0f5;
}

.teacher-row:last-child { border-bottom: 0; }

.avatar {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: #edf1ff;
    color: var(--blue);
    font-weight: 800;
}

.teacher-info { flex: 1; min-width: 0; }
.teacher-info strong, .teacher-info span { display: block; }
.teacher-info strong { font-size: 13px; }
.teacher-info span { color: var(--muted); font-size: 12px; margin-top: 5px; overflow-wrap: anywhere; }

.status {
    padding: 7px 11px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.status.active { color: #218451; background: #e9f8ef; }
.status.inactive { color: #b65b50; background: #fff0ee; }

.empty-state { text-align: center; padding: 35px 10px; }
.empty-state > div { font-size: 35px; color: var(--blue); }
.empty-state h3 { margin-bottom: 7px; }
.empty-state p { color: var(--muted); font-size: 13px; margin-bottom: 22px; }

.quick-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.quick-grid a {
    display: grid;
    gap: 8px;
    padding: 20px;
    border: 1px solid #e8edf5;
    border-radius: 13px;
    text-decoration: none;
    color: var(--navy);
}
.quick-grid a > span { font-size: 24px; color: var(--blue); }
.quick-grid strong { font-size: 14px; }
.quick-grid small { color: var(--muted); }

.invite-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 15px; align-items: end; }
.invite-form label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 8px; }
.invite-form input, .invite-success input {
    width: 100%;
    padding: 13px;
    border: 1px solid #dfe5ef;
    border-radius: 9px;
    font: inherit;
    font-size: 13px;
}

.invite-success {
    padding: 25px;
    margin: 20px 0;
    background: #edf9f2;
    border: 1px solid #ccebd8;
    border-radius: 14px;
}
.invite-success h2 { color: #218451; }
.invite-success p { color: #557566; font-size: 13px; line-height: 1.6; }
.invite-success input { margin: 8px 0 15px; background: white; }
.invite-success #copyMessage { font-weight: 700; }

.secondary-action {
    padding: 9px 13px;
    border: 1px solid #dfe5ef;
    background: white;
    color: #56627a;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

@media (max-width: 850px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .invite-form { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .admin-container { padding: 40px 17px; }
    .admin-welcome { align-items: flex-start; flex-direction: column; }
    .admin-welcome h1 { font-size: 31px; }
    .teacher-row { flex-wrap: wrap; }
    .teacher-info { min-width: 55%; }
    .quick-grid { grid-template-columns: 1fr; }
    .admin-header-right > span { display: none; }
}

/* MATURA – DIÁKKEZELŐ */

.base-navigation {
    display: flex;
    align-items: center;
    gap: 22px;
}

.base-navigation a {
    color: var(--navy);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
}

.base-messages {
    max-width: 1100px;
    margin: 20px auto 0;
    padding: 0 20px;
}

.students-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 55px 22px;
}

.students-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 35px;
}

.students-header h1 {
    font-size: 38px;
    margin: 12px 0;
    color: var(--navy);
}

.students-header p,
.student-panel > p,
.section-heading p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}

.student-count {
    background: #edf3ff;
    padding: 17px 23px;
    border-radius: 14px;
    text-align: center;
}

.student-count strong,
.student-count span {
    display: block;
}

.student-count strong {
    font-size: 27px;
    color: var(--blue);
}

.student-count span {
    font-size: 11px;
    color: var(--muted);
}

.students-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 22px;
}

.student-panel {
    background: white;
    border: 1px solid #e8edf5;
    border-radius: 17px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 8px 30px rgba(20, 40, 80, 0.035);
}

.student-panel h2 {
    color: var(--navy);
    font-size: 18px;
    margin: 0 0 10px;
}

.student-panel form:not(.search-result form) {
    margin-top: 20px;
}

.student-panel label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    margin: 15px 0 7px;
    color: var(--navy);
}

.student-panel input {
    width: 100%;
    padding: 13px;
    border: 1px solid #dfe5ef;
    border-radius: 9px;
    font: inherit;
    font-size: 13px;
    box-sizing: border-box;
}

.primary-button {
    display: inline-block;
    width: 100%;
    margin-top: 16px;
    padding: 13px 18px;
    border: 0;
    border-radius: 9px;
    background: var(--blue);
    color: white;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.primary-button:hover {
    filter: brightness(1.08);
}

.student-list-panel {
    margin-top: 22px;
}

.section-heading {
    margin-bottom: 20px;
}

.student-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid #edf0f5;
}

.student-row:last-child {
    border-bottom: 0;
}

.student-avatar {
    width: 43px;
    height: 43px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: #edf1ff;
    color: var(--blue);
    font-weight: 800;
    font-size: 17px;
}

.student-info {
    flex: 1;
    min-width: 0;
}

.student-info strong,
.student-info span {
    display: block;
}

.student-info strong {
    color: var(--navy);
    font-size: 13px;
}

.student-info span {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
    overflow-wrap: anywhere;
}

.remove-button {
    padding: 9px 12px;
    background: #fff1f0;
    color: #b94d45;
    border: 0;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.search-results {
    margin-top: 22px;
}

.search-results h3 {
    font-size: 13px;
    margin-bottom: 12px;
}

.search-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid #edf0f5;
}

.search-result strong,
.search-result small {
    display: block;
}

.search-result strong {
    font-size: 12px;
    color: var(--navy);
}

.search-result small {
    font-size: 11px;
    color: var(--muted);
    margin-top: 5px;
    overflow-wrap: anywhere;
}

.search-result form {
    margin: 0 !important;
}

.search-result button,
.invite-link button {
    padding: 9px 12px;
    border: 0;
    border-radius: 8px;
    background: #edf3ff;
    color: var(--blue);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.empty-state {
    padding: 40px 15px;
    text-align: center;
}

.empty-icon {
    font-size: 36px;
}

.empty-state h3 {
    color: var(--navy);
    margin: 12px 0 7px;
}

.empty-state p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.invite-result {
    background: #edf9f2;
    border: 1px solid #ccebd8;
    border-radius: 14px;
    padding: 22px;
    margin-bottom: 22px;
}

.invite-result h3 {
    color: #218451;
    margin-top: 0;
}

.invite-result p,
.invite-result small {
    color: #557566;
    font-size: 13px;
}

.invite-link {
    display: flex;
    gap: 10px;
    margin: 15px 0;
}

.invite-link input {
    min-width: 0;
    flex: 1;
    padding: 12px;
    border: 1px solid #ccebd8;
    border-radius: 8px;
    background: white;
    font-size: 12px;
}

.notice {
    padding: 13px 16px;
    border-radius: 9px;
    margin-bottom: 12px;
    font-size: 13px;
}

.notice-success {
    background: #e9f8ef;
    color: #218451;
}

.notice-error {
    background: #fff0ee;
    color: #b94d45;
}

.invitation-status {
    font-size: 11px;
    color: var(--muted);
    font-weight: 700;
}

.invitation-card {
    max-width: 460px;
    margin: 65px auto;
    padding: 35px;
    background: white;
    border: 1px solid #e8edf5;
    border-radius: 18px;
    box-shadow: 0 15px 45px rgba(20, 40, 80, 0.07);
}

.invitation-logo {
    font-size: 22px;
    font-weight: 900;
    color: var(--blue);
    margin-bottom: 28px;
}

.invitation-card h1 {
    color: var(--navy);
    font-size: 27px;
    margin: 12px 0;
}

.invitation-card p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}

.invitation-details {
    background: #f5f7fb;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
}

.invitation-details span,
.invitation-details strong {
    display: block;
}

.invitation-details span {
    color: var(--muted);
    font-size: 11px;
    margin-bottom: 6px;
}

.invitation-details strong {
    color: var(--navy);
    font-size: 13px;
    overflow-wrap: anywhere;
}

.invitation-card form {
    margin-top: 22px;
}

.invitation-card label {
    display: block;
    margin: 15px 0 7px;
    font-size: 12px;
    font-weight: 700;
}

.invitation-card input {
    width: 100%;
    box-sizing: border-box;
    padding: 13px;
    border: 1px solid #dfe5ef;
    border-radius: 9px;
}

.invitation-card > small {
    display: block;
    margin-top: 18px;
    color: var(--muted);
}

@media (max-width: 700px) {
    .students-grid {
        grid-template-columns: 1fr;
    }

    .students-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .students-header h1 {
        font-size: 30px;
    }

    .base-navigation {
        gap: 10px;
    }

    .base-navigation a {
        font-size: 11px;
    }

    .student-row {
        flex-wrap: wrap;
    }

    .student-info {
        min-width: 55%;
    }

    .invite-link {
        flex-direction: column;
    }

    .invitation-card {
        margin: 30px 15px;
        padding: 25px;
    }
}

/* =====================================================
   MATURA – NAPTÁR ÉS ESEMÉNYKEZELÉS
===================================================== */

.calendar-page {
    max-width: 1450px;
    margin: 0 auto;
    padding: 42px 28px 70px;
}

.calendar-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    margin-bottom: 30px;
}

.calendar-heading h1 {
    color: var(--navy);
    font-size: 34px;
    margin: 8px 0;
}

.calendar-heading p {
    color: var(--muted);
    margin: 0;
}

.eyebrow {
    color: var(--blue);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
}

.calendar-primary,
.calendar-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 19px;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
    border: 0;
    cursor: pointer;
    font-size: 14px;
}

.calendar-primary {
    background: var(--blue);
    color: white;
}

.calendar-primary:hover {
    filter: brightness(1.08);
}

.calendar-primary:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.calendar-secondary {
    background: #e9eef8;
    color: var(--navy);
}

.calendar-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(340px, .8fr);
    gap: 22px;
    align-items: start;
}

.calendar-panel {
    background: white;
    border: 1px solid #e7ebf2;
    border-radius: 17px;
    padding: 25px;
    box-shadow: 0 8px 30px rgba(16, 29, 58, .045);
    min-width: 0;
}

.calendar-panel-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
}

.calendar-panel-heading h2 {
    color: var(--navy);
    font-size: 20px;
    margin: 0 0 5px;
}

.calendar-panel-heading span {
    color: var(--muted);
    font-size: 13px;
}

.event-list {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.event-card {
    display: flex;
    align-items: flex-start;
    gap: 17px;
    padding: 17px;
    background: #f8faff;
    border: 1px solid #e9edf5;
    border-left: 4px solid var(--blue);
    border-radius: 12px;
}

.event-test { border-left-color: #e39a35; }
.event-private { border-left-color: #8c68d9; }
.event-elective { border-left-color: #239b82; }
.event-mock_exam { border-left-color: #df6471; }

.event-date {
    min-width: 52px;
    height: 60px;
    border-radius: 10px;
    background: #e9efff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--navy);
}

.event-date strong {
    font-size: 22px;
    line-height: 1.1;
}

.event-date span {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
}

.event-content {
    flex: 1;
    min-width: 0;
}

.event-content h3 {
    color: var(--navy);
    margin: 5px 0 8px;
    font-size: 16px;
}

.event-content p {
    color: var(--muted);
    font-size: 13px;
    margin: 5px 0;
    overflow-wrap: anywhere;
}

.event-type {
    color: var(--blue);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.event-participants {
    font-weight: 700;
}

.event-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
}

.event-actions a,
.delete-event {
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    color: var(--blue);
    background: none;
    border: 0;
    cursor: pointer;
}

.delete-event {
    color: #d34d5a;
}

.event-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.event-form > label {
    color: var(--navy);
    font-size: 13px;
    font-weight: 700;
    margin-top: 8px;
}

.event-form input[type="text"],
.event-form input[type="datetime-local"],
.event-form select,
.event-form textarea {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    border: 1px solid #dce2ed;
    border-radius: 9px;
    padding: 12px;
    color: var(--navy);
    background: #fff;
    font: inherit;
    font-size: 14px;
}

.event-form input:focus,
.event-form select:focus,
.event-form textarea:focus {
    outline: 2px solid rgba(55, 105, 220, .18);
    border-color: var(--blue);
}

.event-date-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 8px;
}

.event-date-fields label {
    display: block;
    color: var(--navy);
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
}

.student-selection {
    border: 1px solid #e0e6f0;
    border-radius: 10px;
    padding: 10px;
    max-height: 260px;
    overflow-y: auto;
}

.selection-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    padding: 5px 4px 12px;
    border-bottom: 1px solid #edf0f5;
    margin-bottom: 5px;
}

.selection-tools span {
    font-size: 12px;
    color: var(--muted);
    margin-right: auto;
}

.selection-tools button {
    border: 0;
    background: #edf2ff;
    color: var(--blue);
    border-radius: 6px;
    padding: 6px 9px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.student-checkbox {
    display: grid;
    grid-template-columns: 20px 1fr;
    gap: 2px 8px;
    padding: 10px 5px;
    border-bottom: 1px solid #f0f2f6;
    cursor: pointer;
}

.student-checkbox:last-child {
    border-bottom: 0;
}

.student-checkbox input {
    grid-row: span 2;
    align-self: center;
    width: 16px;
    height: 16px;
}

.student-checkbox span {
    color: var(--navy);
    font-size: 13px;
    font-weight: 700;
}

.student-checkbox small {
    color: var(--muted);
    font-size: 11px;
}

.no-students {
    background: #fff5e8;
    border-radius: 9px;
    padding: 14px;
    color: #94621e;
    font-size: 13px;
}

.submit-event {
    width: 100%;
    margin-top: 12px;
}

.calendar-empty {
    text-align: center;
    padding: 55px 15px;
}

.empty-icon {
    font-size: 38px;
    color: var(--blue);
    margin-bottom: 12px;
}

.calendar-empty h3 {
    color: var(--navy);
    margin: 0 0 8px;
}

.calendar-empty p {
    color: var(--muted);
    font-size: 14px;
}

.edit-event-panel {
    max-width: 750px;
}

.event-notes {
    white-space: pre-wrap;
}

@media (max-width: 950px) {
    .calendar-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .calendar-page {
        padding: 25px 14px 45px;
    }

    .calendar-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .calendar-heading h1 {
        font-size: 27px;
    }

    .calendar-panel {
        padding: 17px;
    }

    .event-card {
        gap: 10px;
        padding: 12px;
    }

    .event-actions {
        gap: 7px;
    }

    .event-date-fields {
        grid-template-columns: 1fr;
    }
}


/* MATURA – új vezérlőpult */
.dashboard-page {
    width: min(1180px, calc(100% - 40px));
    margin: 48px auto 70px;
}

.dashboard-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 34px;
}

.dashboard-heading h1 {
    margin: 10px 0;
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: -1.5px;
}

.dashboard-avatar {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #3159a5, #7089dc);
    color: white;
    font-size: 27px;
    font-weight: 800;
    flex-shrink: 0;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 23px;
    background: white;
    border: 1px solid #e8edf5;
    border-radius: 18px;
    box-shadow: 0 8px 25px rgba(20, 35, 70, .04);
}

.stat-card span,
.stat-card small {
    display: block;
    color: #718096;
}

.stat-card strong {
    display: block;
    margin: 5px 0;
    color: #17233e;
    font-size: 29px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    font-size: 23px;
}

.stat-blue { background: #e9f1ff; color: #3564ba; }
.stat-purple { background: #f0eaff; color: #7954bb; }
.stat-green { background: #e5f7ef; color: #24845a; }

.dashboard-columns {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr);
    gap: 22px;
    align-items: start;
}

.dashboard-panel {
    min-width: 0;
    padding: 26px;
    background: white;
    border: 1px solid #e8edf5;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(20, 35, 70, .04);
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 22px;
}

.panel-heading h2,
.quick-panel h2 {
    margin: 7px 0 0;
    color: #17233e;
    font-size: 21px;
}

.text-link {
    color: #3564ba;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.upcoming-list {
    display: grid;
    gap: 12px;
}

.upcoming-event {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 15px;
    border: 1px solid #edf0f5;
    border-radius: 14px;
}

.event-date {
    width: 55px;
    height: 60px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #edf3ff;
    border-radius: 12px;
    color: #3159a5;
}

.event-date strong { font-size: 22px; }
.event-date span { font-size: 12px; text-transform: uppercase; }

.event-details h3 {
    margin: 0 0 5px;
    color: #17233e;
    font-size: 16px;
}

.event-details p,
.event-details small {
    margin: 0;
    color: #718096;
    font-size: 13px;
}

.event-details small {
    display: block;
    margin-top: 5px;
}

.quick-panel {
    display: grid;
    gap: 15px;
}

.quick-link {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 14px;
    border: 1px solid #edf0f5;
    border-radius: 14px;
    color: inherit;
    text-decoration: none;
    transition: border-color .2s, transform .2s;
}

.quick-link:hover {
    border-color: #9bb6e8;
    transform: translateY(-2px);
}

.quick-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #edf3ff;
    color: #3159a5;
    font-size: 20px;
    flex-shrink: 0;
}

.quick-link strong,
.quick-link small {
    display: block;
}

.quick-link strong { font-size: 14px; }
.quick-link small { margin-top: 4px; color: #718096; font-size: 12px; }
.quick-arrow { margin-left: auto; color: #7890b9; }

.coming-soon {
    padding: 14px;
    border-radius: 13px;
    background: #f7f8fb;
}

.coming-soon span {
    display: inline-block;
    margin-bottom: 7px;
    color: #7954bb;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .7px;
}

.coming-soon strong,
.coming-soon small {
    display: block;
}

.coming-soon strong { color: #34415c; font-size: 13px; }
.coming-soon small { margin-top: 4px; color: #718096; font-size: 12px; }

.empty-state {
    padding: 35px 15px;
    text-align: center;
}

.empty-icon {
    margin-bottom: 12px;
    color: #9aafd2;
    font-size: 38px;
}

.empty-state h3 { color: #263653; }
.empty-state p { color: #718096; font-size: 14px; }

.primary-button {
    display: inline-block;
    margin-top: 12px;
    padding: 12px 18px;
    border-radius: 10px;
    background: #3159a5;
    color: white;
    font-weight: 700;
    text-decoration: none;
}

@media (max-width: 800px) {
    .dashboard-stats { grid-template-columns: 1fr; }
    .dashboard-columns { grid-template-columns: 1fr; }
    .dashboard-page { margin-top: 28px; }
}

@media (max-width: 480px) {
    .dashboard-heading h1 { font-size: 27px; }
    .dashboard-avatar { width: 50px; height: 50px; }
    .dashboard-panel { padding: 18px; }
    .panel-heading { align-items: flex-start; flex-direction: column; }
}


/* ==================================================
   MATURA – FELADATBANK
   ================================================== */

.task-page {
    width: min(1180px, calc(100% - 36px));
    margin: 48px auto 80px;
}

.task-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
}

.task-heading h1 {
    margin: 8px 0;
    color: #1c2b49;
    font-size: 34px;
}

.task-toolbar {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 20px;
    margin-bottom: 24px;
    background: white;
    border: 1px solid #e8edf5;
    border-radius: 16px;
}

.task-search {
    display: flex;
    gap: 10px;
}

.task-search input {
    flex: 1;
    min-width: 0;
}

.task-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.task-tabs a {
    padding: 9px 15px;
    border-radius: 9px;
    color: #60708b;
    text-decoration: none;
    background: #f3f5f9;
    font-size: 13px;
    font-weight: 700;
}

.task-tabs a.active {
    color: #fff;
    background: #3159a5;
}

.task-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.task-card {
    padding: 23px;
    background: white;
    border: 1px solid #e8edf5;
    border-radius: 17px;
    box-shadow: 0 5px 20px rgba(30, 50, 90, .04);
}

.task-card-top,
.task-meta,
.task-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.task-subject,
.task-topic {
    color: #6680aa;
    font-size: 12px;
    font-weight: 700;
}

.difficulty {
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
}

.difficulty-easy { background: #e7f7ed; color: #21834b; }
.difficulty-medium { background: #fff4dc; color: #a66a0b; }
.difficulty-hard { background: #ffebeb; color: #bb4141; }

.task-card h2 {
    margin: 18px 0 7px;
    color: #233452;
    font-size: 19px;
}

.task-description {
    min-height: 54px;
    color: #64738c;
    font-size: 13px;
    line-height: 1.65;
    white-space: pre-wrap;
}

.task-meta {
    padding: 13px 0;
    margin-top: 12px;
    border-top: 1px solid #edf0f5;
    color: #8390a5;
    font-size: 11px;
}

.task-actions {
    justify-content: flex-start;
    margin-top: 8px;
}

.task-actions form { margin: 0; }

.secondary-button,
.archive-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border: 1px solid #dce4f0;
    border-radius: 9px;
    color: #36578e;
    background: #f7f9fd;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.archive-button { color: #a35b48; }

.task-empty {
    padding: 65px 20px;
    text-align: center;
    background: white;
    border: 1px dashed #d5deed;
    border-radius: 18px;
}

.task-empty h2 { color: #263653; }
.task-empty p { color: #718096; }

.task-form {
    display: grid;
    gap: 20px;
    max-width: 900px;
}

.form-section {
    padding: 26px;
    background: white;
    border: 1px solid #e8edf5;
    border-radius: 17px;
}

.form-section h2 {
    margin: 0 0 20px;
    color: #253653;
    font-size: 20px;
}

.form-section label {
    display: block;
    margin: 15px 0 7px;
    color: #40516e;
    font-size: 13px;
    font-weight: 700;
}

.form-section input,
.form-section textarea,
.form-section select,
.task-search input {
    box-sizing: border-box;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #dce3ee;
    border-radius: 9px;
    color: #263653;
    background: #fff;
    font: inherit;
    font-size: 14px;
}

.form-section textarea { resize: vertical; line-height: 1.6; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.form-hint {
    color: #72829b;
    font-size: 13px;
}

.teacher-solution {
    border-color: #d9e5fa;
    background: #f9fbff;
}

.task-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

@media (max-width: 700px) {
    .task-heading { align-items: flex-start; flex-direction: column; }
    .task-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .task-search { flex-direction: column; }
    .task-form-actions { flex-wrap: wrap; }
}


/* MATURA – FELADATKIOSZTÁS */

.assignment-page {
    width: min(1100px, 94%);
    margin: 32px auto 60px;
}

.assignment-heading {
    margin-bottom: 28px;
}

.assignment-heading h1 {
    margin: 8px 0;
}

.assignment-form,
.assignment-card,
.assignment-recipient {
    background: var(--card, #fff);
    border: 1px solid var(--border, #e3e8ee);
    border-radius: 16px;
    padding: 24px;
}

.assignment-form {
    display: grid;
    gap: 22px;
}

.assignment-form .form-group {
    display: grid;
    gap: 8px;
}

.assignment-form input:not([type="checkbox"]),
.assignment-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border, #d9e0e8);
    border-radius: 9px;
    font: inherit;
    box-sizing: border-box;
}

.assignment-form small,
.assignment-student small,
.assignment-recipient small {
    display: block;
    color: #718096;
    margin-top: 4px;
}

.assignment-student-section h2 {
    margin-bottom: 6px;
}

.assignment-student-list,
.assignment-recipient-list {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.assignment-student {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--border, #e3e8ee);
    border-radius: 10px;
    cursor: pointer;
}

.assignment-student input {
    width: 18px;
    height: 18px;
}

.assignment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.assignment-card {
    display: grid;
    gap: 14px;
}

.assignment-card h2 {
    margin: 0;
}

.assignment-card-meta {
    display: grid;
    gap: 7px;
    color: #718096;
    font-size: 0.9rem;
}

.assignment-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.assignment-recipient {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.recipient-status {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.status-pending,
.status-submitted,
.status-reviewed {
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-pending {
    background: #fff2d6;
    color: #946200;
}

.status-submitted {
    background: #e0efff;
    color: #1759a5;
}

.status-reviewed {
    background: #ddf7e8;
    color: #167345;
}

.assignment-section-title {
    margin: 30px 0 14px;
}

.assignment-description {
    white-space: pre-wrap;
    line-height: 1.7;
}

.assignment-detail-card {
    margin-bottom: 28px;
}

@media (max-width: 600px) {
    .assignment-form,
    .assignment-card,
    .assignment-recipient {
        padding: 17px;
    }

    .assignment-actions {
        justify-content: stretch;
    }

    .assignment-actions > * {
        flex: 1;
        text-align: center;
    }
}


.student-task-dashboard {
    margin-bottom: 24px;
}

.submission-history {
    margin-top: 24px;
}

.submission-entry {
    padding: 18px 0;
    border-top: 1px solid var(--border, #e3e8ee);
    display: grid;
    gap: 12px;
}

.submission-entry h3 {
    margin-bottom: 0;
}


/* Tanulói statisztikák */
.student-statistics {
    margin-bottom: 24px;
    padding: 26px;
    background: white;
    border: 1px solid #e8edf5;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(20, 35, 70, .04);
}

.student-stat-cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 20px;
}

.average-result-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 22px;
    margin-bottom: 22px;
    border-radius: 16px;
    background: #f1f5ff;
}

.average-result-card h3 {
    margin: 7px 0;
    color: #17233e;
}

.average-result-card p {
    margin: 0;
    color: #718096;
    font-size: 0.9rem;
}

.average-result-card > strong {
    color: #3159a5;
    font-size: 36px;
    white-space: nowrap;
}

.statistics-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.statistics-breakdown {
    min-width: 0;
    padding: 20px;
    border: 1px solid #edf0f5;
    border-radius: 16px;
}

.statistics-breakdown h3 {
    margin: 0 0 20px;
    color: #17233e;
}

.statistics-row {
    margin-bottom: 18px;
}

.statistics-row:last-child {
    margin-bottom: 0;
}

.statistics-row-heading {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 8px;
}

.statistics-row-heading strong {
    color: #26344d;
    overflow-wrap: anywhere;
}

.statistics-row-heading span {
    color: #718096;
    font-size: 0.85rem;
    white-space: nowrap;
}

.statistics-track {
    height: 9px;
    overflow: hidden;
    border-radius: 20px;
    background: #edf1f7;
}

.statistics-fill {
    height: 100%;
    border-radius: 20px;
    background: linear-gradient(90deg, #3159a5, #7089dc);
}

.statistics-empty {
    color: #718096;
    font-size: 0.9rem;
}

@media (max-width: 950px) {
    .student-stat-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 650px) {
    .statistics-columns {
        grid-template-columns: 1fr;
    }

    .student-statistics {
        padding: 18px;
    }

    .average-result-card {
        align-items: flex-start;
    }

    .average-result-card > strong {
        font-size: 29px;
    }
}

@media (max-width: 420px) {
    .student-stat-cards {
        grid-template-columns: 1fr;
    }

    .statistics-row-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }
}


/* MATURA LIVE CLASSROOM */
.live-page,
.live-room {
    max-width: 1250px;
    margin: 0 auto;
    padding: 45px 24px 70px;
}

.live-heading,
.live-room-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    margin-bottom: 30px;
}

.live-heading h1,
.live-room-header h1 {
    margin: 8px 0;
    color: var(--navy);
    font-size: clamp(28px, 4vw, 38px);
}

.live-heading p,
.live-room-header p {
    color: var(--muted);
    margin: 0;
}

.live-heading-icon {
    width: 66px;
    height: 66px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    background: #e9f0ff;
    color: #315fbd;
    font-size: 30px;
}

.live-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.live-panel {
    min-width: 0;
    padding: 25px;
    background: white;
    border: 1px solid #e7ecf4;
    border-radius: 18px;
    box-shadow: 0 8px 28px rgba(20, 35, 65, 0.04);
}

.live-panel h2 {
    color: var(--navy);
    margin: 0 0 8px;
    font-size: 21px;
}

.live-panel > p {
    color: var(--muted);
    font-size: 14px;
    margin: 0 0 22px;
}

.live-create-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.live-create-form > label,
.live-student-heading label {
    font-size: 13px;
    font-weight: 700;
    color: var(--navy);
}

.live-create-form > input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #dce3ee;
    border-radius: 10px;
    padding: 13px 14px;
    font: inherit;
}

.live-student-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}

.live-student-heading span {
    font-size: 12px;
    color: var(--muted);
}

.live-student-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
    max-height: 320px;
    overflow-y: auto;
}

.live-student-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid #edf0f5;
    border-radius: 11px;
    cursor: pointer;
}

.live-student-option:hover {
    background: #f7f9fd;
}

.live-student-option input {
    accent-color: #315fbd;
    width: 17px;
    height: 17px;
}

.live-student-avatar {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #e9f0ff;
    color: #315fbd;
    font-weight: 700;
}

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

.live-student-info strong {
    color: var(--navy);
    font-size: 13px;
}

.live-student-info small {
    color: var(--muted);
    font-size: 11px;
    overflow-wrap: anywhere;
}

.live-create-form .primary-button {
    margin-top: 8px;
    border: 0;
    cursor: pointer;
}

.live-class-list {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.live-class-card {
    padding: 17px;
    border: 1px solid #e8edf5;
    border-radius: 13px;
}

.live-class-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.live-class-card-top small {
    color: var(--muted);
    font-size: 11px;
}

.live-class-card h3 {
    margin: 13px 0 5px;
    color: var(--navy);
    font-size: 17px;
}

.live-class-card p {
    color: var(--muted);
    font-size: 13px;
    margin: 0 0 14px;
}

.live-class-card .primary-button {
    display: inline-block;
    text-decoration: none;
    border: 0;
    cursor: pointer;
    text-align: center;
}

.live-status {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.live-status-active {
    background: #e3f8ec;
    color: #187344;
}

.live-status-waiting {
    background: #fff3d9;
    color: #92620c;
}

.live-status-ended {
    background: #edf0f4;
    color: #647084;
}

.live-empty {
    padding: 30px 15px;
    text-align: center;
    color: var(--muted);
}

.live-empty h2,
.live-empty h3 {
    color: var(--navy);
}

.live-empty-icon {
    font-size: 35px;
    color: #7894c7;
}

.live-waiting-text {
    color: var(--muted);
    font-size: 13px;
}

.live-room {
    max-width: 1450px;
}

.live-room-header {
    margin-bottom: 20px;
}

.live-room-header p {
    font-size: 13px;
}

#connectionStatus {
    color: #b7791f;
    font-weight: 700;
}

#connectionStatus.connected {
    color: #198754;
}

.live-back-link {
    color: #315fbd;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
}

.whiteboard-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    padding: 13px;
    margin-bottom: 12px;
    background: white;
    border: 1px solid #e4eaf2;
    border-radius: 13px;
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toolbar-group label {
    color: var(--muted);
    font-size: 12px;
}

.board-tool,
.board-clear {
    border: 1px solid #dce3ee;
    background: white;
    color: var(--navy);
    border-radius: 8px;
    padding: 9px 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
}

.board-tool.active {
    background: #e9f0ff;
    border-color: #9bb7ed;
    color: #2456a7;
}

.board-clear {
    background: #fff0f0;
    border-color: #f3cccc;
    color: #a83232;
}

#boardColor {
    width: 38px;
    height: 32px;
    border: 0;
    background: transparent;
    cursor: pointer;
}

#boardWidth {
    width: 90px;
}

.board-information {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: 12px 2px;
    color: var(--muted);
    font-size: 12px;
}

.whiteboard-wrap {
    width: 100%;
    height: min(68vh, 720px);
    min-height: 380px;
    overflow: hidden;
    border: 1px solid #dfe5ee;
    border-radius: 14px;
    background: white;
    box-shadow: 0 8px 28px rgba(20, 35, 65, 0.06);
}

#whiteboard {
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none;
    cursor: crosshair;
}

#whiteboardToolbar[hidden] {
    display: none;
}

.board-message {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 1000;
    max-width: min(420px, calc(100vw - 44px));
    padding: 13px 17px;
    border-radius: 10px;
    background: #17233f;
    color: white;
    font-size: 13px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity .2s, transform .2s;
}

.board-message.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 850px) {
    .live-layout {
        grid-template-columns: 1fr;
    }

    .live-room-header {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 600px) {
    .live-page,
    .live-room {
        padding: 25px 14px 45px;
    }

    .live-heading {
        align-items: flex-start;
    }

    .live-heading-icon {
        width: 48px;
        height: 48px;
        flex: 0 0 48px;
    }

    .live-panel {
        padding: 18px;
    }

    .whiteboard-toolbar {
        gap: 9px;
    }

    .whiteboard-wrap {
        min-height: 330px;
        height: 58vh;
    }

    .board-information {
        flex-direction: column;
    }
}


/* MATURA – élőóra befejezése */
.board-finish {
    border: 1px solid #e7b6b6;
    background: #fff0f0;
    color: #a52d2d;
    border-radius: 8px;
    padding: 9px 13px;
    cursor: pointer;
    font-weight: 700;
    font-size: 12px;
}
.board-finish:hover {
    background: #ffe0e0;
}


/* =====================================================
   MATURA 2026 – ÚJ EGYSÉGES ALKALMAZÁSFELÜLET
===================================================== */

:root {
    --app-sidebar: #172440;
    --app-sidebar-hover: #263958;
    --app-blue: #4269e8;
    --app-blue-light: #edf2ff;
    --app-bg: #f3f6fc;
    --app-border: #e7ebf3;
    --app-text: #192844;
    --app-muted: #8290a8;
}

body.app-body {
    margin: 0;
    min-height: 100vh;
    background: var(--app-bg);
    color: var(--app-text);
    font-family: 'DM Sans', sans-serif;
}

.app-shell {
    min-height: 100vh;
}

.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    width: 258px;
    padding: 25px 17px 18px;
    background: var(--app-sidebar);
    color: #fff;
    overflow-y: auto;
    transition: transform .25s ease;
}

.app-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 2px 8px 26px;
    color: white;
    text-decoration: none;
}

.app-brand-icon {
    display: grid;
    place-items: center;
    width: 43px;
    height: 43px;
    flex-shrink: 0;
    border-radius: 13px;
    background: linear-gradient(135deg, #4568e8, #4dc6d8);
    color: white;
    font-family: Manrope, sans-serif;
    font-size: 23px;
    font-weight: 800;
    box-shadow: 0 6px 18px #4269e844;
}

.app-brand strong,
.app-brand small {
    display: block;
}

.app-brand strong {
    font-family: Manrope, sans-serif;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: 1px;
}

.app-brand small {
    margin-top: 3px;
    color: #91a2c1;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.2px;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 15px 11px;
    margin-bottom: 20px;
    border: 1px solid #ffffff13;
    border-radius: 13px;
    background: #ffffff09;
}

.sidebar-avatar,
.topbar-avatar {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 39px;
    height: 39px;
    border-radius: 12px;
    background: linear-gradient(135deg, #4568e8, #53b9d8);
    color: white;
    font-weight: 800;
}

.sidebar-user-info {
    min-width: 0;
}

.sidebar-user-info strong,
.sidebar-user-info span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user-info strong {
    color: white;
    font-size: 12px;
}

.sidebar-user-info span {
    margin-top: 4px;
    color: #9baac4;
    font-size: 11px;
}

.sidebar-label {
    padding: 15px 11px 8px;
    color: #7f91b2;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.app-navigation {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.app-nav-link,
.app-logout {
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 10px;
    color: #b7c4da;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    transition: background .18s, color .18s;
}

.app-nav-link:hover {
    background: var(--app-sidebar-hover);
    color: white;
}

.app-nav-link.active {
    background: linear-gradient(100deg, #4269e8, #5079e9);
    color: white;
    box-shadow: 0 5px 15px #4269e83b;
}

.nav-icon {
    display: grid;
    place-items: center;
    width: 23px;
    flex: 0 0 23px;
    font-size: 20px;
    line-height: 1;
}

.sidebar-bottom {
    margin-top: auto;
    padding-top: 22px;
}

.sidebar-bottom-line {
    height: 1px;
    margin: 0 8px 13px;
    background: #ffffff18;
}

.app-logout {
    color: #c3cde0;
}

.app-logout:hover {
    background: #ffffff12;
    color: white;
}

.sidebar-version {
    padding: 15px 12px 0;
    color: #7284a5;
    font-size: 10px;
    letter-spacing: .5px;
}

.app-main {
    min-height: 100vh;
    margin-left: 258px;
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
    padding: 0 38px;
    background: rgba(255,255,255,.94);
    border-bottom: 1px solid var(--app-border);
    backdrop-filter: blur(12px);
}

.topbar-context {
    display: flex;
    align-items: center;
    gap: 11px;
    font-size: 12px;
}

.topbar-context-label {
    color: #9aa6ba;
    font-weight: 700;
    letter-spacing: 1px;
}

.topbar-context-separator {
    color: #c6cedb;
}

.topbar-context-current {
    color: #34435e;
    font-weight: 700;
}

.topbar-account {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-account-info {
    text-align: right;
}

.topbar-account-info strong,
.topbar-account-info span {
    display: block;
}

.topbar-account-info strong {
    color: var(--app-text);
    font-size: 12px;
}

.topbar-account-info span {
    margin-top: 3px;
    color: var(--app-muted);
    font-size: 11px;
}

.topbar-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
}

.app-content {
    width: 100%;
    min-width: 0;
    padding: 1px 0 45px;
}

.app-content .base-messages {
    max-width: 1400px;
    margin: 18px auto 0;
    padding: 0 35px;
}

.mobile-menu-button {
    display: none;
    width: 40px;
    height: 40px;
    padding: 9px;
    border: 1px solid var(--app-border);
    border-radius: 10px;
    background: white;
    cursor: pointer;
}

.mobile-menu-button span {
    display: block;
    height: 2px;
    margin: 4px 0;
    border-radius: 2px;
    background: #263653;
}

.sidebar-overlay {
    display: none;
}

body.app-body .notice {
    border-radius: 11px;
}

body.app-body button,
body.app-body input,
body.app-body select,
body.app-body textarea {
    font-family: inherit;
}

@media (max-width: 1050px) {
    .app-sidebar {
        width: 235px;
    }

    .app-main {
        margin-left: 235px;
    }

    .app-topbar {
        padding: 0 25px;
    }
}

@media (max-width: 760px) {
    .app-sidebar {
        width: 270px;
        transform: translateX(-100%);
        box-shadow: 15px 0 45px #101d3a30;
    }

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

    .app-main {
        margin-left: 0;
    }

    .app-topbar {
        height: 66px;
        padding: 0 15px;
        gap: 12px;
    }

    .mobile-menu-button {
        display: block;
        flex-shrink: 0;
    }

    .sidebar-overlay.is-visible {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 900;
        width: 100%;
        height: 100%;
        border: 0;
        background: #101d3a70;
    }

    .topbar-context {
        margin-right: auto;
        gap: 6px;
        font-size: 10px;
    }

    .topbar-account {
        gap: 7px;
    }

    .topbar-account-info strong {
        max-width: 105px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 11px;
    }

    .topbar-account-info span {
        font-size: 10px;
    }

    .topbar-avatar {
        width: 34px;
        height: 34px;
    }

    .app-content .base-messages {
        padding: 0 15px;
    }
}

@media (max-width: 390px) {
    .topbar-context-label,
    .topbar-context-separator {
        display: none;
    }

    .topbar-account-info {
        display: none;
    }
}
