:root {
    --app-bg: #f5f5f7;
    --surface: rgba(255, 255, 255, 0.86);
    --surface-solid: #ffffff;
    --surface-muted: #fbfbfd;
    --text: #1d1d1f;
    --muted: #6e6e73;
    --line: rgba(0, 0, 0, 0.1);
    --accent: #0071e3;
    --accent-hover: #0077ed;
    --success: #1d8f53;
    --warning: #a35f00;
    --danger: #d92d20;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100%;
    margin: 0;
    padding: 0;
    background:
        linear-gradient(180deg, #fbfbfd 0%, var(--app-bg) 46%, #ffffff 100%);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.55;
    letter-spacing: 0;
    -webkit-font-smoothing: antialiased;
}

body::before,
body::after {
    content: "";
    position: fixed;
    z-index: -1;
    border-radius: 999px;
    filter: blur(50px);
    opacity: 0.55;
    pointer-events: none;
}

body::before {
    top: 80px;
    right: -110px;
    width: 280px;
    height: 280px;
    background: rgba(0, 113, 227, 0.12);
}

body::after {
    bottom: 40px;
    left: -80px;
    width: 240px;
    height: 240px;
    background: rgba(255, 167, 38, 0.12);
}

a {
    color: var(--accent);
}

a:hover,
a:focus {
    color: var(--accent-hover);
    text-decoration: none;
}

.app-navbar.navbar {
    min-height: 56px;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: rgba(251, 251, 253, 0.82);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
    backdrop-filter: saturate(180%) blur(18px);
}

.app-navbar.is-scrolled {
    background: rgba(251, 251, 253, 0.92);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06);
}

.app-navbar .container {
    max-width: 1120px;
}

.app-navbar .navbar-brand {
    height: 56px;
    padding: 18px 0;
    color: var(--text);
    font-size: 16px;
    font-weight: 650;
}

.app-navbar .navbar-brand:hover,
.app-navbar .navbar-brand:focus {
    color: var(--text);
}

.app-navbar .navbar-nav > li > a {
    padding-top: 18px;
    padding-bottom: 18px;
    color: rgba(29, 29, 31, 0.74);
    font-size: 14px;
    font-weight: 500;
}

.app-navbar .navbar-nav > li > a:hover,
.app-navbar .navbar-nav > li > a:focus {
    color: var(--text);
    background: transparent;
}

.app-navbar .navbar-nav > .active > a,
.app-navbar .navbar-nav > .active > a:hover,
.app-navbar .navbar-nav > .active > a:focus {
    color: var(--text);
    background: transparent;
}

.app-navbar .navbar-nav > .active > a::after {
    content: "";
    display: block;
    width: 100%;
    height: 2px;
    margin-top: 8px;
    border-radius: 999px;
    background: var(--accent);
}

.app-navbar .navbar-toggle {
    margin-top: 11px;
    border: 0;
}

.app-navbar .navbar-toggle:hover,
.app-navbar .navbar-toggle:focus {
    background: rgba(0, 0, 0, 0.05);
}

.app-navbar .icon-bar {
    background: var(--text);
}

.page-shell {
    max-width: 1120px;
    padding-top: 34px;
    padding-bottom: 56px;
    animation: page-enter 320ms ease;
}

h1,
h2,
h3,
h4,
h5 {
    color: var(--text);
    font-weight: 700;
    letter-spacing: 0;
}

h1 {
    margin: 0 0 24px;
    font-size: 36px;
    line-height: 1.14;
}

h2 {
    font-size: 25px;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
    letter-spacing: 0;
    text-transform: uppercase;
}

.lead {
    color: var(--muted);
    font-size: 20px;
    line-height: 1.45;
}

.home-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(330px, 430px);
    align-items: center;
    gap: 58px;
    min-height: calc(100vh - 130px);
    padding: 28px 0 64px;
}

.home-copy h1 {
    margin-bottom: 16px;
    font-size: 52px;
    line-height: 1.08;
    background: linear-gradient(90deg, #177ddc 0%, #13a36f 46%, #f5a524 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.home-note {
    margin: 20px 0 0;
    color: var(--muted);
}

.home-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

.home-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 34px;
}

.metric-card {
    position: relative;
    padding: 18px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 12px 28px rgba(20, 99, 170, 0.08);
    overflow: hidden;
}

.metric-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #2f80ed, #27c498);
}

.metric-card:nth-child(2)::before {
    background: linear-gradient(90deg, #ff8a3d, #ffd166);
}

.metric-card:nth-child(3)::before {
    background: linear-gradient(90deg, #8f7cf6, #ff6b8b);
}

.metric-card span {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
}

.metric-card strong {
    display: block;
    margin-bottom: 6px;
    font-size: 18px;
}

.metric-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.home-panel {
    position: relative;
    min-height: 430px;
    padding-bottom: 74px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 8px;
    background:
        radial-gradient(circle at 18% 16%, rgba(255, 209, 102, 0.74), transparent 30%),
        radial-gradient(circle at 82% 20%, rgba(47, 128, 237, 0.44), transparent 32%),
        radial-gradient(circle at 72% 82%, rgba(39, 196, 152, 0.48), transparent 34%),
        linear-gradient(145deg, #f7fbff 0%, #ecf7ff 40%, #fff7e8 100%);
    box-shadow: 0 24px 60px rgba(35, 102, 160, 0.18);
    overflow: hidden;
}

.home-panel::before {
    content: "";
    position: absolute;
    inset: 22px 22px auto;
    height: 16px;
    border-radius: 8px;
    background:
        linear-gradient(90deg, #ff6b8b 0 16%, transparent 16% 21%, #ffd166 21% 37%, transparent 37% 42%, #27c498 42% 58%, transparent 58% 63%, #2f80ed 63% 100%);
    opacity: 0.78;
}

.home-credit {
    display: inline-flex;
    margin: 18px 0 0;
    padding: 8px 14px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.6;
}

.screen-orbit {
    position: absolute;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.25) 72%, transparent 100%);
    opacity: 0.9;
}

.orbit-a {
    top: 90px;
    right: 30px;
    width: 130px;
    height: 130px;
}

.orbit-b {
    bottom: 90px;
    left: 34px;
    width: 94px;
    height: 94px;
}

.screen-dock {
    position: absolute;
    right: 24px;
    bottom: 26px;
    left: 24px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    z-index: 3;
}

.dock-pill {
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.74);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 10px 26px rgba(35, 102, 160, 0.12);
}

.page-heading,
.panel-heading {
    margin-bottom: 26px;
}

.panel-heading.compact {
    margin-bottom: 18px;
}

.section-copy {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    font-size: 16px;
}

.form-panel,
.content-card {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.content-card-soft {
    margin-bottom: 24px;
    background: rgba(255, 255, 255, 0.68);
}

@keyframes page-enter {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.screen-card {
    position: absolute;
    right: 30px;
    left: 30px;
    display: grid;
    gap: 5px;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 18px 40px rgba(35, 102, 160, 0.16);
    backdrop-filter: blur(18px);
}

.screen-card-main {
    top: 72px;
    border-color: rgba(47, 128, 237, 0.16);
}

.screen-card-side {
    right: 58px;
    bottom: 98px;
    left: 58px;
    border-color: rgba(39, 196, 152, 0.18);
}

.screen-card strong {
    font-size: 22px;
}

.screen-card span {
    color: var(--muted);
}

.screen-progress {
    height: 9px;
    margin-top: 12px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.screen-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2f80ed, #27c498, #ffd166);
}

.screen-label {
    font-size: 13px;
    font-weight: 650;
}

.screen-badge {
    position: absolute;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, 0.74);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 14px 30px rgba(35, 102, 160, 0.16);
}

.badge-a {
    top: 162px;
    left: 26px;
}

.badge-b {
    top: 220px;
    right: 24px;
}

.screen-spark {
    position: absolute;
    z-index: 1;
    width: 74px;
    height: 74px;
    border-radius: 20px;
    transform: rotate(14deg);
    opacity: 0.86;
}

.spark-a {
    right: 34px;
    top: 64px;
    background: linear-gradient(135deg, #ff6b8b, #ffd166);
}

.spark-b {
    left: 42px;
    bottom: 88px;
    background: linear-gradient(135deg, #2f80ed, #27c498);
}

.auth-layout {
    display: grid;
    place-items: center;
    min-height: calc(100vh - 150px);
    padding: 28px 0 56px;
}

.auth-layout-wide {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 420px);
    align-items: center;
    gap: 46px;
}

.auth-intro {
    width: 100%;
    max-width: 560px;
}

.auth-intro h1 {
    margin-bottom: 16px;
    font-size: 44px;
    line-height: 1.1;
}

.auth-points {
    display: grid;
    gap: 14px;
    margin-top: 28px;
}

.auth-point {
    padding: 18px 20px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.04);
}

.auth-point strong {
    display: block;
    margin-bottom: 6px;
    font-size: 17px;
}

.auth-point span {
    color: var(--muted);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.auth-card h1 {
    margin-bottom: 28px;
}

.auth-card h2 {
    margin: 0 0 24px;
    font-size: 30px;
}

.btn {
    min-height: 38px;
    padding: 9px 18px;
    border-radius: 999px;
    border-width: 1px;
    font-weight: 600;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.btn:hover,
.btn:focus {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary,
.btn-success,
.btn-info {
    border-color: var(--accent);
    background: var(--accent);
    color: #ffffff;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-success:hover,
.btn-success:focus,
.btn-info:hover,
.btn-info:focus {
    border-color: var(--accent-hover);
    background: var(--accent-hover);
    color: #ffffff;
}

.btn-warning {
    border-color: #f5a524;
    background: #f5a524;
    color: #1d1d1f;
}

.btn-default,
.btn-outline-primary {
    border-color: rgba(0, 0, 0, 0.14);
    background: rgba(255, 255, 255, 0.72);
    color: var(--text);
}

.btn-default:hover,
.btn-default:focus,
.btn-outline-primary:hover,
.btn-outline-primary:focus {
    border-color: rgba(0, 0, 0, 0.22);
    background: #ffffff;
    color: var(--text);
}

.btn-block,
.w-100 {
    width: 100%;
}

.btn-sm {
    min-height: 32px;
    padding: 6px 13px;
    font-size: 13px;
}

.btn-lg {
    min-height: 48px;
    padding: 12px 24px;
    font-size: 16px;
}

.form-group,
.mb-3 {
    margin-bottom: 18px;
}

label,
.form-label {
    margin-bottom: 8px;
    color: var(--text);
    font-size: 14px;
    font-weight: 650;
}

.form-control,
.form-select,
select,
textarea {
    min-height: 44px;
    width: 100%;
    border: 1px solid rgba(0, 0, 0, 0.14);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--text);
    box-shadow: none;
    font-size: 15px;
}

textarea.form-control,
textarea {
    min-height: 120px;
    resize: vertical;
}

.knowledge-textarea {
    min-height: 240px;
}

.form-control:focus,
.form-select:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    outline: 0;
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.14);
}

form:not(.navbar-form) {
    max-width: 760px;
}

.form-panel form {
    max-width: 100%;
}

.alert {
    border: 0;
    border-radius: 8px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.alert-info {
    background: #eef6ff;
    color: #124b7f;
}

.alert-success {
    background: #edf8f2;
    color: #12643a;
}

.alert-warning {
    background: #fff7e8;
    color: var(--warning);
}

.alert-danger {
    background: #fff0ef;
    color: var(--danger);
}

.list-group {
    display: grid;
    gap: 14px;
}

.list-group-item,
.card,
.exam-card,
.exam-list-item,
.result-item,
.question-review {
    margin-bottom: 0;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-solid);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.05);
}

.ai-review-form {
    max-width: none !important;
}

.ai-question-card {
    display: grid;
    gap: 16px;
}

.ai-question-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.approval-check {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.approval-check input {
    margin: 0;
}

.ai-analysis {
    padding: 14px 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.68);
}

.ai-analysis strong {
    display: block;
    margin-bottom: 6px;
}

.ai-analysis p {
    margin: 0;
    color: var(--muted);
}

.ai-stream-card {
    display: grid;
    gap: 18px;
}

.stream-output {
    min-height: 360px;
    max-height: 520px;
    margin: 0;
    padding: 18px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
    color: var(--text);
    font-family: "Microsoft YaHei", "PingFang SC", Consolas, monospace;
    font-size: 14px;
    line-height: 1.7;
    white-space: pre-wrap;
    overflow: auto;
}

.stream-progress-fill {
    width: 0;
}

.btn.disabled {
    pointer-events: none;
    opacity: 0.55;
}

.list-group-item h5,
.card-title {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 20px;
    color: var(--text);
}

.list-group-item .btn,
.card .btn {
    margin-right: 8px;
    margin-bottom: 8px;
}

.btn-group {
    display: inline-block;
    margin-bottom: 8px;
    vertical-align: middle;
}

.exam-list,
.result-list,
.review-stack {
    display: grid;
    gap: 16px;
}

.management-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}

.exam-list-item,
.result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.exam-meta h2,
.result-item h2,
.content-card h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

.exam-title-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 8px;
}

.exam-title-row h2 {
    margin: 0;
}

.exam-status {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.status-live {
    background: #edf8f2;
    color: #12643a;
}

.status-muted {
    background: #eef1f5;
    color: #4e5968;
}

.status-closed {
    background: #fff0ef;
    color: var(--danger);
}

.exam-meta p,
.result-item p,
.content-card p {
    margin: 0;
    color: var(--muted);
}

.exam-type-note {
    margin-bottom: 8px !important;
    font-size: 13px;
    font-weight: 600;
    color: var(--text) !important;
}

.exam-attempt-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.attempt-pill {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 10px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
}

.exam-actions,
.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.exam-settings-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    max-width: none !important;
}

.exam-settings-form .form-select {
    width: 120px;
}

.exam-settings-form .form-control {
    width: 210px;
}

.action-row {
    margin-top: 24px;
}

.action-row-compact {
    margin-top: 0;
    margin-bottom: 18px;
}

.action-row-spacious {
    margin-top: 32px;
}

.select-wrap {
    min-width: 210px;
}

.toolbar-row {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.toolbar-row h2 {
    margin: 0 0 6px;
}

.toolbar-note {
    color: var(--muted) !important;
    font-size: 14px;
}

.toolbar-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    max-width: none !important;
}

.toolbar-form .form-control {
    min-width: 220px;
}

.inline-edit-form {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) minmax(160px, 1fr) auto;
    gap: 10px;
    align-items: center;
    max-width: none !important;
}

.table-actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.table-actions form {
    max-width: none;
}

.compact-input {
    min-height: 38px;
}

.section-copy-tight {
    margin-bottom: 16px;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.76);
    color: var(--text);
    font-weight: 600;
}

.filter-chip.active {
    border-color: var(--accent);
    background: #eef6ff;
    color: #124b7f;
}

.score-pill,
.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 16px;
    border-radius: 999px;
    background: #eef6ff;
    color: #124b7f;
    font-weight: 700;
    white-space: nowrap;
}

.progress-card {
    padding-bottom: 22px;
}

.exam-rule-card {
    display: grid;
    gap: 6px;
    margin-bottom: 24px;
}

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

.progress-header h2 {
    margin: 0 0 4px;
}

.progress-track {
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.progress-fill {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #0071e3 0%, #39a2ff 100%);
    transition: width 180ms ease;
}

.submit-warning {
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid rgba(245, 165, 36, 0.3);
    border-radius: 8px;
    background: #fff7e8;
    color: var(--warning);
    font-weight: 650;
}

.submit-warning[hidden] {
    display: none;
}

.score-display {
    margin: 12px 0 18px;
    font-size: 56px;
    font-weight: 700;
    line-height: 1;
}

.result-summary {
    max-width: 720px;
}

.steps-list {
    margin: 0;
    padding-left: 20px;
}

.steps-list li + li {
    margin-top: 10px;
}

.option-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 18px;
}

.exam-page {
    display: grid;
    gap: 20px;
}

.exam-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.summary-card {
    padding: 20px 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.05);
}

.summary-card span {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
}

.summary-card strong {
    font-size: 24px;
}

.exam-timer {
    margin-bottom: 0;
}

.candidate-card p + p {
    margin-top: 8px;
}

.question-card {
    margin-bottom: 16px;
}

.question-card-missing {
    border-color: rgba(245, 165, 36, 0.48);
    box-shadow: 0 12px 34px rgba(245, 165, 36, 0.13);
}

.question-text {
    margin-bottom: 16px !important;
    color: var(--text) !important;
    font-size: 18px;
}

.choice-stack {
    display: grid;
    gap: 12px;
}

.choice-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 15px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--text);
    cursor: pointer;
}

.choice-item:hover {
    border-color: rgba(0, 113, 227, 0.28);
    background: #fafcff;
}

.choice-item.is-selected {
    border-color: rgba(0, 113, 227, 0.34);
    background: #eef6ff;
    box-shadow: inset 0 0 0 1px rgba(0, 113, 227, 0.12);
}

.choice-item input {
    flex: 0 0 auto;
}

.review-header {
    margin-bottom: 12px;
}

.choice-lines {
    display: grid;
    gap: 6px;
    margin: 10px 0 14px;
    color: var(--text);
}

.choice-lines-compact {
    margin-bottom: 0;
    font-size: 14px;
    color: var(--muted);
}

.wrong-question-detail {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.answer-strip,
.analysis-strip,
.frequent-wrong-strip {
    display: grid;
    gap: 5px;
    padding: 12px 14px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
}

.answer-strip {
    border-color: rgba(0, 113, 227, 0.18);
    background: #eef6ff;
}

.frequent-wrong-strip {
    border-color: rgba(245, 165, 36, 0.28);
    background: #fff7e8;
}

.frequent-wrong-strip strong {
    color: var(--warning);
}

.answer-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.answer-strip strong {
    color: #124b7f;
    font-size: 15px;
    line-height: 1.6;
}

.analysis-strip p {
    margin: 0;
    color: var(--text);
    line-height: 1.7;
}

.choice-distribution {
    display: grid;
    gap: 8px;
}

.choice-stat {
    padding: 10px 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
}

.choice-stat.is-correct {
    border-color: rgba(18, 100, 58, 0.18);
    background: #edf8f2;
}

.choice-stat.is-frequent-wrong {
    border-color: rgba(245, 165, 36, 0.34);
    background: #fff7e8;
}

.choice-stat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 7px;
}

.choice-stat-head strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.06);
}

.choice-stat-head span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.choice-stat-bar {
    height: 8px;
    margin-bottom: 7px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.choice-stat-bar div {
    height: 100%;
    border-radius: inherit;
    background: var(--accent);
}

.choice-stat.is-frequent-wrong .choice-stat-bar div {
    background: #f5a524;
}

.choice-stat p {
    margin: 0;
    color: var(--text);
    font-size: 13px;
    line-height: 1.55;
}

.analytics-note {
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.04);
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.teacher-advice-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.advice-output {
    flex-basis: 100%;
    max-height: 260px;
    padding: 14px;
    border: 1px solid rgba(0, 113, 227, 0.18);
    border-radius: 8px;
    background: #f8fbff;
    color: var(--text);
    line-height: 1.75;
    overflow: auto;
}

.advice-output h3 {
    margin: 14px 0 8px;
    color: #124b7f;
    font-size: 16px;
}

.advice-output h3:first-child {
    margin-top: 0;
}

.advice-output p {
    margin: 0 0 10px;
    color: var(--text);
}

.advice-output ul {
    margin: 0 0 12px;
    padding-left: 20px;
}

.advice-output li {
    margin-bottom: 7px;
}

.metric-subtext {
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

.question-bank-table td {
    vertical-align: top;
}

.question-bank-exam {
    min-width: 150px;
    color: var(--muted);
    font-weight: 650;
}

.question-analysis-preview {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.035);
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.table,
.honor-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.table-responsive {
    overflow-x: auto;
}

.table > thead > tr > th,
.honor-table th {
    border-bottom: 1px solid var(--line);
    background: var(--surface-muted);
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.table > tbody > tr > td,
.table > thead > tr > th,
.honor-table th,
.honor-table td {
    padding: 13px 14px;
    border-top: 0;
    border-right: 0;
    border-left: 0;
}

.table > tbody > tr + tr > td,
.honor-table tbody tr + tr td {
    border-top: 1px solid rgba(0, 0, 0, 0.07);
}

.table-hover > tbody > tr:hover,
.table-striped tbody tr:hover,
.honor-table tbody tr:hover {
    background: #f7f7fa;
}

.table-danger {
    background: #fff2f1;
}

.table-warning {
    background: #fff8eb;
}

.badge,
.rounded-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    min-height: 24px;
    border-radius: 999px;
    background: var(--accent);
    color: #ffffff;
}

.rank-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 34px;
    padding: 0 10px;
    border-radius: 999px;
    background: #eef6ff;
    color: #124b7f;
    font-weight: 700;
}

.rank-chip-1 {
    background: #fff3c4;
    color: #7b5800;
}

.rank-chip-2 {
    background: #eef1f5;
    color: #4e5968;
}

.rank-chip-3 {
    background: #f7e7dc;
    color: #8a4f2b;
}

.card-header,
.exam-header {
    margin: -20px -20px 18px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
    border-radius: 8px 8px 0 0;
    background: var(--surface-muted);
    color: var(--text);
}

.card-header h2,
.exam-header h2 {
    margin: 0;
    font-size: 22px;
}

.bg-primary {
    background: var(--surface-muted) !important;
}

.text-white {
    color: var(--text) !important;
}

.card-body,
.exam-body {
    padding: 0;
}

.card-footer {
    margin: 18px -20px -20px;
    padding: 16px 20px;
    border-top: 1px solid var(--line);
    border-radius: 0 0 8px 8px;
    background: var(--surface-muted);
}

.honor-container {
    width: 100% !important;
    margin: 0 auto !important;
}

.honor-title {
    margin: 0 0 26px !important;
    text-align: left !important;
}

.gold,
.silver,
.bronze {
    color: var(--text);
}

.gold {
    background: #fff8d7 !important;
}

.silver {
    background: #f1f2f5 !important;
}

.bronze {
    background: #fff0df !important;
}

.metric-bar {
    width: 160px;
    height: 10px;
    margin: 0 auto 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.metric-bar-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #f5a524 0%, #ff7a45 100%);
}

.metric-value {
    font-weight: 700;
    text-align: center;
}

.error-rate-cell {
    min-width: 190px;
}

.pagination-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 24px;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.8);
    color: var(--text);
    font-weight: 600;
}

.pagination-link.active {
    border-color: var(--accent);
    background: var(--accent);
    color: #ffffff;
}

.pagination-link.disabled {
    opacity: 0.45;
}

.form-check,
.radio,
.checkbox {
    position: relative;
    margin: 12px 0;
    padding: 14px 16px 14px 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.form-check-input,
input[type="radio"],
input[type="checkbox"] {
    margin-top: 3px;
    accent-color: var(--accent);
}

.fw-bold {
    font-weight: 700;
}

.text-muted {
    color: var(--muted);
}

.text-center {
    text-align: center;
}

.text-end {
    text-align: right;
}

.mt-4 {
    margin-top: 24px;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-4 {
    margin-bottom: 24px;
}

.my-4 {
    margin-top: 24px;
    margin-bottom: 24px;
}

.shadow,
.shadow-sm {
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.05);
}

#timer {
    position: sticky;
    top: 68px;
    z-index: 5;
    font-size: 16px;
    font-weight: 650;
}

@media (max-width: 767px) {
    .app-navbar .navbar-brand {
        padding-left: 15px;
    }

    .app-navbar .navbar-collapse {
        border: 0;
        box-shadow: none;
    }

    .app-navbar .navbar-nav > .active > a::after {
        width: 44px;
    }

    .page-shell {
        padding-top: 24px;
        padding-bottom: 40px;
    }

    .home-hero {
        grid-template-columns: 1fr;
        gap: 28px;
        min-height: auto;
        padding-top: 20px;
    }

    .home-copy h1 {
        font-size: 38px;
    }

    .lead {
        font-size: 18px;
    }

    .home-panel {
        min-height: 380px;
        padding-bottom: 86px;
    }

    .screen-card {
        right: 22px;
        left: 22px;
        padding: 18px;
    }

    .screen-card-main {
        top: 64px;
    }

    .screen-card-side {
        right: 36px;
        bottom: 104px;
        left: 36px;
    }

    .badge-a {
        top: 150px;
        left: 18px;
    }

    .badge-b {
        top: 210px;
        right: 18px;
    }

    .screen-spark {
        width: 56px;
        height: 56px;
    }

    .screen-dock {
        right: 18px;
        bottom: 22px;
        left: 18px;
    }

    .home-metrics {
        grid-template-columns: 1fr;
    }

    .home-credit {
        margin-top: 18px;
    }

    .form-panel,
    .content-card {
        padding: 22px;
    }

    .auth-layout-wide {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .auth-intro h1 {
        font-size: 36px;
    }

    .auth-card {
        padding: 26px;
    }

    .option-grid,
    .exam-summary,
    .management-grid {
        grid-template-columns: 1fr;
    }

    .exam-list-item,
    .result-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .list-group-item .btn,
    .card .btn,
    .btn-group,
    .form-select,
    .select-wrap {
        width: 100%;
        margin-right: 0;
    }

    .toolbar-row,
    .inline-edit-form,
    .ai-question-header {
        align-items: stretch;
        flex-direction: column;
        grid-template-columns: 1fr;
    }

    .toolbar-form,
    .toolbar-form .form-control {
        width: 100%;
    }

    .table-responsive {
        border: 0;
    }

    .metric-bar,
    .error-rate-cell {
        width: 100%;
        min-width: 0;
    }

    .progress-header {
        align-items: flex-start;
        flex-direction: column;
    }
}
