:root {
    --qpt-navy: #10233f;
    --qpt-navy-deep: #081b36;
    --qpt-gold: #f4b942;
    --qpt-gold-hover: #e7a91f;
    --qpt-bg: #f5f7fa;
    --qpt-card: #ffffff;
    --qpt-text: #10233f;
    --qpt-muted: #617087;
    --qpt-border: #dce3ec;
    --qpt-success: #38a844;
    --qpt-danger: #b42318;
    --qpt-radius: 15px;
    --qpt-shadow: 0 8px 24px rgba(16, 35, 63, .055);
}

body.questpass-teacher-page {
    background: var(--qpt-bg);
    overflow-x: hidden;
}
body.questpass-teacher-page .site-header,
body.questpass-teacher-page .main-navigation,
body.questpass-teacher-page .site-footer,
body.questpass-teacher-page .entry-header,
body.questpass-teacher-page .wp-block-post-title,
body.questpass-teacher-page .wp-site-blocks > header,
body.questpass-teacher-page .wp-site-blocks > footer,
body.questpass-teacher-page header.wp-block-template-part,
body.questpass-teacher-page footer.wp-block-template-part {
    display: none !important;
}
body.questpass-teacher-page #page,
body.questpass-teacher-page .site-content,
body.questpass-teacher-page .content-area,
body.questpass-teacher-page .site-main,
body.questpass-teacher-page .inside-article,
body.questpass-teacher-page .entry-content {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}
body.questpass-teacher-page .wp-site-blocks,
body.questpass-teacher-page .wp-site-blocks > main,
body.questpass-teacher-page main.wp-block-group,
body.questpass-teacher-page .wp-block-post-content {
    width: 100%;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
body.questpass-teacher-page .wp-site-blocks > *,
body.questpass-teacher-page .wp-site-blocks main,
body.questpass-teacher-page .wp-site-blocks article,
body.questpass-teacher-page .wp-site-blocks .wp-block-group,
body.questpass-teacher-page .wp-site-blocks .wp-block-post-content {
    margin-block-start: 0 !important;
    padding-block-start: 0 !important;
}

.qpt-app,
.qpt-app *,
.qpt-app *::before,
.qpt-app *::after {
    box-sizing: border-box;
}
.qpt-app {
    position: relative;
    width: 100vw;
    max-width: none !important;
    min-height: 100vh;
    margin-left: calc(50% - 50vw);
    background: var(--qpt-bg);
    color: var(--qpt-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

/* Tanári belépés */
.qpt-login-app {
    display: grid;
    min-height: 100vh;
    overflow: hidden;
    background:
        radial-gradient(circle at 14% 18%, rgba(244, 185, 66, .18), transparent 28rem),
        radial-gradient(circle at 88% 82%, rgba(20, 170, 189, .13), transparent 27rem),
        linear-gradient(145deg, #f7f9fc 0%, #eef3f8 100%);
}
.qpt-login-shell {
    display: grid;
    width: 100%;
    min-height: 100vh;
    place-items: center;
    padding: 48px 20px;
}
.qpt-login-card {
    position: relative;
    width: min(100%, 490px);
    padding: 43px 48px 34px;
    overflow: hidden;
    border: 1px solid rgba(8, 27, 54, .09);
    border-radius: 24px;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 24px 65px rgba(8, 27, 54, .15);
    text-align: center;
}
.qpt-login-card::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 5px;
    background: linear-gradient(90deg, #d99b25, var(--qpt-gold), #14aabd);
    content: "";
}
.qpt-login-brand {
    display: flex;
    justify-content: center;
    margin: 0 auto 27px;
}
.qpt-login-brand img {
    display: block;
    width: min(100%, 240px);
    height: auto;
}
.qpt-login-kicker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    margin-bottom: 14px;
    padding: 5px 13px;
    border-radius: 999px;
    background: #edf8fa;
    color: #147284;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.qpt-login-card h1 {
    margin: 0 0 9px;
    color: var(--qpt-navy-deep);
    font-size: 30px;
    line-height: 1.15;
    letter-spacing: -.03em;
}
.qpt-login-intro {
    margin: 0 auto 27px;
    color: var(--qpt-muted);
    font-size: 15px;
}
#qpt-teacher-login-form {
    margin: 0;
    text-align: left;
}
#qpt-teacher-login-form p {
    margin: 0 0 18px;
}
#qpt-teacher-login-form label {
    display: block;
    color: #253b59;
    font-size: 14px;
    font-weight: 750;
}
#qpt-teacher-login-form .input {
    display: block;
    width: 100%;
    min-height: 51px;
    margin-top: 8px;
    padding: 12px 14px;
    border: 1px solid #cad5e2;
    border-radius: 11px;
    outline: 0;
    background: #f9fbfd;
    color: var(--qpt-text);
    font: inherit;
    box-shadow: none;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
#qpt-teacher-login-form .input:hover {
    border-color: #aab9ca;
    background: #fff;
}
#qpt-teacher-login-form .input:focus {
    border-color: #d99b25;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(244, 185, 66, .18);
}
#qpt-teacher-login-form .login-remember {
    margin: -2px 0 19px;
}
#qpt-teacher-login-form .login-remember label {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #52657d;
    font-weight: 650;
    cursor: pointer;
}
#qpt-teacher-login-form .login-remember input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #d99b25;
}
#qpt-teacher-login-form .login-submit {
    margin-bottom: 0;
}
#qpt-teacher-login-form .button-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 51px;
    padding: 12px 20px;
    border: 1px solid #e0a62f;
    border-radius: 11px;
    background: linear-gradient(135deg, #f6c75d, #e7aa34);
    box-shadow: 0 9px 20px rgba(217, 150, 24, .24);
    color: var(--qpt-navy-deep);
    font: inherit;
    font-size: 15px;
    font-weight: 850;
    line-height: 1.2;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
#qpt-teacher-login-form .button-primary:hover {
    filter: brightness(1.035);
    transform: translateY(-1px);
    box-shadow: 0 12px 25px rgba(217, 150, 24, .31);
}
#qpt-teacher-login-form .button-primary:focus-visible {
    outline: 3px solid rgba(20, 170, 189, .28);
    outline-offset: 3px;
}
.qpt-login-links {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 22px;
    font-size: 13px;
}
.qpt-login-links a {
    color: #1b6680;
    font-weight: 700;
    text-decoration: none;
}
.qpt-login-links a:hover {
    color: #c78008;
    text-decoration: underline;
}
.qpt-login-security {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 29px;
    padding-top: 18px;
    border-top: 1px solid #e7ecf2;
    color: #8290a3;
    font-size: 12px;
    font-weight: 650;
}
.qpt-login-security .qpt-icon {
    width: 15px;
    height: 15px;
}
.qpt-icon {
    display: block;
    width: 24px;
    height: 24px;
}
.qpt-inline-icon {
    display: inline-flex;
    margin-left: 5px;
    color: var(--qpt-muted);
    vertical-align: middle;
}
.qpt-inline-icon .qpt-icon {
    width: 15px;
    height: 15px;
}

.qpt-topbar {
    position: relative;
    z-index: 100;
    display: grid;
    grid-template-columns: 225px minmax(0, 1fr) auto;
    align-items: stretch;
    min-height: 72px;
    padding: 0 34px;
    background: var(--qpt-navy-deep);
    color: #fff;
    box-shadow: 0 3px 16px rgba(7, 25, 51, .18);
}
.qpt-brand {
    display: flex;
    align-items: center;
    width: 190px;
    padding: 12px 0;
    text-decoration: none;
}
.qpt-brand img {
    display: block;
    width: 100%;
    height: 46px;
    object-fit: contain;
    object-position: left center;
}
.qpt-nav {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 14px;
}
.qpt-nav a {
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 13px;
    color: rgba(255, 255, 255, .88);
    font-size: 15px;
    font-weight: 650;
    text-decoration: none;
    transition: color .16s ease;
}
.qpt-nav a::after {
    content: "";
    position: absolute;
    right: 12px;
    bottom: 0;
    left: 12px;
    height: 4px;
    border-radius: 4px 4px 0 0;
    background: transparent;
}
.qpt-nav a:hover,
.qpt-nav a.active {
    color: var(--qpt-gold);
}
.qpt-nav a.active::after {
    background: var(--qpt-gold);
}
.qpt-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 20px;
}
.qpt-avatar,
.qpt-avatar img {
    display: block;
    width: 38px;
    height: 38px;
    border-radius: 50%;
}
.qpt-avatar img {
    border: 2px solid rgba(255, 255, 255, .22);
    object-fit: cover;
}
.qpt-user-name {
    max-width: 150px;
    overflow: hidden;
    color: #fff;
    font-size: 14px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.qpt-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-left: 3px;
    border-radius: 10px;
    color: #fff !important;
    text-decoration: none;
    transition: color .16s ease, background .16s ease;
}
.qpt-logout:hover {
    background: rgba(255, 255, 255, .09);
    color: var(--qpt-gold) !important;
}
.qpt-menu-toggle {
    display: none;
}
.qpt-mobile-overlay {
    display: none;
}

.qpt-wrap {
    width: min(100% - 48px, 1460px);
    margin: 0 auto;
    padding: 42px 0 56px;
}
.qpt-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}
.qpt-header h1 {
    margin: 0 0 4px;
    color: var(--qpt-navy);
    font-size: clamp(30px, 3vw, 42px);
    line-height: 1.15;
    letter-spacing: -.035em;
}
.qpt-header p {
    margin: 0;
    color: var(--qpt-muted);
    font-size: 17px;
}
.qpt-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.qpt-passport {
    min-width: 210px;
    margin: 0;
}
.qpt-passport select {
    width: 100%;
    min-height: 45px;
    padding: 10px 38px 10px 13px;
    border: 1px solid var(--qpt-border);
    border-radius: 10px;
    background: #fff;
    color: var(--qpt-text);
    font: inherit;
    font-weight: 650;
}

.qpt-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 22px;
}
.qpt-card {
    display: flex;
    min-height: 220px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 18px;
    border: 1px solid var(--qpt-border);
    border-radius: var(--qpt-radius);
    background: var(--qpt-card);
    box-shadow: var(--qpt-shadow);
    color: var(--qpt-text);
    text-align: center;
    text-decoration: none;
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.qpt-card:hover {
    transform: translateY(-3px);
    border-color: #bac6d5;
    box-shadow: 0 14px 30px rgba(16, 35, 63, .09);
}
.qpt-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    margin-bottom: 15px;
    color: var(--qpt-navy);
}
.qpt-card-icon .qpt-icon {
    width: 58px;
    height: 58px;
    stroke-width: 1.35;
}
.qpt-card-label {
    color: #30435e;
    font-size: 18px;
}
.qpt-number {
    display: block;
    margin-top: 8px;
    color: var(--qpt-navy);
    font-size: 43px;
    line-height: 1;
    letter-spacing: -.04em;
}

.qpt-overview-panels {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(360px, 1fr);
    gap: 22px;
}
.qpt-section {
    min-width: 0;
    margin: 0 0 20px;
    padding: 24px;
    overflow: hidden;
    border: 1px solid var(--qpt-border);
    border-radius: var(--qpt-radius);
    background: var(--qpt-card);
    box-shadow: var(--qpt-shadow);
}
.qpt-section > h2:first-child {
    margin: -24px -24px 22px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--qpt-border);
}
.qpt-section h2 {
    color: var(--qpt-navy);
    font-size: 21px;
    letter-spacing: -.015em;
}
.qpt-section h3 {
    margin: 22px 0 10px;
    color: var(--qpt-navy);
}
.qpt-task-content {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    align-items: center;
    min-height: 220px;
    gap: 24px;
}
.qpt-task-content h3 {
    margin-top: 0;
    font-size: 22px;
}
.qpt-task-content p {
    max-width: 560px;
    color: var(--qpt-muted);
}
.qpt-task-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #91a0b3;
}
.qpt-task-icon .qpt-icon {
    width: 110px;
    height: 110px;
    stroke-width: 1.2;
}
.qpt-activity-list {
    display: grid;
}
.qpt-activity-item {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid #e4e9f0;
}
.qpt-activity-item:last-child {
    border-bottom: 0;
}
.qpt-activity-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 2px solid #2468d6;
    border-radius: 50%;
    color: #2468d6;
}
.qpt-activity-icon .qpt-icon {
    width: 20px;
    height: 20px;
}
.qpt-activity-review {
    border-color: var(--qpt-success);
    background: var(--qpt-success);
    color: #fff;
}
.qpt-activity-copy {
    display: grid;
    min-width: 0;
}
.qpt-activity-copy strong,
.qpt-activity-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.qpt-activity-copy small,
.qpt-activity-item time,
.qpt-activity-empty {
    color: var(--qpt-muted);
    font-size: 13px;
}
.qpt-activity-item time {
    white-space: nowrap;
}
.qpt-activity-empty {
    padding: 34px 0;
    text-align: center;
}

.qpt-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 43px;
    padding: 10px 16px;
    border: 0;
    border-radius: 10px;
    background: var(--qpt-navy);
    color: #fff !important;
    font: inherit;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
    box-shadow: none;
    transition: transform .16s ease, background .16s ease;
}
.qpt-button:hover {
    transform: translateY(-1px);
    background: #17355e;
}
.qpt-button-primary {
    min-height: 48px;
    padding: 12px 20px;
    background: var(--qpt-gold);
    color: var(--qpt-navy) !important;
}
.qpt-button-primary:hover {
    background: var(--qpt-gold-hover);
}
.qpt-button .qpt-icon {
    width: 20px;
    height: 20px;
}
.qpt-button-secondary {
    border: 1px solid var(--qpt-border);
    background: #f2f5f8;
    color: #344054 !important;
}
.qpt-button-secondary:hover {
    background: #e8edf3;
}

.qpt-mission-actions-cell { min-width: 290px; }
.qpt-mission-actions { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.qpt-mission-actions form { display: inline-flex !important; margin: 0; }
.qpt-mission-actions .qpt-button { min-height: 38px; padding: 9px 12px; white-space: nowrap; }
.qpt-mission-edit { background: linear-gradient(135deg, #174f78, #0d7180); }
.qpt-mission-delete { color: #9c302a !important; background: #fff1ef; box-shadow: none; }
.qpt-mission-delete:hover { color: #fff !important; background: #bd3d34; }

@media (max-width: 800px) {
  .qpt-mission-actions-cell { min-width: 0; }
  .qpt-mission-actions, .qpt-mission-actions form { display: flex !important; width: 100%; }
  .qpt-mission-actions .qpt-button { width: 100%; }
}
.qpt-muted {
    color: var(--qpt-muted);
    overflow-wrap: anywhere;
}
.qpt-badge {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 999px;
    background: #eef2f6;
    font-size: 12px;
    font-weight: 750;
}
.qpt-badge-waiting { background: #fff4d6; color: #845b00; }
.qpt-badge-done { background: #e7f7eb; color: #176b3a; }
.qpt-badge-fix { background: #fff0f0; color: #a32626; }
.qpt-notice {
    margin: 0 0 18px;
    padding: 14px 17px;
    border: 1px solid transparent;
    border-radius: 11px;
}
.qpt-notice-success { border-color: #bce6c7; background: #ebf9ef; color: #176b3a; }
.qpt-notice-warning { border-color: #ead38b; background: #fff8e5; color: #765200; }
.qpt-notice-error { border-color: #f0c2be; background: #fff0ef; color: var(--qpt-danger); }
.qpt-credentials {
    margin-bottom: 20px;
    padding: 18px;
    border: 2px solid #8bd3a2;
    border-radius: 13px;
    background: #f1fcf5;
}

.qpt-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
}
.qpt-field {
    min-width: 0;
}
.qpt-field label {
    display: block;
    margin-bottom: 7px;
    font-weight: 750;
}
.qpt-field input,
.qpt-field select,
.qpt-field textarea,
.qpt-section textarea,
.qpt-section input[type="text"],
.qpt-section input[type="email"],
.qpt-section input[type="number"],
.qpt-section input[type="datetime-local"] {
    width: 100%;
    max-width: 100%;
    padding: 11px 13px;
    border: 1px solid #ccd5e1;
    border-radius: 9px;
    background: #fff;
    color: var(--qpt-text);
    font: inherit;
}
.qpt-field input:focus,
.qpt-field select:focus,
.qpt-field textarea:focus,
.qpt-section textarea:focus {
    outline: 0;
    border-color: var(--qpt-gold);
    box-shadow: 0 0 0 3px rgba(244, 185, 66, .22);
}
.qpt-student-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
}
.qpt-check {
    display: flex;
    min-width: 0;
    align-items: flex-start;
    gap: 11px;
    padding: 13px;
    border: 1px solid var(--qpt-border);
    border-radius: 10px;
    background: #fff;
}
.qpt-check > span {
    min-width: 0;
    overflow-wrap: anywhere;
}
.qpt-empty {
    padding: 32px;
    border: 1px dashed #cbd5e1;
    border-radius: 11px;
    background: #f8fafc;
    color: var(--qpt-muted);
    text-align: center;
}

.qpt-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}
.qpt-table th,
.qpt-table td {
    min-width: 0;
    padding: 13px 14px;
    border-bottom: 1px solid #e8edf3;
    text-align: left;
    vertical-align: middle;
    overflow-wrap: anywhere;
}
.qpt-table th {
    background: #f6f8fb;
    color: var(--qpt-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.qpt-table tbody tr:hover {
    background: #fafbfd;
}
.qpt-category-table .qpt-category-name {
    width: 100%;
}
.qpt-category-table .qpt-category-type,
.qpt-category-table .qpt-category-status,
.qpt-category-table .qpt-category-actions,
.qpt-category-table .qpt-category-action-list,
.qpt-category-table .qpt-category-action-list form,
.qpt-category-table .qpt-badge,
.qpt-category-table .qpt-button {
    white-space: nowrap;
}
.qpt-category-table th.qpt-category-type,
.qpt-category-table th.qpt-category-status,
.qpt-category-table th.qpt-category-actions {
    overflow-wrap: normal;
    word-break: keep-all;
}
.qpt-category-table .qpt-category-type {
    min-width: 78px;
}
.qpt-category-table .qpt-category-status {
    min-width: 82px;
}
.qpt-category-table .qpt-category-actions {
    min-width: 286px;
}
.qpt-category-action-list {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
}
.qpt-category-action-list form {
    display: inline-flex !important;
    margin: 0;
}
.qpt-category-action-list .qpt-button {
    width: auto;
    margin: 0;
}
.qpt-category-action-list .qpt-category-edit {
    border: 1px solid #8fa0b7;
    background: #edf1f6;
    color: var(--qpt-navy) !important;
}
.qpt-category-action-list .qpt-category-edit:hover {
    border-color: var(--qpt-navy);
    background: var(--qpt-navy);
    color: #fff !important;
}
.qpt-category-action-list .qpt-category-disable {
    border: 1px solid #d9aa47;
    background: #fff6df;
    color: #7a5611 !important;
}
.qpt-category-action-list .qpt-category-disable:hover {
    border-color: var(--qpt-gold-hover);
    background: var(--qpt-gold);
    color: var(--qpt-navy-deep) !important;
}
.qpt-category-action-list .qpt-category-enable {
    border: 1px solid #7fac86;
    background: #edf7ef;
    color: #276633 !important;
}
.qpt-category-action-list .qpt-category-enable:hover {
    border-color: #3f8650;
    background: #3f8650;
    color: #fff !important;
}
.qpt-category-action-list .qpt-category-delete {
    border: 1px solid #d39b95;
    background: #fbedeb;
    color: #8f3028 !important;
}
.qpt-category-action-list .qpt-category-delete:hover {
    border-color: var(--qpt-danger);
    background: var(--qpt-danger);
    color: #fff !important;
}
.qpt-review-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 240px));
    gap: 14px;
    margin: 18px 0;
}
.qpt-review-images a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 180px;
    padding: 8px;
    border: 1px solid var(--qpt-border);
    border-radius: 11px;
    background: #f6f7f9;
}
.qpt-review-image {
    display: grid;
    gap: 8px;
    min-width: 0;
}
.qpt-review-image label {
    color: var(--qpt-navy);
    font-size: 13px;
    font-weight: 750;
}
.qpt-review-image textarea {
    width: 100%;
    min-height: 96px;
    box-sizing: border-box;
    padding: 10px 11px;
    border: 1px solid var(--qpt-border);
    border-radius: 10px;
    resize: vertical;
}
.qpt-review-images img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.qpt-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.qpt-gallery-item {
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--qpt-border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 7px 20px rgba(31, 41, 55, .07);
}

.qpt-gallery-item a { display: block; background: #f4f5f8; }
.qpt-gallery-item img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .2s ease; }
.qpt-gallery-item a:hover img { transform: scale(1.025); }
.qpt-gallery-item figcaption { padding: 11px 13px; color: var(--qpt-muted); font-size: 13px; font-weight: 700; }
.qpt-gallery-comments {
  margin: 0 11px 11px;
  padding: 10px;
  border: 1px solid var(--qpt-border);
  border-radius: 10px;
  background: #f8f9fb;
}
.qpt-gallery-comments-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  color: #26344a;
  font-size: 12px;
}
.qpt-gallery-comments-heading span {
  min-width: 22px;
  padding: 2px 6px;
  border-radius: 999px;
  color: #285f9b;
  background: #e9f2fc;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}
.qpt-gallery-comments-empty {
  margin: 0;
  color: var(--qpt-muted);
  font-size: 11px;
}
.qpt-gallery-comment-list {
  display: grid;
  gap: 9px;
  max-height: 250px;
  overflow-y: auto;
}
.qpt-gallery-comment {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 8px;
}
.qpt-gallery-comment-avatar {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--qpt-border);
  border-radius: 50%;
  color: #26344a;
  background: #fff;
  font-size: 12px;
  font-weight: 900;
  overflow: hidden;
}
.qpt-gallery-comment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.qpt-gallery-comment-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 3px 7px;
}
.qpt-gallery-comment-meta strong { color: #26344a; font-size: 11px; }
.qpt-gallery-comment-meta time { color: var(--qpt-muted); font-size: 9px; }
.qpt-gallery-comment p {
  margin: 3px 0;
  color: #43516a;
  font-size: 11px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.qpt-gallery-comment form { margin: 0; }
.qpt-gallery-comment button {
  padding: 0;
  border: 0;
  color: #a22e27;
  background: transparent;
  font: inherit;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}
.qpt-gallery-delete { padding: 0 11px 11px; }
.qpt-gallery-delete-button {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid #e8b8b3;
  border-radius: 9px;
  color: #a22e27;
  background: #fff5f4;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: color .16s ease, background .16s ease, border-color .16s ease;
}
.qpt-gallery-delete-button:hover,
.qpt-gallery-delete-button:focus {
  border-color: #bd3d34;
  color: #fff;
  background: #bd3d34;
  outline: none;
}
.qpt-reflection {
    padding: 15px;
    border-radius: 10px;
    background: #f6f8fb;
    overflow-wrap: anywhere;
}
.qpt-criterion {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 15px 0;
    border-bottom: 1px solid #e8edf3;
}
.qpt-stars {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
}
.qpt-stars input {
    position: absolute;
    opacity: 0;
}
.qpt-stars label {
    color: #c3c8d0;
    font-size: 30px;
    cursor: pointer;
}
.qpt-stars input:checked ~ label,
.qpt-stars label:hover,
.qpt-stars label:hover ~ label {
    color: var(--qpt-gold);
}
.qpt-xp-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 18px 0;
    padding: 17px;
    border-left: 4px solid var(--qpt-gold);
    border-radius: 0 10px 10px 0;
    background: #fff9e9;
}

.qpt-grade-preview {
    display: grid;
    gap: 2px;
    min-width: 220px;
    padding: 10px 14px;
    border: 1px solid rgba(217, 150, 24, .28);
    border-radius: 10px;
    background: #fff;
}

.qpt-grade-preview span {
    color: var(--qpt-muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.qpt-grade-preview strong {
    color: var(--qpt-navy);
    font-size: 19px;
}

.qpt-grade-preview small {
    color: var(--qpt-muted);
    font-size: 12px;
}
.qpt-grade-approval {
    display: grid;
    grid-template-columns: minmax(220px, 320px) minmax(280px, 1fr);
    gap: 16px;
    align-items: end;
    margin: 18px 0 24px;
    padding: 17px;
    border: 1px solid var(--qpt-border);
    border-radius: 12px;
    background: #f8f9fc;
}
.qpt-grade-publish {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 13px;
    border: 1px solid #cad8ed;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
}
.qpt-grade-publish input { margin-top: 3px; }
.qpt-grade-publish span { display: grid; gap: 3px; }
.qpt-grade-publish small { color: var(--qpt-muted); font-weight: 400; }

.qpt-grade {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 999px;
    background: #eef3f8;
    color: var(--qpt-navy);
    font-size: 12px;
    font-weight: 850;
    white-space: nowrap;
}

.qpt-grade-1 { color: #9b2c2c; background: #fff0f0; }
.qpt-grade-2 { color: #8a4b08; background: #fff5e5; }
.qpt-grade-3 { color: #775d00; background: #fff9d9; }
.qpt-grade-4 { color: #176b3a; background: #eaf8ef; }
.qpt-grade-5 { color: #075d68; background: #e5f8fa; }

.qpt-media-field {
    display: grid;
    grid-template-columns: minmax(190px, 1fr) auto;
    gap: 7px;
    align-items: center;
}

.qpt-media-field .qpt-button {
    min-height: 42px;
    padding: 8px 11px;
    box-shadow: none;
}

.qpt-remove-image {
    justify-self: start;
    padding: 0;
    border: 0;
    color: #b42318;
    background: transparent;
    cursor: pointer;
}

.qpt-media-preview {
    grid-column: 1 / -1;
    width: 82px;
    height: 82px;
    padding: 5px;
    border: 1px solid var(--qpt-border);
    border-radius: 11px;
    background: #fff;
    object-fit: contain;
}

.qpt-media-field-compact {
    min-width: 280px;
}

.qpt-media-field-compact .qpt-media-preview {
    width: 62px;
    height: 62px;
}

.qpt-mission-cover-field {
    grid-template-columns: auto auto minmax(0, 1fr);
    justify-content: start;
    padding: 14px;
    border: 1px dashed #c6d1df;
    border-radius: 13px;
    background: #f8fafc;
}

.qpt-mission-cover-preview {
    grid-column: 1 / -1;
    width: min(100%, 520px);
    height: auto;
    aspect-ratio: 16 / 9;
    padding: 0;
    object-fit: cover;
}

.qpt-media-help {
    grid-column: 1 / -1;
    margin: 3px 0 0;
    color: var(--qpt-muted);
    font-size: 13px;
}

@media (max-width: 1180px) {
    .qpt-topbar {
        grid-template-columns: 180px minmax(0, 1fr) auto;
        padding: 0 22px;
    }
    .qpt-brand { width: 165px; }
    .qpt-nav { gap: 2px; }
    .qpt-nav a { padding: 0 10px; font-size: 14px; }
    .qpt-user-name { display: none; }
    .qpt-grid { gap: 14px; }
    .qpt-card { min-height: 195px; }
}

@media (max-width: 900px) {
    body.qpt-menu-open { overflow: hidden; }
    .qpt-topbar {
        display: flex;
        min-height: 66px;
        align-items: center;
        justify-content: space-between;
        padding: 0 16px;
    }
    .qpt-brand { width: 165px; padding: 8px 0; }
    .qpt-menu-toggle {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        order: 3;
        min-height: 42px;
        padding: 8px 11px;
        border: 1px solid rgba(255,255,255,.18);
        border-radius: 9px;
        background: transparent;
        color: #fff;
        font: inherit;
        font-weight: 700;
        cursor: pointer;
    }
    .qpt-menu-toggle .qpt-icon { width: 21px; height: 21px; }
    .qpt-user { margin-left: auto; padding: 0 10px; }
    .qpt-avatar { display: none; }
    .qpt-logout { width: 38px; height: 38px; }
    .qpt-nav {
        position: fixed;
        z-index: 1002;
        top: 0;
        right: 0;
        bottom: 0;
        display: flex;
        width: min(84vw, 330px);
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 2px;
        padding: 82px 18px 24px;
        background: var(--qpt-navy-deep);
        box-shadow: -16px 0 40px rgba(0,0,0,.22);
        transform: translateX(105%);
        transition: transform .22s ease;
    }
    .qpt-nav.is-open { transform: translateX(0); }
    .qpt-nav a {
        min-height: 48px;
        padding: 0 14px;
        border-radius: 8px;
        font-size: 16px;
    }
    .qpt-nav a::after { display: none; }
    .qpt-nav a.active { background: rgba(244,185,66,.12); }
    .qpt-mobile-overlay {
        position: fixed;
        z-index: 1001;
        inset: 0;
        display: block;
        background: rgba(4, 16, 32, .58);
    }
    .qpt-mobile-overlay[hidden] { display: none; }
    .qpt-wrap {
        width: min(100% - 28px, 760px);
        padding: 28px 0 42px;
    }
    .qpt-header {
        align-items: flex-start;
        flex-direction: column;
        margin-bottom: 22px;
    }
    .qpt-header-actions {
        width: 100%;
        flex-wrap: wrap;
    }
    .qpt-passport { flex: 1 1 220px; }
    .qpt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .qpt-overview-panels { grid-template-columns: 1fr; }
    .qpt-task-content { grid-template-columns: 125px minmax(0, 1fr); }
    .qpt-task-icon .qpt-icon { width: 85px; height: 85px; }
    .qpt-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .qpt-login-shell {
        min-height: 100svh;
        padding: 22px 14px;
    }
    .qpt-login-card {
        padding: 34px 22px 28px;
        border-radius: 19px;
    }
    .qpt-login-brand {
        margin-bottom: 23px;
    }
    .qpt-login-brand img {
        width: min(100%, 215px);
    }
    .qpt-login-card h1 {
        font-size: 27px;
    }
    .qpt-login-links {
        align-items: flex-start;
        flex-direction: column;
        gap: 9px;
    }
    .qpt-mission-cover-field {
        grid-template-columns: 1fr;
    }
    .qpt-mission-cover-field .qpt-button {
        width: 100%;
    }
    .qpt-mission-cover-field .qpt-remove-image {
        padding: 6px 0;
    }
    .qpt-brand { width: 142px; }
    .qpt-menu-toggle span { display: none; }
    .qpt-user { padding: 0 5px; }
    .qpt-header h1 { font-size: 30px; }
    .qpt-header p { font-size: 15px; }
    .qpt-header-actions,
    .qpt-header-actions .qpt-button,
    .qpt-passport {
        width: 100%;
    }
    .qpt-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .qpt-card { min-height: 165px; padding: 17px 10px; }
    .qpt-card-icon { width: 48px; height: 48px; margin-bottom: 10px; }
    .qpt-card-icon .qpt-icon { width: 44px; height: 44px; }
    .qpt-card-label { font-size: 14px; }
    .qpt-number { font-size: 34px; }
    .qpt-section { padding: 17px; }
    .qpt-section > h2:first-child {
        margin: -17px -17px 18px;
        padding: 15px 17px;
    }
    .qpt-task-content {
        display: block;
        min-height: 0;
        text-align: center;
    }
    .qpt-task-icon { margin-bottom: 12px; }
    .qpt-task-icon .qpt-icon { width: 70px; height: 70px; }
    .qpt-activity-item {
        grid-template-columns: 38px minmax(0, 1fr);
    }
    .qpt-activity-item time {
        grid-column: 2;
    }
    .qpt-form-grid,
    .qpt-student-grid {
        grid-template-columns: 1fr;
    }
    .qpt-button {
        width: 100%;
        margin: 4px 0;
    }
    .qpt-section form[style*="display:inline"] {
        display: block !important;
    }
    .qpt-criterion,
    .qpt-xp-box {
        align-items: stretch;
        flex-direction: column;
    }
    .qpt-review-images,
    .qpt-grade-approval { grid-template-columns: 1fr; }
    .qpt-table,
    .qpt-table thead,
    .qpt-table tbody,
    .qpt-table tr,
    .qpt-table th,
    .qpt-table td {
        display: block;
        width: 100%;
    }
    .qpt-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }
    .qpt-table tbody {
        display: grid;
        gap: 12px;
    }
    .qpt-table tbody tr {
        padding: 13px;
        border: 1px solid var(--qpt-border);
        border-radius: 11px;
        background: #fff;
    }
    .qpt-table td {
        display: grid;
        grid-template-columns: minmax(100px, 38%) minmax(0, 1fr);
        gap: 10px;
        padding: 8px 0;
        border: 0;
    }
    .qpt-table td::before {
        content: attr(data-label);
        color: var(--qpt-muted);
        font-size: 11px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: .03em;
    }
    .qpt-table td:empty { display: none; }
    .qpt-category-table .qpt-category-name,
    .qpt-category-table .qpt-category-type,
    .qpt-category-table .qpt-category-status,
    .qpt-category-table .qpt-category-actions {
        width: 100%;
        min-width: 0;
    }
    .qpt-category-action-list {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    .qpt-category-action-list .qpt-button {
        width: auto;
    }
}
