.ae-panel {
    --ae-ink: #172433;
    --ae-muted: #667085;
    --ae-line: #d9e0e8;
    --ae-bg: #f5f7fa;
    --ae-card: #ffffff;
    --ae-accent: #2271b1;
    --ae-accent-dark: #155d91;
    --ae-good: #128a4a;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    width: calc(100vw - 48px);
    max-width: 1720px;
    margin-left: 50%;
    transform: translateX(-50%);
    min-height: 720px;
    background: var(--ae-bg);
    color: var(--ae-ink);
    border: 1px solid var(--ae-line);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ae-panel * {
    box-sizing: border-box;
    letter-spacing: 0;
}

.ae-panel-nav {
    background: #1f2d3d;
    color: white;
    padding: 22px 16px;
}

.ae-panel-brand {
    padding: 8px 10px 20px;
    border-bottom: 1px solid rgba(255,255,255,.16);
    margin-bottom: 14px;
}

.ae-panel-brand span,
.ae-panel-brand strong {
    display: block;
}

.ae-panel-brand span {
    color: #c9d6e2;
    font-size: 13px;
}

.ae-panel-brand strong {
    font-size: 22px;
}

.ae-panel-nav a {
    display: block;
    color: #dbe7f2;
    text-decoration: none;
    padding: 12px 12px;
    border-radius: 6px;
    font-weight: 650;
    margin-bottom: 4px;
}

.ae-panel-nav a:hover,
.ae-panel-nav a.is-active {
    background: #2f80c0;
    color: #fff;
}

.ae-panel-nav .ae-panel-main-menu {
    margin-bottom: 14px;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.08);
    color: #fff;
}

.ae-panel-nav .ae-panel-main-menu:hover {
    background: #2f80c0;
}

.ae-panel-main {
    min-width: 0;
    padding: 28px;
}

.ae-panel-top-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 18px;
}

.ae-panel-top-actions a {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    padding: 10px 16px;
    background: var(--ae-accent);
    color: #fff;
    font-weight: 900;
    text-decoration: none;
}

.ae-panel-top-actions a:hover {
    background: var(--ae-accent-dark);
    color: #fff;
}

.ae-panel-head {
    margin-bottom: 22px;
}

.ae-panel-head p {
    margin: 0 0 4px;
    color: var(--ae-muted);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12px;
}

.ae-panel-head h1 {
    margin: 0;
    font-size: 30px;
    line-height: 1.2;
}

.ae-panel-section,
.ae-metric,
.ae-review-item {
    background: var(--ae-card);
    border: 1px solid var(--ae-line);
    border-radius: 8px;
}

.ae-panel-section {
    padding: 18px;
    min-width: 0;
}

.ae-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.ae-metric {
    padding: 18px;
}

.ae-metric span {
    display: block;
    color: var(--ae-muted);
    font-size: 13px;
    font-weight: 700;
}

.ae-metric strong {
    display: block;
    margin-top: 8px;
    font-size: 28px;
}

.ae-action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.ae-action-grid a,
.ae-button,
.ae-primary,
.ae-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border-radius: 6px;
    border: 1px solid var(--ae-accent);
    background: var(--ae-accent);
    color: white;
    text-decoration: none;
    font-weight: 700;
    padding: 8px 12px;
    white-space: nowrap;
}

.ae-action-grid a:hover,
.ae-button:hover,
.ae-primary:hover,
.ae-back:hover {
    background: var(--ae-accent-dark);
    color: white;
}

.ae-back {
    margin-bottom: 16px;
    background: #ffffff;
    color: var(--ae-accent);
}

.ae-table-wrap {
    overflow-x: auto;
    max-width: 100%;
}

.ae-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1180px;
    table-layout: fixed;
}

.ae-table th:nth-child(1),
.ae-table td:nth-child(1) {
    width: 8%;
}

.ae-table th:nth-child(2),
.ae-table td:nth-child(2),
.ae-table th:nth-child(3),
.ae-table td:nth-child(3) {
    width: 15%;
}

.ae-table th:nth-child(4),
.ae-table td:nth-child(4),
.ae-table th:nth-child(5),
.ae-table td:nth-child(5) {
    width: 9%;
}

.ae-table th:nth-child(6),
.ae-table td:nth-child(6) {
    width: 12%;
}

.ae-table th:nth-child(7),
.ae-table td:nth-child(7) {
    width: 17%;
}

.ae-table th:nth-child(8),
.ae-table td:nth-child(8) {
    width: 10%;
}

.ae-table th,
.ae-table td {
    text-align: left;
    border-bottom: 1px solid var(--ae-line);
    padding: 13px 12px;
    vertical-align: middle;
    overflow-wrap: anywhere;
}

.ae-table th:nth-child(6),
.ae-table td:nth-child(6),
.ae-table th:nth-child(7),
.ae-table td:nth-child(7),
.ae-table th:nth-child(8),
.ae-table td:nth-child(8) {
    overflow-wrap: normal;
    word-break: normal;
}

.ae-table th {
    background: #eef3f8;
    color: #314457;
    font-size: 13px;
}

.ae-questions-table,
.ae-results-table,
.ae-audit-table {
    min-width: 980px;
}

.ae-results-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
}

.ae-results-table th:nth-child(1),
.ae-results-table td:nth-child(1) {
    width: 6%;
}

.ae-results-table th:nth-child(2),
.ae-results-table td:nth-child(2) {
    width: 14%;
}

.ae-results-table th:nth-child(3),
.ae-results-table td:nth-child(3) {
    width: 14%;
}

.ae-results-table th:nth-child(4),
.ae-results-table td:nth-child(4) {
    width: 8%;
}

.ae-results-table th:nth-child(5),
.ae-results-table td:nth-child(5) {
    width: 10%;
}

.ae-results-table th:nth-child(6),
.ae-results-table td:nth-child(6) {
    width: 14%;
}

.ae-results-table th:nth-child(7),
.ae-results-table td:nth-child(7) {
    width: 14%;
}

.ae-results-table th:nth-child(8),
.ae-results-table td:nth-child(8) {
    width: 10%;
}

.ae-results-table th:nth-child(9),
.ae-results-table td:nth-child(9) {
    width: 10%;
    overflow-wrap: normal;
    word-break: normal;
}

.ae-results-table th:nth-child(9) {
    white-space: nowrap;
}

.ae-audit-table {
    min-width: 1220px;
}

.ae-blackbox-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.ae-blackbox-intro h2 {
    margin: 0 0 6px;
    font-size: 22px;
}

.ae-blackbox-intro p {
    margin: 0;
    color: var(--ae-muted);
    line-height: 1.45;
}

.ae-blackbox-table {
    min-width: 1480px;
}

.ae-blackbox-table th:nth-child(1),
.ae-blackbox-table td:nth-child(1) {
    width: 11%;
}

.ae-blackbox-table th:nth-child(2),
.ae-blackbox-table td:nth-child(2) {
    width: 10%;
}

.ae-blackbox-table th:nth-child(3),
.ae-blackbox-table td:nth-child(3),
.ae-blackbox-table th:nth-child(4),
.ae-blackbox-table td:nth-child(4) {
    width: 12%;
}

.ae-blackbox-table th:nth-child(5),
.ae-blackbox-table td:nth-child(5) {
    width: 7%;
}

.ae-blackbox-table th:nth-child(6),
.ae-blackbox-table td:nth-child(6),
.ae-blackbox-table th:nth-child(7),
.ae-blackbox-table td:nth-child(7) {
    width: 12%;
}

.ae-blackbox-table th:nth-child(8),
.ae-blackbox-table td:nth-child(8) {
    width: 12%;
}

.ae-blackbox-table th:nth-child(9),
.ae-blackbox-table td:nth-child(9) {
    width: 22%;
}

.ae-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #eef6ff;
    color: #165f9f;
    font-weight: 700;
    white-space: nowrap;
    max-width: 100%;
}

.ae-review-summary {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.ae-review-summary span {
    border: 1px solid var(--ae-line);
    border-radius: 8px;
    padding: 10px;
    background: #f9fbfd;
}

.ae-review-summary strong,
.ae-review-meta strong {
    display: block;
    color: var(--ae-muted);
    font-size: 12px;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.ae-review-form {
    display: grid;
    gap: 14px;
}

.ae-review-item {
    display: grid;
    grid-template-columns: minmax(260px, 1.2fr) minmax(220px, .9fr) minmax(220px, .8fr);
    gap: 18px;
    padding: 18px;
}

.ae-review-question h2 {
    margin: 0 0 12px;
    font-size: 18px;
}

.ae-review-question img {
    max-width: 280px;
    width: 100%;
    border-radius: 8px;
}

.ae-review-meta {
    display: grid;
    gap: 10px;
}

.ae-review-meta span {
    display: block;
}

.ae-review-controls {
    display: grid;
    align-content: start;
    gap: 9px;
}

.ae-review-controls label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.ae-review-controls textarea {
    width: 100%;
    min-height: 86px;
    border: 1px solid var(--ae-line);
    border-radius: 6px;
    padding: 10px;
    resize: vertical;
}

.ae-primary {
    justify-self: start;
    border: 0;
    cursor: pointer;
}

.ae-success,
.ae-panel-notice {
    padding: 14px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    background: #eafaf1;
    color: var(--ae-good);
    font-weight: 700;
}

.ae-panel-notice {
    background: #fff6e5;
    color: #8a5a00;
}

.ae-release-badge,
.ae-release-date {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    border-radius: 999px;
    padding: 4px 10px;
    font-weight: 800;
    background: #e9f8ef;
    color: #128a4a;
    white-space: nowrap;
    max-width: 100%;
}

.ae-release-date {
    display: block;
    width: max-content;
    margin-top: 6px;
    background: #eef1f4;
    color: #667085;
    font-size: 12px;
}

.ae-release-pending {
    background: #fff6db;
    color: #9a6700;
}

.ae-release-withheld {
    background: #fdecee;
    color: #c6283d;
}

.ae-release-form {
    margin: 8px 0 0;
}

.ae-release-form button {
    min-height: 34px;
    border: 0;
    border-radius: 6px;
    padding: 7px 11px;
    background: var(--ae-accent);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    width: 100%;
    max-width: 132px;
    white-space: normal;
    line-height: 1.15;
    text-align: center;
}

.ae-results-table .ae-release-form {
    margin-top: 0;
}

.ae-results-table .ae-release-form button {
    max-width: none;
}

.ae-release-alert {
    padding: 13px 15px;
    border-radius: 8px;
    margin-bottom: 14px;
    font-weight: 800;
}

.ae-release-ok {
    background: #e9f8ef;
    color: #128a4a;
}

.ae-release-error {
    background: #fdecee;
    color: #c6283d;
}

.ae-editor-section,
.ae-exams-list {
    margin-bottom: 18px;
}

.ae-editor-section h2,
.ae-exams-list h2 {
    margin: 0 0 14px;
    font-size: 20px;
}

.ae-editor-form {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(180px, 240px) auto;
    gap: 14px;
    align-items: end;
}

.ae-editor-form label,
.ae-question-assign-form label {
    display: grid;
    gap: 6px;
    font-weight: 750;
}

.ae-editor-form span {
    color: var(--ae-muted);
    font-size: 12px;
    text-transform: uppercase;
}

.ae-editor-form input,
.ae-editor-form select {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--ae-line);
    border-radius: 6px;
    padding: 8px 10px;
    background: #fff;
}

.ae-exam-create-form,
.ae-exam-settings-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ae-exam-create-form .ae-primary,
.ae-exam-settings-form .ae-button {
    align-self: end;
}

.ae-exam-schedule {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.ae-exam-schedule span {
    border: 1px solid var(--ae-line);
    border-radius: 6px;
    padding: 10px;
    background: #f9fbfd;
}

.ae-exam-schedule strong {
    display: block;
    margin-bottom: 4px;
    color: var(--ae-muted);
    font-size: 12px;
    text-transform: uppercase;
}

.ae-question-form,
.ae-associate-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.ae-question-form label,
.ae-associate-form label,
.ae-certificate-upload label {
    display: grid;
    gap: 6px;
    font-weight: 750;
}

.ae-question-form span,
.ae-associate-form span,
.ae-certificate-card span,
.ae-certificate-upload span {
    color: var(--ae-muted);
    font-size: 12px;
    text-transform: uppercase;
}

.ae-question-form input,
.ae-question-form select,
.ae-question-form textarea,
.ae-associate-form input,
.ae-associate-form select,
.ae-certificate-upload input {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--ae-line);
    border-radius: 6px;
    padding: 8px 10px;
    background: #fff;
    font: inherit;
}

.ae-associate-form input[readonly] {
    background: #f0f4f8;
    color: var(--ae-muted);
}

.ae-password-note {
    grid-column: 1 / -1;
    padding: 14px 16px;
    border: 1px solid #bfe6cf;
    border-radius: 8px;
    background: #e8f7ef;
    color: #172433;
}

.ae-password-note strong {
    display: block;
    margin-bottom: 4px;
    color: #007f3d;
}

.ae-password-note p {
    margin: 0;
    color: var(--ae-muted);
}

.ae-question-form textarea {
    min-height: 88px;
    resize: vertical;
}

.ae-field-wide,
.ae-form-actions {
    grid-column: 1 / -1;
}

.ae-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.ae-muted-line {
    display: block;
    margin-top: 4px;
    color: var(--ae-muted);
    font-size: 12px;
    font-weight: 650;
}

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

.ae-row-actions form {
    margin: 0;
}

.ae-associates-table {
    min-width: 1240px;
}

.ae-access-table {
    min-width: 1040px;
}

.ae-security-intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 14px;
    margin-bottom: 18px;
}

.ae-security-intro h2 {
    margin-bottom: 8px;
}

.ae-security-intro p,
.ae-security-note p {
    max-width: 860px;
    margin: 0;
    color: var(--ae-muted);
}

.ae-security-table {
    min-width: 1040px;
}

.ae-security-table th:nth-child(1),
.ae-security-table td:nth-child(1) {
    width: 24%;
}

.ae-security-table th:nth-child(2),
.ae-security-table td:nth-child(2) {
    width: 8%;
}

.ae-security-table th:nth-child(3),
.ae-security-table td:nth-child(3) {
    width: 20%;
}

.ae-security-table th:nth-child(4),
.ae-security-table td:nth-child(4),
.ae-security-table th:nth-child(5),
.ae-security-table td:nth-child(5) {
    width: 17%;
}

.ae-security-table th:nth-child(6),
.ae-security-table td:nth-child(6) {
    width: 14%;
}

.ae-security-log-table {
    min-width: 980px;
}

.ae-security-log-table th:nth-child(1),
.ae-security-log-table td:nth-child(1) {
    width: 18%;
}

.ae-security-log-table th:nth-child(2),
.ae-security-log-table td:nth-child(2),
.ae-security-log-table th:nth-child(3),
.ae-security-log-table td:nth-child(3) {
    width: 22%;
}

.ae-security-log-table th:nth-child(4),
.ae-security-log-table td:nth-child(4) {
    width: 38%;
}

.ae-access-picker {
    max-width: 520px;
    margin-bottom: 14px;
}

.ae-access-picker label {
    display: grid;
    gap: 6px;
    font-weight: 750;
}

.ae-access-picker span {
    color: var(--ae-muted);
    font-size: 12px;
    text-transform: uppercase;
}

.ae-access-picker select {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--ae-line);
    border-radius: 6px;
    padding: 8px 10px;
    background: #fff;
    font: inherit;
}

.ae-check-inline {
    display: inline-grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    font-weight: 800;
}

.ae-check-inline input {
    width: 18px;
    height: 18px;
}

.ae-access-actions {
    margin-top: 14px;
}

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

.ae-certificate-card {
    display: grid;
    grid-template-columns: minmax(220px, .8fr) minmax(0, 1.2fr);
    gap: 16px;
    align-items: start;
    border: 1px solid var(--ae-line);
    border-radius: 8px;
    padding: 14px;
    background: #fff;
}

.ae-certificate-card strong {
    display: block;
    margin: 4px 0;
    font-size: 18px;
}

.ae-certificate-upload {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
}

.ae-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    border: 0;
    border-radius: 6px;
    padding: 8px 12px;
    background: #c6283d;
    color: #fff;
    cursor: pointer;
    font-weight: 800;
}

.ae-exam-card {
    border: 1px solid var(--ae-line);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 14px;
    background: #fff;
}

.ae-exam-card header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.ae-exam-card header span {
    color: var(--ae-muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.ae-exam-card h3 {
    margin: 4px 0 0;
    font-size: 22px;
}

.ae-exam-card header strong {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    border-radius: 999px;
    padding: 5px 11px;
    background: #eef6ff;
    color: #165f9f;
}

.ae-exam-shortcode {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.ae-exam-shortcode span {
    color: var(--ae-muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.ae-exam-shortcode code {
    border: 1px solid var(--ae-line);
    border-radius: 6px;
    padding: 6px 8px;
    background: #f9fbfd;
    color: var(--ae-ink);
    white-space: nowrap;
}

.ae-exam-internal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 16px;
}

.ae-question-assign-form {
    display: grid;
    gap: 14px;
}

.ae-exam-settings-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--ae-line);
}

.ae-exam-settings-form label {
    display: grid;
    gap: 6px;
    font-weight: 750;
}

.ae-exam-settings-form span {
    color: var(--ae-muted);
    font-size: 12px;
    text-transform: uppercase;
}

.ae-exam-settings-form input,
.ae-exam-settings-form select {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--ae-line);
    border-radius: 6px;
    padding: 8px 10px;
    background: #fff;
}

.ae-question-picker {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px;
}

.ae-question-picker label {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    min-height: 48px;
    border: 1px solid var(--ae-line);
    border-radius: 6px;
    padding: 10px;
    background: #f9fbfd;
}

.ae-question-picker input {
    margin-top: 3px;
}

.ae-question-picker span {
    overflow-wrap: anywhere;
}

@media (max-width: 980px) {
    .ae-panel {
        width: calc(100vw - 20px);
        grid-template-columns: 1fr;
    }

    .ae-panel-nav {
        display: flex;
        gap: 6px;
        overflow-x: auto;
        padding: 12px;
    }

    .ae-panel-brand {
        display: none;
    }

    .ae-panel-nav a {
        white-space: nowrap;
        margin: 0;
    }

    .ae-metrics,
    .ae-action-grid,
    .ae-editor-form,
    .ae-exam-settings-form,
    .ae-exam-create-form,
    .ae-exam-schedule,
    .ae-question-form,
    .ae-associate-form,
    .ae-certificate-card,
    .ae-certificate-upload,
    .ae-review-summary,
    .ae-review-item {
        grid-template-columns: 1fr;
    }

    .ae-panel-main {
        padding: 18px;
    }

    .ae-panel-top-actions {
        justify-content: stretch;
    }

    .ae-panel-top-actions a {
        width: 100%;
    }

    .ae-results-table {
        min-width: 980px;
    }

    .ae-security-intro {
        grid-template-columns: 1fr;
    }

    .ae-blackbox-intro {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (min-width: 981px) and (max-width: 1280px) {
    .ae-panel {
        grid-template-columns: 220px minmax(0, 1fr);
    }

    .ae-panel-main {
        padding: 22px;
    }

    .ae-panel-nav {
        padding: 18px 12px;
    }

    .ae-review-item {
        grid-template-columns: 1fr;
    }

    .ae-results-table {
        min-width: 1120px;
    }
}
