:root {
    --a360-navy: #0f172a;
    --a360-indigo: #4f46e5;
    --a360-sky: #0ea5e9;
    --a360-green: #16a34a;
    --a360-orange: #f97316;
    --a360-muted: #64748b;
    --a360-soft: #f4f7fb;
}

body {
    font-family: "Inter", "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f8fafc;
    color: #152033;
    overflow-x: hidden;
}

.navbar-brand span, .brand-mark { color: var(--a360-indigo); }
.a360-logo-link {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    min-width: 0;
    text-decoration: none;
}
.a360-logo {
    display: block;
    width: auto;
    height: 34px;
    max-width: 190px;
    object-fit: contain;
}
.auth-logo {
    height: 38px;
    max-width: 210px;
}
.admin-logo {
    height: 34px;
    max-width: 170px;
}
.a360-logo-pill {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 7px 9px;
    border-radius: 8px;
    background: #fff;
}
.auth-navbar {
    position: sticky;
    top: 0;
    z-index: 30;
}
.auth-page-main {
    min-height: calc(100vh - 137px);
}
.site-footer {
    border-top: 1px solid #e5e7eb;
    background: #fff;
    color: #64748b;
    padding: 18px 0;
    font-size: 13px;
}
.site-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 14px;
}
.site-footer-links span {
    white-space: nowrap;
}
.admin-footer {
    padding-left: 0;
}
.bg-navy { background: var(--a360-navy); }
.text-muted-2 { color: var(--a360-muted); }
.btn-indigo { background: var(--a360-indigo); border-color: var(--a360-indigo); color: #fff; }
.btn-indigo:hover { background: #4338ca; border-color: #4338ca; color: #fff; }
.btn-soft { background: #eef2ff; color: #3730a3; border-color: #e0e7ff; }
.hero {
    background:
        linear-gradient(110deg, rgba(15, 23, 42, .94), rgba(49, 46, 129, .86)),
        url("https://images.unsplash.com/photo-1552664730-d307ca884978?auto=format&fit=crop&w=1800&q=80") center/cover;
    color: #fff;
    min-height: 620px;
}
.hero .lead { color: #dbeafe; }
.metric { border-left: 3px solid rgba(255,255,255,.35); }
.section-band { padding: 72px 0; }
.app-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(15, 23, 42, .06);
}
.assessment-icon {
    width: 48px;
    height: 48px;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
    color: #fff;
    background: var(--a360-indigo);
}
.accent-green { background: var(--a360-green); }
.accent-orange { background: var(--a360-orange); }
.accent-sky { background: var(--a360-sky); }
.accent-indigo { background: var(--a360-indigo); }
.dashboard-shell { min-height: 100vh; }
.sidebar {
    background: var(--a360-navy);
    color: #dbeafe;
}
.sidebar a { color: #dbeafe; text-decoration: none; }
.sidebar a.active, .sidebar a:hover { color: #fff; background: rgba(255,255,255,.08); }
.exam-header { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid #e5e7eb; }
.question-nav button {
    width: 38px;
    height: 38px;
    border-radius: 8px;
}
.question-nav-large {
    max-height: min(42vh, 360px);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 2px 4px 6px 0;
    scrollbar-width: thin;
}
.question-nav-large button.btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    padding: 0;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1;
}
.question-nav-sectioned {
    display: block;
}
.question-nav-section {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 0 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
}
.question-nav-section:last-child {
    border-bottom: 0;
    margin-bottom: 0;
}
.question-nav-section-title {
    flex: 0 0 100%;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    background: #f8fafc;
    border-radius: 6px;
    padding: 6px 8px;
}
.question-nav button.btn.not-attempted {
    background: #fff;
    color: #2563eb;
    border-color: #2563eb;
}
.question-nav button.btn.attempted {
    background: #dcfce7;
    color: #166534;
    border-color: #16a34a;
}
.question-nav button.btn.review {
    background: #fef3c7;
    color: #92400e;
    border-color: #f59e0b;
}
.question-nav button.btn.active {
    box-shadow: 0 0 0 3px rgba(79, 70, 229, .18);
}
.question-nav button.btn.mandatory-blocked {
    background: #fee2e2;
    color: #991b1b;
    border-color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, .18);
}
.mandatory-panel-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #7c2d12;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    padding: 10px 12px;
    line-height: 1.35;
}
.question-block { display: none; }
.question-block.active { display: block; }
.survey-rating-card {
    border: 1px solid #dbe3ef;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}
.survey-rating-heading,
.survey-rating-row {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) repeat(5, minmax(84px, 120px));
}
.survey-rating-heading {
    background: #f8fafc;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}
.survey-rating-heading > div,
.survey-rating-row > div,
.survey-rating-choice {
    padding: 12px;
    border-right: 1px solid #e5e7eb;
}
.survey-rating-heading > div:first-child {
    text-align: left;
}
.survey-rating-heading > div:last-child,
.survey-rating-row > label:last-child {
    border-right: 0;
}
.survey-rating-row {
    align-items: stretch;
}
.survey-rating-question {
    font-weight: 600;
    color: #0f172a;
    line-height: 1.45;
}
.survey-rating-choice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    margin: 0;
    min-height: 68px;
}
.survey-rating-choice span {
    display: none;
}
.survey360-flow {
    max-width: 1280px;
    margin: 0 auto;
}
.survey360-section {
    overflow: hidden;
}
.survey360-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid #dbe3ef;
    background: #f8fafc;
}
.survey360-table {
    display: grid;
}
.survey360-row {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) repeat(5, minmax(96px, 128px)) 84px;
    align-items: stretch;
    border-bottom: 1px solid #e5e7eb;
}
.survey360-row:last-child {
    border-bottom: 0;
}
.survey360-row > div,
.survey360-choice {
    padding: 14px;
    border-right: 1px solid #e5e7eb;
}
.survey360-row > div:last-child {
    border-right: 0;
}
.survey360-head {
    color: #475569;
    background: #f8fafc;
    font-size: 12px;
    font-weight: 800;
    text-align: center;
    line-height: 1.25;
}
.survey360-head > div:first-child {
    text-align: left;
}
.survey360-question-text {
    color: #0f172a;
    font-weight: 650;
    line-height: 1.45;
}
.survey360-choice {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    cursor: pointer;
}
.survey360-choice span {
    display: none;
}
.survey360-save-status,
.survey360-open-status,
.survey360-competency-feedback-status {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}
.survey360-competency-feedback-row {
    padding: 18px 20px;
    border-top: 1px solid #dbe3ef;
    background: #fbfdff;
}
.survey360-missing {
    outline: 3px solid rgba(239, 68, 68, .28);
    outline-offset: -3px;
    background: #fff7ed;
}
.timer-pill { background: #fff7ed; color: #9a3412; }
.save-status { min-width: 72px; }
.markBtn.is-marked {
    background: #fffbeb;
    color: #92400e;
    border-color: #f59e0b;
}
.proctoring-freeze {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(15, 23, 42, .86);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.proctoring-freeze.show { display: flex; }
.proctoring-freeze-card {
    max-width: 620px;
    width: 100%;
    background: #fff;
    border-radius: 8px;
    border-top: 6px solid #dc2626;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .32);
    padding: 30px;
}
.proctoring-freeze-icon {
    width: 58px;
    height: 58px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: #fee2e2;
    color: #b91c1c;
    font-size: 28px;
}
.tracking-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
}
.tracking-item:last-child { border-bottom: 0; }
.tracking-state {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
}
.tracking-state.warn {
    background: #fef3c7;
    color: #92400e;
}
.tracking-state.danger {
    background: #fee2e2;
    color: #991b1b;
}
.tracking-state.muted {
    background: #e5e7eb;
    color: #475569;
}
.code-editor {
    font-family: Consolas, "Courier New", monospace;
    min-height: 220px;
    background: #0f172a;
    color: #dbeafe;
}
.coding-editor-shell {
    border: 1px solid #1e293b;
    border-radius: 8px;
    overflow: hidden;
    background: #0f172a;
}
.coding-editor-shell .CodeMirror {
    height: 360px;
    font-family: Consolas, "JetBrains Mono", "Courier New", monospace;
    font-size: 14px;
    line-height: 1.55;
}
.coding-toolbar {
    background: #111827;
    border: 1px solid #1f2937;
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    color: #cbd5e1;
    padding: 10px 12px;
}
.coding-output pre {
    white-space: pre-wrap;
    word-break: break-word;
}
.subjective-upload-list {
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: #fff;
    padding: 12px;
}
.subjective-upload-item {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px;
    background: #f8fafc;
}
.subjective-thumb {
    width: 54px;
    height: 54px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #dbe3ef;
    background: #fff;
    flex: 0 0 auto;
}
.subjective-file-icon {
    width: 54px;
    height: 54px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e0e7ff;
    color: #3730a3;
    font-size: 24px;
    flex: 0 0 auto;
}
.report-cover {
    background: linear-gradient(135deg, #0f172a, #3730a3);
    color: #fff;
    padding: 30px;
}
.table-responsive { border-radius: 8px; }
.table-responsive table {
    min-width: 680px;
}
.admin-page-header {
    gap: 18px;
    margin-bottom: 24px;
}
.admin-page-title {
    font-size: 28px;
    line-height: 1.15;
    letter-spacing: 0;
}
.admin-page-subtitle {
    max-width: 780px;
    color: var(--a360-muted);
}
.admin-actions .btn {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 600;
}
.admin-actions .btn i { margin-right: 0 !important; }
.admin-form-card,
.admin-info-card,
.admin-table-card,
.admin-filter-card {
    padding: 22px;
}
.admin-filter-card .form-label,
.admin-form-card .form-label {
    margin-bottom: 7px;
    color: #0f172a;
    font-size: 14px;
}
.admin-filter-card .form-select,
.admin-filter-card .form-control,
.admin-form-card .form-select,
.admin-form-card .form-control {
    min-height: 44px;
}
.admin-upload-box {
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    padding: 18px;
}
.admin-upload-box .form-control {
    background: #fff;
}
.admin-format-list {
    display: grid;
    gap: 10px;
    margin: 0;
}
.admin-format-row {
    display: grid;
    grid-template-columns: minmax(140px, 180px) 1fr;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
}
.admin-format-row:last-child { border-bottom: 0; }
.admin-format-key {
    font-weight: 700;
    color: #0f172a;
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
}
.admin-format-value {
    color: #334155;
}
.admin-note {
    border: 1px solid #dbe4ef;
    background: #f8fafc;
    border-radius: 8px;
    padding: 16px;
}
.admin-data-table thead th,
table.dataTable.admin-data-table > thead > tr > th {
    background: #f8fafc;
    color: #0f172a;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .02em;
    border-bottom: 1px solid #dbe4ef;
}
.admin-data-table tbody td {
    vertical-align: middle;
    color: #1e293b;
}
.admin-data-table tbody tr:hover {
    background: #f8fafc;
}
.admin-data-table .btn-sm {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.dt-container .dt-layout-row {
    align-items: center;
    margin: 0 0 14px;
}
.dt-container .dt-search label,
.dt-container .dt-length label {
    color: var(--a360-muted);
    font-size: 14px;
}
.dt-container .dt-search input,
.dt-container .dt-length select {
    border-color: #dbe4ef;
    border-radius: 8px;
    min-height: 38px;
}
.dt-container .dt-search input {
    min-width: min(320px, 100%);
}
.dt-container .dt-info {
    color: var(--a360-muted);
    font-size: 14px;
}
.dt-container .dt-paging .page-link {
    border-radius: 8px;
    margin: 0 2px;
}
@media (max-width: 767px) {
    .hero { min-height: auto; padding: 80px 0 48px; }
    .section-band { padding: 42px 0; }
    .sidebar { min-height: auto; }
    .sidebar {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        align-items: center;
        position: sticky;
        top: 0;
        z-index: 30;
    }
    .sidebar .fw-bold {
        flex: 0 0 auto;
        margin-bottom: 0 !important;
        margin-right: 8px;
    }
    .sidebar .a360-logo-pill {
        flex: 0 0 auto;
        margin-bottom: 0 !important;
        margin-right: 8px;
        padding: 5px 7px;
    }
    .sidebar .admin-logo {
        height: 28px;
        max-width: 145px;
    }
    .sidebar a {
        flex: 0 0 auto;
        margin: 0 !important;
        white-space: nowrap;
    }
    .dashboard-shell > main {
        padding: 18px !important;
    }
    .navbar .container,
    .navbar .container-fluid {
        gap: 10px;
    }
    .navbar-brand {
        margin-right: 0;
        min-width: 0;
    }
    .auth-navbar .container {
        flex-wrap: nowrap;
    }
    .auth-navbar .btn {
        min-height: 34px;
        padding: 6px 10px;
        font-size: 12px;
        white-space: nowrap;
    }
    .auth-page-main {
        min-height: calc(100vh - 125px);
    }
    .a360-logo {
        height: 30px;
        max-width: 170px;
    }
    .dashboard-shell .navbar .ms-auto,
    .report-shell .navbar .ms-auto {
        gap: 6px !important;
    }
    .dashboard-shell .navbar .btn,
    .report-shell .navbar .btn {
        min-height: 34px;
        padding: 6px 10px;
        font-size: 12px;
        white-space: nowrap;
    }
    .report-shell .navbar .btn i {
        margin-right: 2px;
    }
    .navbar-collapse .btn {
        width: 100%;
        margin-top: 8px;
    }
    .hero .display-4 {
        font-size: 42px;
        line-height: 1.05;
    }
    .hero .lead {
        font-size: 18px !important;
    }
    .metric {
        min-height: 118px;
    }
    .app-card {
        box-shadow: 0 8px 22px rgba(15, 23, 42, .05);
    }
    .exam-header .container-fluid {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
    .exam-header h1 {
        max-width: 210px;
        line-height: 1.2;
    }
    .timer-pill {
        padding: 7px 10px !important;
    }
    main.container-fluid {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    .question-nav {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        overflow-y: hidden;
        max-height: none;
        padding-bottom: 4px;
        scrollbar-width: thin;
    }
    .question-nav button {
        flex: 0 0 auto;
        width: 42px;
        height: 42px;
    }
    .question-block {
        padding: 18px !important;
    }
    .question-block h2 {
        font-size: 20px;
        line-height: 1.3;
    }
    .question-block .d-flex.justify-content-between {
        align-items: flex-start !important;
    }
    .question-block label.border {
        padding: 13px !important;
        line-height: 1.35;
    }
    .survey-rating-card {
        overflow-x: visible;
    }
    .survey-rating-heading {
        display: none;
    }
    .survey-rating-row {
        display: block;
    }
    .survey-rating-question {
        padding: 14px;
        border-bottom: 1px solid #e5e7eb;
    }
    .survey-rating-choice {
        justify-content: flex-start;
        border-right: 0;
        border-bottom: 1px solid #e5e7eb;
        min-height: 48px;
    }
    .survey-rating-choice span {
        display: inline;
        font-weight: 600;
        color: #475569;
    }
    .survey360-section-header {
        align-items: flex-start;
        flex-direction: column;
        padding: 14px;
    }
    .survey360-head {
        display: none;
    }
    .survey360-row {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        border-bottom: 10px solid #f1f5f9;
    }
    .survey360-question-text {
        grid-column: 1 / -1;
        padding: 14px;
        border-right: 0;
        border-bottom: 1px solid #e5e7eb;
    }
    .survey360-choice {
        min-height: 52px;
        padding: 10px;
    }
    .survey360-choice span {
        display: inline;
        margin-left: 4px;
        font-weight: 700;
        color: #475569;
    }
    .survey360-save-status {
        grid-column: 1 / -1;
        padding: 8px 14px;
        text-align: left;
        border-top: 1px solid #e5e7eb;
    }
    .question-block .btn {
        min-height: 42px;
    }
    .question-block .d-flex.gap-2.ms-auto {
        width: 100%;
        justify-content: flex-end;
        margin-left: 0 !important;
    }
    .prevBtn,
    .nextBtn,
    .inlineSubmitBtn,
    .saveBtn,
    .markBtn {
        flex: 1 1 auto;
    }
    .coding-toolbar {
        align-items: flex-start !important;
        font-size: 13px;
    }
    .coding-editor-shell .CodeMirror {
        height: 300px;
        font-size: 13px;
    }
    .coding-output {
        overflow-x: auto;
    }
    .subjective-upload-item {
        align-items: flex-start;
        flex-wrap: wrap;
    }
    .subjective-upload-item .btn {
        flex: 1 1 calc(50% - 8px);
    }
    .subjective-thumb,
    .subjective-file-icon {
        width: 48px;
        height: 48px;
    }
    .proctoring-freeze-card {
        padding: 22px;
    }
    .dt-container .dt-layout-row {
        display: block;
    }
    .dt-container .dt-search,
    .dt-container .dt-length,
    .dt-container .dt-info,
    .dt-container .dt-paging {
        margin-bottom: 10px;
        text-align: left;
    }
    .dt-container .dt-search input,
    .dt-container .dt-length select {
        width: 100%;
        margin-left: 0;
    }
    .admin-page-title { font-size: 24px; }
    .admin-actions { width: 100%; }
    .admin-actions .btn { flex: 1 1 100%; }
    .admin-form-card,
    .admin-info-card,
    .admin-table-card,
    .admin-filter-card {
        padding: 16px;
    }
    .admin-format-row { grid-template-columns: 1fr; gap: 4px; }
}

@media (max-width: 575px) {
    .container,
    .container-fluid {
        --bs-gutter-x: 1.25rem;
    }
    .hero .display-4 {
        font-size: 36px;
    }
    .section-band .d-flex.justify-content-between {
        align-items: flex-start !important;
        flex-direction: column;
        gap: 12px;
    }
    .section-band .btn {
        width: 100%;
    }
    .dashboard-shell .navbar .container-fluid {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }
    .dashboard-shell .navbar .container-fluid,
    .report-shell .navbar .container-fluid {
        flex-wrap: nowrap;
    }
    .a360-logo {
        height: 28px;
        max-width: 142px;
    }
    .auth-navbar .container {
        padding-left: 14px;
        padding-right: 14px;
    }
    .auth-navbar .btn {
        width: auto;
        min-width: 0;
        padding-left: 9px;
        padding-right: 9px;
    }
    .auth-page-main .container {
        padding-top: 28px !important;
        padding-bottom: 28px !important;
    }
    .auth-logo {
        height: 32px;
        max-width: 175px;
    }
    .site-footer {
        padding: 14px 12px;
        text-align: center;
    }
    .site-footer-links {
        font-size: 12px;
        gap: 4px 10px;
    }
    .report-shell .navbar .btn {
        padding: 6px 8px;
    }
    .dashboard-shell .navbar .nav-btn-label,
    .report-shell .navbar .nav-btn-label {
        display: none;
    }
    .dashboard-shell .navbar .btn,
    .report-shell .navbar .btn {
        width: 36px;
        min-width: 36px;
        padding-left: 0;
        padding-right: 0;
        text-align: center;
    }
    .dashboard-shell .navbar .btn i,
    .report-shell .navbar .btn i {
        margin: 0;
    }
    .report-shell .navbar .btn-outline-secondary {
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .dashboard-shell main.container {
        padding-left: 14px;
        padding-right: 14px;
    }
    .assessment-icon {
        width: 44px;
        height: 44px;
    }
    .exam-header .btn-sm {
        width: 38px;
        height: 38px;
        padding: 0;
    }
    .exam-header a.btn-sm {
        width: auto;
        padding: 7px 10px;
    }
    .tracking-item {
        font-size: 14px;
    }
    .question-block .d-flex.gap-2.ms-auto {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .question-block .inlineSubmitBtn {
        grid-column: 1 / -1;
    }
    .input-group {
        flex-direction: column;
    }
    .input-group > .form-control,
    .input-group > .btn {
        width: 100%;
        border-radius: 8px !important;
    }
    .modal-dialog {
        margin: 12px;
    }
}
.typing-summary-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(110px, 1fr));
    gap: 10px;
}

.report-template-modal .modal-content {
    max-height: calc(100dvh - 2rem);
    overflow: hidden;
}
.report-template-modal.show .modal-dialog {
    transform: none !important;
}
.report-template-modal .modal-header,
.report-template-modal .modal-footer {
    flex: 0 0 auto;
    background: #fff;
}
.report-template-modal .modal-body {
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 575.98px) {
    .report-template-modal .modal-dialog {
        margin: 0;
    }
    .report-template-modal .modal-content {
        max-height: 100dvh;
        border: 0;
        border-radius: 0;
    }
    .report-template-modal .modal-header,
    .report-template-modal .modal-body,
    .report-template-modal .modal-footer {
        padding-left: 16px;
        padding-right: 16px;
    }
    .report-template-modal .modal-footer {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .report-template-modal .modal-footer > * {
        width: 100%;
        margin: 0;
    }
}
.typing-metric {
    min-height: 90px;
    padding: 14px;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: #f8fafc;
    text-align: center;
}
.typing-metric span,
.typing-metric small {
    display: block;
    color: #64748b;
    font-size: .75rem;
}
.typing-metric strong {
    display: inline-block;
    margin: 3px 2px 0;
    color: #10203a;
    font-size: 1.55rem;
    line-height: 1.1;
}
.typing-reference {
    padding: 18px;
    border: 1px solid #cbd5e1;
    border-left: 4px solid #4f46e5;
    border-radius: 8px;
    background: #f8fafc;
}
.typing-reference-text {
    max-height: 260px;
    overflow-y: auto;
    color: #26344d;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.05rem;
    line-height: 1.85;
    user-select: none;
}
.typing-input {
    min-height: 230px;
    font-family: "Courier New", monospace;
    font-size: 1rem;
    line-height: 1.7;
    resize: vertical;
}
.typing-progress {
    background: #4f46e5;
}
@media (max-width: 767.98px) {
    .typing-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .typing-metric:last-child { grid-column: 1 / -1; }
    .typing-reference { padding: 14px; }
    .typing-reference-text { max-height: 220px; font-size: .95rem; line-height: 1.65; }
}
