/* Shared visual language for teacher and student screens. */
:root {
    --blue-700: #3730a3;
    --blue-600: #4338ca;
    --blue-500: #6366f1;
    --blue-100: #eef2ff;
    --kicker: #526078;
    --radius: 16px;
    --line: #e2e7f0;
}
body { color: #18243a; font-size: 16px; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #818cf8; outline-offset: 3px; }
.brand-mark { background: #4338ca; box-shadow: none; border-radius: 12px; }
.tp-monogram { position: relative; display: inline-block; color: white; font-size: 29px; font-weight: 800; line-height: 1; padding-right: 5px; }
.tp-brand-dot { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: white; bottom: 1px; right: 0; }
.brand-copy strong { color: #18243a; letter-spacing: -.5px; }
.btn-primary, .btn-primary-wide { background: #4338ca; border: 1px solid #4338ca; box-shadow: none; color: white; }
.btn-primary:hover, .btn-primary-wide:hover { background: #3730a3; border-color: #3730a3; color: white; }
.btn-secondary { background: white; border: 1px solid #d7ddea; color: #27344d; box-shadow: none; }
.btn-secondary:hover { background: #eef2ff; border-color: #a5b4fc; color: #3730a3; }
.btn-primary, .btn-secondary, .btn-primary-wide { min-height: 46px; border-radius: 10px; font-weight: 600; padding: 11px 17px; text-align: center; white-space: normal; }
.action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 44px;
    max-width: 100%;
    padding: 8px 12px;
    color: #27344d;
    text-decoration: none;
    overflow-wrap: anywhere;
}
.action-link:hover { text-decoration: none; }
.breadcrumbs { flex-wrap: wrap; }
.breadcrumbs .action-link { color: #27344d; text-align: left; }
.teacher-page-intro > .action-link { justify-self: start; }
.teacher-share-panel { padding: 14px; }
.teacher-share-panel .teacher-share { grid-template-columns: minmax(0, 1fr) auto; }
.teacher-share-panel #public-link { min-width: 0; padding: 8px; text-overflow: ellipsis; }
.teacher-share-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.teacher-share-actions > * { flex: 1 1 145px; }
.teacher-share-actions button[hidden] { display: none; }
.teacher-share-panel [data-copy-test-status] { margin: 0; color: var(--muted); font-size: 14px; }
.teacher-share-panel [data-copy-test-status]:not(:empty) { margin-bottom: 12px; }
button:disabled { opacity: .55; cursor: not-allowed; }
.side-nav-link.is-active { color: #4338ca; background: #eef2ff; }
.sidebar { overflow-y: auto; }
.platform-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding: 20px 32px; border-top: 1px solid #e2e7f0; color: #5b6980; font-size: 12px; line-height: 1.6; margin-top: auto; }
.table-card, .teacher-panel, .tp-completed-card, .student-test-card { border-color: #e2e7f0; box-shadow: 0 4px 20px #18243a05; }
.teacher-panel h2 { font-size: 20px; }
.bank-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.bank-card {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--ink);
    text-decoration: none;
}
.bank-card:hover { border-color: #a5b4fc; background: #fafaff; color: var(--blue-700); }
.bank-card-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--blue-100);
    color: var(--blue-700);
}
.bank-card-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.bank-card-copy { display: grid; gap: 4px; overflow-wrap: anywhere; }
.bank-card-copy > span { color: var(--muted); font-size: 13px; }
.bank-card-arrow { color: var(--blue-700); }
.teacher-panel p, .teacher-editor p { line-height: 1.65; }
.teacher-editor label { margin-bottom: 7px; }
.teacher-editor textarea { min-height: 110px; }
.teacher-editor input[type="file"] { padding: 6px; max-width: 100%; overflow: hidden; }
.teacher-editor input[type="file"]::file-selector-button {
    margin-inline-end: 8px;
    padding: 9px 12px;
    border: 1px solid #c7d2fe;
    border-radius: 8px;
    background: #eef2ff;
    color: #3730a3;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.teacher-editor input[type="file"]::file-selector-button:hover { background: #e0e7ff; }
.teacher-question { padding: 18px; }
.teacher-question summary { padding: 6px 0; line-height: 1.6; }
.teacher-review { color: #664a10; background: #fffbeb; border-color: #f1d89a; }
.teacher-review li { margin-block: 6px; }
.teacher-actions .teacher-review { flex-basis: 100%; }
.teacher-actions .teacher-review a { margin: 2px; }
.teacher-panel input[type=checkbox], .teacher-editor input[type=checkbox] { accent-color: #4338ca; width: 20px; height: 20px; }
.teacher-panel input:focus, .teacher-editor input:focus, .teacher-editor textarea:focus, select:focus { border-color: #6366f1; }
.teacher-filters { padding: 16px; border: 1px solid #e2e7f0; background: white; border-radius: 14px; }
.teacher-filters label { flex-direction: column; align-items: stretch; }
.teacher-filters button { align-self: end; }
.teacher-question-list label { border-bottom: 1px solid #eef0f6; }
.teacher-question-list label:has(input:checked) { background: #eef2ff; border-radius: 8px; }
.teacher-question-list label:hover { background: #f5f7fb; }
.bank-actions { border-top: 1px solid #e2e7f0; padding: 12px; border-radius: 12px 12px 0 0; }
.login-layout { display: block; max-width: 480px; min-height: auto; margin: 48px auto; }
.login-panel-wrap { min-height: auto; padding: 36px; }
.login-heading h2 { font-size: 28px; }
.login-note { margin-top: 24px; }
.alert, .form-alert { border-radius: 10px; line-height: 1.6; }
.page-intro h1 { overflow-wrap: anywhere; }
.tp-option { border-radius: 12px; }
.tp-option:has(input:checked) { border-color: #4338ca; background: #eef2ff; }
@media (max-width: 680px) {
    .teacher-tests-table td:nth-child(3) { grid-column: auto; }
    .recent-tests-table tbody tr {
        grid-template-columns: minmax(0, 1fr) auto auto;
        align-items: center;
        gap: 8px;
        padding: 12px;
    }
    .recent-tests-table td:nth-child(3) { grid-column: auto; }
    .recent-tests-table .action-link { width: 100%; justify-content: flex-start; text-align: left; }
    .recent-tests-table time { white-space: nowrap; }
    .recent-section .section-heading-row { flex-wrap: wrap; }
    .recent-section .section-heading-row .action-link { flex-shrink: 0; }
    .platform-footer { padding: 20px 17px; flex-direction: column; gap: 4px; }
    .login-layout { width: calc(100% - 32px); margin: 24px auto; }
    .login-panel-wrap { padding: 26px 20px; }
    .teacher-actions { gap: 10px; }
    .teacher-actions > .btn-primary, .teacher-actions > .btn-secondary { flex: 1 1 180px; }
    .teacher-filters label { flex: 1 1 130px; }
    .teacher-panel { padding: 16px; }
    .teacher-question summary { font-size: 16px; }
    .teacher-bank-actions { bottom: env(safe-area-inset-bottom, 0px); }
    .page-intro h1 { font-size: 26px; line-height: 1.25; }
}
