:root {
    --vlingo-ink: #16191f;
    --vlingo-muted: #667085;
    --vlingo-line: #e8edf3;
    --vlingo-panel: #f7f9fc;
    --vlingo-card: #ffffff;
    --vlingo-orange: #cf6f31;
    --vlingo-gold: #f5b32f;
    --vlingo-blue: #2364aa;
}

.vlingo-home-body {
    margin: 0;
    min-height: 100dvh;
    color: var(--vlingo-ink);
    background:
        radial-gradient(circle at 14% 18%, rgba(245, 179, 47, 0.18), transparent 28%),
        radial-gradient(circle at 88% 10%, rgba(35, 100, 170, 0.12), transparent 26%),
        linear-gradient(135deg, #fbfcff 0%, #eef4f8 100%);
    font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
}

.vlingo-home-shell {
    width: min(1180px, calc(100vw - 56px));
    margin: 0 auto;
    padding: 64px 0;
}

.vlingo-home-hero {
    position: relative;
    overflow: hidden;
    min-height: 390px;
    padding: 56px;
    border: 1px solid rgba(22, 25, 31, 0.08);
    border-radius: 32px;
    background:
        linear-gradient(125deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.78)),
        linear-gradient(135deg, rgba(207, 111, 49, 0.10), rgba(35, 100, 170, 0.10));
    box-shadow: 0 28px 90px rgba(19, 37, 66, 0.12);
}

.vlingo-home-hero::after {
    content: "";
    position: absolute;
    right: -70px;
    bottom: -95px;
    width: 360px;
    height: 360px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(207, 111, 49, 0.20), rgba(245, 179, 47, 0.22));
}

.vlingo-home-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.vlingo-home-logo {
    width: 162px;
    height: auto;
}

.vlingo-home-brand span {
    color: #344054;
    font-size: 15px;
}

.vlingo-home-eyebrow {
    margin: 48px 0 10px;
    color: var(--vlingo-orange);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.vlingo-home-hero h1 {
    margin: 0;
    max-width: 760px;
    font-size: clamp(42px, 4rem, 68px);
    line-height: 1.02;
    letter-spacing: 0;
}

.vlingo-home-lead {
    max-width: 710px;
    margin: 26px 0 0;
    color: var(--vlingo-muted);
    font-size: 18px;
    line-height: 1.8;
}

.vlingo-home-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 34px;
}

.vlingo-home-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 800;
    text-decoration: none;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.vlingo-home-actions a:hover,
.vlingo-home-module-action:hover {
    transform: translateY(-1px);
}

.vlingo-home-actions a:active,
.vlingo-home-module-action:active {
    transform: translateY(1px);
}

.vlingo-home-actions a:focus-visible,
.vlingo-home-module-action:focus-visible {
    outline: 3px solid rgba(35, 100, 170, 0.28);
    outline-offset: 3px;
}

.vlingo-home-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--vlingo-orange), #b95720);
    box-shadow: 0 14px 30px rgba(207, 111, 49, 0.24);
}

.vlingo-home-secondary {
    color: var(--vlingo-ink);
    background: #ffffff;
    border: 1px solid var(--vlingo-line);
}

.vlingo-home-modules {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 22px;
}

.vlingo-home-module-card {
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 14px;
    min-width: 0;
    padding: 24px;
    border: 1px solid rgba(22, 25, 31, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 18px 50px rgba(19, 37, 66, 0.08);
}

.vlingo-home-module-card h2 {
    margin: 0;
    font-size: 26px;
    line-height: 1.15;
    letter-spacing: 0;
}

.vlingo-home-module-card p {
    margin: 0;
    color: var(--vlingo-muted);
    line-height: 1.72;
}

.vlingo-home-module-action {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-width: 82px;
    padding: 8px 14px;
    border: 1px solid rgba(207, 111, 49, 0.28);
    border-radius: 8px;
    background: #fff7ed;
    color: #9a4a1b;
    font-weight: 900;
    text-decoration: none;
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.vlingo-home-module-action:hover {
    border-color: rgba(207, 111, 49, 0.5);
    background: #fff1df;
}

.vlingo-home-status {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 22px;
}

.vlingo-home-status article,
.vlingo-home-boundary {
    border: 1px solid var(--vlingo-line);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 18px 50px rgba(19, 37, 66, 0.08);
}

.vlingo-home-status article {
    min-width: 0;
    padding: 22px;
}

.vlingo-home-status span {
    display: block;
    color: var(--vlingo-muted);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.vlingo-home-status strong {
    display: block;
    margin-top: 8px;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.1;
}

.vlingo-home-status-text {
    color: #1f2937;
    font-size: clamp(18px, 1.5vw, 24px) !important;
    line-height: 1.18 !important;
    word-break: keep-all;
}

.vlingo-home-boundary {
    margin-top: 22px;
    padding: 26px 30px;
}

.vlingo-home-boundary h2 {
    margin: 0 0 14px;
}

.vlingo-home-boundary ul {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.vlingo-home-boundary li {
    padding: 9px 13px;
    border-radius: 999px;
    background: var(--vlingo-panel);
    color: var(--vlingo-muted);
    font-weight: 700;
}

body.admin-body {
    --ds-background: #f3f1ec;
    --ui-content-surface: #ffffff;
    --surface-color: #ffffff;
    --theme-sidebar-bg: #111827;
    --theme-sidebar-hover: rgba(255, 255, 255, 0.08);
    --theme-sidebar-active: #fff7ed;
    --ds-sidebar-text: #e5e7eb;
    --ds-sidebar-border: rgba(255, 255, 255, 0.10);
    --theme-button-accent: #d8732f;
    --primary-color: #d8732f;
    --primary-hover: #bc5e22;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.30), rgba(255, 255, 255, 0.08)),
        var(--ds-background, #f3f1ec);
}

body.admin-body .admin-workspace {
    width: auto;
    max-width: none;
    min-height: calc(100vh - 56px);
    margin-left: 0;
    padding-top: 34px;
    padding-right: clamp(28px, 3vw, 54px);
    padding-left: clamp(28px, 3vw, 54px);
}

body.admin-body .admin-workspace > .page-header,
body.admin-body .admin-workspace > .business-header,
body.admin-body .admin-workspace > header {
    border-color: rgba(17, 24, 39, 0.08);
    background: rgba(255, 255, 255, 0.76);
    box-shadow: 0 18px 50px rgba(17, 24, 39, 0.06);
}

body.course-production-local-body .admin-topbar.vlingo-page-header,
body.course-production-local-body .page-top-header.vlingo-page-header,
body.course-production-local-body .vlingo-page-header {
    display: flex;
    justify-content: flex-end;
    width: 100%;
    min-height: 0 !important;
    height: auto !important;
    margin: -12px 0 2px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.course-production-local-body .vlingo-page-header-main {
    width: auto;
    min-width: 0;
    margin-left: auto;
    display: flex;
    justify-content: flex-end;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.course-production-local-body .vlingo-page-header-title,
body.course-production-local-body .current-company-switcher {
    display: none !important;
}

body.course-production-local-body .vlingo-page-header-utility {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    width: auto;
    min-width: 0;
    margin-left: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

body.course-production-local-body .page-top-language,
body.course-production-local-body .admin-topbar-language,
body.course-production-local-body .vlingo-page-header-language {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.admin-body .section-heading {
    margin-bottom: 26px;
    max-width: 760px;
}

body.admin-body .section-heading h2 {
    margin-top: 6px;
    font-size: clamp(30px, 2.4vw, 42px);
    letter-spacing: -0.035em;
}

body.admin-body .section-heading p {
    max-width: 560px;
    color: var(--vlingo-muted);
    line-height: 1.7;
}

body.admin-body .dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    max-width: none;
}

body.admin-body .stat-card {
    min-height: 118px;
    border: 1px solid rgba(18, 24, 38, 0.06);
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff, #fbfaf7);
    box-shadow: 0 16px 38px rgba(18, 24, 38, 0.06);
}

body.admin-body .stat-card strong {
    font-size: clamp(32px, 3vw, 44px);
    letter-spacing: -0.045em;
}

body.admin-body .dashboard-columns {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) minmax(320px, 1fr) minmax(280px, 0.8fr);
    gap: 18px;
    max-width: none;
    align-items: start;
}

body.admin-body .dashboard-columns .section {
    border: 1px solid rgba(17, 24, 39, 0.07);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 18px 46px rgba(18, 24, 38, 0.06);
}

body.admin-body .compact-list > div {
    border: 1px solid rgba(18, 24, 38, 0.04);
    border-radius: 14px;
    background: #f8f6f1;
}

body.admin-body .language-switch,
body.admin-body [data-language-switch],
body.admin-body .language-switcher {
    position: fixed;
    top: 20px;
    right: 28px;
    z-index: 20;
}

body.admin-body .admin-brand {
    padding-top: 24px;
    padding-bottom: 28px;
}

body.admin-body .admin-brand .logo {
    width: 180px;
    max-width: 180px;
    height: auto;
}

body.admin-body .admin-brand .sidebar-logo-collapsed {
    display: none;
}

body.admin-body .admin-shell.sidebar-collapsed .admin-brand {
    padding-top: 22px;
    padding-bottom: 24px;
}

body.admin-body .admin-shell.sidebar-collapsed .admin-brand .sidebar-logo-expanded {
    display: none;
}

body.admin-body .admin-shell.sidebar-collapsed .admin-brand .sidebar-logo-collapsed {
    display: block;
    width: 42px;
    max-width: 42px;
    height: 32px;
    max-height: 32px;
    object-fit: contain;
    object-position: center center;
}

body.admin-body .admin-sidebar {
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    background:
        radial-gradient(circle at 38% 0%, rgba(216, 115, 47, 0.22), transparent 30%),
        linear-gradient(180deg, #111827 0%, #0d1423 100%);
}

body.admin-body .admin-nav {
    gap: 8px;
}

body.admin-body .admin-nav-route-group {
    display: grid;
    gap: 8px;
}

body.admin-body .admin-nav-route-group[hidden] {
    display: none;
}

body.admin-body .admin-nav-item {
    border-radius: 14px;
    color: rgba(229, 231, 235, 0.86);
}

body.admin-body .admin-nav-home-link {
    margin-bottom: 6px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    text-decoration: none;
}

body.admin-body .admin-nav-item.active {
    color: #111827;
    background: #fff7ed;
    box-shadow: inset 3px 0 0 var(--vlingo-orange);
}

body.admin-body .admin-nav-item:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

body.admin-body .admin-nav-item.active:hover {
    color: #111827;
    background: #fff7ed;
}

body.admin-body .page-version-footer {
    right: 28px;
    bottom: 22px;
    color: rgba(22, 25, 31, 0.62);
}

body.admin-body .audio-tts-panel .log-container {
    min-height: 46px;
    max-height: 220px;
    margin: 16px 0 0;
    padding: 12px 16px;
    border: 1px solid rgba(17, 24, 39, 0.08);
    border-radius: 12px;
    background: #f8fafc;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

body.admin-body .audio-tts-panel .log-content {
    color: #475569;
}

body.admin-body .audio-tts-panel .log-content:empty::before {
    content: "音频生成日志将在这里显示";
    color: #94a3b8;
}

body.admin-body .audio-tts-panel .btn:disabled {
    border-color: #e2e8f0;
    background: #f8fafc;
    color: #94a3b8;
}

body.login-body .login-runtime-surface .login-brand-row {
    height: 100%;
    min-height: 280px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 18px;
    text-align: center;
}

body.login-body .login-runtime-surface .login-brand-row .logo {
    width: min(320px, 78%);
    max-width: 320px;
    height: auto;
}

body.login-body .login-runtime-title {
    display: block;
    width: 100%;
}

body.login-body .login-product-title {
    margin: 0;
    color: #111827;
    font-size: clamp(34px, 3.4vw, 48px);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -0.045em;
}

body.login-body .login-access-heading {
    margin: 18px 0 20px;
}

body.login-body .login-access-heading h2 {
    margin: 0;
    color: #2f3135;
    font-size: clamp(26px, 2vw, 32px);
    font-weight: 900;
    line-height: 1.12;
    letter-spacing: -0.035em;
}

body.login-body .executive-login-shell,
body.login-body .login-card {
    min-height: auto;
}

body.login-body .login-access-layer {
    padding-top: 30px;
    padding-bottom: 24px;
}

body.login-body .login-form {
    gap: 12px;
}

body.login-body .login-form .form-group {
    margin-bottom: 10px;
}

body.login-body .login-form input {
    min-height: 40px;
}

body.login-body .login-form .btn,
body.login-body .login-form button[type="submit"] {
    min-height: 40px;
}

body.login-body .login-platform-identity {
    margin-top: 18px;
}

@media (min-width: 1900px) {
    body.admin-body .admin-workspace {
        margin-left: 0;
    }
}

@media (max-width: 900px) {
    .vlingo-home-shell {
        width: min(100vw - 28px, 760px);
        padding: 28px 0;
    }

    .vlingo-home-hero {
        padding: 32px 24px;
        border-radius: 24px;
    }

    .vlingo-home-hero h1 {
        font-size: 42px;
    }

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

    .vlingo-home-status {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.admin-body .admin-workspace {
        width: auto;
        padding: 22px 16px;
    }

    body.admin-body .dashboard-grid,
    body.admin-body .dashboard-columns {
        grid-template-columns: 1fr;
        max-width: none;
    }

    body.admin-body .language-switch,
    body.admin-body [data-language-switch],
    body.admin-body .language-switcher {
        position: static;
        margin-bottom: 16px;
    }
}

@media (max-width: 560px) {
    .vlingo-home-status {
        grid-template-columns: 1fr;
    }
}

/* Inline sentence structure workspace inside Course Production. */
body.admin-body.course-production-local-body:has([data-section-panel="sentence-structure"].active) .admin-main,
body.admin-body.course-production-local-body:has([data-section-panel="sentence-structure"].active) .admin-content,
body.admin-body.course-production-local-body:has([data-section-panel="sentence-structure"].active) .content-wrapper,
body.admin-body.course-production-local-body:has([data-section-panel="sentence-structure"].active) .main-content {
    width: 100%;
    max-width: none;
}

body.admin-body.course-production-local-body [data-section-panel="sentence-structure"].active {
    width: calc(100vw - var(--ds-sidebar-width, 256px) - 64px);
    max-width: none;
}

.sentence-structure-pipeline-shell {
    width: 100%;
    max-width: none;
}

.sentence-structure-pipeline-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    max-width: none !important;
    margin-bottom: 14px !important;
}

.sentence-structure-pipeline-heading h2 {
    margin: 4px 0 0;
    color: #0f172a;
    font-size: clamp(28px, 2.1vw, 38px);
    line-height: 1.05;
    letter-spacing: 0;
}

.sentence-structure-pipeline-heading h2 i {
    color: var(--vlingo-orange);
    font-size: 0.68em;
    transform: translateY(-3px);
}

.sentence-structure-pipeline-heading p {
    max-width: 780px !important;
    color: var(--vlingo-muted);
    line-height: 1.75;
}

.sentence-structure-lab-status span,
.sentence-structure-panel-head > span,
[data-active-sentence-course] {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    justify-content: center;
    padding: 5px 11px;
    border-radius: 999px;
    background: #f8f6f1;
    color: #475569;
    font-size: 12px;
    font-weight: 900;
}

.sentence-structure-course-lock {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
    padding: 12px 14px !important;
}

.sentence-structure-course-lock h3 {
    flex: 0 0 auto;
    margin: 0;
    color: #111827;
    font-size: 16px;
    letter-spacing: 0;
}

.sentence-structure-course-lock h3 i {
    color: var(--vlingo-orange);
}

.sentence-structure-course-lock p {
    margin: 0;
    color: var(--vlingo-muted);
}

.sentence-structure-course-lock-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    min-width: min(760px, 62vw);
}

.sentence-structure-course-lock-controls select,
.sentence-structure-quality-filter select,
.sentence-structure-token-table input,
.sentence-structure-token-table select {
    box-sizing: border-box;
    width: 100%;
    min-height: 40px;
    border: 1px solid rgba(17, 24, 39, 0.10);
    border-radius: 12px;
    background: #ffffff;
    color: #111827;
    font: inherit;
}

.sentence-structure-course-lock-controls select {
    flex: 1 1 420px;
    min-width: min(420px, 42vw);
    padding: 0 12px;
}

.sentence-structure-lab-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.sentence-structure-lab-actions .btn,
.sentence-structure-editor-actions .btn,
.sentence-structure-ai-actions .btn,
.sentence-exercise-actions .btn,
.sentence-exercise-head .btn,
.sentence-learning-hints-head .btn,
.sentence-structure-course-lock .btn {
    min-height: 40px;
    border-radius: 12px;
    font-weight: 800;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}

.sentence-structure-lab-actions .btn:hover,
.sentence-structure-editor-actions .btn:hover:not(:disabled),
.sentence-structure-ai-actions .btn:hover:not(:disabled),
.sentence-exercise-actions .btn:hover:not(:disabled),
.sentence-exercise-head .btn:hover:not(:disabled),
.sentence-structure-course-lock .btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

.sentence-structure-lab-actions .btn-primary,
.sentence-structure-editor-actions .btn-primary,
.sentence-structure-ai-actions .btn-primary,
.sentence-exercise-actions .btn-primary,
.sentence-exercise-head .btn-primary {
    border: 0;
    background: linear-gradient(135deg, var(--vlingo-orange), #b95c22);
    color: #ffffff;
    box-shadow: 0 14px 30px rgba(207, 111, 49, 0.20);
}

.sentence-structure-lab-actions .btn-secondary,
.sentence-structure-editor-actions .btn-secondary,
.sentence-structure-ai-actions .btn-secondary,
.sentence-exercise-actions .btn-secondary,
.sentence-learning-hints-head .btn-secondary,
.sentence-structure-course-lock .btn-secondary {
    border: 1px solid rgba(17, 24, 39, 0.10);
    background: rgba(255, 255, 255, 0.90);
    color: #111827;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.sentence-structure-lab-actions button:disabled,
.sentence-structure-editor-actions button:disabled,
.sentence-structure-ai-actions button:disabled,
.sentence-exercise button:disabled {
    border-color: rgba(17, 24, 39, 0.08);
    background: #f4f1eb;
    color: #a8a29e;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.sentence-structure-quality-filter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #475569;
    font-weight: 900;
}

.sentence-structure-quality-filter select {
    min-width: 150px;
    padding: 0 10px;
}

.sentence-structure-feedback {
    display: none;
    min-height: 40px;
    align-items: center;
    padding: 9px 13px;
    border-radius: 12px;
    background: #fff7ed;
    color: #9a3412;
    font-weight: 800;
}

.sentence-structure-feedback:not(:empty) {
    display: inline-flex;
}

.sentence-structure-feedback[data-feedback-type="error"] {
    background: #fef2f2;
    color: #991b1b;
}

.sentence-structure-lab-grid {
    display: grid;
    grid-template-columns: minmax(270px, 340px) minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    width: 100%;
}

.sentence-structure-work-area {
    display: grid;
    min-width: 0;
    gap: 14px;
}

.sentence-structure-panel {
    min-width: 0;
    border: 1px solid rgba(18, 24, 38, 0.06);
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff, #fbfaf7);
    box-shadow: 0 10px 24px rgba(18, 24, 38, 0.05);
}

.sentence-structure-candidates,
.sentence-structure-editor,
.sentence-structure-preview-panel {
    padding: 14px;
}

.sentence-structure-candidates {
    position: sticky;
    top: 18px;
}

.sentence-structure-panel-head,
.sentence-structure-ai-head,
.sentence-exercise-head,
.sentence-learning-hints-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 16px;
}

.sentence-structure-panel-head h2,
.sentence-structure-ai-head h3,
.sentence-exercise-head h3,
.sentence-learning-hints-head h3 {
    margin: 0;
    color: #111827;
    font-size: 18px;
    line-height: 1.16;
    letter-spacing: 0;
}

.sentence-structure-panel .eyebrow {
    margin: 0 0 6px;
    color: var(--vlingo-muted);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.05em;
}

.sentence-structure-list {
    display: grid;
    gap: 8px;
    max-height: calc(100vh - 280px);
    min-height: 260px;
    overflow: auto;
    padding-right: 4px;
}

.sentence-structure-list:empty::before {
    content: "暂无 draft 候选。请先锁定课程并导入下一批 100 条。";
    display: grid;
    min-height: 220px;
    place-items: center;
    padding: 22px;
    border: 1px dashed rgba(17, 24, 39, 0.16);
    border-radius: 18px;
    background: #f8f6f1;
    color: #64748b;
    text-align: center;
    line-height: 1.7;
}

.sentence-structure-candidate {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid rgba(17, 24, 39, 0.06);
    border-radius: 10px;
    background: #f8f6f1;
    color: #111827;
    text-align: left;
    box-shadow: none;
}

.sentence-structure-candidate.is-active {
    border-color: rgba(216, 115, 47, 0.42);
    background: #fff7ed;
    box-shadow: inset 4px 0 0 var(--vlingo-orange);
}

.sentence-structure-candidate strong,
.sentence-structure-candidate span,
.sentence-structure-candidate small {
    display: block;
}

.sentence-structure-candidate strong {
    margin-bottom: 4px;
    color: #111827;
}

.sentence-structure-candidate span,
.sentence-structure-candidate small {
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
}

.sentence-structure-detail {
    margin-bottom: 14px;
}

.sentence-structure-original {
    margin: 0 0 6px;
    color: #111827;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.025em;
}

.sentence-structure-translation {
    margin: 0 0 16px;
    color: #475569;
    font-size: 16px;
}

.sentence-structure-source {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
}

.sentence-structure-source div {
    min-width: 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f8f6f1;
}

.sentence-structure-source dt {
    margin-bottom: 5px;
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
}

.sentence-structure-source dd {
    margin: 0;
    overflow: hidden;
    color: #111827;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sentence-structure-editor-actions,
.sentence-structure-ai-actions,
.sentence-exercise-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 14px 0;
}

.sentence-structure-ai-panel,
.sentence-card-preview,
.sentence-learning-hints,
.sentence-exercise {
    margin-top: 16px;
    padding: 16px;
    border: 1px solid rgba(17, 24, 39, 0.07);
    border-radius: 18px;
    background: #f8f6f1;
}

.sentence-card-preview {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 7px;
    min-height: 86px;
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    background: #F8F6F1;
}

.sentence-structure-ai-panel.is-hidden,
.sentence-learning-hints.is-hidden,
.sentence-exercise-body.is-hidden,
.is-hidden {
    display: none !important;
}

.sentence-structure-ai-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.sentence-structure-ai-examples {
    margin-top: 12px;
    color: #475569;
}

.sentence-structure-human-token-label {
    margin: 18px 0 8px;
    color: #475569;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.05em;
}

.sentence-structure-token-table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(17, 24, 39, 0.08);
    border-radius: 16px;
    background: #ffffff;
}

.sentence-structure-token-table {
    width: 100%;
    min-width: 680px;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
}

.sentence-structure-token-table th,
.sentence-structure-token-table td {
    padding: 8px;
    border-bottom: 1px solid rgba(17, 24, 39, 0.08);
    color: #334155;
    text-align: left;
    vertical-align: top;
}

.sentence-structure-token-table th {
    background: #f8f6f1;
    color: #475569;
    font-size: 12px;
    font-weight: 900;
}

.sentence-structure-token-table th:nth-child(1),
.sentence-structure-token-table td:nth-child(1) {
    width: 70px;
}

.sentence-structure-token-table th:nth-child(2),
.sentence-structure-token-table td:nth-child(2),
.sentence-structure-token-table th:nth-child(3),
.sentence-structure-token-table td:nth-child(3) {
    width: 18%;
}

.sentence-structure-token-table th:nth-child(4),
.sentence-structure-token-table td:nth-child(4) {
    width: 160px;
}

.sentence-structure-token-table th:nth-child(6),
.sentence-structure-token-table td:nth-child(6) {
    width: 90px;
}

.sentence-structure-token-table tbody:empty::before {
    content: "还没有拆句片段。可以先生成拆句建议或手动新增。";
    display: block;
    padding: 18px;
    color: #64748b;
}

.sentence-card-preview:empty::before {
    content: "保存前可在这里实时查看拆句卡片。";
    color: #64748b;
}

.sentence-token-card,
.sentence-structure-ai-token,
.sentence-exercise-token {
    display: inline-flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 17px 11px 10px;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 3px 8px rgba(40, 30, 20, 0.05);
}

.sentence-token-card {
    --token-accent: #8A96A8;
    --token-soft: rgba(138, 150, 168, 0.08);
    --token-text: #405066;
    position: relative;
    min-width: 82px;
    max-width: 142px;
    overflow: hidden;
    border: 1px solid #E7E0D6;
    background: #ffffff;
    box-shadow: 0 3px 8px rgba(40, 30, 20, 0.05);
}

.sentence-token-card.is-phrase {
    min-width: 128px;
    max-width: 260px;
    padding-right: 13px;
    padding-left: 13px;
}

.sentence-token-card::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 11px;
    width: 48px;
    height: 2px;
    border-radius: 999px;
    background: var(--token-accent);
}

.sentence-token-id {
    color: #1F2933;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 6px;
    white-space: nowrap;
}

.sentence-token-role {
    width: fit-content;
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--token-soft);
    color: var(--token-text);
    font-size: 10px;
    font-weight: 900;
    line-height: 1.3;
}

.sentence-token-zh {
    margin-top: auto;
    color: #6B7280;
    font-size: 12px;
    line-height: 1.45;
    padding-top: 5px;
}

.sentence-token-parts {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 7px;
}

.sentence-token-part {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    max-width: 100%;
    color: #8A8F98;
    font-size: 10px;
    line-height: 1.25;
}

.sentence-token-part b {
    overflow: hidden;
    color: #4B5563;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sentence-token-part em {
    color: #9CA3AF;
    font-style: normal;
    font-weight: 700;
}

.sentence-token-zh.is-pending {
    color: #94a3b8;
}

.sentence-token-card[data-color-group="time"] {
    --token-accent: #8A96A8;
    --token-soft: rgba(138, 150, 168, 0.12);
    --token-text: #405066;
}

.sentence-token-card[data-color-group="subject"] {
    --token-accent: #D88745;
    --token-soft: rgba(216, 135, 69, 0.09);
    --token-text: #8A4B1F;
}

.sentence-token-card[data-color-group="subject_phrase"] {
    --token-accent: #D88745;
    --token-soft: rgba(216, 135, 69, 0.08);
    --token-text: #8A4B1F;
}

.sentence-token-card[data-color-group="determiner"],
.sentence-token-card[data-color-group="possessive"] {
    --token-accent: #D88745;
    --token-soft: rgba(216, 135, 69, 0.08);
    --token-text: #8A4B1F;
}

.sentence-token-card[data-color-group="verb"],
.sentence-token-card[data-color-group="action"] {
    --token-accent: #6FAF7A;
    --token-soft: rgba(111, 175, 122, 0.09);
    --token-text: #356B40;
}

.sentence-token-card[data-color-group="predicate_progressive"] {
    --token-accent: #6FAF7A;
    --token-soft: rgba(111, 175, 122, 0.08);
    --token-text: #356B40;
}

.sentence-token-card[data-color-group="object"] {
    --token-accent: #8A96A8;
    --token-soft: rgba(138, 150, 168, 0.12);
    --token-text: #405066;
}

.sentence-token-card[data-color-group="noun_phrase"] {
    --token-accent: #8A96A8;
    --token-soft: rgba(138, 150, 168, 0.08);
    --token-text: #405066;
}

.sentence-token-card[data-color-group="purpose"] {
    --token-accent: #A58AD6;
    --token-soft: rgba(165, 138, 214, 0.09);
    --token-text: #5F4A89;
}

.sentence-token-card[data-color-group="passive"] {
    --token-accent: #8A96A8;
    --token-soft: rgba(138, 150, 168, 0.12);
    --token-text: #405066;
}

.sentence-token-card[data-color-group="place"] {
    --token-accent: #8A96A8;
    --token-soft: rgba(138, 150, 168, 0.12);
    --token-text: #405066;
}

.sentence-token-card[data-color-group="connector"] {
    --token-accent: #8A96A8;
    --token-soft: rgba(138, 150, 168, 0.12);
    --token-text: #405066;
}

.sentence-token-card[data-color-group="modifier"] {
    --token-accent: #A58AD6;
    --token-soft: rgba(165, 138, 214, 0.09);
    --token-text: #5F4A89;
}

.sentence-token-card[data-color-group="state"],
.sentence-token-card[data-color-group="be"] {
    --token-accent: #8A96A8;
    --token-soft: rgba(138, 150, 168, 0.12);
    --token-text: #405066;
}

.sentence-token-card[data-color-group="other"] {
    --token-accent: #8A96A8;
    --token-soft: rgba(138, 150, 168, 0.12);
    --token-text: #405066;
}

.sentence-structure-ai-token[data-color-group="time"],
.sentence-exercise-token[data-color-group="time"] { border-left: 4px solid #2563eb; }
.sentence-structure-ai-token[data-color-group="subject"],
.sentence-exercise-token[data-color-group="subject"] { border-left: 4px solid #d8732f; }
.sentence-structure-ai-token[data-color-group="verb"],
.sentence-structure-ai-token[data-color-group="action"],
.sentence-exercise-token[data-color-group="verb"],
.sentence-exercise-token[data-color-group="action"] { border-left: 4px solid #16a34a; }
.sentence-structure-ai-token[data-color-group="object"],
.sentence-exercise-token[data-color-group="object"] { border-left: 4px solid #ca8a04; }
.sentence-structure-ai-token[data-color-group="purpose"],
.sentence-exercise-token[data-color-group="purpose"] { border-left: 4px solid #7c3aed; }
.sentence-structure-ai-token[data-color-group="passive"],
.sentence-exercise-token[data-color-group="passive"] { border-left: 4px solid #be123c; }
.sentence-structure-ai-token[data-color-group="place"],
.sentence-exercise-token[data-color-group="place"] { border-left: 4px solid #0891b2; }
.sentence-structure-ai-token[data-color-group="connector"],
.sentence-exercise-token[data-color-group="connector"] { border-left: 4px solid #475569; }
.sentence-structure-ai-token[data-color-group="modifier"],
.sentence-exercise-token[data-color-group="modifier"] { border-left: 4px solid #9333ea; }
.sentence-structure-ai-token[data-color-group="other"],
.sentence-exercise-token[data-color-group="other"] { border-left: 4px solid #94a3b8; }

.sentence-learning-hints section {
    margin-top: 12px;
}

.sentence-learning-hints h4 {
    margin: 0 0 8px;
    color: #111827;
}

.sentence-learning-hints [data-learning-hint-list] {
    color: #475569;
    line-height: 1.7;
}

.sentence-exercise-head p {
    margin: 6px 0 0;
    color: #64748b;
}

.sentence-exercise-token-list {
    display: grid;
    gap: 10px;
}

.sentence-exercise-result {
    margin-top: 12px;
    color: #475569;
    font-weight: 800;
}

@media (max-width: 1500px) {
    body.admin-body.course-production-local-body [data-section-panel="sentence-structure"].active {
        width: auto;
    }

    .sentence-structure-lab-grid {
        grid-template-columns: minmax(300px, 0.8fr) minmax(620px, 1.6fr);
    }

    .sentence-structure-preview-panel {
        grid-column: 1 / -1;
        position: static;
    }
}

@media (max-width: 1100px) {
    .sentence-structure-pipeline-heading,
    .sentence-structure-course-lock,
    .sentence-structure-course-lock-controls {
        display: grid;
        min-width: 0;
        justify-content: stretch;
    }

    .sentence-structure-course-lock-controls select {
        min-width: 0;
        width: 100%;
    }

    .sentence-structure-lab-grid,
    .sentence-structure-source {
        grid-template-columns: 1fr;
    }

    .sentence-structure-candidates,
    .sentence-structure-preview-panel {
        position: static;
    }
}

.learning-access-admin {
    display: grid;
    gap: 16px;
}

.learning-access-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.learning-access-search label,
.learning-access-admin .grant-form label {
    display: grid;
    gap: 8px;
}

.learning-access-search span,
.learning-access-admin .grant-form span {
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.learning-access-admin input[type="search"],
.learning-access-admin input[type="text"],
.learning-access-admin input[type="datetime-local"] {
    width: 100%;
    min-height: 42px;
    border: 1px solid #d8e0e8;
    border-radius: 8px;
    padding: 0 12px;
    color: #0f172a;
    background: #fff;
    font: inherit;
}

.learning-access-admin .access-admin-status {
    margin: 12px 0 0;
    color: #64748b;
}

.learning-access-admin .access-admin-status.is-error {
    color: #b42318;
}

.learning-access-admin .access-admin-status.is-success {
    color: #1f7a5c;
}

.learning-access-admin .access-admin-results {
    display: grid;
    gap: 14px;
}

.learning-access-admin .learner-card {
    border: 1px solid #d8e0e8;
    border-radius: 10px;
    background: #fff;
    padding: 16px;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.06);
}

.learning-access-admin .learner-card-main {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.learning-access-admin .learner-email {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 850;
}

.learning-access-admin .learner-meta {
    margin: 0;
    color: #64748b;
    line-height: 1.6;
}

.learning-access-admin .access-badge {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 8px 12px;
    background: #eef8f1;
    color: #1f7a5c;
    font-size: 13px;
    font-weight: 800;
}

.learning-access-admin .access-badge.is-locked {
    background: #fff4ed;
    color: #b8502c;
}

.learning-access-admin .entitlement-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    margin: 14px 0;
}

.learning-access-admin .entitlement-item {
    border: 1px solid #d8e0e8;
    border-radius: 10px;
    padding: 12px;
    background: #f7f9fb;
}

.learning-access-admin .entitlement-item strong,
.learning-access-admin .entitlement-item span {
    display: block;
}

.learning-access-admin .entitlement-item span {
    margin-top: 4px;
    color: #64748b;
    font-size: 13px;
}

.learning-access-admin .entitlement-item button.danger {
    margin-top: 10px;
    min-height: 36px;
    border: 1px solid #f2b8b5;
    border-radius: 8px;
    padding: 0 12px;
    background: #fff5f4;
    color: #b42318;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.learning-access-admin .grant-form {
    display: grid;
    grid-template-columns: minmax(180px, 240px) minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
    margin-top: 12px;
}

.device-sn-admin {
    display: grid;
    gap: 16px;
}

.device-sn-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
}

.device-sn-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px;
    border: 1px solid #d8e0e8;
    border-radius: 10px;
    background: #f8fafc;
}

.device-sn-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #475569;
    font-weight: 800;
    cursor: pointer;
}

.device-sn-tab.active {
    border-color: #d8e0e8;
    background: #fff;
    color: #0f172a;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.device-sn-tab-panel[hidden] {
    display: none;
}

.device-sn-tab-panel {
    display: grid;
    gap: 16px;
}

.device-sn-panel,
.device-sn-table-panel {
    min-width: 0;
}

.device-sn-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(96px, 1fr));
    gap: 12px;
    align-items: end;
}

.device-sn-generate-form .btn {
    grid-column: 1 / -1;
    min-height: 42px;
}

.device-sn-manage-btn {
    min-height: 38px;
    white-space: nowrap;
}

.device-sn-policy-dialog[hidden] {
    display: none;
}

.device-sn-policy-dialog {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 24px;
}

.device-sn-policy-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.46);
}

.device-sn-policy-modal {
    position: relative;
    z-index: 1;
    width: min(760px, 100%);
    max-height: min(760px, calc(100vh - 48px));
    overflow: auto;
    border: 1px solid #d8e0e8;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
    padding: 22px;
}

.device-sn-policy-form {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
    margin-top: 16px;
}

.device-sn-policy-form label:first-child,
.device-sn-policy-form .btn {
    grid-column: 1 / -1;
}

.device-sn-filter-form {
    grid-template-columns: minmax(96px, 0.8fr) minmax(132px, 1fr) minmax(124px, 0.9fr) auto auto auto;
}

.device-sn-form label {
    display: grid;
    gap: 8px;
}

.device-sn-form span,
.device-sn-hint {
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.device-sn-form input,
.device-sn-form select {
    width: 100%;
    min-height: 42px;
    border: 1px solid #d8e0e8;
    border-radius: 8px;
    padding: 0 12px;
    color: #0f172a;
    background: #fff;
    font: inherit;
}

.device-sn-status {
    margin: 12px 0 0;
    color: #64748b;
}

.device-sn-status.is-error {
    color: #b42318;
}

.device-sn-status.is-success {
    color: #1f7a5c;
}

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

.device-sn-summary > div {
    min-height: 86px;
    border: 1px solid #d8e0e8;
    border-radius: 10px;
    padding: 14px;
    background: #fff;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.05);
}

.device-sn-summary span,
.device-sn-summary strong {
    display: block;
}

.device-sn-summary span {
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
}

.device-sn-summary strong {
    margin-top: 8px;
    color: #0f172a;
    font-size: 24px;
    line-height: 1.1;
}

.device-sn-table-wrap {
    max-height: 520px;
    overflow: auto;
}

.device-sn-table th:nth-child(1),
.device-sn-table td:nth-child(1) {
    width: 210px;
}

.device-sn-table th:nth-child(7),
.device-sn-table td:nth-child(7) {
    width: 170px;
}

.device-sn-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    border-radius: 999px;
    padding: 0 10px;
    background: #eef8f1;
    color: #1f7a5c;
    font-size: 12px;
    font-weight: 850;
}

@media (max-width: 900px) {
    .learning-access-search,
    .learning-access-admin .grant-form,
    .device-sn-grid,
    .device-sn-form,
    .device-sn-filter-form,
    .device-sn-summary {
        grid-template-columns: 1fr;
    }

    .device-sn-tabs {
        display: grid;
    }

    .learning-access-admin .learner-card-main {
        display: grid;
    }
}

