.admin-section {
    padding: 8px 0;
}

.admin-section__title {
    font-family: var(--font-display);
    font-size: 28px;
    margin: 12px 0 18px;
    letter-spacing: -0.01em;
}

.admin-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

.admin-topic {
    background: var(--md-sys-color-surface-container-low);
    border-radius: var(--shape-lg);
    padding: 18px 18px 14px;
    box-shadow: var(--elev-1);
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.16s var(--motion-spring), box-shadow 0.2s var(--motion-standard);
}
.admin-topic:hover { transform: translateY(-2px); box-shadow: var(--elev-2); }

.admin-topic__title {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

.admin-topic__meta {
    color: var(--md-sys-color-on-surface-variant);
    font-size: 12px;
}

.admin-topic__actions {
    display: flex;
    gap: 6px;
    margin-top: 6px;
}

/* ─── Wizard ─────────────────────────────────────────────────────────────── */
.wizard {
    max-width: 880px;
    margin: 0 auto;
}

.wizard__steps {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 6px;
    background: var(--md-sys-color-surface-container);
    border-radius: var(--shape-full);
    overflow-x: auto;
    scrollbar-width: none;
}
.wizard__steps::-webkit-scrollbar { display: none; }

.wizard__step {
    padding: 8px 14px;
    border-radius: var(--shape-full);
    font-size: 13px;
    font-weight: 600;
    color: var(--md-sys-color-on-surface-variant);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.3s var(--motion-standard), color 0.3s var(--motion-standard);
}
.wizard__step.is-active {
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
}
.wizard__step.is-done {
    background: var(--md-sys-color-tertiary-container);
    color: var(--md-sys-color-on-tertiary-container);
}
.wizard__step .num {
    width: 22px; height: 22px;
    border-radius: var(--shape-full);
    background: rgba(0,0,0,0.06);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 12px;
}

.wizard__viewport {
    position: relative;
    min-height: 200px;
}

.wizard__panel {
    background: var(--md-sys-color-surface-container-lowest);
    border-radius: var(--shape-xl);
    padding: 26px;
    box-shadow: var(--elev-1);
}

.wizard__heading {
    margin: 0 0 8px;
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.wizard__lede {
    margin: 0 0 18px;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 14px;
}

.wizard__actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 22px;
    flex-wrap: wrap;
}

/* Drop zone */
.drop-zone {
    background: var(--md-sys-color-surface-container);
    border-radius: var(--shape-xl);
    padding: 40px 28px;
    text-align: center;
    transition: background 0.18s var(--motion-standard), transform 0.18s var(--motion-spring);
    cursor: pointer;
    display: block;
}
.drop-zone:hover { background: var(--md-sys-color-surface-container-high); }
.drop-zone.is-dragover {
    background: var(--md-sys-color-primary-container);
    transform: scale(1.01);
}

.drop-zone__icon {
    font-size: 56px !important;
    color: var(--md-sys-color-primary);
    margin-bottom: 8px;
    display: inline-block;
}
.drop-zone__title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 4px;
}
.drop-zone__text {
    color: var(--md-sys-color-on-surface-variant);
    font-size: 14px;
    margin: 0;
}

.uploaded-file {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--md-sys-color-tertiary-container);
    color: var(--md-sys-color-on-tertiary-container);
    border-radius: var(--shape-lg);
}
.uploaded-file__icon {
    width: 44px; height: 44px;
    background: var(--md-sys-color-tertiary);
    border-radius: var(--shape-md);
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.uploaded-file__info { flex: 1; min-width: 0; }
.uploaded-file__name {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.uploaded-file__meta { font-size: 12px; opacity: 0.85; }

/* Thoughts streaming */
.thoughts-block {
    background: var(--md-sys-color-surface-container);
    border-radius: var(--shape-lg);
    padding: 14px 16px;
    margin: 14px 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.thoughts-block__head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--md-sys-color-primary);
    font-size: 13px;
}
.thoughts-block__head .pulse-dot {
    width: 8px; height: 8px;
    border-radius: var(--shape-full);
    background: var(--md-sys-color-primary);
    animation: pulse-dot 1.2s infinite;
}
.thoughts-block__body {
    font-size: 13px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    color: var(--md-sys-color-on-surface-variant);
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 240px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}
.thoughts-block__body::-webkit-scrollbar { width: 8px; }
.thoughts-block__body::-webkit-scrollbar-thumb {
    background: var(--md-sys-color-surface-container-highest);
    border-radius: var(--shape-full);
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.7); }
}

.stream-output {
    background: var(--md-sys-color-surface-container-lowest);
    border-radius: var(--shape-lg);
    padding: 18px 22px;
    min-height: 140px;
    box-shadow: inset 0 0 0 1px var(--md-sys-color-surface-container);
}

/* ─── Test editor (admin) ────────────────────────────────────────────────── */
.test-editor {
    background: var(--md-sys-color-surface-container-low);
    border-radius: var(--shape-lg);
    padding: 16px;
    margin: 10px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.test-editor__head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.test-editor__num {
    width: 28px; height: 28px;
    border-radius: var(--shape-full);
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
    margin-top: 6px;
}

.test-editor__question,
.test-editor__input {
    width: 100%;
    background: var(--md-sys-color-surface-container);
    border-radius: var(--shape-md);
    padding: 12px 14px;
    font-size: 15px;
    color: var(--md-sys-color-on-surface);
    font-family: inherit;
    line-height: 1.45;
    resize: none;
    overflow-y: hidden;
    transition: background 0.18s var(--motion-standard);
    word-break: break-word;
    display: block;
}

.test-editor__question {
    font-weight: 600;
    min-height: 52px;
}
.test-editor__input {
    font-size: 14px;
    font-weight: 500;
    min-height: 42px;
}

.test-editor__question:focus,
.test-editor__input:focus {
    background: var(--md-sys-color-surface-container-high);
}

.test-editor__question::-webkit-scrollbar,
.test-editor__input::-webkit-scrollbar { width: 6px; }
.test-editor__question::-webkit-scrollbar-thumb,
.test-editor__input::-webkit-scrollbar-thumb {
    background: var(--md-sys-color-surface-container-highest);
    border-radius: var(--shape-full);
}

.test-editor__option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.test-editor__radio {
    width: 36px; height: 36px;
    border-radius: var(--shape-full);
    background: var(--md-sys-color-surface-container);
    color: var(--md-sys-color-on-surface-variant);
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 4px;
    transition: background 0.18s var(--motion-standard), color 0.18s var(--motion-standard), transform 0.14s var(--motion-spring);
}
.test-editor__radio:hover { background: var(--md-sys-color-surface-container-high); }
.test-editor__radio:active { transform: scale(0.92); }
.test-editor__radio.is-correct {
    background: var(--md-sys-color-success);
    color: var(--md-sys-color-success-on);
}
.test-editor__radio .material-symbols-rounded { font-size: 18px; }

/* ─── Login ──────────────────────────────────────────────────────────────── */
.login-wrap {
    max-width: 420px;
    margin: 80px auto;
    background: var(--md-sys-color-surface-container-lowest);
    border-radius: var(--shape-xl);
    padding: 32px 28px;
    box-shadow: var(--elev-2);
    text-align: center;
}
.login-wrap__icon {
    font-size: 56px !important;
    color: var(--md-sys-color-primary);
    margin-bottom: 8px;
    display: inline-block;
}
.login-wrap__title {
    font-family: var(--font-display);
    font-size: 24px;
    margin: 0 0 4px;
}
.login-wrap__hint {
    color: var(--md-sys-color-on-surface-variant);
    font-size: 14px;
    margin: 0 0 20px;
}
