html,
body {
    background: #eef2f6;
    color: #1f2937;
    font-family: "Microsoft YaHei UI", "Segoe UI", Arial, sans-serif;
    margin: 0;
}

a {
    color: inherit;
}

.workspace-header {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1.2rem;
}

.workspace-header h1 {
    color: #101828;
    font-size: 2rem;
    margin: 0 0 0.35rem;
}

.eyebrow {
    color: #1f6f78;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    margin: 0 0 0.3rem;
    text-transform: uppercase;
}

.muted,
.empty-state {
    color: #667085;
    margin: 0;
}

.status-strip {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    justify-content: flex-end;
}

.status-strip span,
.soft-badge,
.chip {
    background: rgba(31, 111, 120, 0.08);
    border: 1px solid rgba(31, 111, 120, 0.14);
    border-radius: 999px;
    color: #24545b;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.38rem 0.72rem;
}

.diagnosis-page-grid,
.dashboard-main-grid,
.support-grid,
.workspace-grid,
.stats-grid,
.dashboard-kpi-grid,
.dashboard-deep-grid,
.dashboard-bottom-grid {
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
}

.diagnosis-page-grid,
.dashboard-main-grid,
.support-grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(360px, 1fr);
}

.workspace-grid--split,
.workspace-grid--workorder,
.workspace-grid--cases,
.workspace-grid--devices {
    grid-template-columns: minmax(0, 1.35fr) minmax(360px, 1fr);
}

.workspace-grid--admin {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stats-grid,
.dashboard-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-deep-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.95fr) minmax(0, 0.85fr);
}

.dashboard-bottom-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
}

.column-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.column-stack--narrow {
    max-width: 460px;
}

.column-stack--fixed {
    max-width: 440px;
}

.panel {
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.06);
    padding: 1.15rem 1.15rem 1.1rem;
}

.panel h2 {
    color: #101828;
    font-size: 1.06rem;
    margin: 0 0 0.95rem;
}

.panel-heading {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.panel-heading-actions {
    align-items: center;
    display: flex;
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.centered-copy {
    margin: 0 auto;
    max-width: 560px;
    text-align: center;
}

.hero-panel {
    background:
        radial-gradient(circle at top right, rgba(122, 185, 199, 0.18), transparent 24%),
        linear-gradient(135deg, #172033 0%, #22314a 58%, #29405c 100%);
    border: 1px solid rgba(41, 64, 92, 0.4);
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
    color: #ffffff;
    overflow: hidden;
    padding: 1.4rem;
}

.hero-panel h1 {
    color: #ffffff;
    font-size: 2.1rem;
    margin: 0.2rem 0 0.55rem;
}

.hero-panel .muted,
.hero-panel p {
    color: #d0d7e3;
}

.hero-panel-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.9fr);
}

.hero-metric-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hero-metric-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 0.9rem 0.95rem;
}

.hero-metric-card strong {
    display: block;
    font-size: 1.45rem;
    margin-top: 0.15rem;
}

.hero-metric-card span {
    color: #d0d7e3;
    font-size: 0.8rem;
}

.hero-side-panel {
    background: rgba(7, 12, 24, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    padding: 1rem;
}

.hero-side-panel h2 {
    color: #ffffff;
    margin-bottom: 0.3rem;
}

.hero-side-panel ul {
    color: #d0d7e3;
    margin: 0;
    padding-left: 1.1rem;
}

.hero-side-panel li {
    margin-bottom: 0.45rem;
}

.stat-panel {
    min-height: 136px;
    position: relative;
}

.stat-panel::after {
    background: linear-gradient(180deg, rgba(31, 111, 120, 0.14), transparent);
    border-radius: 14px;
    content: "";
    inset: 0;
    opacity: 0.55;
    pointer-events: none;
    position: absolute;
}

.stat-panel > * {
    position: relative;
    z-index: 1;
}

.stat-label {
    color: #667085;
    display: block;
    font-size: 0.8rem;
    margin-bottom: 0.35rem;
}

.stat-value {
    color: #101828;
    display: block;
    font-size: 2.05rem;
    font-weight: 800;
}

.stat-trend {
    color: #24545b;
    font-size: 0.82rem;
    font-weight: 600;
    margin-top: 0.55rem;
}

.action-grid {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.action-tile {
    background: linear-gradient(180deg, #fcfdff 0%, #f7fafc 100%);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    gap: 0.38rem;
    min-height: 126px;
    padding: 1rem;
    text-decoration: none;
}

.action-tile strong {
    color: #101828;
    font-size: 0.98rem;
}

.action-tile span {
    color: #667085;
    font-size: 0.88rem;
    line-height: 1.5;
}

.home-action-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 1rem;
}

.home-action-card {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.06);
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    min-height: 190px;
    padding: 1.15rem;
    text-decoration: none;
    transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.home-action-card:hover {
    border-color: rgba(31, 111, 120, 0.28);
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.1);
    transform: translateY(-2px);
}

.home-action-card span {
    align-items: center;
    background: rgba(31, 111, 120, 0.08);
    border-radius: 12px;
    color: #24545b;
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 800;
    height: 34px;
    justify-content: center;
    width: 44px;
}

.home-action-card strong {
    color: #101828;
    display: block;
    font-size: 1.24rem;
}

.home-action-card p {
    color: #667085;
    line-height: 1.55;
    margin: 0;
}

.home-action-card--primary {
    background:
        radial-gradient(circle at top right, rgba(126, 213, 223, 0.24), transparent 30%),
        linear-gradient(135deg, #172033 0%, #203d59 100%);
    color: #ffffff;
}

.home-action-card--primary span {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.home-action-card--primary strong,
.home-action-card--primary p {
    color: #ffffff;
}

.text-link {
    color: #1f6f78;
    font-size: 0.9rem;
    font-weight: 800;
    text-decoration: none;
}

.field-row {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: 1fr 1fr;
}

label {
    color: #344054;
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.85rem;
}

label .form-control {
    margin-top: 0.35rem;
}

.field-helper {
    color: #7b8794;
    display: block;
    font-size: 0.76rem;
    font-weight: 500;
    margin-top: 0.35rem;
}

.issue-box {
    min-height: 170px;
    resize: vertical;
}

.chip-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.chip-row-label {
    color: #667085;
    font-size: 0.78rem;
    font-weight: 700;
    margin-right: 0.1rem;
}

.primary-action {
    align-items: center;
    background: linear-gradient(180deg, #1f6f78 0%, #245d72 100%);
    border: 0;
    border-radius: 12px;
    box-shadow: 0 12px 24px rgba(31, 111, 120, 0.18);
    color: #fff;
    display: inline-flex;
    font-size: 0.94rem;
    font-weight: 700;
    gap: 0.5rem;
    justify-content: center;
    min-height: 46px;
    padding: 0 1rem;
    width: 100%;
}

.primary-action:disabled {
    cursor: default;
    opacity: 0.7;
}

.primary-action:not(button) {
    text-decoration: none;
}

.evidence-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.summary-card {
    background: #ffffff;
}

.summary-copy {
    background: linear-gradient(180deg, #effaf4 0%, #edf7f2 100%);
    border: 1px solid rgba(28, 91, 67, 0.08);
    border-left: 4px solid #24845c;
    border-radius: 10px;
    color: #1c5b43;
    margin: 0 0 1rem;
    padding: 0.95rem;
}

.result-meta-grid {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 0.85rem;
}

.result-meta-grid div {
    background: #f8fafc;
    border: 1px solid #e4e9f1;
    border-radius: 10px;
    padding: 0.72rem 0.78rem;
}

.result-meta-grid span {
    color: #667085;
    display: block;
    font-size: 0.76rem;
    margin-bottom: 0.18rem;
}

.result-meta-grid strong {
    color: #101828;
    display: block;
    font-size: 1.2rem;
}

.query-footnote {
    color: #667085;
    font-size: 0.78rem;
    line-height: 1.5;
    margin: 0.7rem 0 0;
    word-break: break-word;
}

.warning-panel {
    background: linear-gradient(180deg, #fff8f1 0%, #fff4ed 100%);
    border-color: #fed7aa;
}

.dropzone-panel {
    align-items: center;
    background:
        linear-gradient(180deg, rgba(31, 111, 120, 0.04), rgba(31, 111, 120, 0.02)),
        rgba(255, 255, 255, 0.84);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 280px;
    text-align: center;
}

.dropzone-icon {
    align-items: center;
    background: linear-gradient(180deg, #dff2f4 0%, #d4ecef 100%);
    border-radius: 999px;
    color: #1f6f78;
    display: flex;
    font-size: 1.35rem;
    font-weight: 800;
    height: 68px;
    justify-content: center;
    margin-bottom: 1rem;
    width: 68px;
}

.queue-stack {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.queue-item {
    align-items: flex-start;
    background: #f9fafb;
    border: 1px solid #eaecf0;
    border-radius: 10px;
    display: flex;
    gap: 0.8rem;
    min-height: 60px;
    overflow: hidden;
    padding: 0.8rem 0.9rem;
}

.queue-item strong {
    color: #101828;
    display: block;
    font-size: 0.98rem;
    line-height: 1.35;
    min-width: 0;
    overflow-wrap: anywhere;
}

.queue-item span {
    color: #344054;
    display: block;
    font-size: 0.88rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.queue-item.active {
    background: linear-gradient(180deg, #f4fbfc 0%, #f1f7f8 100%);
    border-color: #bcdde2;
    box-shadow: inset 0 0 0 1px rgba(31, 111, 120, 0.08);
}

.workspace-grid--documents-top {
    grid-template-columns: minmax(360px, 0.9fr) minmax(0, 1.1fr);
}

.workspace-grid--documents-review {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
}

.workspace-grid--robot-workbench {
    grid-template-columns: minmax(360px, 0.85fr) minmax(0, 1.15fr);
}

.workspace-grid--robot-detail {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.workspace-grid--inventory {
    grid-template-columns: minmax(360px, 0.85fr) minmax(0, 1.15fr);
}

.workspace-grid--inventory-detail {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
}

.workspace-grid--manual-library {
    grid-template-columns: minmax(360px, 0.82fr) minmax(0, 1.18fr);
}

.inventory-message,
.robot-message {
    margin-bottom: 1rem;
}

.inventory-message--success,
.robot-message--success {
    background: #f1faf5;
    border-color: #b9ddcb;
    color: #1c5b43;
}

.inventory-message--error,
.robot-message--error {
    background: #fff5f4;
    border-color: #f4c7c3;
    color: #a33b33;
}

.robot-search-bar {
    align-items: flex-end;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: minmax(0, 1fr) auto auto;
}

.robot-search-field {
    min-width: 0;
}

.robot-empty-state {
    align-items: flex-start;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.robot-empty-state strong {
    color: #101828;
}

.robot-empty-state span {
    line-height: 1.5;
}

.robot-list-item {
    color: inherit;
    font: inherit;
    text-align: left;
    width: 100%;
}

.robot-list-title {
    align-items: flex-start;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.robot-list-title span {
    flex-shrink: 0;
}

.robot-form-grid,
.robot-maintenance-form,
.robot-detail-grid {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.robot-form-wide {
    grid-column: 1 / -1;
}

.robot-submit-record {
    margin-top: 0.9rem;
}

.robot-timeline-item .detail-block {
    -webkit-line-clamp: unset;
    max-height: none;
}

.inventory-movement-item .detail-block {
    -webkit-line-clamp: unset;
    max-height: none;
}

.manual-import-form,
.manual-search-grid {
    display: grid;
    gap: 0.75rem;
}

.manual-search-grid {
    align-items: end;
    grid-template-columns: minmax(220px, 1fr) minmax(160px, 0.65fr) minmax(150px, 0.55fr) auto;
}

.manual-health-grid {
    display: grid;
    gap: 0.7rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 1rem;
}

.manual-health-grid div {
    background: #f8fafc;
    border: 1px solid #e4e7ec;
    border-radius: 10px;
    padding: 0.75rem;
}

.manual-health-grid span {
    color: #667085;
    display: block;
    font-size: 0.82rem;
}

.manual-health-grid strong {
    color: #101828;
    display: block;
    font-size: 1.35rem;
    margin-top: 0.2rem;
}

.manual-issues {
    display: grid;
    gap: 0.45rem;
    margin-top: 0.85rem;
}

.manual-issues span {
    background: #fff8f1;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    color: #9a3412;
    padding: 0.55rem 0.7rem;
}

.manual-quality-stack {
    display: grid;
    gap: 0.65rem;
    max-height: 360px;
    overflow: auto;
}

.manual-quality-item {
    border-left: 3px solid #b7791f;
}

.manual-quality-item .detail-block {
    -webkit-line-clamp: unset;
    max-height: none;
}

.manual-quality-item {
    align-items: flex-start;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.manual-repair-actions {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.manual-repair-actions span {
    color: #667085;
    font-size: 0.86rem;
    line-height: 1.45;
}

.manual-selected-issue {
    background: #f8fafc;
    border: 1px solid #dde5ea;
    border-radius: 8px;
    display: grid;
    gap: 0.25rem;
    margin-bottom: 0.85rem;
    padding: 0.75rem;
}

.manual-selected-issue strong {
    color: #102a2e;
    font-size: 0.95rem;
}

.manual-selected-issue span,
.manual-repair-editor {
    color: #667085;
    font-size: 0.86rem;
}

.manual-repair-editor {
    display: grid;
    gap: 0.4rem;
}

.manual-repair-editor textarea {
    line-height: 1.5;
    resize: vertical;
}

.manual-repair-result {
    border: 1px solid #dde5ea;
    border-radius: 8px;
    display: grid;
    gap: 0.25rem;
    margin-top: 0.85rem;
    padding: 0.75rem;
}

.manual-repair-result span {
    font-size: 0.86rem;
}

.manual-repair-result--success {
    background: #f0f9f4;
    border-color: rgba(31, 138, 91, 0.22);
    color: #145b3b;
}

.manual-repair-result--failed {
    background: #fff8f1;
    border-color: rgba(183, 121, 31, 0.24);
    color: #7a4c0a;
}

.manual-result-title {
    align-items: flex-start;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.manual-result-title span,
.manual-result-meta {
    color: #667085;
    font-size: 0.86rem;
}

.manual-result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0.55rem 0;
}

.manual-excerpt {
    -webkit-line-clamp: unset;
    max-height: none;
}

.queue-stack--manual-docs {
    max-height: 420px;
}

.upload-stack {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.form-control--file {
    align-items: center;
    display: flex;
    min-height: 44px;
    padding: 0.45rem 0.6rem;
}

.queue-stack--scroll {
    max-height: 620px;
    overflow: auto;
    padding-right: 0.2rem;
}

.queue-stack--published {
    max-height: 360px;
}

.queue-item--draft,
.queue-item--document,
.queue-item--chunk,
.queue-item--published {
    cursor: pointer;
    min-height: 96px;
    transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
}

.queue-item--draft:hover,
.queue-item--document:hover,
.queue-item--chunk:hover,
.queue-item--published:hover {
    border-color: #bfd7dd;
    transform: translateY(-1px);
}

.queue-item-body {
    flex: 1;
    min-width: 0;
}

.queue-item-body p {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.queue-item--published .detail-block {
    display: -webkit-box;
    line-height: 1.45;
    margin-top: 0.28rem;
    max-height: 2.9em;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.review-meta-grid,
.review-field-grid {
    display: grid;
    gap: 0.8rem;
}

.review-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 1rem;
}

.review-field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.review-field-card {
    background: #f8fafc;
    border: 1px solid #e4e9f1;
    border-radius: 12px;
    padding: 0.9rem;
}

.review-field-card span {
    color: #667085;
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.review-field-card p {
    color: #101828;
    line-height: 1.55;
    margin: 0;
    white-space: pre-line;
}

.review-chunk {
    background: #f8fafc;
    border: 1px solid #e4e9f1;
    border-radius: 12px;
    max-height: 420px;
    overflow: auto;
    padding: 0.9rem;
}

.review-alert {
    border-radius: 12px;
    margin-bottom: 1rem;
    padding: 0.9rem 1rem;
}

.review-alert strong {
    color: #9a3412;
    display: block;
    font-size: 0.88rem;
    margin-bottom: 0.45rem;
}

.review-alert--warning {
    background: #fff7ed;
    border: 1px solid #fed7aa;
}

.review-alert--success {
    background: #ecfdf3;
    border: 1px solid #bbf7d0;
}

.review-alert--success strong {
    color: #166534;
}

.review-alert--danger {
    background: #fff1f2;
    border: 1px solid #fecdd3;
}

.review-alert--danger strong {
    color: #9f1239;
}

.secondary-chip {
    background: #ffffff;
    border: 1px solid #d7dde6;
    border-radius: 999px;
    color: #344054;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 700;
    min-height: 34px;
    padding: 0 0.85rem;
}

.secondary-chip--active {
    background: rgba(31, 111, 120, 0.1);
    border-color: #a8ccd1;
    color: #24545b;
}

.secondary-action {
    align-items: center;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    color: #344054;
    display: inline-flex;
    font-size: 0.94rem;
    font-weight: 700;
    justify-content: center;
    min-height: 46px;
    padding: 0 1rem;
    width: 100%;
}

.secondary-action:disabled,
.secondary-chip:disabled {
    cursor: default;
    opacity: 0.65;
}

.action-grid--review {
    margin-top: 0.9rem;
}

.compact-list {
    color: #344054;
    line-height: 1.55;
    margin-bottom: 0;
    padding-left: 1.2rem;
}

.compact-list li {
    margin-bottom: 0.45rem;
}

.detail-block {
    color: #344054;
    line-height: 1.6;
    margin: 0;
    white-space: pre-line;
}

.success-panel {
    background: linear-gradient(180deg, #f1faf5 0%, #edf8f2 100%);
    border-color: #b9ddcb;
}

.success-copy {
    color: #1c5b43;
    line-height: 1.55;
    margin: 0;
}

.form-showcase-grid {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 1rem;
}

.field-card {
    display: flex;
    flex-direction: column;
    gap: 0.38rem;
}

.field-title {
    color: #344054;
    font-size: 0.8rem;
    font-weight: 700;
}

.field-box,
.text-card {
    background: #f9fafb;
    border: 1px solid #d7dde6;
    border-radius: 10px;
}

.field-box {
    align-items: center;
    color: #101828;
    display: flex;
    min-height: 40px;
    padding: 0.58rem 0.72rem;
}

.text-card {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-bottom: 1rem;
    padding: 0.82rem 0.88rem;
}

.text-card p {
    color: #101828;
    line-height: 1.5;
    margin: 0;
}

.case-card,
.hit-item,
.feed-item,
.data-row {
    border-top: 1px solid #eaecf0;
    padding-top: 0.85rem;
}

.case-card:first-of-type,
.hit-item:first-of-type,
.feed-item:first-of-type,
.data-row:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.case-card {
    background: #f9fafb;
    border: 1px solid #eaecf0;
    border-radius: 12px;
    padding: 0.85rem;
}

.case-card p,
.hit-item p {
    margin: 0.4rem 0 0;
}

.hit-item span,
.feed-item span {
    color: #667085;
    display: block;
    font-size: 0.8rem;
    margin-top: 0.15rem;
}

.feed-item strong {
    color: #101828;
}

.form-control {
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid #cfd8e3;
    border-radius: 12px;
    padding: 0.72rem 0.86rem;
}

.form-control:focus {
    border-color: #6fa5ab;
    box-shadow: 0 0 0 0.15rem rgba(31, 111, 120, 0.12);
    outline: 0;
}

.home-section-title {
    color: #101828;
    font-size: 1rem;
    font-weight: 800;
    margin: 0 0 0.85rem;
}

.dense-list {
    display: grid;
    gap: 0.75rem;
}

.dense-list-item {
    align-items: flex-start;
    background: #f8fafc;
    border: 1px solid #e3e8ef;
    border-radius: 12px;
    display: grid;
    gap: 0.8rem;
    grid-template-columns: 92px minmax(0, 1fr);
    padding: 0.85rem 0.9rem;
}

.dense-list-item strong {
    color: #101828;
}

.dense-list-item p {
    color: #667085;
    line-height: 1.5;
    margin: 0.15rem 0 0;
}

.dense-tag {
    align-items: center;
    background: rgba(31, 111, 120, 0.08);
    border-radius: 10px;
    color: #24545b;
    display: inline-flex;
    font-size: 0.76rem;
    font-weight: 800;
    justify-content: center;
    min-height: 30px;
    padding: 0 0.75rem;
}

.inline-tag {
    align-items: center;
    background: #eef6f7;
    border: 1px solid #cbe4e7;
    border-radius: 999px;
    color: #24545b;
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0.2rem 0.25rem 0 0;
    min-height: 28px;
    padding: 0.25rem 0.65rem;
}

.data-grid-two {
    display: grid;
    gap: 0.8rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.data-card {
    background: #f8fafc;
    border: 1px solid #e4e9f1;
    border-radius: 12px;
    padding: 0.9rem;
}

.data-card span {
    color: #667085;
    display: block;
    font-size: 0.78rem;
}

.data-card strong {
    color: #101828;
    display: block;
    font-size: 1.25rem;
    margin-top: 0.2rem;
}

.kpi-note {
    color: #24545b;
    font-size: 0.78rem;
    font-weight: 600;
    margin-top: 0.4rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: #b32121;
    color: white;
    padding: 1rem;
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

/* Diagnosis page: loading spinner */
.spinner {
    animation: spin 0.8s linear infinite;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    display: inline-block;
    height: 16px;
    width: 16px;
}

.spinner--large {
    border-width: 3px;
    border-color: rgba(31, 111, 120, 0.2);
    border-top-color: #1f6f78;
    height: 28px;
    width: 28px;
}

.spinner--teal {
    border-color: rgba(31, 111, 120, 0.2);
    border-top-color: #1f6f78;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Diagnosis page: error panel */
.error-panel {
    background: linear-gradient(180deg, #fff1f2 0%, #ffe4e6 100%);
    border-color: #fecdd3;
}

.error-panel h2 {
    color: #9f1239;
}

.error-panel p {
    color: #881337;
    line-height: 1.55;
    margin: 0 0 0.85rem;
}

/* Diagnosis page: loading overlay */
.loading-overlay {
    display: flex;
    justify-content: center;
    padding: 2rem 0;
}

.loading-card {
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 2rem 3rem;
}

.loading-card p {
    color: #667085;
    margin: 0;
}

.inline-loading {
    align-items: center;
    background: #f4fbfc;
    border: 1px solid #d7ecef;
    border-radius: 10px;
    color: #24545b;
    display: flex;
    font-size: 0.9rem;
    font-weight: 700;
    gap: 0.6rem;
    margin: 0;
    padding: 0.92rem;
}

/* Diagnosis page: empty hint box */
.empty-hint-box {
    background: #f9fafb;
    border: 1px dashed #d7dde6;
    border-radius: 12px;
    padding: 1rem;
}

.empty-hint-box .empty-state {
    margin-bottom: 0.5rem;
}

.empty-hint-box .muted {
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
}

/* Diagnosis page: variant cards */
.variant-grid {
    display: grid;
    gap: 0.6rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0.5rem 0 0.75rem;
    padding-left: 0.5rem;
}

.variant-card {
    background: #f8fafc;
    border: 1px solid #e4e9f1;
    border-radius: 10px;
    padding: 0.75rem 0.85rem;
}

.variant-card-header {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.variant-card-header strong {
    color: #101828;
    font-size: 0.88rem;
}

.variant-meta {
    color: #667085;
    font-size: 0.78rem;
}

/* Diagnosis page: collapsible excerpt */
.excerpt-collapse {
    margin-top: 0.4rem;
}

.excerpt-collapse summary {
    color: #1f6f78;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
}

.excerpt-collapse summary:hover {
    text-decoration: underline;
}

.excerpt-text {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #334155;
    font-size: 0.82rem;
    line-height: 1.65;
    margin: 0.4rem 0 0;
    max-height: 320px;
    overflow: auto;
    padding: 0.7rem 0.8rem;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Diagnosis page: single source line */
.single-source-line {
    color: #667085;
    display: flex;
    flex-direction: column;
    font-size: 0.82rem;
    gap: 0.3rem;
    margin: 0.25rem 0 0.5rem 0.5rem;
}

/* Diagnosis page: knowledge hit cards */
.hit-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hit-card {
    background: #f9fafb;
    border: 1px solid #eaecf0;
    border-radius: 10px;
    padding: 0.85rem 0.9rem;
}

.hit-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
}

.hit-card-header strong {
    color: #101828;
    font-size: 0.92rem;
}

.hit-meta {
    color: #667085;
    font-size: 0.78rem;
    flex-shrink: 0;
}

.hit-content {
    color: #344054;
    font-size: 0.85rem;
    line-height: 1.6;
    margin: 0.4rem 0 0;
    white-space: pre-line;
}

.hit-score-bar {
    align-items: center;
    display: flex;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.hit-score-label {
    color: #667085;
    font-size: 0.75rem;
}

.hit-score-value {
    background: rgba(31, 111, 120, 0.08);
    border-radius: 6px;
    color: #24545b;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
}

/* Diagnosis page: similar cases */
.case-result-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.case-result-card {
    background: #f9fafb;
    border: 1px solid #e4e9f1;
    border-radius: 12px;
    padding: 0.9rem;
}

.case-result-header {
    border-bottom: 1px solid #e4e9f1;
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
    margin-bottom: 0.65rem;
    padding-bottom: 0.55rem;
}

.case-result-header strong {
    color: #101828;
    font-size: 0.95rem;
}

.case-result-header span {
    color: #667085;
    font-size: 0.78rem;
}

.case-result-card p {
    color: #344054;
    font-size: 0.86rem;
    line-height: 1.55;
    margin: 0.35rem 0 0;
}

/* Diagnosis assistant refresh */
.diagnosis-hero {
    align-items: flex-end;
    background: linear-gradient(135deg, #ffffff 0%, #f3f8fa 100%);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.06);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding: 1.25rem;
}

.diagnosis-hero-copy {
    max-width: 760px;
}

.diagnosis-hero h1 {
    color: #101828;
    font-size: clamp(1.65rem, 2.8vw, 2.35rem);
    margin: 0 0 0.45rem;
}

.diagnosis-hero p {
    color: #536170;
    line-height: 1.7;
    margin: 0;
}

.diagnosis-hero-status {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.diagnosis-hero-status span {
    background: rgba(31, 111, 120, 0.08);
    border: 1px solid rgba(31, 111, 120, 0.14);
    border-radius: 999px;
    color: #24545b;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.42rem 0.72rem;
}

.diagnosis-workspace {
    align-items: start;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
}

.diagnosis-search-panel,
.diagnosis-summary-panel,
.diagnosis-tabs-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.06);
}

.diagnosis-search-panel {
    padding: 1.1rem;
    position: sticky;
    top: 1rem;
}

.diagnosis-issue-box {
    min-height: 132px;
}

.diagnosis-chip-row {
    margin-bottom: 0.85rem;
}

.secondary-chip,
.primary-action,
.secondary-action,
.diagnosis-tab {
    transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease, color 140ms ease, transform 140ms ease;
}

.secondary-chip:hover:not(:disabled),
.diagnosis-tab:hover {
    border-color: rgba(31, 111, 120, 0.32);
    transform: translateY(-1px);
}

.diagnosis-run-button:hover:not(:disabled) {
    box-shadow: 0 16px 30px rgba(31, 111, 120, 0.22);
    transform: translateY(-1px);
}

.diagnosis-safety-card {
    background: #fff8f1;
    border: 1px solid #fed7aa;
    border-radius: 14px;
    margin-top: 1rem;
    padding: 0.9rem;
}

.diagnosis-safety-card strong {
    color: #9a3412;
    display: block;
    font-size: 0.88rem;
    margin-bottom: 0.45rem;
}

.diagnosis-safety-card p,
.diagnosis-safety-card li {
    color: #7c2d12;
    font-size: 0.86rem;
    line-height: 1.6;
}

.diagnosis-safety-card p,
.diagnosis-safety-card ul {
    margin: 0;
}

.diagnosis-safety-card ul {
    padding-left: 1.1rem;
}

.diagnosis-result-area {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.diagnosis-summary-panel {
    min-height: 246px;
    overflow: hidden;
    padding: 1.25rem;
    position: relative;
}

.diagnosis-summary-panel::before {
    background: linear-gradient(180deg, rgba(31, 111, 120, 0.16), transparent);
    content: "";
    height: 5px;
    inset: 0 0 auto;
    position: absolute;
}

.diagnosis-summary-topline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.9rem;
}

.diagnosis-pill {
    background: #f4f7fa;
    border: 1px solid #e4e9f1;
    border-radius: 999px;
    color: #536170;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.36rem 0.68rem;
}

.diagnosis-pill--strong {
    background: #eaf6f2;
    border-color: #c7e8dc;
    color: #1c5b43;
}

.diagnosis-pill--medium {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #9a3412;
}

.diagnosis-pill--weak {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #9f1239;
}

.diagnosis-copy-button {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    color: #344054;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 800;
    min-height: 32px;
    padding: 0 0.75rem;
    transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.diagnosis-copy-button:hover {
    border-color: rgba(31, 111, 120, 0.32);
    color: #1f6f78;
    transform: translateY(-1px);
}

.diagnosis-summary-panel h2 {
    color: #101828;
    font-size: clamp(1.35rem, 2.2vw, 1.9rem);
    line-height: 1.28;
    margin: 0 0 0.7rem;
}

.diagnosis-summary-text {
    color: #344054;
    font-size: 1rem;
    line-height: 1.75;
    margin: 0;
    max-width: 920px;
}

.diagnosis-confidence-note {
    color: #667085;
    font-size: 0.86rem;
    line-height: 1.6;
    margin: 0.65rem 0 0;
}

.copy-status {
    border-radius: 10px;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.45;
    margin: 0.7rem 0 0;
    padding: 0.62rem 0.75rem;
}

.copy-status--success {
    background: #ecfdf3;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.copy-status--error {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    color: #9f1239;
}

.diagnosis-metric-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 1.1rem;
}

.diagnosis-metric-grid div {
    background: #f8fafc;
    border: 1px solid #e4e9f1;
    border-radius: 14px;
    padding: 0.85rem 0.9rem;
}

.diagnosis-metric-grid span {
    color: #667085;
    display: block;
    font-size: 0.78rem;
    margin-bottom: 0.2rem;
}

.diagnosis-metric-grid strong {
    color: #101828;
    display: block;
    font-size: 1.45rem;
}

.diagnosis-empty-start {
    align-items: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 200px;
    text-align: center;
}

.diagnosis-empty-icon {
    align-items: center;
    background: rgba(31, 111, 120, 0.08);
    border-radius: 999px;
    color: #24545b;
    display: inline-flex;
    font-size: 1.15rem;
    font-weight: 800;
    height: 52px;
    justify-content: center;
    margin-bottom: 0.8rem;
    width: 52px;
}

.diagnosis-empty-start h2 {
    margin-bottom: 0.35rem;
}

.diagnosis-empty-start p {
    color: #667085;
    line-height: 1.6;
    margin: 0;
}

.diagnosis-loading-state {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    justify-content: center;
    min-height: 200px;
}

.diagnosis-skeleton {
    animation: shimmer 1.2s ease-in-out infinite;
    background: linear-gradient(90deg, #eef2f6 0%, #f8fafc 48%, #eef2f6 100%);
    background-size: 220% 100%;
    border-radius: 12px;
    height: 18px;
}

.diagnosis-skeleton--title {
    height: 34px;
    width: 58%;
}

.diagnosis-skeleton--short {
    width: 72%;
}

@keyframes shimmer {
    0% { background-position: 120% 0; }
    100% { background-position: -120% 0; }
}

.diagnosis-tabs-card {
    padding: 0.75rem;
}

.diagnosis-tabs {
    background: #f4f7fa;
    border: 1px solid #e4e9f1;
    border-radius: 14px;
    display: grid;
    gap: 0.4rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 0.35rem;
}

.diagnosis-tab {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #536170;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 800;
    min-height: 42px;
    padding: 0 0.75rem;
}

.diagnosis-tab--active {
    background: #ffffff;
    border-color: rgba(31, 111, 120, 0.18);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    color: #1f6f78;
}

.diagnosis-tab-panel {
    animation: fadeInUp 180ms ease both;
    padding: 1rem 0.25rem 0.25rem;
}

.diagnosis-overview-grid,
.diagnosis-evidence-layout {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.diagnosis-insight-card,
.diagnosis-fault-card {
    background: #f8fafc;
    border: 1px solid #e4e9f1;
    border-radius: 14px;
    padding: 1rem;
}

.diagnosis-no-result-card {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 14px;
    display: grid;
    gap: 1rem;
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.7fr);
    padding: 1rem;
}

.diagnosis-no-result-card h3 {
    color: #9a3412;
    font-size: 1rem;
    margin: 0.35rem 0 0.3rem;
}

.diagnosis-no-result-card p {
    color: #7c2d12;
    line-height: 1.6;
    margin: 0;
}

.diagnosis-no-result-label {
    color: #c2410c;
    font-size: 0.76rem;
    font-weight: 900;
}

.diagnosis-suggestion-grid {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.diagnosis-suggestion-grid button {
    background: #ffffff;
    border: 1px solid #fed7aa;
    border-radius: 10px;
    color: #9a3412;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 800;
    min-height: 38px;
}

.diagnosis-insight-card--wide {
    grid-column: 1 / -1;
}

.diagnosis-section-heading,
.diagnosis-section-title-row {
    align-items: center;
    display: flex;
    gap: 0.6rem;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.diagnosis-section-heading {
    justify-content: flex-start;
}

.diagnosis-section-heading span {
    align-items: center;
    background: rgba(31, 111, 120, 0.1);
    border-radius: 10px;
    color: #24545b;
    display: inline-flex;
    font-size: 0.76rem;
    font-weight: 900;
    height: 30px;
    justify-content: center;
    width: 34px;
}

.diagnosis-section-heading h3,
.diagnosis-section-title-row h3 {
    color: #101828;
    font-size: 1rem;
    margin: 0;
}

.diagnosis-clean-list {
    color: #344054;
    line-height: 1.68;
    margin: 0;
    padding-left: 1.2rem;
}

.diagnosis-clean-list li {
    margin-bottom: 0.55rem;
}

.diagnosis-clean-list li:last-child {
    margin-bottom: 0;
}

.diagnosis-clean-list--columns {
    columns: 2;
}

.diagnosis-check-item {
    align-items: flex-start;
    break-inside: avoid;
    display: flex;
    gap: 0.5rem;
    list-style: none;
    margin-bottom: 0.65rem;
}

.diagnosis-check-item input {
    accent-color: #1f6f78;
    margin-top: 0.22rem;
}

.diagnosis-check-item label {
    color: #344054;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.5;
    margin: 0;
}

.diagnosis-step-list {
    counter-reset: steps;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.diagnosis-step-list li {
    align-items: flex-start;
    background: #f8fafc;
    border: 1px solid #e4e9f1;
    border-radius: 14px;
    display: grid;
    gap: 0.85rem;
    grid-template-columns: 36px minmax(0, 1fr);
    padding: 0.9rem;
}

.diagnosis-step-list span {
    align-items: center;
    background: #1f6f78;
    border-radius: 999px;
    color: #ffffff;
    display: inline-flex;
    font-size: 0.82rem;
    font-weight: 900;
    height: 32px;
    justify-content: center;
    width: 32px;
}

.diagnosis-step-list p {
    color: #344054;
    line-height: 1.65;
    margin: 0.2rem 0 0;
}

.diagnosis-fault-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.diagnosis-fault-card strong {
    color: #101828;
    display: block;
    font-size: 0.98rem;
    line-height: 1.35;
}

.diagnosis-fault-card span {
    color: #667085;
    display: block;
    font-size: 0.8rem;
    margin-top: 0.22rem;
}

.diagnosis-fault-card p {
    color: #344054;
    line-height: 1.65;
    margin: 0.75rem 0 0;
    white-space: pre-line;
}

.diagnosis-fade-in {
    animation: fadeInUp 220ms ease both;
}

.diagnosis-assistant-status {
    background: #f8fafc;
    border: 1px solid #e4e9f1;
    border-radius: 14px;
    margin-top: 1rem;
    padding: 0.9rem;
}

.diagnosis-assistant-status strong,
.diagnosis-assistant-status span {
    display: block;
}

.diagnosis-assistant-status strong {
    color: #101828;
    font-size: 0.88rem;
    margin-bottom: 0.35rem;
}

.diagnosis-assistant-status span {
    color: #24545b;
    font-size: 0.84rem;
    font-weight: 800;
    margin-bottom: 0.35rem;
}

.diagnosis-assistant-status p {
    color: #667085;
    font-size: 0.82rem;
    line-height: 1.55;
    margin: 0;
}

.hit-collapse .hit-content {
    margin-top: 0.45rem;
}

.secondary-action--compact {
    min-height: 38px;
    width: auto;
}

.history-metric-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 1rem;
}

.history-item {
    cursor: pointer;
    justify-content: space-between;
}

.history-item--active {
    background: #f4fbfc;
    border-color: #a8ccd1;
}

.history-item--empty {
    border-style: dashed;
}

.history-badge {
    background: #eaf6f2;
    border: 1px solid #c7e8dc;
    border-radius: 999px;
    color: #1c5b43;
    flex-shrink: 0;
    font-size: 0.76rem;
    font-weight: 900;
    padding: 0.26rem 0.58rem;
}

.history-badge--warning {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #9a3412;
}

.history-detail-panel {
    align-self: start;
    position: sticky;
    top: 1rem;
}

.history-detail-stack {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.ai-provider-message {
    margin-bottom: 1rem;
}

.ai-provider-message--success {
    border-color: rgba(22, 101, 52, 0.22);
    color: #166534;
}

.ai-provider-message--error {
    border-color: rgba(185, 28, 28, 0.22);
    color: #b91c1c;
}

.ai-quick-switch-panel {
    align-items: center;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
    margin-bottom: 1rem;
}

.ai-quick-switch-copy h2 {
    color: #101828;
    font-size: 1.08rem;
    margin: 0 0 0.35rem;
}

.ai-quick-switch-copy p {
    margin-bottom: 0;
}

.ai-quick-switch-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: flex-end;
}

.ai-quick-switch-actions .primary-action,
.ai-quick-switch-actions .secondary-action {
    min-height: 40px;
    min-width: 128px;
    width: auto;
}

.ai-quick-switch-actions .text-link {
    white-space: nowrap;
}

.ai-quick-switch-empty {
    color: #667085;
    font-size: 0.84rem;
    font-weight: 700;
}

.ai-preset-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.ai-preset-item {
    background: #f8fafc;
    border: 1px solid #e4e9f1;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.95rem;
}

.ai-preset-item--active {
    background: #f4fbfc;
    border-color: #a8ccd1;
}

.ai-preset-main {
    align-items: flex-start;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.ai-preset-main strong {
    color: #101828;
    display: block;
    font-size: 1rem;
}

.ai-preset-main p {
    color: #667085;
    margin: 0.25rem 0 0;
}

.ai-preset-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ai-preset-meta span {
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 0.28rem 0.58rem;
}

.ai-status-ok {
    background: #ecfdf3;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.ai-status-warn {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
}

.ai-provider-detail {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    margin: 0 0 1rem;
}

.ai-provider-detail div {
    border-bottom: 1px solid #e4e9f1;
    display: grid;
    gap: 0.8rem;
    grid-template-columns: 120px minmax(0, 1fr);
    padding-bottom: 0.65rem;
}

.ai-provider-detail dt {
    color: #667085;
    font-size: 0.82rem;
    font-weight: 800;
}

.ai-provider-detail dd {
    color: #101828;
    margin: 0;
    overflow-wrap: anywhere;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1280px) {
    .stats-grid,
    .dashboard-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-deep-grid,
    .dashboard-bottom-grid {
        grid-template-columns: 1fr;
    }

    .hero-panel-grid {
        grid-template-columns: 1fr;
    }

    .home-action-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1080px) {
    .diagnosis-page-grid,
    .dashboard-main-grid,
    .support-grid,
    .workspace-grid--split,
    .workspace-grid--workorder,
    .workspace-grid--cases,
    .workspace-grid--devices,
    .workspace-grid--robot-workbench,
    .workspace-grid--robot-detail,
    .workspace-grid--inventory,
    .workspace-grid--inventory-detail,
    .workspace-grid--manual-library,
    .workspace-grid--admin {
        grid-template-columns: 1fr;
    }

    .workspace-grid--documents-top,
    .workspace-grid--documents-review {
        grid-template-columns: 1fr;
    }

    .ai-quick-switch-panel {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .ai-quick-switch-actions {
        justify-content: flex-start;
    }

    .diagnosis-workspace {
        grid-template-columns: 1fr;
    }

    .diagnosis-search-panel {
        position: static;
    }

    .diagnosis-overview-grid,
    .diagnosis-evidence-layout,
    .diagnosis-no-result-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .workspace-header,
    .diagnosis-hero,
    .panel-heading,
    .field-row {
        display: block;
    }

    .panel-heading-actions {
        justify-content: flex-start;
        margin-top: 0.75rem;
    }

    .diagnosis-hero-status {
        justify-content: flex-start;
        margin-top: 0.85rem;
    }

    .status-strip {
        justify-content: flex-start;
        margin-top: 0.75rem;
    }

    .action-grid,
    .home-action-grid,
    .stats-grid,
    .dashboard-kpi-grid,
    .form-showcase-grid,
    .data-grid-two,
    .review-meta-grid,
    .review-field-grid,
    .variant-grid,
    .result-meta-grid,
    .case-result-grid,
    .robot-search-bar,
    .manual-search-grid,
    .manual-health-grid,
    .robot-form-grid,
    .robot-maintenance-form,
    .robot-detail-grid {
        grid-template-columns: 1fr;
    }

    .robot-list-title {
        display: block;
    }

    .diagnosis-tabs,
    .diagnosis-metric-grid,
    .history-metric-grid,
    .diagnosis-suggestion-grid {
        grid-template-columns: 1fr;
    }

    .diagnosis-clean-list--columns {
        columns: 1;
    }

    .diagnosis-step-list li {
        grid-template-columns: 1fr;
    }

    .queue-item,
    .dense-list-item {
        align-items: flex-start;
        grid-template-columns: 1fr;
    }
}

/* ──────────────────────────────────────────────
   V2 Diagnosis Workbench
   ────────────────────────────────────────────── */

.workbench-hero {
    align-items: flex-end;
    background: linear-gradient(135deg, #ffffff 0%, #f0f7f8 100%);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.06);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding: 1.25rem;
}

.workbench-hero-copy {
    max-width: 760px;
}

.workbench-hero h1 {
    color: #101828;
    font-size: clamp(1.65rem, 2.8vw, 2.35rem);
    margin: 0 0 0.45rem;
}

.workbench-hero p {
    color: #536170;
    line-height: 1.7;
    margin: 0;
}

.workbench-hero-status {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.workbench-hero-status span {
    background: rgba(31, 111, 120, 0.08);
    border: 1px solid rgba(31, 111, 120, 0.14);
    border-radius: 999px;
    color: #24545b;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.42rem 0.72rem;
}

.workbench-ai-status--ready {
    background: rgba(6, 118, 71, 0.08) !important;
    border-color: rgba(6, 118, 71, 0.2) !important;
    color: #067647 !important;
}

.workbench-ai-status--incomplete {
    background: rgba(181, 71, 8, 0.08) !important;
    border-color: rgba(181, 71, 8, 0.2) !important;
    color: #b54708 !important;
}

/* Three-column layout */
.workbench-layout {
    align-items: start;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr) minmax(300px, 380px);
}

@media (max-width: 1560px) {
    .workbench-layout {
        grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    }

    .workbench-evidence-panel {
        grid-column: 1 / -1;
    }
}

/* Input panel */
.workbench-input-panel {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
    padding: 1.25rem;
    position: sticky;
    top: 1rem;
}

.workbench-form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.workbench-form label {
    color: #344054;
    display: flex;
    flex-direction: column;
    font-size: 0.85rem;
    font-weight: 600;
    gap: 0.3rem;
}

.workbench-form .form-control {
    font-size: 0.9rem;
    padding: 0.55rem 0.75rem;
}

.workbench-symptom-input {
    min-height: 72px;
    resize: vertical;
}

/* Result area */
.workbench-result-area {
    min-height: 400px;
}

.workbench-empty-start,
.workbench-evidence-empty {
    align-items: center;
    color: #667085;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 300px;
    text-align: center;
}

.workbench-empty-icon {
    align-items: center;
    background: rgba(31, 111, 120, 0.08);
    border-radius: 50%;
    color: #1f6f78;
    display: flex;
    font-size: 2.5rem;
    font-weight: 700;
    height: 64px;
    justify-content: center;
    margin-bottom: 1rem;
    width: 64px;
}

.workbench-empty-start h2 {
    color: #344054;
    font-size: 1.35rem;
    margin: 0 0 0.5rem;
}

.workbench-empty-start p {
    color: #667085;
    margin: 0;
    max-width: 360px;
}

/* Insufficient evidence state */
.workbench-insufficient {
    background: #fff;
    border: 2px solid #fda29b;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(240, 68, 56, 0.06);
    padding: 2rem;
}

.workbench-insufficient-badge {
    background: #fef3f2;
    border: 1px solid #fecdca;
    border-radius: 999px;
    color: #b42318;
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding: 0.35rem 0.85rem;
}

.workbench-insufficient h2 {
    color: #101828;
    font-size: 1.2rem;
    line-height: 1.6;
    margin: 0 0 1.5rem;
}

/* Result content */
.workbench-result-content {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
    padding: 1.5rem;
}

.workbench-result-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.workbench-result-header h2 {
    color: #101828;
    font-size: 1.35rem;
    margin: 0;
}

.workbench-confidence-pill {
    background: rgba(31, 111, 120, 0.1);
    border: 1px solid rgba(31, 111, 120, 0.2);
    border-radius: 999px;
    color: #1f6f78;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.35rem 0.85rem;
}

.workbench-summary {
    color: #344054;
    font-size: 1.05rem;
    line-height: 1.7;
    margin: 0 0 1.5rem;
}

.workbench-section {
    margin-bottom: 1.5rem;
}

.workbench-section h3 {
    color: #101828;
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.workbench-causes,
.workbench-steps {
    color: #344054;
    font-size: 0.9rem;
    line-height: 1.7;
    margin: 0;
    padding-left: 1.25rem;
}

.workbench-causes li,
.workbench-steps li {
    margin-bottom: 0.5rem;
}

.workbench-actions-list {
    color: #344054;
    font-size: 0.9rem;
    line-height: 1.7;
    list-style: none;
    margin: 0;
    padding: 0;
}

.workbench-actions-list li {
    background: #f8f9fb;
    border-left: 3px solid #1f6f78;
    border-radius: 0 8px 8px 0;
    margin-bottom: 0.5rem;
    padding: 0.6rem 0.85rem;
}

/* Evidence panel */
.workbench-evidence-panel {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
    padding: 1.25rem;
    position: sticky;
    top: 1rem;
}

.workbench-evidence-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: calc(100vh - 12rem);
    overflow-y: auto;
}

.workbench-evidence-card {
    background: #f8f9fb;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 12px;
    padding: 0.85rem;
}

.workbench-evidence-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.35rem;
}

.workbench-evidence-header strong {
    color: #1f6f78;
    font-size: 0.95rem;
}

.workbench-evidence-confidence {
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
}

.workbench-evidence-confidence.confidence-high {
    background: #ecfdf3;
    border: 1px solid #abefc6;
    color: #067647;
}

.workbench-evidence-confidence.confidence-medium {
    background: #fffaeb;
    border: 1px solid #fedf89;
    color: #b54708;
}

.workbench-evidence-confidence.confidence-low {
    background: #fef3f2;
    border: 1px solid #fecdca;
    color: #b42318;
}

.workbench-evidence-title {
    color: #344054;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0 0 0.4rem;
}

.workbench-evidence-meta {
    color: #667085;
    display: flex;
    flex-wrap: wrap;
    font-size: 0.78rem;
    gap: 0.35rem 0.85rem;
    margin-bottom: 0.4rem;
}

.workbench-excerpt {
    font-size: 0.82rem;
    margin-top: 0.4rem;
}

.workbench-excerpt summary {
    color: #1f6f78;
    cursor: pointer;
    font-weight: 600;
}

.workbench-excerpt p {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 8px;
    color: #344054;
    font-size: 0.82rem;
    line-height: 1.65;
    margin: 0.4rem 0 0;
    padding: 0.65rem;
    white-space: pre-wrap;
}

/* Workbench responsive */
@media (max-width: 1280px) {
    .workbench-layout {
        grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    }

    .workbench-evidence-panel {
        grid-column: 1 / -1;
    }
}

/* Source bar — diagnosis result source indicator */
.workbench-source-bar {
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding: 0.45rem 1rem;
    text-align: center;
}

.workbench-source-bar--rule {
    background: #f0f4f8;
    border: 1px solid #d0d5dd;
    color: #344054;
}

.workbench-source-bar--ai {
    background: #ecfdf3;
    border: 1px solid #abefc6;
    color: #067647;
}

.agent-debug-layout {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr) minmax(300px, 380px);
}

.agent-debug-panel,
.agent-debug-events {
    align-self: start;
}

.agent-debug-message {
    margin-bottom: 1rem;
}

.agent-debug-message--success {
    background: linear-gradient(180deg, #f1faf5 0%, #edf8f2 100%);
    border-color: #b9ddcb;
    color: #1c5b43;
}

.agent-debug-message--error,
.agent-debug-error {
    background: linear-gradient(180deg, #fff4ed 0%, #fff1f3 100%);
    border: 1px solid #fed7aa;
    border-radius: 10px;
    color: #9a3412;
    line-height: 1.55;
    margin: 0 0 1rem;
    padding: 0.75rem 0.85rem;
}

.agent-debug-compact-action {
    min-height: 38px;
    padding: 0 0.8rem;
    width: auto;
}

.agent-debug-json-input {
    font-family: Consolas, "Courier New", monospace;
    min-height: 300px;
    resize: vertical;
    white-space: pre;
}

.agent-tool-summary {
    background: #f8fafc;
    border: 1px solid #e4e9f1;
    border-radius: 12px;
    margin-bottom: 1rem;
    padding: 0.85rem;
}

.agent-tool-summary strong {
    color: #101828;
    display: block;
    font-size: 0.98rem;
    margin-bottom: 0.35rem;
}

.agent-tool-summary p {
    color: #475467;
    font-size: 0.84rem;
    line-height: 1.55;
    margin: 0 0 0.75rem;
}

.agent-tool-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.agent-debug-check {
    align-items: center;
    background: #fff8f1;
    border: 1px solid #fed7aa;
    border-radius: 10px;
    color: #9a3412;
    display: flex;
    font-size: 0.82rem;
    gap: 0.5rem;
    margin: 0.8rem 0 0;
    padding: 0.65rem 0.7rem;
}

.agent-debug-check input {
    flex: 0 0 auto;
}

.agent-tool-badges span,
.agent-event-item span {
    background: rgba(31, 111, 120, 0.08);
    border: 1px solid rgba(31, 111, 120, 0.14);
    border-radius: 999px;
    color: #24545b;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.26rem 0.55rem;
}

.agent-trace-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 1rem;
}

.agent-trace-grid div {
    background: #f8fafc;
    border: 1px solid #e4e9f1;
    border-radius: 12px;
    padding: 0.8rem;
}

.agent-trace-grid span {
    color: #667085;
    display: block;
    font-size: 0.78rem;
    margin-bottom: 0.2rem;
}

.agent-trace-grid strong {
    color: #101828;
    font-size: 1rem;
}

.agent-debug-code {
    background: #101828;
    border-radius: 12px;
    color: #e4edf8;
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.82rem;
    line-height: 1.55;
    margin: 0;
    max-height: 420px;
    overflow: auto;
    padding: 0.95rem;
    white-space: pre-wrap;
}

.agent-event-list {
    display: grid;
    gap: 0.75rem;
}

.agent-event-item {
    background: #ffffff;
    border: 1px solid #e4e9f1;
    border-left: 4px solid #98a2b3;
    border-radius: 12px;
    padding: 0.8rem;
}

.agent-event-item--success {
    border-left-color: #24845c;
}

.agent-event-item--error {
    border-left-color: #d92d20;
}

.agent-event-item div {
    align-items: center;
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
}

.agent-event-item strong {
    color: #101828;
    font-size: 0.9rem;
}

.agent-event-item p {
    color: #475467;
    font-size: 0.82rem;
    line-height: 1.5;
    margin: 0.45rem 0;
}

.agent-event-item small {
    color: #667085;
    display: block;
    font-size: 0.76rem;
}

.workbench-source-bar--fallback {
    background: #fffaeb;
    border: 1px solid #fedf89;
    color: #b54708;
}

.workbench-source-bar--exploratory {
    background: #eef6ff;
    border: 1px solid #b9d9ff;
    color: #15579c;
}

/* Export action buttons */
.workbench-export-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.workbench-export-btn {
    background: rgba(31, 111, 120, 0.06);
    border: 1px solid rgba(31, 111, 120, 0.18);
    border-radius: 8px;
    color: #1f6f78;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.4rem 0.85rem;
    transition: background 0.15s, border-color 0.15s;
}

.workbench-export-btn:hover {
    background: rgba(31, 111, 120, 0.12);
    border-color: rgba(31, 111, 120, 0.3);
}

.workbench-export-btn:active {
    background: rgba(31, 111, 120, 0.18);
}

/* V2 workbench density refresh */
.workbench-hero {
    align-items: center;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: none;
    padding: 1rem 1.1rem;
}

.workbench-hero h1 {
    font-size: 1.55rem;
    letter-spacing: 0;
    margin-bottom: 0.25rem;
}

.workbench-hero p {
    line-height: 1.55;
}

.workbench-layout {
    gap: 0.85rem;
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr) minmax(280px, 360px);
}

@media (max-width: 1560px) {
    .workbench-layout {
        grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
    }

    .workbench-evidence-panel {
        grid-column: 1 / -1;
    }
}

.workbench-input-panel,
.workbench-result-content,
.workbench-evidence-panel,
.workbench-insufficient {
    border-radius: 12px;
    box-shadow: none;
}

.workbench-input-panel,
.workbench-evidence-panel {
    padding: 1rem;
}

.workbench-field-group {
    align-items: center;
    display: flex;
    gap: 0.5rem;
    margin-bottom: -0.2rem;
}

.workbench-field-group span {
    color: #475467;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.workbench-inline-fields {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.workbench-advanced-input {
    border-top: 1px solid #edf1f5;
    padding-top: 0.75rem;
}

.workbench-advanced-input summary {
    color: #1f6f78;
    cursor: pointer;
    font-size: 0.84rem;
    font-weight: 800;
    list-style-position: outside;
}

.workbench-advanced-grid {
    display: grid;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.workbench-result-content {
    animation: fadeInUp 180ms ease both;
    padding: 1.1rem;
}

.workbench-result-topline {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.workbench-result-topline h2 {
    color: #101828;
    font-size: 1.18rem;
    line-height: 1.25;
    margin: 0;
}

.workbench-kicker {
    color: #667085;
    display: block;
    font-size: 0.76rem;
    font-weight: 800;
    margin-bottom: 0.2rem;
}

.workbench-verdict {
    background: #f7fbfb;
    border-left: 4px solid #1f6f78;
    border-radius: 8px;
    margin-bottom: 0.9rem;
    padding: 0.8rem 0.9rem;
}

.workbench-verdict p {
    color: #182230;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.65;
    margin: 0;
}

.expanded-diagnosis-main {
    background: #ffffff;
    border: 1px solid #d7e8ea;
    border-radius: 10px;
    margin-bottom: 1rem;
    padding: 1rem;
}

.expanded-diagnosis-main__header {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.expanded-diagnosis-main__header h3 {
    color: #102a43;
    font-size: 1.05rem;
    line-height: 1.35;
    margin: 0;
}

.expanded-diagnosis-main__summary {
    background: #f7fbfb;
    border-left: 3px solid #1f6f78;
    border-radius: 7px;
    color: #184e55;
    font-size: 0.92rem;
    font-weight: 650;
    line-height: 1.65;
    margin: 0 0 0.9rem;
    padding: 0.75rem 0.85rem;
}

.expanded-hypothesis-grid {
    display: grid;
    gap: 0.7rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 1rem;
}

.expanded-hypothesis-card {
    background: #fbfcfd;
    border: 1px solid #e5edf0;
    border-radius: 8px;
    padding: 0.75rem;
}

.expanded-hypothesis-card__top {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: space-between;
    margin-bottom: 0.45rem;
}

.expanded-hypothesis-card__top strong {
    color: #102a43;
    font-size: 0.9rem;
}

.expanded-hypothesis-card p {
    color: #344054;
    font-size: 0.86rem;
    line-height: 1.6;
    margin: 0;
}

.expanded-hypothesis-card__verify {
    border-top: 1px solid #edf1f5;
    margin-top: 0.65rem;
    padding-top: 0.55rem;
}

.expanded-hypothesis-card__verify span {
    color: #1f6f78;
    display: block;
    font-size: 0.74rem;
    font-weight: 800;
    margin-bottom: 0.2rem;
}

.expanded-flow {
    border-top: 1px solid #edf1f5;
    padding-top: 0.85rem;
}

.expanded-flow h3 {
    color: #344054;
    font-size: 0.9rem;
    margin: 0 0 0.65rem;
}

.expanded-flow ol {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.expanded-flow li {
    align-items: flex-start;
    display: grid;
    gap: 0.65rem;
    grid-template-columns: 1.65rem minmax(0, 1fr);
}

.expanded-flow li > span {
    align-items: center;
    background: #1f6f78;
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 800;
    height: 1.65rem;
    justify-content: center;
    width: 1.65rem;
}

.expanded-flow strong {
    color: #102a43;
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}

.expanded-flow p {
    color: #475467;
    font-size: 0.85rem;
    line-height: 1.55;
    margin: 0;
}

.workbench-result-utilities {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.workbench-result-utilities .workbench-source-bar,
.workbench-result-utilities .workbench-export-actions {
    margin-bottom: 0;
}

.workbench-source-bar {
    border-radius: 8px;
    text-align: left;
}

.workbench-priority-grid {
    border-bottom: 1px solid #edf1f5;
    border-top: 1px solid #edf1f5;
    display: grid;
    gap: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 1rem;
}

.workbench-priority-panel {
    padding: 0.85rem 0.85rem 0.85rem 0;
}

.workbench-priority-panel + .workbench-priority-panel {
    border-left: 1px solid #edf1f5;
    padding-left: 0.85rem;
}

.workbench-priority-panel span {
    color: #667085;
    display: block;
    font-size: 0.76rem;
    font-weight: 800;
    margin-bottom: 0.28rem;
}

.workbench-priority-panel strong {
    color: #182230;
    display: block;
    font-size: 0.92rem;
    line-height: 1.55;
}

.workbench-priority-panel--action strong {
    color: #1f5f49;
}

.workbench-section {
    margin-bottom: 1.1rem;
}

.workbench-section h3 {
    border-bottom: 0;
    color: #344054;
    font-size: 0.92rem;
    margin-bottom: 0.55rem;
    padding-bottom: 0;
}

.workbench-causes,
.workbench-steps,
.workbench-actions-list {
    font-size: 0.88rem;
    line-height: 1.65;
}

.workbench-actions-list li {
    background: #f7faf8;
    border-left-color: #2e7d5b;
}

.workbench-evidence-list {
    gap: 0.55rem;
}

.workbench-evidence-card {
    background: #ffffff;
    border-color: #e7ecf2;
    border-radius: 10px;
    padding: 0.75rem;
    transition: border-color 150ms ease, transform 150ms ease;
}

.workbench-evidence-card:hover {
    border-color: #b7d6da;
    transform: translateY(-1px);
}

.workbench-evidence-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

@media (max-width: 860px) {
    .expanded-hypothesis-grid {
        grid-template-columns: 1fr;
    }
}

.workbench-excerpt summary {
    font-size: 0.8rem;
}

.workbench-excerpt p {
    max-height: 180px;
    overflow: auto;
}

@media (max-width: 960px) {
    .workbench-hero {
        display: block;
    }

    .workbench-hero-status {
        justify-content: flex-start;
        margin-top: 0.85rem;
    }

    .workbench-layout {
        grid-template-columns: 1fr;
    }

    .workbench-input-panel,
    .workbench-evidence-panel {
        position: static;
    }

    .workbench-priority-grid,
    .workbench-inline-fields {
        grid-template-columns: 1fr;
    }

    .workbench-priority-panel + .workbench-priority-panel {
        border-left: 0;
        border-top: 1px solid #edf1f5;
        padding-left: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

/* ── Operator Quick Start Cards ── */

.operator-quick-start {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    margin-top: 1.5rem;
}

.operator-quick-card {
    align-items: center;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
    color: inherit;
    display: flex;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    text-decoration: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.operator-quick-card:hover {
    border-color: rgba(31, 111, 120, 0.28);
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.1);
}

.operator-quick-icon {
    align-items: center;
    background: linear-gradient(180deg, rgba(31, 111, 120, 0.12), rgba(31, 111, 120, 0.04));
    border-radius: 12px;
    color: #1f6f78;
    display: flex;
    font-size: 1.35rem;
    height: 52px;
    justify-content: center;
    width: 52px;
}

.operator-quick-card strong {
    color: #0f172a;
    display: block;
    font-size: 1.05rem;
    margin-bottom: 0.2rem;
}

.operator-quick-card p {
    color: #667085;
    font-size: 0.85rem;
    margin: 0;
}

/* ── Operator History ── */

.operator-history {
    margin-top: 1.5rem;
}

.operator-history-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.operator-history-card {
    align-items: center;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    transition: border-color 0.18s ease;
}

.operator-history-card:hover {
    border-color: rgba(31, 111, 120, 0.18);
}

.operator-history-main {
    min-width: 0;
    flex: 1;
}

.operator-history-header {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
}

.operator-history-header strong {
    color: #0f172a;
    font-size: 0.95rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.operator-history-badge {
    background: rgba(31, 111, 120, 0.1);
    border-radius: 8px;
    color: #1f6f78;
    flex-shrink: 0;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.15rem 0.55rem;
}

.operator-history-badge--warning {
    background: rgba(180, 130, 20, 0.1);
    color: #92700c;
}

.operator-history-badge--info {
    background: rgba(21, 87, 156, 0.1);
    color: #15579c;
}

.operator-history-meta {
    color: #667085;
    display: flex;
    flex-wrap: wrap;
    font-size: 0.78rem;
    gap: 0.35rem;
}

.operator-history-meta span::after {
    content: " ·";
    color: #aab7c9;
    margin-left: 0.35rem;
}

.operator-history-meta span:last-child::after {
    content: "";
}

/* ── Login Page ── */

.login-shell {
    align-items: center;
    background:
        radial-gradient(circle at top left, rgba(49, 83, 122, 0.18), transparent 22%),
        linear-gradient(180deg, #eef2f6 0%, #e9edf3 100%);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.login-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 20px;
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.1);
    max-width: 420px;
    padding: 2.5rem 2rem;
    width: 100%;
}

.login-brand {
    align-items: center;
    display: flex;
    gap: 0.95rem;
    margin-bottom: 1.5rem;
}

.login-brand .brand-mark {
    background: linear-gradient(180deg, #2e5579 0%, #203d59 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
    color: #ffffff;
    display: flex;
    font-size: 0.95rem;
    font-weight: 800;
    height: 46px;
    justify-content: center;
    width: 46px;
}

.login-brand .brand-name {
    color: #0f172a;
    font-size: 1.35rem;
    font-weight: 800;
}

.login-brand .brand-subtitle {
    color: #667085;
    font-size: 0.78rem;
}

.login-card h1 {
    color: #0f172a;
    font-size: 1.25rem;
    margin: 0 0 0.35rem;
}

.login-card > .muted {
    color: #667085;
    font-size: 0.85rem;
    margin: 0 0 1.5rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.login-alert {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    border-radius: 10px;
    color: #9f1239;
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.45;
    padding: 0.75rem 0.85rem;
}

.login-check {
    align-items: center;
    color: #475467;
    display: inline-flex;
    font-size: 0.86rem;
    font-weight: 700;
    gap: 0.55rem;
    margin: 0;
}

.login-check input {
    accent-color: #1f6f78;
    height: 1rem;
    width: 1rem;
}

.login-role-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.login-role-option {
    cursor: pointer;
    display: block;
}

.login-role-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.login-role-card {
    border: 2px solid rgba(15, 23, 42, 0.1);
    border-radius: 14px;
    display: block;
    padding: 1rem 1.25rem;
    transition: border-color 0.18s ease, background 0.18s ease;
}

.login-role-option input[type="radio"]:checked + .login-role-card {
    background: rgba(31, 111, 120, 0.06);
    border-color: #1f6f78;
}

.login-role-card:hover {
    border-color: rgba(31, 111, 120, 0.3);
}

.login-role-card strong {
    color: #0f172a;
    display: block;
    font-size: 0.95rem;
    margin-bottom: 0.15rem;
}

.login-role-card small {
    color: #667085;
    font-size: 0.78rem;
}

/* Operator console polish */
.operator-shell .shell-sidebar {
    background:
        linear-gradient(180deg, rgba(28, 43, 65, 0.98) 0%, rgba(18, 31, 45, 0.98) 100%);
}

.operator-topbar .topbar-main {
    align-items: center;
}

.operator-topbar-meta {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.operator-content {
    padding-top: 1.25rem;
}

.operator-sidebar-card {
    margin-top: 0.2rem;
}

.operator-sidebar-flow {
    background: rgba(255, 255, 255, 0.03);
}

.operator-page-header {
    margin-bottom: 1rem;
}

.operator-command-panel {
    margin-bottom: 1rem;
}

.operator-hero-panel {
    border-radius: 16px;
    padding: 1.25rem;
}

.operator-hero-panel .hero-panel-grid {
    align-items: stretch;
}

.operator-hero-panel h1 {
    font-size: clamp(1.7rem, 2.4vw, 2.15rem);
}

.operator-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-top: 1.1rem;
}

.operator-primary-link,
.operator-secondary-link {
    min-width: 140px;
    width: auto;
}

.operator-secondary-link {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

.operator-action-grid {
    grid-template-columns: minmax(220px, 0.9fr) minmax(220px, 0.9fr) minmax(360px, 1.2fr);
}

.operator-home-panel {
    min-height: 190px;
}

.operator-home-panel h2 {
    margin-bottom: 0.85rem;
}

.operator-history-stats {
    margin-bottom: 1rem;
}

.operator-history-panel {
    margin-bottom: 1rem;
}

.operator-history {
    margin-top: 0;
}

.operator-history-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: none;
}

.operator-history-card:hover {
    border-color: rgba(31, 111, 120, 0.28);
}

.operator-history-header strong {
    font-size: 1rem;
}

.operator-history-meta {
    gap: 0.35rem 0.5rem;
}

.operator-history-meta span::after {
    content: "·";
    margin-left: 0.5rem;
}

.operator-history-meta span:last-child::after {
    content: "";
    margin-left: 0;
}

.operator-history-action {
    flex-shrink: 0;
}

.operator-history-card--session {
    align-items: flex-start;
}

.operator-history-summary {
    color: #344054;
    font-size: 0.9rem;
    line-height: 1.55;
    margin: 0 0 0.55rem;
}

.operator-history-actions {
    align-items: flex-end;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.operator-history-badge--success {
    background: rgba(22, 101, 52, 0.1);
    color: #166534;
}

.operator-session-strip {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #dbe4ef;
    border-radius: 12px;
    color: #475467;
    display: flex;
    flex-wrap: wrap;
    font-size: 0.84rem;
    gap: 0.6rem;
    justify-content: space-between;
    margin: 0.85rem 0;
    padding: 0.7rem 0.85rem;
}

.operator-session-strip a {
    color: #1f6f78;
    font-weight: 700;
    text-decoration: none;
}

.workbench-export-link {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    text-decoration: none;
}

.workbench-followup-card {
    background: #f8fafc;
    border: 1px solid #dbe4ef;
    border-radius: 12px;
    display: grid;
    gap: 0.75rem;
    margin: 0.85rem 0 1rem;
    padding: 0.9rem;
}

.workbench-followup-card h3 {
    color: #0f172a;
    font-size: 0.95rem;
    margin: 0 0 0.2rem;
}

.workbench-followup-input {
    align-items: stretch;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 96px;
    gap: 0.75rem;
}

.workbench-followup-input textarea {
    min-height: 64px;
    min-width: 0;
    resize: vertical;
    width: 100%;
}

.workbench-followup-input .primary-action {
    align-self: stretch;
    min-height: 44px;
    min-width: 0;
    padding-inline: 0.85rem;
    width: 96px;
}

.operator-detail-loading {
    margin: 1rem 0;
    padding: 1.5rem;
}

.operator-detail-header {
    align-items: flex-start;
}

.operator-detail-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.75fr);
    margin-bottom: 1rem;
}

.operator-detail-panel {
    min-width: 0;
}

.operator-detail-panel--wide {
    min-height: 100%;
}

.operator-detail-columns {
    display: grid;
    gap: 0.85rem;
    margin-top: 1rem;
}

.operator-detail-list {
    display: grid;
    gap: 0.75rem;
    margin: 0;
}

.operator-detail-list div {
    border-bottom: 1px solid #eef2f7;
    display: grid;
    gap: 0.25rem;
    padding-bottom: 0.65rem;
}

.operator-detail-list dt {
    color: #667085;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.operator-detail-list dd {
    color: #0f172a;
    font-size: 0.92rem;
    margin: 0;
    overflow-wrap: anywhere;
}

.operator-detail-repeat,
.operator-feedback-submit {
    margin-top: 1rem;
    width: 100%;
}

.operator-detail-evidence {
    max-height: none;
}

.operator-feedback-current {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    color: #166534;
    margin-bottom: 1rem;
    padding: 0.85rem;
}

.operator-feedback-current span {
    display: block;
    font-weight: 800;
}

.operator-feedback-current small {
    color: #3f8f5f;
    display: block;
    margin-top: 0.2rem;
}

.operator-feedback-current p {
    color: #14532d;
    margin: 0.55rem 0 0;
}

.operator-feedback-options {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 1rem;
}

.operator-feedback-choice {
    background: #ffffff;
    border: 1px solid #d0d7e2;
    border-radius: 10px;
    color: #344054;
    cursor: pointer;
    font-weight: 800;
    min-height: 42px;
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.operator-feedback-choice:hover,
.operator-feedback-choice--selected {
    background: rgba(31, 111, 120, 0.08);
    border-color: #1f6f78;
    color: #1f6f78;
}

.operator-feedback-note {
    color: #344054;
    display: grid;
    font-size: 0.85rem;
    font-weight: 700;
    gap: 0.45rem;
}

.operator-feedback-status {
    color: #1f6f78;
    font-size: 0.85rem;
    font-weight: 700;
    margin: 0.75rem 0 0;
}

.diagnosis-feedback-header {
    margin-bottom: 1rem;
}

.diagnosis-feedback-stats {
    margin-bottom: 1rem;
}

.diagnosis-feedback-panel {
    margin-bottom: 1rem;
}

.diagnosis-feedback-list {
    display: grid;
    gap: 0.75rem;
}

.diagnosis-feedback-card {
    align-items: flex-start;
    background: #ffffff;
    border: 1px solid #e4e9f2;
    border-radius: 12px;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 1rem;
}

.diagnosis-feedback-main {
    min-width: 0;
}

.diagnosis-feedback-title-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.45rem;
}

.diagnosis-feedback-title-row strong {
    color: #0f172a;
    font-size: 1rem;
}

.diagnosis-feedback-card p {
    color: #344054;
    line-height: 1.55;
    margin: 0 0 0.5rem;
}

.diagnosis-feedback-note {
    background: #f8fafc;
    border: 1px solid #e4e9f2;
    border-radius: 10px;
    margin-top: 0.75rem;
    padding: 0.75rem;
}

.diagnosis-feedback-note span {
    color: #667085;
    display: block;
    font-size: 0.76rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.diagnosis-feedback-note p {
    margin: 0;
}

.operator-empty-state {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    min-height: 260px;
    padding: 1.5rem;
}

.operator-empty-action {
    margin-top: 1rem;
    max-width: 180px;
    text-decoration: none;
}

@media (max-width: 1280px) {
    .operator-action-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .operator-home-panel {
        grid-column: 1 / -1;
    }
}

@media (max-width: 960px) {
    .operator-topbar-meta,
    .operator-action-grid,
    .operator-history-stats {
        grid-template-columns: 1fr;
    }

    .operator-history-card {
        align-items: stretch;
        flex-direction: column;
    }

    .operator-history-actions {
        align-items: stretch;
        width: 100%;
    }

    .operator-history-action {
        width: 100%;
    }

    .operator-detail-grid {
        grid-template-columns: 1fr;
    }

    .diagnosis-feedback-card {
        flex-direction: column;
    }

    .diagnosis-feedback-card .operator-history-action {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .operator-feedback-options {
        grid-template-columns: 1fr;
    }

    .operator-session-strip {
        align-items: stretch;
        flex-direction: column;
    }
}

/* ── External Reference Cards ── */

.external-ref-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.external-ref-card {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-left: 3px solid rgba(31, 111, 120, 0.3);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    transition: border-color 0.18s ease;
}

.external-ref-card:hover {
    border-left-color: #1f6f78;
}

.external-ref-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.35rem;
}

.external-ref-domain {
    color: #667085;
    font-size: 0.72rem;
    font-weight: 600;
}

.external-ref-badge {
    background: rgba(180, 130, 20, 0.1);
    border-radius: 6px;
    color: #92700c;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.12rem 0.45rem;
}

.external-ref-title {
    color: #1f6f78;
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.3rem;
    text-decoration: none;
}

.external-ref-title:hover {
    text-decoration: underline;
}

.external-ref-snippet {
    color: #475467;
    font-size: 0.78rem;
    line-height: 1.5;
    margin: 0 0 0.45rem;
}

.external-ref-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.external-ref-relevance {
    color: #667085;
    font-size: 0.7rem;
}

.external-ref-type {
    color: #667085;
    font-size: 0.7rem;
}

.external-ref-conflict {
    color: #b45309;
    font-size: 0.7rem;
    font-weight: 600;
}

.external-ref-disclaimer {
    background: rgba(180, 130, 20, 0.06);
    border-left: 3px solid rgba(180, 130, 20, 0.4);
    border-radius: 6px;
    color: #92700c;
    font-size: 0.75rem;
    line-height: 1.5;
    margin: 0.5rem 0 0.75rem;
    padding: 0.5rem 0.75rem;
}

.external-analysis-card {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(31, 111, 120, 0.12);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 1rem;
}

.external-analysis-summary {
    background: rgba(31, 111, 120, 0.06);
    border-left: 3px solid #1f6f78;
    border-radius: 7px;
    color: #184e55;
    font-size: 0.84rem;
    font-weight: 650;
    line-height: 1.55;
    padding: 0.7rem 0.85rem;
}

.external-analysis-section {
    border-top: 1px solid rgba(15, 23, 42, 0.06);
    padding-top: 0.75rem;
}

.external-analysis-section h3 {
    color: #102a43;
    font-size: 0.84rem;
    margin: 0 0 0.45rem;
}

.external-analysis-section ol {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin: 0;
    padding-left: 1.15rem;
}

.external-analysis-section li {
    color: #22354d;
    font-size: 0.8rem;
    line-height: 1.55;
    padding-left: 0.15rem;
}

.external-analysis-section li small {
    color: #1f6f78;
    display: inline-block;
    font-weight: 700;
    margin-left: 0.35rem;
    white-space: nowrap;
}

.external-analysis-sources {
    border-top: 1px solid rgba(15, 23, 42, 0.06);
    padding-top: 0.75rem;
}

.external-analysis-sources summary {
    color: #1f6f78;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 700;
}

/* ── Conversation / Follow-up ── */

.operator-conversation {
    margin-top: 1.5rem;
}

.operator-conversation-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.operator-conversation-msg {
    border-radius: 14px;
    padding: 1rem 1.25rem;
}

.operator-conversation-msg--user {
    background: rgba(31, 111, 120, 0.08);
    border: 1px solid rgba(31, 111, 120, 0.15);
    margin-left: 2rem;
}

.operator-conversation-msg--assistant {
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(15, 23, 42, 0.08);
    margin-right: 2rem;
}

.operator-conversation-meta {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.operator-conversation-meta strong {
    color: #0f172a;
    font-size: 0.85rem;
}

.operator-conversation-meta span {
    color: #667085;
    font-size: 0.72rem;
}

.operator-conversation-ref {
    background: rgba(31, 111, 120, 0.1);
    border-radius: 6px;
    color: #1f6f78;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.1rem 0.4rem;
}

.operator-conversation-ref--ext {
    background: rgba(180, 130, 20, 0.1);
    color: #92700c;
}

.operator-conversation-msg p {
    color: #374151;
    font-size: 0.88rem;
    line-height: 1.6;
    margin: 0;
    white-space: pre-wrap;
}

.operator-conversation-input {
    align-items: stretch;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 104px;
    gap: 0.75rem;
    margin-top: 1rem;
}

.operator-conversation-input textarea {
    min-height: 68px;
    min-width: 0;
    resize: vertical;
    width: 100%;
}

.operator-conversation-input .primary-action {
    align-self: stretch;
    min-height: 44px;
    min-width: 0;
    padding-inline: 0.85rem;
    width: 104px;
}

.operator-conversation-error {
    color: #b45309;
    font-size: 0.82rem;
    margin-top: 0.5rem;
}

@media (max-width: 720px) {
    .operator-conversation-msg--user {
        margin-left: 0.5rem;
    }

    .operator-conversation-msg--assistant {
        margin-right: 0.5rem;
    }

    .operator-conversation-input {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .operator-conversation-input .primary-action {
        min-height: 42px;
        min-width: 0;
        width: 100%;
    }

    .workbench-followup-input {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .workbench-followup-input .primary-action {
        min-height: 42px;
        min-width: 0;
        width: 100%;
    }
}

@media (max-width: 1280px) {
    .agent-debug-layout {
        grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    }

    .agent-debug-events {
        grid-column: 1 / -1;
    }
}

@media (max-width: 860px) {
    .agent-debug-layout,
    .agent-trace-grid {
        grid-template-columns: 1fr;
    }

    .agent-debug-json-input {
        min-height: 240px;
    }
}

/* ── External Reference Review Button ── */

.operator-ext-review-btn {
    margin-top: 0.5rem;
    width: 100%;
}

.operator-ext-review-btn:disabled {
    cursor: default;
    opacity: 0.6;
}

/* V3 service console visual refresh */
:root {
    --of-bg: #eef3f6;
    --of-surface: #ffffff;
    --of-surface-soft: #f7fafc;
    --of-border: #d8e0e7;
    --of-border-soft: #e8eef2;
    --of-text: #132126;
    --of-heading: #0b171b;
    --of-muted: #61737b;
    --of-muted-2: #8da0a8;
    --of-teal: #176c72;
    --of-teal-soft: #e8f4f4;
    --of-blue: #2764b8;
    --of-blue-soft: #e9f1ff;
    --of-green: #1f8a5b;
    --of-green-soft: #eaf7ef;
    --of-amber: #b7791f;
    --of-amber-soft: #fff3d8;
    --of-red: #c2413b;
    --of-red-soft: #fdedec;
    --of-purple: #6b4bb0;
    --of-purple-soft: #f2edff;
}

html,
body {
    background: var(--of-bg);
    color: var(--of-text);
    font-family: "Microsoft YaHei UI", "Segoe UI", Arial, sans-serif;
    letter-spacing: 0;
}

body {
    scrollbar-color: #b9c7cf transparent;
}

::selection {
    background: rgba(23, 108, 114, 0.16);
}

a,
button,
input,
select,
textarea {
    letter-spacing: 0;
}

.workspace-header {
    align-items: center;
    background: var(--of-surface);
    border: 1px solid var(--of-border);
    border-radius: 8px;
    box-sizing: border-box;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
    min-height: 76px;
    padding: 1rem 1.1rem;
}

.workspace-header h1 {
    color: var(--of-heading);
    font-size: clamp(1.35rem, 1.9vw, 1.65rem);
    line-height: 1.25;
    margin: 0 0 0.25rem;
}

.eyebrow {
    color: var(--of-teal);
    font-size: 0.72rem;
    letter-spacing: 0;
    margin-bottom: 0.2rem;
    text-transform: none;
}

.muted,
.empty-state {
    color: var(--of-muted);
    font-size: 0.86rem;
    line-height: 1.55;
}

.status-strip {
    gap: 0.45rem;
}

.status-strip span,
.soft-badge,
.chip,
.inline-tag,
.operator-history-badge,
.external-ref-badge {
    background: var(--of-teal-soft);
    border: 1px solid rgba(23, 108, 114, 0.12);
    border-radius: 999px;
    color: var(--of-teal);
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.2;
    padding: 0.38rem 0.65rem;
}

.panel,
.summary-card,
.dropzone-panel,
.warning-panel,
.success-panel,
.review-field-card,
.review-chunk,
.case-card,
.login-card,
.operator-history-card,
.diagnosis-feedback-card,
.external-analysis-card,
.external-ref-card {
    background: var(--of-surface);
    border: 1px solid var(--of-border);
    border-radius: 8px;
    box-shadow: none;
}

.panel {
    padding: 1rem;
}

.panel h2,
.home-section-title,
.operator-history-header strong,
.diagnosis-feedback-title-row strong {
    color: var(--of-heading);
}

.panel h2 {
    font-size: 1.05rem;
    line-height: 1.35;
    margin-bottom: 0.7rem;
}

.panel-heading {
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 0.9rem;
}

.panel-heading h2 {
    margin: 0 0 0.25rem;
}

.workspace-grid,
.stats-grid,
.dashboard-kpi-grid,
.dashboard-deep-grid,
.dashboard-bottom-grid,
.diagnosis-page-grid,
.dashboard-main-grid,
.support-grid {
    gap: 1rem;
}

.home-action-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.home-action-card,
.action-tile,
.hero-metric-card,
.meta-pill {
    background: var(--of-surface);
    border: 1px solid var(--of-border);
    border-radius: 8px;
    box-shadow: none;
    min-height: 148px;
    padding: 1rem;
}

.home-action-card {
    position: relative;
}

.home-action-card::after {
    background: var(--of-teal);
    border-radius: 999px;
    bottom: 14px;
    content: "";
    height: 6px;
    left: 16px;
    position: absolute;
    right: 16px;
}

.home-action-card:hover,
.action-tile:hover,
.queue-item:hover,
.operator-history-card:hover,
.diagnosis-feedback-card:hover {
    border-color: rgba(23, 108, 114, 0.28);
    box-shadow: none;
    transform: none;
}

.home-action-card span,
.action-tile span:first-child,
.operator-quick-icon,
.dropzone-icon {
    align-items: center;
    background: var(--of-teal-soft);
    border-radius: 8px;
    color: var(--of-teal);
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 800;
    height: 34px;
    justify-content: center;
    width: 42px;
}

.home-action-card strong {
    color: var(--of-heading);
    font-size: 1.15rem;
    line-height: 1.3;
}

.home-action-card p {
    color: var(--of-muted);
    font-size: 0.84rem;
    line-height: 1.55;
    padding-bottom: 0.8rem;
}

.home-action-card--primary {
    background: var(--of-teal-soft);
    border-color: var(--of-teal-soft);
    color: var(--of-text);
}

.home-action-card--primary strong,
.home-action-card--primary p {
    color: var(--of-text);
}

.home-action-card--primary span {
    background: var(--of-surface);
    color: var(--of-teal);
}

.home-action-card--amber {
    background: var(--of-amber-soft);
    border-color: var(--of-amber-soft);
}

.home-action-card--amber::after {
    background: var(--of-amber);
}

.home-action-card--amber span {
    background: var(--of-surface);
    color: var(--of-amber);
}

.home-action-card--blue {
    background: var(--of-blue-soft);
    border-color: var(--of-blue-soft);
}

.home-action-card--blue::after {
    background: var(--of-blue);
}

.home-action-card--blue span {
    background: var(--of-surface);
    color: var(--of-blue);
}

.home-action-card--green {
    background: var(--of-green-soft);
    border-color: var(--of-green-soft);
}

.home-action-card--green::after {
    background: var(--of-green);
}

.home-action-card--green span {
    background: var(--of-surface);
    color: var(--of-green);
}

.hero-panel {
    background: #071519;
    border: 1px solid #172a30;
    border-radius: 8px;
    box-shadow: none;
}

.hero-panel h1 {
    font-size: clamp(1.65rem, 2.2vw, 2rem);
}

.hero-side-panel,
.operator-secondary-link {
    background: #12252a;
    border: 1px solid #254046;
    border-radius: 8px;
}

.stat-panel {
    min-height: 116px;
}

.stat-panel::after {
    content: none;
}

.stat-label,
.field-title,
.meta-label,
.manual-health-grid span,
.result-meta-grid span,
.review-field-card span {
    color: var(--of-muted);
    font-size: 0.76rem;
    font-weight: 700;
}

.stat-value,
.manual-health-grid strong,
.result-meta-grid strong {
    color: var(--of-heading);
    font-size: clamp(1.55rem, 2.1vw, 2rem);
}

.stat-trend {
    color: var(--of-teal);
}

.form-control,
.field-box,
.text-card,
.result-meta-grid div,
.manual-health-grid div {
    background: var(--of-surface-soft);
    border: 1px solid var(--of-border);
    border-radius: 8px;
    color: var(--of-text);
}

.form-control {
    min-height: 42px;
    padding: 0.62rem 0.75rem;
}

textarea.form-control {
    min-height: 96px;
}

.form-control:focus {
    border-color: rgba(23, 108, 114, 0.48);
    box-shadow: 0 0 0 0.14rem rgba(23, 108, 114, 0.12);
}

label,
.operator-feedback-note {
    color: #34454d;
    font-size: 0.84rem;
}

.primary-action,
.secondary-action,
.secondary-chip,
.sidebar-logout-btn,
.operator-feedback-choice {
    border-radius: 8px;
    box-shadow: none;
    min-height: 42px;
}

.primary-action {
    background: var(--of-teal);
    border: 1px solid var(--of-teal);
    color: #ffffff;
}

.primary-action:hover:not(:disabled) {
    background: #125d63;
}

.secondary-action,
.secondary-chip {
    background: var(--of-surface);
    border: 1px solid var(--of-border);
    color: #34454d;
}

.secondary-action:hover:not(:disabled),
.secondary-chip:hover:not(:disabled),
.secondary-chip--active {
    background: var(--of-teal-soft);
    border-color: rgba(23, 108, 114, 0.24);
    color: var(--of-teal);
}

.queue-stack {
    gap: 0.65rem;
}

.queue-item,
.feed-item,
.data-row {
    background: var(--of-surface-soft);
    border: 1px solid var(--of-border-soft);
    border-radius: 8px;
    gap: 0.75rem;
    min-height: 58px;
    padding: 0.78rem 0.85rem;
}

button.queue-item {
    cursor: pointer;
}

.queue-item.active,
.queue-item--published.active,
.robot-list-item.active {
    background: var(--of-teal-soft);
    border-color: rgba(23, 108, 114, 0.28);
}

.queue-item strong {
    color: var(--of-heading);
    font-size: 0.92rem;
}

.queue-item span,
.queue-item p,
.detail-block {
    color: var(--of-muted);
    font-size: 0.82rem;
}

.robot-list-title span,
.manual-result-title span {
    background: var(--of-surface);
    border-radius: 999px;
    color: var(--of-teal);
    font-size: 0.74rem;
    font-weight: 700;
    padding: 0.24rem 0.55rem;
}

.robot-list-item,
.manual-result-item,
.manual-document-item {
    position: relative;
}

.robot-list-item::before,
.manual-document-item::before,
.manual-result-item::before {
    align-items: center;
    background: var(--of-teal-soft);
    border-radius: 8px;
    color: var(--of-teal);
    content: "RB";
    display: inline-flex;
    flex: 0 0 38px;
    font-size: 0.72rem;
    font-weight: 800;
    height: 38px;
    justify-content: center;
}

.manual-document-item::before,
.manual-result-item::before {
    background: var(--of-blue-soft);
    color: var(--of-blue);
    content: "PDF";
    width: 38px;
}

.inventory-movement-item::before {
    background: var(--of-amber-soft);
    color: var(--of-amber);
    content: "SP";
}

.review-alert,
.login-alert,
.inventory-message,
.robot-message,
.agent-debug-message,
.operator-conversation-msg {
    border-radius: 8px;
}

.warning-panel,
.review-alert--warning,
.manual-issues span,
.external-ref-disclaimer {
    background: var(--of-amber-soft);
    border-color: rgba(183, 121, 31, 0.24);
    color: #7a4c0a;
}

.success-panel,
.review-alert--success,
.inventory-message--success,
.robot-message--success,
.agent-debug-message--success,
.operator-feedback-current {
    background: var(--of-green-soft);
    border-color: rgba(31, 138, 91, 0.22);
    color: #145b3b;
}

.inventory-message--error,
.robot-message--error,
.agent-debug-message--error,
.review-alert--danger,
.login-alert,
.agent-debug-error {
    background: var(--of-red-soft);
    border-color: rgba(194, 65, 59, 0.22);
    color: #8d2d28;
}

.summary-copy {
    background: var(--of-green-soft);
    border: 1px solid rgba(31, 138, 91, 0.18);
    border-left: 4px solid var(--of-green);
    border-radius: 8px;
    color: #145b3b;
}

.field-row,
.robot-form-grid,
.robot-maintenance-form,
.robot-detail-grid,
.review-field-grid,
.form-showcase-grid {
    gap: 0.75rem;
}

.manual-health-grid div,
.result-meta-grid div,
.review-field-card,
.field-box,
.text-card {
    padding: 0.75rem;
}

.manual-search-grid,
.robot-search-bar {
    gap: 0.75rem;
}

.manual-result-meta {
    gap: 0.38rem;
}

.queue-stack--scroll,
.queue-stack--manual-docs,
.queue-stack--published {
    scrollbar-color: #bfd0d8 transparent;
}

.agent-debug-layout,
.agent-trace-grid {
    gap: 1rem;
}

.agent-debug-code,
pre {
    background: #071519;
    border: 1px solid #172a30;
    border-radius: 8px;
    color: #d7e4e7;
    font-size: 0.78rem;
}

.agent-trace-grid div {
    background: var(--of-surface-soft);
    border: 1px solid var(--of-border);
    border-radius: 8px;
}

.agent-event-item {
    border-radius: 8px;
}

.agent-event-item--success {
    background: var(--of-green-soft);
    border-color: rgba(31, 138, 91, 0.2);
}

.agent-event-item--error {
    background: var(--of-red-soft);
    border-color: rgba(194, 65, 59, 0.2);
}

.login-shell {
    background: var(--of-bg);
}

.login-card {
    border-radius: 8px;
    max-width: 430px;
}

.login-brand .brand-mark {
    background: var(--of-teal);
    border: 0;
    border-radius: 10px;
    box-shadow: none;
}

.login-brand .brand-name {
    color: var(--of-heading);
}

.operator-shell .shell-sidebar {
    background: transparent;
}

.operator-history-card,
.diagnosis-feedback-card {
    box-shadow: none;
}

.operator-conversation-msg--user {
    background: var(--of-teal-soft);
    border-color: rgba(23, 108, 114, 0.18);
}

.operator-conversation-msg--assistant {
    background: var(--of-surface);
    border-color: var(--of-border);
}

.external-ref-card {
    border-left: 3px solid rgba(23, 108, 114, 0.32);
}

.external-ref-title,
.text-link {
    color: var(--of-teal);
}

@media (max-width: 1280px) {
    .home-action-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .manual-health-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 960px) {
    .workspace-header {
        align-items: stretch;
        flex-direction: column;
    }

    .status-strip {
        justify-content: flex-start;
    }

    .home-action-grid,
    .workspace-grid--split,
    .workspace-grid--workorder,
    .workspace-grid--cases,
    .workspace-grid--devices,
    .workspace-grid--documents-top,
    .workspace-grid--documents-review,
    .workspace-grid--robot-workbench,
    .workspace-grid--robot-detail,
    .workspace-grid--inventory,
    .workspace-grid--inventory-detail,
    .workspace-grid--manual-library,
    .diagnosis-page-grid,
    .dashboard-main-grid,
    .support-grid,
    .dashboard-deep-grid,
    .dashboard-bottom-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .home-action-grid,
    .stats-grid,
    .dashboard-kpi-grid,
    .manual-health-grid,
    .field-row,
    .robot-form-grid,
    .robot-maintenance-form,
    .robot-detail-grid,
    .review-meta-grid,
    .review-field-grid,
    .form-showcase-grid,
    .result-meta-grid {
        grid-template-columns: 1fr;
    }

    .robot-search-bar,
    .manual-search-grid,
    .operator-conversation-input,
    .workbench-followup-input {
        grid-template-columns: 1fr;
    }

    .workspace-header {
        padding: 0.9rem;
    }
}

/* OmniFix Figma V3 complete UI pass */
.workspace-header {
    min-height: 76px;
    padding: 1rem 1.1rem;
}

/* OmniFix V3 Robot Service Modules UI */
:root {
    --of-v3-bg: #eef2f5;
    --of-v3-sidebar: #0b171b;
    --of-v3-card: #ffffff;
    --of-v3-border: #dde5ea;
    --of-v3-soft: #f7fafc;
    --of-v3-track: #e8eef2;
    --of-v3-text: #132126;
    --of-v3-heading: #0b171b;
    --of-v3-muted: #61737b;
    --of-v3-faint: #8da0a8;
    --of-v3-teal: #176c72;
    --of-v3-teal-soft: #e8f4f4;
    --of-v3-blue: #2764b8;
    --of-v3-blue-soft: #e9f1ff;
    --of-v3-green: #1f8a5b;
    --of-v3-green-soft: #eaf7ef;
    --of-v3-amber: #b7791f;
    --of-v3-amber-soft: #fff3d8;
    --of-v3-red: #c2413b;
    --of-v3-red-soft: #fdedec;
}

html,
body {
    background: var(--of-v3-bg);
    color: var(--of-v3-text);
}

.module-stat-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(4, minmax(0, 268px));
    margin-bottom: 18px;
}

.module-stat-card,
.module-panel,
.workspace-header,
.panel {
    background: var(--of-v3-card);
    border: 1px solid var(--of-v3-border);
    border-radius: 8px;
    box-shadow: none;
}

.module-stat-card {
    display: grid;
    gap: 10px;
    min-height: 121px;
    padding: 16px;
}

.module-stat-card > div {
    align-items: center;
    display: flex;
    gap: 10px;
}

.module-stat-card strong {
    color: var(--of-v3-heading);
    font-size: 2rem;
    line-height: 43px;
}

.module-stat-label {
    color: var(--of-v3-muted);
    display: block;
    font-size: 0.75rem;
    line-height: 16px;
}

.module-stat-card small {
    color: var(--of-v3-faint);
    display: block;
    font-size: 0.68rem;
    line-height: 15px;
}

.module-icon {
    align-items: center;
    background: var(--of-v3-teal-soft);
    border-radius: 10px;
    color: var(--of-v3-teal);
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.78rem;
    font-weight: 800;
    height: 38px;
    justify-content: center;
    min-width: 26px;
    padding: 0 4px;
}

.module-icon--amber {
    background: var(--of-v3-amber-soft);
    color: var(--of-v3-amber);
}

.module-icon--blue {
    background: var(--of-v3-blue-soft);
    color: var(--of-v3-blue);
}

.module-icon--green {
    background: var(--of-v3-green-soft);
    color: var(--of-v3-green);
}

.module-icon--red {
    background: var(--of-v3-red-soft);
    color: var(--of-v3-red);
}

.module-work-grid,
.module-bottom-grid {
    display: grid;
    gap: 18px;
    margin-bottom: 18px;
}

.module-work-grid {
    grid-template-columns: minmax(0, 760px) minmax(320px, 414px);
}

.module-bottom-grid {
    grid-template-columns: minmax(0, 580px) minmax(0, 594px);
}

.module-panel {
    padding: 18px;
}

.module-panel h2,
.panel h2 {
    color: var(--of-v3-text);
    font-size: 1.25rem;
    line-height: 27px;
    margin: 0 0 14px;
}

.module-lane-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.module-lane {
    border-radius: 8px;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 188px;
    padding: 16px;
    text-decoration: none;
}

.module-lane--teal {
    background: var(--of-v3-teal-soft);
}

.module-lane--amber {
    background: var(--of-v3-amber-soft);
}

.module-lane--blue {
    background: var(--of-v3-blue-soft);
}

.module-lane strong {
    color: var(--of-v3-text);
    font-size: 1.12rem;
    line-height: 24px;
}

.module-lane p {
    color: var(--of-v3-muted);
    font-size: 0.75rem;
    line-height: 18px;
    margin: 0;
}

.module-progress {
    display: grid;
    gap: 8px;
}

.module-progress div {
    align-items: center;
    color: var(--of-v3-text);
    display: flex;
    font-size: 0.75rem;
    gap: 8px;
    justify-content: space-between;
    line-height: 16px;
}

.module-progress span {
    font-weight: 500;
}

.module-progress b {
    font-weight: 700;
    white-space: nowrap;
}

.module-progress i {
    background: var(--of-v3-track);
    border-radius: 999px;
    display: block;
    height: 8px;
    overflow: hidden;
    position: relative;
}

.module-progress i::before {
    background: var(--bar, var(--of-v3-teal));
    border-radius: inherit;
    content: "";
    inset: 0 auto 0 0;
    position: absolute;
    width: var(--value, 50%);
}

.module-progress--full {
    margin-bottom: 12px;
    max-width: 430px;
}

.module-todo {
    align-items: center;
    border-radius: 8px;
    display: flex;
    gap: 10px;
    min-height: 54px;
    padding: 12px;
}

.module-todo--amber {
    background: var(--of-v3-amber-soft);
}

.module-todo--red {
    background: var(--of-v3-red-soft);
}

.module-todo--blue {
    background: var(--of-v3-blue-soft);
}

.module-todo--green {
    background: var(--of-v3-green-soft);
}

.module-todo span {
    align-items: center;
    background: #ffffff;
    border-radius: 10px;
    display: inline-flex;
    font-weight: 800;
    height: 38px;
    justify-content: center;
    min-width: 18px;
}

.module-todo strong {
    color: var(--of-v3-text);
    font-size: 0.81rem;
    line-height: 18px;
}

.module-feed-row {
    align-items: center;
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    min-height: 40px;
}

.module-feed-row span,
.module-feed-row p {
    color: var(--of-v3-muted);
    font-size: 0.75rem;
    line-height: 16px;
    margin: 0;
}

.workspace-header {
    margin-bottom: 18px;
    min-height: auto;
    padding: 16px 18px;
}

.workspace-header h1 {
    font-size: 1.44rem;
    line-height: 31px;
}

.panel {
    padding: 18px;
}

.form-control,
.field-box,
.text-card,
.result-meta-grid div,
.manual-health-grid div {
    background: var(--of-v3-soft);
    border-color: var(--of-v3-border);
    border-radius: 8px;
}

.queue-item,
.feed-item,
.data-row {
    border-color: var(--of-v3-border);
    border-radius: 8px;
    padding: 12px;
}

.queue-item.active,
.queue-item--published.active,
.robot-list-item.active {
    background: var(--of-v3-teal-soft);
}

.primary-action {
    background: var(--of-v3-teal);
    border-color: var(--of-v3-teal);
    border-radius: 8px;
}

.secondary-action,
.secondary-chip {
    border-color: var(--of-v3-border);
    border-radius: 8px;
}

.soft-badge,
.chip,
.inline-tag {
    border-radius: 999px;
}

.manual-search-grid,
.robot-search-bar {
    align-items: end;
}

.inventory-movement-item::before,
.robot-list-item::before,
.manual-document-item::before,
.manual-result-item::before {
    border-radius: 10px;
    height: 38px;
    width: auto;
    min-width: 26px;
}

.workspace-header h1 {
    font-size: 1.45rem;
}

.dashboard-kpi-grid,
.stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-panel {
    min-height: 86px;
    overflow: hidden;
    padding: 1rem 1rem 0.85rem 1.25rem;
}

.stat-panel::before {
    background: var(--of-teal);
    border-radius: 8px;
    content: "";
    inset: 0 auto 0 0;
    position: absolute;
    width: 5px;
}

.stat-panel::after {
    background: var(--of-teal-soft);
    border-radius: 999px;
    content: "";
    height: 24px;
    opacity: 1;
    position: absolute;
    right: 18px;
    top: 18px;
    width: 24px;
}

.stat-panel--green::before {
    background: var(--of-green);
}

.stat-panel--green::after {
    background: var(--of-green-soft);
}

.stat-panel--amber::before {
    background: var(--of-amber);
}

.stat-panel--amber::after {
    background: var(--of-amber-soft);
}

.stat-panel--red::before {
    background: var(--of-red);
}

.stat-panel--red::after {
    background: var(--of-red-soft);
}

.stat-label {
    margin-bottom: 0.4rem;
}

.stat-value {
    font-size: 1.55rem;
    line-height: 1.1;
}

.stat-trend {
    display: block;
    font-size: 0.76rem;
    margin-top: 0.35rem;
}

.home-overview-kpis {
    margin-bottom: 1rem;
}

.home-ops-grid {
    align-items: stretch;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1fr);
}

.metric-progress-list {
    display: grid;
    gap: 1.25rem;
    padding: 1.15rem 0.4rem 0.35rem;
}

.metric-progress > div {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.55rem;
}

.metric-progress strong {
    color: var(--of-heading);
    font-size: 0.84rem;
}

.metric-progress span {
    color: var(--of-teal);
    font-size: 0.78rem;
    font-weight: 800;
}

.metric-progress progress {
    appearance: none;
    border: 0;
    border-radius: 999px;
    height: 8px;
    overflow: hidden;
    width: 100%;
}

.metric-progress progress::-webkit-progress-bar {
    background: #edf2f5;
    border-radius: 999px;
}

.metric-progress progress::-webkit-progress-value {
    background: var(--of-teal);
    border-radius: 999px;
}

.metric-progress progress::-moz-progress-bar {
    background: var(--of-teal);
}

.metric-progress--green span {
    color: var(--of-green);
}

.metric-progress--green progress::-webkit-progress-value {
    background: var(--of-green);
}

.metric-progress--green progress::-moz-progress-bar {
    background: var(--of-green);
}

.metric-progress--blue span {
    color: var(--of-blue);
}

.metric-progress--blue progress::-webkit-progress-value {
    background: var(--of-blue);
}

.metric-progress--blue progress::-moz-progress-bar {
    background: var(--of-blue);
}

.home-risk-item {
    color: inherit;
    text-decoration: none;
}

.home-feature-panel {
    margin-top: 1rem;
}

.home-feature-grid {
    display: grid;
    gap: 1.75rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-feature-card {
    border-radius: 8px;
    color: inherit;
    display: flex;
    flex-direction: column;
    min-height: 170px;
    padding: 1.25rem;
    text-decoration: none;
}

.home-feature-card strong {
    font-size: 1rem;
    line-height: 1.3;
}

.home-feature-card p {
    color: var(--of-muted);
    font-size: 0.84rem;
    line-height: 1.55;
    margin: 0.8rem 0 auto;
}

.home-feature-card span {
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--of-border);
    border-radius: 8px;
    color: var(--of-teal);
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 800;
    height: 36px;
    justify-content: center;
    margin-top: 1.3rem;
    width: 78px;
}

.home-feature-card--teal {
    background: var(--of-teal-soft);
}

.home-feature-card--teal strong {
    color: var(--of-teal);
}

.home-feature-card--green {
    background: var(--of-green-soft);
}

.home-feature-card--green strong {
    color: var(--of-green);
}

.home-feature-card--amber {
    background: var(--of-amber-soft);
}

.home-feature-card--amber strong {
    color: var(--of-amber);
}

.robot-list-item,
.manual-document-item,
.manual-result-item,
.inventory-movement-item {
    align-items: flex-start;
}

.robot-list-item::before,
.manual-document-item::before,
.manual-result-item::before,
.inventory-movement-item::before {
    margin-top: 0.1rem;
}

.field-card {
    min-width: 0;
}

.field-box {
    min-height: 42px;
    overflow-wrap: anywhere;
}

.centered-copy {
    margin-top: 12vh;
}

.centered-copy h1,
.centered-copy h2 {
    color: var(--of-heading);
}

@media (max-width: 1280px) {
    .dashboard-kpi-grid,
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .manual-search-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 960px) {
    .home-ops-grid,
    .home-feature-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .dashboard-kpi-grid,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .home-feature-card {
        min-height: 148px;
    }
}

/* Final authority: OmniFix V3 Robot Service Modules UI */
.workspace-header,
.panel,
.module-stat-card,
.module-panel {
    background: #ffffff;
    border: 1px solid #dde5ea;
    border-radius: 8px;
    box-shadow: none;
}

.shell-content > .workspace-header:first-child {
    display: none;
}

.workspace-header {
    margin-bottom: 18px;
    min-height: auto;
    padding: 16px 18px;
}

.workspace-header h1 {
    color: #0b171b;
    font-size: 1.44rem;
    line-height: 31px;
}

.panel {
    padding: 18px;
}

.panel h2 {
    color: #132126;
    font-size: 1.25rem;
    line-height: 27px;
}

.module-stat-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(4, minmax(0, 268px));
    margin-bottom: 18px;
}

.module-work-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 760px) minmax(320px, 414px);
    margin-bottom: 18px;
}

.module-bottom-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 580px) minmax(0, 594px);
    margin-bottom: 18px;
}

.module-panel,
.module-stat-card {
    padding: 18px;
    font-family: var(--of-v3-font);
}

.module-stat-card {
    display: grid;
    gap: 10px;
    min-height: 121px;
}

.module-stat-card > div {
    align-items: center;
    display: flex;
    gap: 10px;
}

.module-stat-card strong {
    color: #0b171b;
    font-size: 2rem;
    line-height: 43px;
}

.module-lane-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.module-lane {
    border-radius: 8px;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 188px;
    padding: 16px;
    text-decoration: none;
}

.module-lane--teal {
    background: #e8f4f4;
}

.module-lane--amber {
    background: #fff3d8;
}

.module-lane--blue {
    background: #e9f1ff;
}

.module-lane strong {
    color: #132126;
    font-size: 1.12rem;
    line-height: 24px;
}

.module-lane p {
    color: #61737b;
    font-size: 0.75rem;
    line-height: 18px;
    margin: 0;
}

.module-icon {
    align-items: center;
    background: #e8f4f4;
    border-radius: 10px;
    color: #176c72;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.78rem;
    font-weight: 800;
    height: 38px;
    justify-content: center;
    min-width: 26px;
    padding: 0 4px;
}

.module-icon--amber {
    background: #fff3d8;
    color: #b7791f;
}

.module-icon--blue {
    background: #e9f1ff;
    color: #2764b8;
}

.module-icon--red {
    background: #fdedec;
    color: #c2413b;
}

.module-progress {
    display: grid;
    gap: 8px;
}

.module-progress div {
    align-items: center;
    color: #132126;
    display: flex;
    font-size: 0.75rem;
    gap: 8px;
    justify-content: space-between;
    line-height: 16px;
}

.module-progress b {
    font-weight: 700;
    white-space: nowrap;
}

.module-progress i {
    background: #e8eef2;
    border-radius: 999px;
    display: block;
    height: 8px;
    overflow: hidden;
    position: relative;
}

.module-progress i::before {
    background: var(--bar, #176c72);
    border-radius: inherit;
    content: "";
    inset: 0 auto 0 0;
    position: absolute;
    width: var(--value, 50%);
}

.module-progress--full {
    margin-bottom: 12px;
    max-width: 430px;
}

.module-todo {
    align-items: center;
    border-radius: 8px;
    display: flex;
    gap: 10px;
    min-height: 54px;
    padding: 12px;
}

.module-todo--amber {
    background: #fff3d8;
}

.module-todo--red {
    background: #fdedec;
}

.module-todo--blue {
    background: #e9f1ff;
}

.module-todo--green {
    background: #eaf7ef;
}

.module-todo span {
    align-items: center;
    background: #ffffff;
    border-radius: 10px;
    display: inline-flex;
    font-weight: 800;
    height: 38px;
    justify-content: center;
    min-width: 18px;
}

.module-feed-row {
    align-items: center;
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    min-height: 40px;
}

.module-feed-row span,
.module-feed-row p {
    color: #61737b;
    font-size: 0.75rem;
    line-height: 16px;
    margin: 0;
}

.workspace-grid--robot-workbench,
.workspace-grid--inventory,
.workspace-grid--manual-library {
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
}

.form-control,
.field-box,
.text-card,
.result-meta-grid div,
.manual-health-grid div {
    background: #f7fafc;
    border-color: #dde5ea;
    border-radius: 8px;
}

.queue-item,
.feed-item,
.data-row {
    border-color: #dde5ea;
    border-radius: 8px;
}

.primary-action {
    background: #176c72;
    border-color: #176c72;
    border-radius: 8px;
}

.secondary-action,
.secondary-chip {
    border-color: #dde5ea;
    border-radius: 8px;
}

@media (max-width: 1280px) {
    .module-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 268px));
    }

    .module-work-grid,
    .module-bottom-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 960px) {
    .module-stat-grid,
    .module-lane-grid,
    .workspace-grid--robot-workbench,
    .workspace-grid--inventory,
    .workspace-grid--manual-library {
        grid-template-columns: 1fr;
    }
}

/* Figma V3 service screens */
:root {
    --of-v3-font: "Microsoft YaHei UI", "Segoe UI", Arial, sans-serif;
}

.v3-page {
    display: grid;
    gap: 18px;
    font-family: var(--of-v3-font);
}

.v3-stat-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(4, minmax(0, 268px));
}

.v3-grid,
.v3-grid--work-order,
.v3-grid--diagnosis,
.v3-grid--documents,
.v3-grid--system,
.v3-grid--operator {
    display: grid;
    gap: 18px;
}

.v3-grid--work-order,
.v3-grid--diagnosis,
.v3-grid--documents,
.v3-grid--system {
    align-items: start;
    grid-template-columns: 360px minmax(0, 814px);
}

.v3-grid--work-order > .v3-stack:first-child {
    position: relative;
    z-index: 2;
}

.v3-grid--work-order > .v3-stack:last-child {
    min-width: 0;
    position: relative;
    z-index: 1;
}

.v3-grid--operator {
    grid-template-columns: minmax(0, 760px) minmax(320px, 414px);
}

.v3-card,
.v3-stat,
.v3-row,
.v3-photo-tile {
    background: #ffffff;
    border: 1px solid #dde5ea;
    border-radius: 8px;
    box-shadow: none;
}

.v3-card {
    padding: 18px;
}

.v3-card h2,
.v3-card h3 {
    color: #132126;
    font-size: 1.12rem;
    font-weight: 700;
    line-height: 24px;
    margin: 0 0 14px;
}

.v3-card h3 {
    font-size: 1rem;
    line-height: 22px;
}

.v3-card--nested {
    background: #ffffff;
    padding: 16px;
}

.v3-card p {
    margin: 0;
}

.v3-card--tall {
    min-height: 300px;
}

.v3-stack {
    display: grid;
    gap: 18px;
}

.v3-stack--compact {
    gap: 12px;
}

.v3-stat {
    display: grid;
    gap: 10px;
    min-height: 121px;
    padding: 16px;
}

.v3-stat-top {
    align-items: center;
    display: flex;
    gap: 10px;
}

.v3-stat strong {
    color: #0b171b;
    font-size: 2rem;
    line-height: 43px;
}

.v3-label {
    color: #61737b;
    display: block;
    font-size: 0.75rem;
    line-height: 16px;
}

.v3-note {
    color: #8da0a8;
    display: block;
    font-size: 0.68rem;
    line-height: 15px;
}

.v3-icon {
    align-items: center;
    background: #e8f4f4;
    border-radius: 10px;
    color: #176c72;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.78rem;
    font-weight: 800;
    height: 38px;
    justify-content: center;
    min-width: 26px;
    padding: 0 6px;
}

.v3-icon--amber {
    background: #fff3d8;
    color: #b7791f;
}

.v3-icon--blue {
    background: #e9f1ff;
    color: #2764b8;
}

.v3-icon--green {
    background: #eaf7ef;
    color: #1f8a5b;
}

.v3-icon--red {
    background: #fdedec;
    color: #c2413b;
}

.v3-row {
    background: #f7fafc;
    border-left: 4px solid #176c72;
    min-height: 56px;
    padding: 12px;
}

.v3-row strong {
    color: #132126;
    display: block;
    font-size: 0.82rem;
    line-height: 18px;
    margin-bottom: 4px;
}

.v3-row span,
.v3-row p {
    color: #61737b;
    display: block;
    font-size: 0.75rem;
    line-height: 16px;
    margin: 0;
}

.v3-row--teal {
    background: #e8f4f4;
    border-left-color: #176c72;
}

.v3-row--blue {
    background: #e9f1ff;
    border-left-color: #2764b8;
}

.v3-row--green {
    background: #eaf7ef;
    border-left-color: #1f8a5b;
}

.v3-row--amber {
    background: #fff3d8;
    border-left-color: #b7791f;
}

.v3-row--red {
    background: #fdedec;
    border-left-color: #c2413b;
}

.v3-row-grid {
    display: grid;
    gap: 12px;
}

.v3-row-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.v3-row-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.v3-row-grid--5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.v3-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.v3-pill {
    align-items: center;
    background: #e8f4f4;
    border-radius: 8px;
    color: #176c72;
    display: inline-flex;
    font-size: 0.75rem;
    font-weight: 800;
    min-height: 28px;
    padding: 0 10px;
    text-decoration: none;
}

.v3-progress {
    display: grid;
    gap: 8px;
}

.v3-progress-row {
    align-items: center;
    color: #132126;
    display: flex;
    font-size: 0.75rem;
    gap: 8px;
    justify-content: space-between;
    line-height: 16px;
}

.v3-progress-bar {
    background: #e8eef2;
    border-radius: 999px;
    display: block;
    height: 8px;
    overflow: hidden;
    position: relative;
}

.v3-progress-bar::before {
    background: var(--bar, #176c72);
    border-radius: inherit;
    content: "";
    inset: 0 auto 0 0;
    position: absolute;
    width: var(--value, 50%);
}

.v3-progress-bar--green {
    --bar: #1f8a5b;
}

.v3-progress-bar--blue {
    --bar: #2764b8;
}

.v3-progress-bar--amber {
    --bar: #b7791f;
}

.v3-photo-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, 142px);
}

.v3-photo-tile {
    background: #f7fafc;
    padding: 8px;
}

.v3-photo-tile div {
    align-items: center;
    background: #dfe7ec;
    border-radius: 8px;
    display: flex;
    height: 76px;
    justify-content: center;
}

.v3-photo-tile div::before {
    background: #cad5dc;
    border-radius: 999px;
    content: "";
    height: 30px;
    width: 30px;
}

.v3-photo-tile span {
    color: #61737b;
    display: block;
    font-size: 0.75rem;
    line-height: 16px;
    margin-top: 8px;
}

.v3-pdf-preview {
    background: #172033;
    border-radius: 8px;
    color: #ffffff;
    min-height: 220px;
    padding: 18px;
}

.v3-pdf-preview strong {
    display: block;
    font-size: 2.8rem;
    line-height: 1.2;
    margin-bottom: 20px;
}

.v3-pdf-preview span {
    color: #d0d7e3;
    display: block;
    font-size: 0.85rem;
    line-height: 1.5;
    margin-top: 10px;
}

.v3-pdf-preview-title {
    color: #ffffff;
    margin: 0;
}

.v3-muted {
    color: #61737b;
    font-size: 0.75rem;
    line-height: 18px;
}

.v3-section-note {
    margin-top: 14px;
}

.v3-empty {
    color: #61737b;
    font-family: var(--of-v3-font);
    font-size: 0.85rem;
}

.v3-static-design-reference {
    display: none;
}

.v3-large-title {
    color: #132126;
    font-size: 1.18rem;
    font-weight: 800;
    line-height: 26px;
    margin: 0 0 8px;
}

.v3-advanced-section {
    margin-top: 18px;
}

.v3-advanced-section > summary {
    background: #ffffff;
    border: 1px solid #dde5ea;
    border-radius: 8px;
    color: #176c72;
    cursor: pointer;
    font-weight: 800;
    padding: 14px 18px;
}

@media (max-width: 1280px) {
    .v3-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 268px));
    }

    .v3-grid--work-order,
    .v3-grid--diagnosis,
    .v3-grid--documents,
    .v3-grid--system,
    .v3-grid--operator {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .v3-stat-grid,
    .v3-row-grid--2,
    .v3-row-grid--3,
    .v3-row-grid--5,
    .v3-photo-grid {
        grid-template-columns: 1fr;
    }
}

/* Final V3 authority: keep every service-workbench page visually aligned with the second Figma file. */
:root {
    --of-v3-font: "Microsoft YaHei UI", "Segoe UI", Arial, sans-serif;
}

html,
body,
.omni-shell,
.omni-shell--service {
    background: #eef2f5;
    color: #132126;
    font-family: var(--of-v3-font);
    letter-spacing: 0;
}

.shell-main,
.shell-content,
.v3-page {
    min-width: 0;
}

.shell-content {
    max-width: none;
    width: 100%;
}

.shell-topbar,
.workspace-header,
.v3-card,
.v3-card--nested,
.v3-stat,
.panel,
.module-stat-card,
.module-panel,
.queue-item,
.feed-item,
.data-row,
.form-control,
.field-box,
.text-card,
.manual-health-grid div,
.result-meta-grid div,
.review-field-card,
.diagnosis-feedback-card,
.operator-history-card,
.external-analysis-card,
.external-ref-card {
    border-radius: 8px;
    box-shadow: none;
    font-family: var(--of-v3-font);
}

.shell-topbar,
.workspace-header,
.v3-card,
.v3-card--nested,
.v3-stat,
.panel,
.module-stat-card,
.module-panel {
    background: #ffffff;
    border: 1px solid #dde5ea;
}

.v3-card--nested {
    background: #f7fafc;
}

.v3-card--nested .v3-row {
    background: #ffffff;
}

.panel h2,
.panel-heading h2,
.module-panel h2,
.v3-card h2,
.v3-card h3,
.v3-stat strong,
.v3-large-title,
.module-stat-card strong,
.module-lane strong,
.queue-item strong,
.v3-row strong {
    color: #132126;
    letter-spacing: 0;
}

.muted,
.empty-state,
.v3-muted,
.v3-empty,
.module-lane p,
.queue-item span,
.queue-item p,
.detail-block,
.v3-row span,
.v3-row p,
.module-feed-row span,
.module-feed-row p {
    color: #61737b;
}

.v3-row {
    border-radius: 8px;
    overflow-wrap: anywhere;
}

.v3-icon,
.module-icon,
.nav-item-index,
.operator-status-mark,
.robot-list-item::before,
.manual-document-item::before,
.manual-result-item::before,
.inventory-movement-item::before {
    border-radius: 8px;
}

.primary-action,
.secondary-action,
.secondary-chip,
.v3-pill,
.operator-feedback-choice,
.sidebar-logout-btn {
    border-radius: 8px;
    box-shadow: none;
}

.primary-action {
    background: #176c72;
    border-color: #176c72;
}

.primary-action:hover:not(:disabled) {
    background: #125d63;
    border-color: #125d63;
}

.form-control,
.field-box,
.text-card,
.manual-health-grid div,
.result-meta-grid div {
    background: #f7fafc;
    border-color: #dde5ea;
}

.module-stat-grid,
.v3-stat-grid,
.dashboard-kpi-grid,
.stats-grid {
    align-items: stretch;
}

.module-stat-card,
.v3-stat,
.panel,
.v3-card {
    min-width: 0;
}

.module-stat-card *,
.v3-stat *,
.v3-card *,
.panel * {
    letter-spacing: 0;
}

.v3-photo-tile {
    background: #f7fafc;
    border: 1px solid #dde5ea;
    border-radius: 8px;
}

.v3-photo-tile div {
    background: #dfe7ec;
}

.workbench-hero,
.diagnosis-hero,
.hero-panel,
.workbench-input-panel,
.workbench-evidence-panel,
.diagnosis-search-panel,
.diagnosis-summary-panel {
    border-radius: 8px;
    box-shadow: none;
}

.operator-detail-header {
    display: none;
}

@media (min-width: 961px) {
    .shell-sidebar {
        background: #0b171b;
        border-radius: 12px;
        height: calc(100vh - 40px);
        margin: 20px 0 20px 24px;
        width: 184px;
    }

    .shell-main {
        padding: 20px 24px 28px 16px;
    }

    .shell-topbar {
        min-height: 72px;
        max-width: none;
        width: 100%;
    }
}

@media (max-width: 1280px) {
    .module-stat-grid,
    .module-work-grid,
    .module-bottom-grid,
    .module-lane-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 760px) {
    .module-stat-grid,
    .module-work-grid,
    .module-bottom-grid,
    .module-lane-grid {
        grid-template-columns: 1fr;
    }
}

.work-order-message {
    font-size: 0.86rem;
    line-height: 1.5;
    padding: 12px 16px;
}

.work-order-message--success {
    background: #eaf7ef;
    border-color: rgba(31, 138, 91, 0.24);
    color: #145b3b;
}

.work-order-message--error {
    background: #fdedec;
    border-color: rgba(194, 65, 59, 0.24);
    color: #9f2f29;
}

.work-order-row {
    cursor: pointer;
    font: inherit;
    text-align: left;
    transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
    width: 100%;
}

.work-order-row:hover,
.work-order-row--selected {
    border-color: rgba(23, 108, 114, 0.38);
    box-shadow: inset 0 0 0 1px rgba(23, 108, 114, 0.12);
}

.work-order-row:hover {
    transform: translateY(-1px);
}

.work-order-record-row {
    align-items: flex-start;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.work-order-record-row > div:first-child {
    min-width: 0;
}

.work-order-row-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
}

.work-order-inline-action {
    min-height: 38px;
    padding: 0 14px;
    width: auto;
}

.work-order-form-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.work-order-form-wide {
    grid-column: 1 / -1;
}

.work-order-actions {
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(120px, 0.32fr) minmax(0, 1fr);
    margin-top: 4px;
}

.work-order-close-panel {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.work-order-trace-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.work-order-service-outbound-action {
    margin-top: 12px;
    width: 100%;
}

.work-order-page label {
    margin-bottom: 0;
}

.work-order-page .form-control {
    width: 100%;
}

@media (max-width: 760px) {
    .work-order-form-grid,
    .work-order-actions,
    .work-order-trace-grid {
        grid-template-columns: 1fr;
    }

    .work-order-record-row {
        display: grid;
    }

    .work-order-row-actions {
        justify-content: stretch;
    }

    .work-order-row-actions > * {
        flex: 1 1 0;
    }
}

/* V3 backoffice consolidation: keep legacy admin panels visually aligned. */
.ai-provider-message,
.inventory-message,
.robot-message,
.work-order-message,
.review-alert,
.login-alert {
    border-radius: 8px;
    box-shadow: none;
    font-family: var(--of-v3-font);
}

.ai-preset-item,
.diagnosis-feedback-card,
.operator-history-card,
.external-analysis-card,
.external-ref-card {
    background: #f7fafc;
    border: 1px solid #dde5ea;
    border-radius: 8px;
    box-shadow: none;
}

.ai-preset-item--active {
    background: #e8f4f4;
    border-color: rgba(23, 108, 114, 0.24);
}

.ai-preset-main strong,
.diagnosis-feedback-card strong,
.operator-history-card strong,
.ai-provider-detail dt {
    color: #132126;
    letter-spacing: 0;
}

.ai-preset-main p,
.ai-preset-meta,
.ai-provider-detail dd,
.diagnosis-feedback-card p,
.diagnosis-feedback-note,
.operator-history-meta {
    color: #61737b;
    letter-spacing: 0;
}

.ai-preset-meta span,
.operator-history-badge {
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 800;
}

.ai-status-ok,
.operator-history-badge--success {
    background: #eaf7ef;
    color: #1f8a5b;
}

.ai-status-warn,
.operator-history-badge--warning {
    background: #fff3d8;
    color: #b7791f;
}

.operator-history-badge--info {
    background: #e9f1ff;
    color: #2764b8;
}

.ai-provider-detail {
    display: grid;
    gap: 10px;
}

.ai-provider-detail div {
    background: #f7fafc;
    border: 1px solid #dde5ea;
    border-radius: 8px;
    padding: 10px 12px;
}

.ai-provider-detail dt,
.ai-provider-detail dd {
    margin: 0;
}

.ai-provider-detail dt {
    font-size: 0.75rem;
    font-weight: 800;
}

.ai-provider-detail dd {
    font-size: 0.82rem;
    overflow-wrap: anywhere;
}

.diagnosis-feedback-list {
    display: grid;
    gap: 12px;
}

.diagnosis-feedback-card {
    align-items: flex-start;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 12px;
}

.diagnosis-feedback-main {
    min-width: 0;
}

.diagnosis-feedback-title-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}

.diagnosis-feedback-note {
    background: #ffffff;
    border: 1px solid #dde5ea;
    border-radius: 8px;
    margin-top: 10px;
    padding: 10px;
}

.diagnosis-feedback-note span {
    color: #176c72;
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.mobile-user-action-row,
.mobile-user-reset-box,
.inline-action-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mobile-user-reset-box {
    background: #f7fafc;
    border: 1px solid #dde5ea;
    border-radius: 8px;
    margin-top: 12px;
    padding: 12px;
}

.mobile-user-reset-box p {
    margin-bottom: 8px;
}

.mobile-user-role-select {
    width: auto;
}

.secondary-action--compact,
.operator-history-action {
    min-height: 38px;
    width: auto;
}

@media (max-width: 760px) {
    .diagnosis-feedback-card {
        display: grid;
    }

    .mobile-user-action-row,
    .mobile-user-reset-box,
    .inline-action-row {
        align-items: stretch;
        display: grid;
    }
}

/* V3 full-web authority: second Figma file parity layer. */
body {
    overflow-x: hidden;
}

.omni-shell--service,
.operator-shell {
    background: #eef2f5;
}

@media (min-width: 961px) {
    .omni-shell--service .shell-sidebar,
    .operator-shell .shell-sidebar {
        background: #0b171b;
        border: 0;
        border-radius: 12px;
        box-shadow: none;
        box-sizing: border-box;
        height: calc(100vh - 40px);
        margin: 20px 0 20px 24px;
        overflow: hidden auto;
        padding: 18px;
        position: sticky;
        top: 20px;
        width: 184px;
    }

    .omni-shell--service .shell-main,
    .operator-shell .shell-main {
        padding: 20px 24px 28px 16px;
    }

    .omni-shell--service .shell-topbar,
    .operator-shell .shell-topbar {
        background: #ffffff;
        border: 1px solid #dde5ea;
        border-radius: 8px;
        box-shadow: none;
        display: grid;
        grid-template-columns: minmax(380px, 1fr) auto auto;
        min-height: 72px;
        padding: 11px 18px;
        position: static;
        max-width: none;
        width: 100%;
    }

    .omni-shell--service .shell-content,
    .operator-shell .shell-content {
        max-width: none;
        padding: 0;
        width: 100%;
    }
}

.operator-shell .operator-status {
    background: #f7fafc;
    border: 1px solid #dde5ea;
    border-radius: 8px;
    color: #132126;
    height: 40px;
    min-height: 40px;
    padding: 8px;
}

.operator-shell .operator-status-mark {
    display: inline-flex;
}

.operator-shell .operator-status small {
    display: block;
}

.operator-shell .operator-status strong {
    color: #132126;
    font-size: 0.75rem;
}

.operator-shell .operator-status--online .operator-status-mark {
    background: #eaf7ef;
    color: #1f8a5b;
}

.workspace-header,
.operator-page-header,
.diagnosis-feedback-header {
    background: #ffffff;
    border: 1px solid #dde5ea;
    border-radius: 8px;
    box-shadow: none;
    box-sizing: border-box;
    margin-bottom: 18px;
    padding: 18px;
}

.workspace-header h1,
.operator-page-header h1,
.diagnosis-feedback-header h1,
.utility-card h1 {
    color: #0b171b;
    font-size: 1.44rem;
    line-height: 31px;
    margin: 0 0 4px;
}

.eyebrow {
    color: #176c72;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0;
    margin: 0 0 4px;
    text-transform: uppercase;
}

.panel,
.data-card,
.workbench-input-panel,
.workbench-result-area,
.workbench-evidence-panel,
.workbench-result-content,
.workbench-empty-start,
.workbench-insufficient,
.expanded-diagnosis-main,
.workbench-followup-card,
.workbench-priority-panel,
.agent-debug-panel,
.agent-debug-events,
.history-detail-panel,
.ai-quick-switch-panel,
.operator-detail-card,
.operator-conversation {
    background: #ffffff;
    border: 1px solid #dde5ea;
    border-radius: 8px;
    box-shadow: none;
}

.workbench-hero,
.operator-hero-panel,
.hero-panel {
    background: #ffffff;
    border: 1px solid #dde5ea;
    border-radius: 8px;
    box-shadow: none;
    color: #132126;
    margin-bottom: 18px;
    padding: 18px;
}

.workbench-hero h1,
.operator-hero-panel h1,
.hero-panel h1 {
    color: #0b171b;
    font-size: 1.44rem;
    line-height: 31px;
    margin: 0 0 6px;
}

.workbench-hero p,
.operator-hero-panel p,
.hero-panel p,
.hero-panel .muted {
    color: #61737b;
}

.workbench-hero-status span {
    background: #f7fafc;
    border: 1px solid #dde5ea;
    border-radius: 8px;
    color: #61737b;
}

.workbench-ai-status--ready,
.workbench-hero-status .workbench-ai-status--ready {
    background: #eaf7ef;
    border-color: rgba(31, 138, 91, 0.24);
    color: #1f8a5b;
}

.workbench-ai-status--incomplete,
.workbench-hero-status .workbench-ai-status--incomplete {
    background: #fff3d8;
    border-color: rgba(183, 121, 31, 0.24);
    color: #b7791f;
}

.workbench-layout,
.agent-debug-layout {
    display: grid;
    gap: 18px;
    grid-template-columns: 300px minmax(0, 1fr) 320px;
}

.workbench-input-panel,
.workbench-evidence-panel,
.workbench-result-area,
.agent-debug-panel,
.agent-debug-events {
    padding: 18px;
}

.workbench-result-area {
    min-height: 520px;
}

.workbench-evidence-card,
.external-analysis-card,
.external-ref-card,
.agent-event-item,
.history-item,
.operator-history-card,
.diagnosis-feedback-card,
.queue-item,
.data-row {
    background: #f7fafc;
    border: 1px solid #dde5ea;
    border-radius: 8px;
    box-shadow: none;
}

.data-card,
.stat-panel {
    min-height: 121px;
    padding: 16px;
}

.stat-panel::after,
.stat-panel::before {
    content: none;
}

.stat-value,
.data-card strong {
    color: #0b171b;
    font-size: 2rem;
    line-height: 43px;
}

.history-metric-grid,
.diagnosis-feedback-stats,
.operator-history-stats {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 18px;
}

.login-shell {
    align-items: center;
    background: #eef2f5;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
}

.login-card {
    background: #ffffff;
    border: 1px solid #dde5ea;
    border-radius: 8px;
    box-shadow: none;
    max-width: 430px;
    padding: 24px;
    width: 100%;
}

.login-brand {
    align-items: center;
    display: flex;
    gap: 12px;
    margin-bottom: 22px;
}

.login-card .brand-mark {
    align-items: center;
    background: #e8f4f4;
    border-radius: 8px;
    color: #176c72;
    display: inline-flex;
    font-weight: 800;
    height: 38px;
    justify-content: center;
    width: 38px;
}

.login-card .brand-name {
    color: #0b171b;
}

.login-card .brand-subtitle {
    color: #61737b;
}

.login-card h1 {
    color: #0b171b;
    font-size: 1.44rem;
    line-height: 31px;
    margin: 0 0 6px;
}

.login-form,
.login-action-stack {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.login-action-stack + .login-action-stack {
    margin-top: 12px;
}

.login-card .primary-action,
.login-card .secondary-action {
    display: inline-flex;
    text-decoration: none;
    width: 100%;
}

.utility-page {
    min-height: 420px;
}

.utility-card {
    display: grid;
    gap: 18px;
    max-width: 760px;
}

.utility-link-grid a {
    text-decoration: none;
}

.form-control,
input.form-control,
select.form-control,
textarea.form-control {
    border-radius: 8px;
    box-sizing: border-box;
    min-width: 0;
}

.primary-action,
.secondary-action {
    min-width: 0;
    text-align: center;
}

.service-attachment-panel {
    background: #ffffff;
    border: 1px solid #dde5ea;
    border-radius: 8px;
    box-shadow: none;
    display: grid;
    gap: 12px;
    margin-top: 14px;
    padding: 14px;
}

.service-attachment-panel--timeline,
.service-attachment-panel--compact {
    background: #f7fafc;
    margin-top: 10px;
    padding: 10px;
}

.service-attachment-header {
    align-items: flex-start;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.service-attachment-header strong {
    color: #132126;
    display: block;
    font-size: 0.95rem;
}

.service-attachment-header span,
.service-attachment-header small,
.service-attachment-empty {
    color: #61737b;
    font-size: 0.82rem;
    line-height: 1.45;
}

.service-attachment-message {
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    margin: 0;
    padding: 8px 10px;
}

.service-attachment-message--success {
    background: #eaf7ef;
    color: #1f8a5b;
}

.service-attachment-message--error {
    background: #fff0ef;
    color: #c2413b;
}

.service-upload-grid {
    align-items: end;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(130px, 0.45fr) minmax(160px, 0.55fr) minmax(220px, 1fr);
}

.service-upload-grid label {
    margin-bottom: 0;
}

.service-attachment-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
}

.service-attachment-tile {
    background: #f7fafc;
    border: 1px solid #dde5ea;
    border-radius: 8px;
    color: inherit;
    display: grid;
    gap: 6px;
    min-width: 0;
    padding: 8px;
    text-decoration: none;
}

.service-attachment-tile img,
.service-attachment-file {
    aspect-ratio: 4 / 3;
    background: #e8f4f4;
    border: 1px solid #dde5ea;
    border-radius: 6px;
    object-fit: cover;
    width: 100%;
}

.service-attachment-file {
    align-items: center;
    color: #176c72;
    display: flex;
    font-weight: 800;
    justify-content: center;
}

.service-attachment-tile span,
.service-attachment-tile small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.service-attachment-tile span {
    color: #132126;
    font-size: 0.8rem;
    font-weight: 800;
}

.service-attachment-tile small {
    color: #61737b;
    font-size: 0.74rem;
}

@media (max-width: 760px) {
    .service-upload-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1280px) {
    .workbench-layout,
    .agent-debug-layout {
        grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
    }

    .workbench-evidence-panel,
    .agent-debug-events {
        grid-column: 1 / -1;
    }

    .history-metric-grid,
    .diagnosis-feedback-stats,
    .operator-history-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 960px) {
    .operator-shell .shell-sidebar,
    .omni-shell--service .shell-sidebar {
        box-sizing: border-box;
        margin: 12px 12px 0;
        position: static;
        width: auto;
    }

    .operator-shell .shell-topbar,
    .omni-shell--service .shell-topbar {
        box-sizing: border-box;
        margin-left: 0;
        margin-right: 0;
        width: auto;
    }

    .workbench-layout,
    .agent-debug-layout,
    .history-metric-grid,
    .diagnosis-feedback-stats,
    .operator-history-stats {
        grid-template-columns: 1fr;
    }

    .workbench-evidence-panel,
    .agent-debug-events {
        grid-column: auto;
    }
}

@media (max-width: 760px) {
    .workspace-header,
    .operator-page-header,
    .diagnosis-feedback-header {
        display: grid;
    }

    .action-grid,
    .utility-link-grid {
        grid-template-columns: 1fr;
    }

    .login-shell {
        padding: 12px;
    }
}

/* V3 auth and permission pages: align login/access-denied with Full Web V3 route frames. */
.auth-v3-shell {
    background: #eef2f5;
    color: #132126;
    display: flex;
    min-height: 100vh;
}

.auth-v3-sidebar {
    background: #13242f !important;
    border-radius: 14px !important;
}

.auth-v3-brand {
    margin-bottom: 28px;
}

.auth-v3-brand-name {
    color: #ffffff;
    font-size: 24px;
    font-weight: 800;
    line-height: 30px;
}

.auth-v3-brand-subtitle {
    color: #94b0bd;
    font-size: 10px;
    line-height: 13px;
    margin-top: 14px;
}

.auth-v3-nav {
    display: grid;
    gap: 16px;
}

.auth-v3-nav-item {
    align-items: center;
    background: #13242f;
    border: 1px solid #1f3642;
    border-radius: 8px;
    color: #d6e5eb;
    display: flex;
    gap: 10px;
    height: 42px;
    padding: 7px 8px;
    text-decoration: none;
}

.auth-v3-nav-item span {
    align-items: center;
    background: #1f3642;
    border-radius: 6px;
    color: #b8d1db;
    display: inline-flex;
    flex: 0 0 28px;
    font-size: 10px;
    font-weight: 800;
    height: 28px;
    justify-content: center;
}

.auth-v3-nav-item strong {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.25;
}

.auth-v3-nav-item.active {
    background: #176c72;
    border-color: #176c72;
    color: #ffffff;
}

.auth-v3-nav-item.active span {
    background: #ffffff;
    color: #176c72;
}

.auth-v3-cycle-note {
    background: #1f3642;
    border-radius: 10px;
    box-sizing: border-box;
    color: #bad1db;
    margin-top: auto;
    min-height: 82px;
    padding: 12px;
    width: 148px;
}

.auth-v3-cycle-note strong {
    color: #ffffff;
    display: block;
    font-size: 12px;
    line-height: 16px;
    margin-bottom: 6px;
}

.auth-v3-cycle-note p {
    font-size: 10px;
    line-height: 13px;
    margin: 0;
}

.auth-v3-page {
    background: #eef2f5;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    width: 100%;
}

.auth-v3-main {
    box-sizing: border-box;
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.auth-v3-stat-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(4, 268px);
    margin-bottom: 18px;
}

.auth-page-redesign {
    gap: 18px;
}

.auth-hero {
    align-items: stretch;
    background: #ffffff;
    border: 1px solid #d8e0e5;
    border-radius: 12px;
    box-shadow: 0 14px 34px rgba(17, 34, 51, 0.07);
    box-sizing: border-box;
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1fr) minmax(460px, 0.75fr);
    margin-bottom: 0;
    min-height: 154px;
    padding: 28px 30px;
}

.auth-kicker,
.auth-panel-label {
    color: #176c72;
    display: block;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    line-height: 1.2;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.auth-hero h1 {
    color: #0b171b;
    font-size: clamp(2rem, 2.4vw, 2.85rem);
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.05;
    margin: 0;
    text-wrap: balance;
}

.auth-hero p {
    color: #4d626c;
    font-size: 1rem;
    line-height: 1.65;
    margin: 14px 0 0;
    max-width: 760px;
    text-wrap: pretty;
}

.auth-status-strip {
    align-content: stretch;
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.auth-status-strip span {
    background: #f7fafc;
    border: 1px solid #d8e0e5;
    border-radius: 10px;
    color: #61737b;
    display: grid;
    font-size: 0.86rem;
    gap: 8px;
    min-height: 88px;
    padding: 16px;
}

.auth-status-strip strong {
    color: #0f5f65;
    display: block;
    font-size: 1.25rem;
    font-weight: 900;
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.auth-status-strip .auth-status-error strong {
    color: #a93535;
}

.auth-v3-stat,
.auth-v3-panel {
    background: #ffffff;
    border: 1px solid #d8e0e5;
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(17, 34, 51, 0.08);
    box-sizing: border-box;
}

.auth-v3-stat {
    min-height: 121px;
    padding: 15px 16px;
}

.auth-v3-stat-icon {
    align-items: center;
    background: #e5f3f2;
    border-radius: 8px;
    color: #176c72;
    display: inline-flex;
    font-size: 10px;
    font-weight: 800;
    height: 28px;
    justify-content: center;
    margin-right: 14px;
    min-width: 28px;
    padding: 0 3px;
    vertical-align: top;
}

.auth-v3-stat div {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    vertical-align: top;
}

.auth-v3-stat strong {
    color: #182b34;
    font-size: 12px;
    line-height: 16px;
}

.auth-v3-stat small {
    color: #677a84;
    font-size: 10px;
    line-height: 13px;
}

.auth-v3-stat b {
    color: #176c72;
    display: block;
    font-size: 32px;
    font-weight: 800;
    line-height: 40px;
    margin-top: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.auth-v3-stat--warning .auth-v3-stat-icon {
    background: #fff1e8;
    color: #b84c22;
}

.auth-v3-stat--warning b {
    color: #b84c22;
}

.auth-v3-stat--danger .auth-v3-stat-icon {
    background: #ffeaea;
    color: #a93535;
}

.auth-v3-stat--danger b {
    color: #a93535;
}

.auth-v3-workspace {
    align-items: start;
    display: grid;
    gap: 18px;
    grid-template-columns: 760px 414px;
    min-height: 0;
}

.auth-v3-panel {
    padding: 18px;
}

.auth-v3-login-panel {
    align-content: start;
    display: grid;
    min-height: 520px;
}

.auth-v3-login-panel .auth-v3-field-row,
.auth-v3-login-panel .auth-v3-alert,
.auth-v3-login-panel .auth-v3-row--danger {
    max-width: 680px;
}

.auth-v3-denied-panel,
.auth-v3-side-panel {
    align-content: start;
    display: grid;
    min-height: 430px;
}

.auth-v3-login-panel + .auth-v3-side-panel {
    min-height: 520px;
}

.auth-v3-panel-header {
    margin-bottom: 28px;
    padding: 0;
}

.auth-v3-panel-header h1,
.auth-v3-panel-header h2,
.auth-v3-side-panel h2 {
    color: #182b34;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.15;
    margin: 0;
    text-wrap: balance;
}

.auth-v3-side-panel h2 {
    font-size: 1.65rem;
    line-height: 1.2;
    margin-bottom: 18px;
}

.auth-v3-panel-header p {
    color: #677a84;
    font-size: 1rem;
    line-height: 1.6;
    margin: 10px 0 0;
}

.auth-v3-row,
.auth-v3-field-row {
    background: #fafcfd;
    border: 1px solid #d8e0e5;
    border-radius: 8px;
    box-sizing: border-box;
    display: grid;
    gap: 9px;
    margin-bottom: 16px;
    min-height: 82px;
    padding: 15px 16px 15px 22px;
    position: relative;
}

.auth-v3-row::before,
.auth-v3-field-row::before {
    background: #176c72;
    border-radius: 8px;
    bottom: -1px;
    content: "";
    left: -1px;
    position: absolute;
    top: -1px;
    width: 4px;
}

.auth-v3-row strong,
.auth-v3-field-row span {
    color: #182b34;
    font-size: 0.96rem;
    font-weight: 700;
    line-height: 1.25;
}

.auth-v3-row span,
.auth-v3-field-row input {
    color: #677a84;
    font-size: 0.96rem;
    line-height: 1.35;
}

.auth-v3-field-row input.form-control {
    background: transparent;
    border: 0;
    color: #132126;
    font-size: 1rem;
    min-height: 32px;
    padding: 0;
}

.auth-v3-field-row input.form-control::placeholder {
    color: #7a8c95;
    font-size: 1rem;
}

.auth-v3-field-row input.form-control:focus {
    box-shadow: none;
    outline: 2px solid rgba(23, 108, 114, 0.18);
    outline-offset: 4px;
}

.auth-v3-row--warning::before,
.auth-v3-field-row--warning::before {
    background: #b84c22;
}

.auth-v3-row--danger::before {
    background: #a93535;
}

.auth-v3-alert {
    background: #ffeaea;
    border: 1px solid rgba(169, 53, 53, 0.22);
    border-radius: 8px;
    color: #a93535;
    font-size: 0.95rem;
    font-weight: 700;
    margin: -8px 0 16px;
    padding: 13px 16px;
}

.auth-v3-check {
    align-items: center;
    color: #61737b;
    display: inline-flex;
    font-size: 0.95rem;
    gap: 8px;
    margin: 2px 0 16px;
}

.auth-v3-action-row {
    align-items: center;
    display: flex;
    gap: 18px;
    margin: 24px 0 28px;
}

.auth-v3-action-row .primary-action,
.auth-v3-action-row .secondary-action,
.auth-v3-action-row form {
    width: auto;
}

.auth-v3-action-row .primary-action,
.auth-v3-action-row .secondary-action {
    justify-content: center;
    font-size: 1rem;
    font-weight: 800;
    min-height: 52px;
    min-width: 180px;
    padding: 0 26px;
    text-decoration: none;
}

.auth-v3-login-panel .auth-v3-action-row .primary-action {
    min-width: 260px;
}

.auth-access-map {
    background: #0b171b;
    border-radius: 12px;
    color: #d7e7ec;
    display: grid;
    gap: 1px;
    margin-top: 22px;
    overflow: hidden;
}

.auth-access-map div {
    align-items: center;
    background: #12252b;
    display: grid;
    gap: 8px;
    grid-template-columns: 140px minmax(0, 1fr);
    min-height: 58px;
    padding: 14px 16px;
}

.auth-access-map span {
    color: #91aab5;
    font-size: 0.9rem;
}

.auth-access-map strong {
    color: #ffffff;
    font-size: 1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (min-width: 961px) {
    .auth-v3-shell .shell-sidebar {
        top: 20px;
    }

    .auth-v3-shell .shell-main {
        padding: 20px 24px 28px 16px;
    }

    .auth-v3-shell .shell-topbar {
        align-items: center;
        border-radius: 12px;
        box-sizing: border-box;
        gap: 18px;
        grid-template-columns: minmax(380px, 1fr) auto auto;
        height: 72px;
        margin: 0 0 20px;
        max-width: none;
        min-height: 72px;
        overflow: hidden;
        padding: 10px 18px;
        position: static;
        width: 100%;
    }

    .auth-v3-shell .shell-content {
        margin: 0;
        max-width: none;
        padding: 0;
        width: 100%;
    }

    .auth-v3-shell .auth-v3-page {
        min-height: calc(100vh - 112px);
    }

    .auth-v3-shell .auth-v3-workspace {
        align-items: stretch;
        flex: 1 1 auto;
    }

    .auth-v3-shell .auth-v3-login-panel,
    .auth-v3-shell .auth-v3-side-panel {
        min-height: clamp(560px, calc(100vh - 362px), 720px);
    }
}

@media (max-width: 1280px) {
    .auth-v3-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .auth-v3-workspace {
        grid-template-columns: minmax(0, 1fr);
    }

    .auth-hero {
        grid-template-columns: 1fr;
    }

    .auth-status-strip {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 960px) {
    .auth-v3-shell {
        display: block;
        overflow-x: clip;
    }

    .auth-v3-sidebar {
        margin: 0 !important;
        padding: 12px !important;
    }

    .auth-v3-nav {
        gap: 8px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .auth-v3-nav-item {
        min-height: 34px;
        padding: 5px 7px;
    }

    .auth-v3-nav-item span {
        height: 22px;
        min-width: 22px;
    }

    .auth-v3-nav-item strong {
        font-size: 0.74rem;
    }

    .auth-v3-cycle-note {
        display: none;
    }

    .auth-v3-shell .shell-content {
        padding: 0;
    }

    .auth-v3-stat-grid {
        grid-template-columns: 1fr;
    }

    .auth-hero {
        min-height: 0;
        padding: 20px;
    }

    .auth-hero h1 {
        font-size: 1.85rem;
    }

    .auth-v3-action-row {
        align-items: stretch;
        flex-direction: column;
        margin-inline: 0;
    }

    .auth-v3-action-row .primary-action,
    .auth-v3-action-row .secondary-action,
    .auth-v3-action-row form {
        width: 100%;
    }

    .auth-v3-page,
    .auth-v3-workspace,
    .auth-v3-stat-grid,
    .auth-v3-panel,
    .auth-v3-row,
    .auth-v3-field-row {
        box-sizing: border-box;
        max-width: 100%;
    }
}

/* V3 UI fix cycle: shell sizing, mobile first-screen usability, and workbench entry. */
#blazor-error-ui {
    display: none;
}

.workbench-context-summary {
    margin-top: 18px;
}

.workbench-hero {
    margin-bottom: 18px;
}

.workbench-layout {
    align-items: stretch;
}

.workbench-input-panel,
.workbench-result-area,
.workbench-evidence-panel {
    min-width: 0;
}

.workbench-form label,
.workbench-advanced-grid label,
.workbench-inline-fields label {
    min-width: 0;
}

.workbench-form .primary-action {
    width: 100%;
}

@media (min-width: 961px) {
    .omni-shell--service,
    .operator-shell {
        display: flex;
        min-height: 100vh;
    }

    .omni-shell--service .shell-sidebar,
    .operator-shell .shell-sidebar {
        flex: 0 0 184px;
        height: calc(100vh - 40px);
        margin: 20px 0 20px 24px;
        position: sticky;
        top: 20px;
        width: 184px;
    }

    .omni-shell--service .shell-main,
    .operator-shell .shell-main,
    .auth-v3-shell .shell-main {
        flex: 1 1 auto;
        min-width: 0;
        padding: 20px 24px 28px 16px;
    }

    .omni-shell--service .shell-topbar,
    .operator-shell .shell-topbar,
    .auth-v3-shell .shell-topbar {
        box-sizing: border-box;
        margin: 0 0 20px;
        max-width: none;
        width: 100%;
    }

    .omni-shell--service .shell-content,
    .operator-shell .shell-content,
    .auth-v3-shell .shell-content {
        box-sizing: border-box;
        max-width: none;
        width: 100%;
    }

    .module-stat-grid,
    .v3-stat-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .module-work-grid,
    .v3-grid--operator {
        grid-template-columns: minmax(0, 1.45fr) minmax(340px, 0.8fr);
    }

    .auth-v3-workspace {
        grid-template-columns: minmax(520px, 720px) minmax(460px, 1fr);
    }

    .auth-v3-login-panel {
        max-width: 720px;
    }

    .auth-v3-side-panel {
        max-width: none;
    }

    .module-bottom-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .v3-grid--work-order,
    .v3-grid--diagnosis,
    .v3-grid--documents,
    .v3-grid--system {
        grid-template-columns: minmax(320px, 0.42fr) minmax(0, 1fr);
    }
}

@media (max-width: 960px) {
    .omni-shell--service,
    .operator-shell,
    .auth-v3-shell {
        display: block;
        min-height: 100vh;
        padding: 8px;
    }

    .omni-shell--service .shell-sidebar,
    .operator-shell .shell-sidebar,
    .auth-v3-shell .shell-sidebar {
        border-radius: 12px;
        box-sizing: border-box;
        height: auto;
        margin: 0;
        max-height: none;
        overflow: visible;
        padding: 0;
        position: static;
        width: 100%;
    }

    .omni-shell--service .shell-main,
    .operator-shell .shell-main,
    .auth-v3-shell .shell-main {
        min-height: 0;
        padding: 10px 0 16px;
    }

    .omni-shell--service .shell-topbar,
    .operator-shell .shell-topbar,
    .auth-v3-shell .shell-topbar {
        box-sizing: border-box;
        gap: 10px;
        grid-template-columns: minmax(0, 1fr);
        margin: 0 0 10px;
        max-width: none;
        min-height: 0;
        padding: 12px;
        width: 100%;
    }

    .topbar-copy strong {
        font-size: 1.1rem;
        line-height: 1.25;
    }

    .topbar-copy p {
        font-size: 0.72rem;
        line-height: 1.35;
    }

    .topbar-tabs {
        gap: 6px;
        max-width: 100%;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .topbar-tab,
    ::deep .topbar-tab {
        min-height: 26px;
        padding: 0 8px;
    }

    .operator-status {
        display: none;
    }

    .omni-shell--service .shell-content,
    .operator-shell .shell-content,
    .auth-v3-shell .shell-content {
        box-sizing: border-box;
        max-width: none;
        padding: 0;
        width: 100%;
    }

    .workbench-hero {
        margin-bottom: 10px;
        padding: 14px;
    }

    .workbench-hero-copy h1 {
        font-size: 1.25rem;
        line-height: 1.25;
    }

    .workbench-hero-copy p {
        font-size: 0.82rem;
    }

    .workbench-hero-status {
        gap: 6px;
        margin-top: 10px;
    }

    .workbench-layout {
        gap: 10px;
        grid-template-columns: 1fr;
    }

    .workbench-input-panel,
    .workbench-result-area,
    .workbench-evidence-panel,
    .workbench-result-content,
    .workbench-empty-start,
    .workbench-insufficient {
        padding: 14px;
    }

    .workbench-inline-fields,
    .workbench-advanced-grid,
    .workbench-followup-input {
        grid-template-columns: 1fr;
    }

    .workbench-context-summary {
        margin-top: 10px;
    }
}

@media (max-width: 560px) {
    .omni-shell--service,
    .operator-shell,
    .auth-v3-shell {
        padding: 6px;
    }

    .omni-shell--service .shell-main,
    .operator-shell .shell-main,
    .auth-v3-shell .shell-main {
        padding-top: 8px;
    }

    .auth-v3-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .auth-v3-cycle-note {
        display: none;
    }

    .auth-v3-workspace,
    .auth-v3-panel-grid {
        gap: 10px;
    }

    .auth-v3-login-panel,
    .auth-v3-side-panel {
        padding: 16px;
    }

    .workbench-hero-status span {
        flex: 1 1 auto;
        text-align: center;
    }
}

/* Figma 1:1 pass for Screen / 服务总览 (node 1:2). */
.ios-shell {
    background: #edf2f4;
}

.ios-main {
    padding: 20px 24px 28px 16px;
}

.omni-shell .ios-rail.shell-sidebar {
    background: #08171a;
    border: 0;
    border-radius: 10px;
    box-shadow: none;
    height: 835px;
    margin: 20px 0 20px 24px;
    padding: 0;
    top: 20px;
    width: 184px;
}

.omni-shell .ios-context-bar {
    background: #ffffff;
    border: 1px solid #cfdae0;
    border-radius: 6px;
    box-shadow: none;
    gap: 0;
    grid-template-columns: minmax(0, 488px) 256px 142px;
    height: 72px;
    margin: 0;
    min-height: 72px;
    padding: 0 18px;
    width: 952px;
}

.topbar-copy strong {
    font-size: 1.72rem;
    font-weight: 800;
    line-height: 31px;
}

.topbar-copy p {
    font-size: 0.82rem;
    line-height: 16px;
    margin: 3px 0 0;
}

.topbar-tabs {
    background: transparent;
    border: 0;
    border-radius: 0;
    display: flex;
    gap: 8px;
    height: 40px;
    padding: 0;
}

.topbar-tab,
::deep .topbar-tab {
    align-items: center;
    background: #f4f7f8;
    border-radius: 14px;
    color: #60737d;
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 700;
    height: 28px;
    justify-content: center;
    margin-top: 6px;
    min-height: 28px;
    padding: 0 8px;
}

.topbar-tab.active,
::deep .topbar-tab.active {
    background: #0f7b7e;
    box-shadow: none;
    color: #ffffff;
}

.operator-status {
    background: #f8fafb;
    border: 1px solid #cbd9df;
    border-radius: 6px;
    height: 40px;
    min-height: 40px;
    width: 142px;
}

.operator-status-mark {
    background: #e4f5f5;
    border-radius: 16px;
    height: 38px;
    min-width: 18px;
}

.operator-status span:last-child strong {
    font-size: 0.78rem;
}

.operator-status span:last-child small {
    font-size: 0.72rem;
}

.ios-content {
    padding-top: 20px;
}

.brand-block {
    align-items: flex-start;
    display: block;
    padding: 18px 18px 0;
}

.brand-name {
    color: #ffffff;
    font-size: 1.78rem;
    font-weight: 800;
    line-height: 32px;
}

.brand-subtitle {
    color: #9aaeb5;
    font-size: 0.82rem;
    line-height: 15px;
    margin-top: 18px;
}

.nav-stack {
    gap: 18px;
    margin-top: 18px;
    padding: 0 18px;
}

.nav-item-link,
.nav-stack ::deep .nav-item-link {
    background: transparent;
    border: 0;
    border-radius: 6px;
    color: #9aaeb5;
    display: flex;
    gap: 10px;
    min-height: 42px;
    padding: 0;
}

.nav-item-link.active,
.nav-stack ::deep .nav-item-link.active {
    background: #17363a;
    box-shadow: none;
    color: #ffffff;
    padding: 0 8px;
    width: fit-content;
}

.nav-item-link:hover,
.nav-stack ::deep .nav-item-link:hover {
    background: rgba(255, 255, 255, 0.06);
}

.nav-item-index {
    background: #1d353a;
    border-radius: 8px;
    color: #b9cbd0;
    font-size: 0.8rem;
    height: 38px;
    min-width: 20px;
}

.nav-item-link.active .nav-item-index,
.nav-stack ::deep .nav-item-link.active .nav-item-index {
    background: #0f7b7e;
}

.nav-item-copy strong {
    color: inherit;
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 18px;
}

.nav-stack--secondary,
.sidebar-user {
    display: none;
}

.sidebar-card--highlight {
    background: #0f2a2f;
    border: 1px solid #24535b;
    border-radius: 6px;
    box-shadow: none;
    color: #d7e4e7;
    margin: 298px 18px 0;
    padding: 12px;
    width: 148px;
}

.sidebar-card-label,
.sidebar-card strong {
    color: #ffffff;
    font-size: 0.82rem;
}

.sidebar-card p {
    color: #c2d0d5;
    font-size: 0.76rem;
    line-height: 16px;
}

.figma-home {
    display: grid;
    gap: 0;
    height: 860px;
    position: relative;
    width: 1192px;
}

.figma-stat-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(4, 268px);
    height: 121px;
    width: 1126px;
}

.figma-stat-card,
.figma-panel {
    background: #ffffff;
    border: 1px solid #d3dee4;
    border-radius: 6px;
    box-shadow: none;
    box-sizing: border-box;
}

.figma-stat-card {
    height: 121px;
    padding: 16px;
}

.figma-stat-top {
    align-items: center;
    display: flex;
    gap: 10px;
    height: 36px;
}

.figma-stat-icon,
.figma-lane-icon {
    align-items: center;
    border-radius: 8px;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.82rem;
    font-weight: 800;
    height: 38px;
    justify-content: center;
    min-width: 26px;
}

.figma-stat-card--teal .figma-stat-icon,
.figma-lane--teal .figma-lane-icon {
    background: #e4f5f5;
    color: #0f7b7e;
}

.figma-stat-card--amber .figma-stat-icon,
.figma-lane--amber .figma-lane-icon {
    background: #fff3d8;
    color: #c46a1b;
}

.figma-stat-card--red .figma-stat-icon {
    background: #ffe5e4;
    color: #c2413b;
}

.figma-stat-card--blue .figma-stat-icon,
.figma-lane--blue .figma-lane-icon {
    background: #e4eeff;
    color: #3478f6;
}

.figma-stat-top strong {
    color: #60737d;
    display: block;
    font-size: 0.82rem;
    line-height: 16px;
}

.figma-stat-top small {
    color: #7a8e96;
    display: block;
    font-size: 0.78rem;
    line-height: 15px;
    margin-top: 2px;
}

.figma-stat-card b {
    color: #0a1c24;
    display: block;
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 43px;
    margin-top: 10px;
}

.figma-middle-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: 760px 414px;
    height: 345px;
    margin-top: 25px;
}

.figma-panel {
    padding: 18px;
}

.figma-panel h2 {
    color: #0a1c24;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 27px;
    margin: 0;
}

.figma-module-lanes {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, 232px);
    margin-top: 16px;
}

.figma-lane {
    border-radius: 6px;
    box-sizing: border-box;
    color: inherit;
    display: block;
    height: 188px;
    padding: 16px;
    text-decoration: none;
}

.figma-lane--teal {
    background: #e7f4f3;
}

.figma-lane--amber {
    background: #fff1cf;
}

.figma-lane--blue {
    background: #e7f0ff;
}

.figma-lane strong {
    color: #0a1c24;
    display: block;
    font-size: 1.28rem;
    line-height: 24px;
    margin-top: 14px;
}

.figma-lane p {
    color: #60737d;
    font-size: 0.82rem;
    line-height: 18px;
    margin: 14px 0 0;
}

.figma-progress-row {
    color: #0a1c24;
    display: flex;
    font-size: 0.82rem;
    font-weight: 700;
    justify-content: space-between;
    line-height: 16px;
    margin-top: 16px;
}

.figma-track {
    background: #dde7eb;
    border-radius: 999px;
    height: 8px;
    margin-top: 8px;
    overflow: hidden;
}

.figma-track i {
    background: var(--bar, #0f7b7e);
    border-radius: inherit;
    display: block;
    height: 100%;
    width: var(--meter);
}

.figma-lane--amber .figma-track i {
    --bar: #c46a1b;
}

.figma-lane--blue .figma-track i {
    --bar: #3478f6;
}

.figma-todo-panel {
    height: 335px;
}

.figma-todo-list {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

.figma-todo {
    align-items: center;
    background: color-mix(in srgb, var(--todo) 13%, white);
    border-radius: 6px;
    display: flex;
    gap: 12px;
    height: 54px;
    padding: 0 12px;
}

.figma-todo span {
    color: var(--todo);
    font-size: 1.3rem;
    font-weight: 800;
}

.figma-todo strong {
    color: #0a1c24;
    font-size: 0.92rem;
    line-height: 18px;
}

.figma-bottom-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: 580px 594px;
    height: 306px;
    margin-top: 64px;
}

.figma-risk-panel {
    height: 255px;
}

.figma-feed-panel {
    height: 263px;
}

.figma-risk-row {
    display: grid;
    grid-template-columns: 1fr auto;
    margin-top: 15px;
}

.figma-risk-row span,
.figma-risk-row b {
    color: #0a1c24;
    font-size: 0.82rem;
    line-height: 16px;
}

.figma-risk-row .figma-track {
    grid-column: 1 / -1;
    margin-top: 8px;
    width: 430px;
}

.figma-feed-list {
    display: grid;
    gap: 0;
    margin-top: 15px;
}

.figma-feed-row {
    align-items: center;
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    height: 50px;
}

.figma-feed-row time,
.figma-feed-row span,
.figma-empty {
    color: #60737d;
    font-size: 0.82rem;
    line-height: 16px;
}

@media (max-width: 960px) {
    .figma-home,
    .figma-stat-grid,
    .figma-middle-grid,
    .figma-bottom-grid {
        height: auto;
        width: auto;
    }

    .figma-stat-grid,
    .figma-middle-grid,
    .figma-bottom-grid,
    .figma-module-lanes {
        grid-template-columns: 1fr;
    }

    .figma-stat-card,
    .figma-panel,
    .figma-lane,
    .figma-todo-panel,
    .figma-risk-panel,
    .figma-feed-panel {
        height: auto;
    }
}

/* Figma V3 1:1 lock. Keep this at the end so older V3/iOS shell rules cannot drift. */
@media (min-width: 961px) {
    .omni-shell.omni-shell--service.ios-shell {
        background: #eef2f5 !important;
        display: flex !important;
        min-height: 100vh !important;
    }

    .omni-shell .shell-sidebar.ios-rail {
        background: #08171a !important;
        border: 0 !important;
        border-radius: 10px !important;
        box-shadow: none !important;
        box-sizing: border-box !important;
        height: 835px !important;
        margin: 20px 0 20px 24px !important;
        overflow: hidden !important;
        padding: 0 !important;
        position: sticky !important;
        top: 20px !important;
        width: 184px !important;
        backdrop-filter: none !important;
    }

    .omni-shell .shell-main.ios-main {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        padding: 20px 24px 28px 16px !important;
    }

    .omni-shell .shell-topbar.ios-context-bar {
        align-items: center !important;
        background: #ffffff !important;
        border: 1px solid #cfdae0 !important;
        border-radius: 6px !important;
        box-shadow: none !important;
        display: grid !important;
        gap: 0 !important;
        grid-template-columns: 488px 256px 142px !important;
        height: 72px !important;
        margin: 0 0 20px !important;
        min-height: 72px !important;
        padding: 0 18px !important;
        position: static !important;
        width: 952px !important;
        backdrop-filter: none !important;
    }

    .omni-shell .shell-content.ios-content {
        margin: 0 !important;
        max-width: none !important;
        overflow: visible !important;
        padding: 0 !important;
        width: 1192px !important;
    }

    .omni-shell .brand-block {
        align-items: flex-start !important;
        display: block !important;
        padding: 18px 18px 0 !important;
    }

    .omni-shell .brand-name {
        color: #ffffff !important;
        font-size: 1.78rem !important;
        font-weight: 800 !important;
        line-height: 32px !important;
    }

    .omni-shell .brand-subtitle {
        color: #9aaeb5 !important;
        font-size: 0.82rem !important;
        line-height: 15px !important;
        margin-top: 18px !important;
    }

    .omni-shell .nav-stack {
        display: flex !important;
        flex-direction: column !important;
        gap: 18px !important;
        margin-top: 18px !important;
        padding: 0 18px !important;
    }

    .omni-shell .nav-stack--secondary,
    .omni-shell .sidebar-user {
        display: none !important;
    }

    .omni-shell .nav-item-link,
    .omni-shell .nav-stack .nav-item-link {
        align-items: center !important;
        background: transparent !important;
        border: 0 !important;
        border-radius: 6px !important;
        box-shadow: none !important;
        color: #9aaeb5 !important;
        display: flex !important;
        gap: 10px !important;
        min-height: 42px !important;
        padding: 0 !important;
        width: fit-content !important;
    }

    .omni-shell .nav-item-link.active,
    .omni-shell .nav-stack .nav-item-link.active {
        background: #17363a !important;
        color: #ffffff !important;
        padding: 0 8px !important;
    }

    .omni-shell .nav-item-index {
        align-items: center !important;
        background: #1d353a !important;
        border-radius: 8px !important;
        color: #b9cbd0 !important;
        display: inline-flex !important;
        font-size: 0.8rem !important;
        font-weight: 800 !important;
        height: 38px !important;
        justify-content: center !important;
        min-width: 20px !important;
        padding: 0 4px !important;
    }

    .omni-shell .nav-item-link.active .nav-item-index {
        background: #0f7b7e !important;
        color: #ffffff !important;
    }

    .omni-shell .nav-item-copy strong {
        color: inherit !important;
        font-size: 0.86rem !important;
        font-weight: 700 !important;
        line-height: 18px !important;
        max-width: none !important;
        white-space: nowrap !important;
    }

    .omni-shell .sidebar-card--highlight {
        background: #0f2a2f !important;
        border: 1px solid #24535b !important;
        border-radius: 6px !important;
        box-shadow: none !important;
        color: #d7e4e7 !important;
        margin: 298px 18px 0 !important;
        padding: 12px !important;
        width: 148px !important;
    }

    .omni-shell .sidebar-card-label,
    .omni-shell .sidebar-card strong {
        color: #ffffff !important;
    }

    .omni-shell .sidebar-card p {
        color: #c2d0d5 !important;
        font-size: 0.76rem !important;
        line-height: 16px !important;
    }
}

/* iOS Liquid V4 polish: final shell proportions and core screen readability. */
.ios-auth-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ios-auth-content {
    flex: 1 1 auto;
    padding-top: 0;
}

.ios-login-page {
    align-items: stretch;
    display: grid;
    gap: 22px;
    grid-template-columns: minmax(0, 1.1fr) minmax(420px, 0.72fr);
    min-height: 0;
    height: calc(100vh - 194px);
}

.ios-login-hero {
    align-content: space-between;
    grid-template-columns: minmax(0, 1fr) 230px;
    grid-template-rows: auto auto minmax(0, 1fr);
    min-height: 0;
}

.ios-login-brand {
    align-self: start;
    grid-column: 1 / 2;
    grid-row: 1;
}

.ios-login-copy {
    align-self: start;
    display: grid;
    gap: 14px;
    grid-column: 1 / 2;
    grid-row: 2;
    margin-top: clamp(44px, 9vh, 86px);
    max-width: 680px;
}

.ios-login-visual {
    align-self: end;
    grid-column: 2 / 3;
    grid-row: 2 / 4;
}

.ios-login-copy p {
    max-width: 600px;
}

.ios-login-panel-grid {
    align-content: stretch;
    display: grid;
    gap: 18px;
    grid-template-columns: 1fr;
    min-height: 0;
}

.ios-login-form,
.ios-login-health {
    min-height: 0;
}

.ios-login-form {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ios-login-health {
    padding: 22px;
}

.ios-login-health .ios-panel-header {
    margin-bottom: 14px;
}

.ios-access-map {
    margin-top: 18px;
}

.ios-rail.shell-sidebar {
    width: 184px;
}

.ios-rail.shell-sidebar .sidebar-card--highlight,
.ios-rail.shell-sidebar .sidebar-user {
    background: rgba(255, 255, 255, 0.48);
    border: 1px solid rgba(104, 135, 150, 0.18);
    border-radius: 18px;
    color: var(--ios-text);
    margin-top: 14px;
    width: auto;
}

.ios-rail.shell-sidebar .sidebar-card-label,
.ios-rail.shell-sidebar .sidebar-card strong {
    color: var(--ios-text);
}

.ios-rail.shell-sidebar .sidebar-card p,
.ios-rail.shell-sidebar .sidebar-user-role {
    color: var(--ios-muted);
}

.ios-rail.shell-sidebar .sidebar-logout-btn {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(104, 135, 150, 0.24);
    color: var(--ios-text);
}

.ios-page {
    gap: 18px;
}

.ios-hero-card,
.ios-dashboard-glance {
    min-height: 220px;
}

.ios-hero-card h1,
.ios-login-copy h1 {
    font-size: clamp(2.55rem, 4.2vw, 4.25rem);
}

.workbench-hero {
    background:
        radial-gradient(circle at 82% 8%, rgba(52, 120, 246, 0.16), transparent 30%),
        radial-gradient(circle at 22% 18%, rgba(15, 123, 126, 0.14), transparent 24%),
        rgba(255, 255, 255, 0.68);
    border: 1px solid var(--ios-border);
    border-radius: 28px;
    box-shadow: var(--ios-soft-shadow);
    display: grid;
    gap: 22px;
    grid-template-columns: minmax(0, 1fr) minmax(420px, 0.74fr);
    margin-bottom: 20px;
    min-height: 230px;
    padding: 30px;
    backdrop-filter: blur(28px) saturate(170%);
}

.workbench-hero-copy h1 {
    color: var(--ios-text);
    font-size: clamp(2.5rem, 4vw, 4.1rem);
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1.02;
    margin: 0 0 14px;
}

.workbench-hero-copy p:not(.eyebrow) {
    color: var(--ios-muted);
    font-size: 1.03rem;
    line-height: 1.58;
    margin: 0;
    max-width: 760px;
}

.workbench-hero-visual {
    align-content: center;
    display: grid;
    gap: 18px;
}

.workbench-hero-rings {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.workbench-hero-rings .ios-ring-chart {
    max-width: 132px;
}

.workbench-hero-status {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.workbench-hero-status span {
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid var(--ios-border);
    border-radius: 999px;
    color: #31505b;
    font-size: 0.86rem;
    font-weight: 760;
    padding: 8px 12px;
}

.workbench-layout {
    gap: 20px;
    grid-template-columns: minmax(320px, 0.44fr) minmax(430px, 0.78fr) minmax(300px, 0.46fr);
}

.workbench-input-panel,
.workbench-result-area,
.workbench-evidence-panel,
.workbench-context-summary .v3-card,
.workbench-context-summary.v3-empty {
    background: var(--ios-card);
    border: 1px solid var(--ios-border);
    border-radius: 24px;
    box-shadow: var(--ios-soft-shadow);
    backdrop-filter: blur(26px) saturate(160%);
}

.workbench-input-panel,
.workbench-result-area,
.workbench-evidence-panel {
    padding: 22px;
}

.workbench-result-area {
    min-height: 560px;
}

.workbench-context-summary {
    margin-top: 20px;
}

.workbench-context-summary.v3-page {
    background: transparent;
    padding: 0;
}

.workbench-context-summary .v3-card {
    padding: 22px;
}

.workbench-empty-start {
    min-height: 480px;
}

.workbench-empty-icon {
    background: rgba(15, 123, 126, 0.12);
    border-radius: 24px;
    color: var(--ios-teal);
}

.workbench-form label,
.workbench-followup-card,
.workbench-priority-panel,
.workbench-evidence-card,
.workbench-excerpt,
.external-analysis-card {
    border-radius: 18px;
}

@media (max-width: 1280px) {
    .ios-login-page {
        grid-template-columns: 1fr;
    }

    .ios-login-panel-grid {
        grid-template-columns: minmax(0, 1fr) minmax(320px, 0.68fr);
    }

    .workbench-hero,
    .workbench-layout {
        grid-template-columns: 1fr;
    }

    .workbench-hero-status {
        justify-content: flex-start;
    }
}

@media (max-width: 960px) {
    .ios-login-panel-grid,
    .workbench-hero-rings {
        grid-template-columns: 1fr;
    }

    .ios-login-hero {
        grid-template-columns: 1fr;
    }

    .workbench-hero {
        border-radius: 24px;
        padding: 22px;
    }

    .workbench-hero-copy h1 {
        font-size: 2.3rem;
    }
}

@media (max-width: 560px) {
    .ios-login-page {
        gap: 12px;
    }

    .ios-login-hero {
        display: none;
    }

    .ios-login-form {
        justify-content: flex-start;
    }

    .ios-login-health {
        display: none;
    }

    .workbench-hero {
        margin-bottom: 12px;
        min-height: 0;
        padding: 18px;
    }

    .workbench-hero-rings {
        display: none;
    }
}

/* RC visual convergence for the service workbench */
.workbench-hero {
    background:
        radial-gradient(circle at 10% 15%, rgba(52, 120, 246, 0.12), transparent 28%),
        rgba(255, 255, 255, 0.72);
    border: 1px solid var(--ios-border);
    border-radius: 24px;
    box-shadow: var(--ios-soft-shadow);
    box-sizing: border-box;
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(0, 1fr) auto;
    margin-bottom: 20px;
    padding: 24px;
    backdrop-filter: blur(26px) saturate(160%);
}

.workbench-hero-copy h1 {
    color: var(--ios-text);
    font-size: clamp(2rem, 2.8vw, 3.1rem);
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1.05;
    margin: 0 0 12px;
}

.workbench-hero-copy p {
    color: var(--ios-muted);
    font-size: 1.02rem;
    line-height: 1.5;
    margin: 0;
}

.workbench-hero-status {
    align-content: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.workbench-hero-status span,
.soft-badge {
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid var(--ios-border);
    border-radius: 999px;
    color: #37505a;
    font-size: 0.9rem;
    font-weight: 760;
    min-height: 34px;
    padding: 8px 12px;
}

.workbench-layout {
    align-items: stretch;
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(300px, 0.42fr) minmax(420px, 0.76fr) minmax(300px, 0.46fr);
}

.workbench-input-panel,
.workbench-result-area,
.workbench-evidence-panel,
.workbench-result-content,
.workbench-empty-start,
.workbench-insufficient,
.diagnosis-loading-state {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--ios-border);
    border-radius: 24px;
    box-shadow: var(--ios-soft-shadow);
    box-sizing: border-box;
    backdrop-filter: blur(24px) saturate(160%);
}

.workbench-input-panel,
.workbench-evidence-panel,
.workbench-result-content,
.workbench-insufficient,
.diagnosis-loading-state {
    padding: 22px;
}

.workbench-result-area {
    min-height: 594px;
    padding: 18px;
}

.workbench-empty-start {
    align-items: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 300px;
    padding: 38px;
    text-align: center;
}

.workbench-empty-start h2,
.workbench-result-topline h2,
.workbench-input-panel h2,
.workbench-evidence-panel h2 {
    color: var(--ios-text);
    font-size: 1.8rem;
    font-weight: 840;
    letter-spacing: 0;
    line-height: 1.1;
    margin: 0;
}

.workbench-empty-start p,
.workbench-input-panel .muted,
.workbench-evidence-panel .muted {
    color: var(--ios-muted);
    font-size: 0.98rem;
    line-height: 1.5;
}

.workbench-empty-icon {
    align-items: center;
    background: rgba(15, 123, 126, 0.1);
    border-radius: 999px;
    color: var(--ios-teal);
    display: inline-flex;
    font-size: 2.2rem;
    font-weight: 850;
    height: 78px;
    justify-content: center;
    margin-bottom: 18px;
    width: 78px;
}

.workbench-form label,
.workbench-advanced-grid label,
.workbench-inline-fields label {
    color: #37505a;
    font-size: 0.98rem;
    font-weight: 760;
}

.form-control {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--ios-border);
    border-radius: 16px;
    color: var(--ios-text);
    font-size: 1rem;
    min-height: 48px;
}

textarea.form-control {
    line-height: 1.5;
    min-height: 110px;
}

.workbench-inline-fields {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.workbench-field-group span,
.workbench-kicker {
    color: var(--ios-teal);
    font-size: 0.82rem;
    font-weight: 850;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.workbench-verdict {
    background: rgba(15, 123, 126, 0.08);
    border: 1px solid rgba(15, 123, 126, 0.16);
    border-radius: 20px;
    color: #0b4f53;
    font-size: 1.05rem;
    line-height: 1.58;
    padding: 18px;
}

.workbench-priority-grid,
.workbench-result-utilities {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.workbench-priority-panel,
.workbench-section,
.workbench-followup-card,
.workbench-evidence-card,
.external-analysis-card {
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid var(--ios-border);
    border-radius: 20px;
    box-shadow: none;
    padding: 16px;
}

.workbench-export-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.workbench-export-btn {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--ios-border);
    border-radius: 14px;
    color: var(--ios-text);
    font-weight: 760;
    min-height: 40px;
    padding: 0 14px;
}

@media (max-width: 1280px) {
    .workbench-layout {
        grid-template-columns: minmax(300px, 0.45fr) minmax(0, 1fr);
    }

    .workbench-evidence-panel {
        grid-column: 1 / -1;
    }
}

@media (max-width: 960px) {
    .workbench-hero,
    .workbench-layout,
    .workbench-priority-grid,
    .workbench-result-utilities {
        grid-template-columns: 1fr;
    }

    .workbench-hero-status {
        justify-content: flex-start;
    }

    .workbench-result-area {
        min-height: 360px;
    }
}

/* iOS Liquid V4: restrained glass workspace */
:root {
    --ios-bg: #eef5f8;
    --ios-bg-deep: #dfeaf0;
    --ios-card: rgba(255, 255, 255, 0.72);
    --ios-card-strong: rgba(255, 255, 255, 0.88);
    --ios-border: rgba(104, 135, 150, 0.22);
    --ios-hairline: rgba(8, 31, 38, 0.08);
    --ios-text: #0a1c24;
    --ios-muted: #60737d;
    --ios-subtle: #8ca0a8;
    --ios-teal: #0f7b7e;
    --ios-blue: #3478f6;
    --ios-green: #1f8a5b;
    --ios-amber: #c46a1b;
    --ios-red: #c2413b;
    --ios-shadow: 0 22px 64px rgba(21, 55, 71, 0.12);
    --ios-soft-shadow: 0 12px 32px rgba(21, 55, 71, 0.08);
}

html,
body {
    background:
        radial-gradient(circle at 12% 0%, rgba(52, 120, 246, 0.12), transparent 26%),
        radial-gradient(circle at 88% 12%, rgba(15, 123, 126, 0.16), transparent 24%),
        linear-gradient(180deg, var(--ios-bg) 0%, #f7fbfd 58%, #e8f1f5 100%);
    color: var(--ios-text);
    font-family: "Segoe UI Variable Text", "Microsoft YaHei UI", "PingFang SC", "Segoe UI", Arial, sans-serif;
    font-size: 15px;
}

.ios-shell,
.ios-auth-shell {
    background:
        radial-gradient(circle at 14% 8%, rgba(52, 120, 246, 0.12), transparent 24%),
        radial-gradient(circle at 82% 18%, rgba(15, 123, 126, 0.14), transparent 26%),
        linear-gradient(180deg, var(--ios-bg) 0%, #f7fbfd 62%, var(--ios-bg-deep) 100%);
    color: var(--ios-text);
    min-height: 100vh;
}

.ios-shell {
    display: flex;
}

.ios-main,
.ios-auth-main {
    box-sizing: border-box;
    flex: 1 1 auto;
    min-width: 0;
    padding: 22px 24px 28px;
}

.ios-rail.shell-sidebar {
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid var(--ios-border);
    border-radius: 24px;
    box-shadow: var(--ios-soft-shadow);
    height: calc(100vh - 44px);
    margin: 22px 0 22px 24px;
    overflow: hidden auto;
    padding: 18px;
    position: sticky;
    top: 22px;
    width: 168px;
    backdrop-filter: blur(24px) saturate(160%);
}

.ios-context-bar,
.ios-auth-topbar {
    align-items: center;
    background: var(--ios-card-strong);
    border: 1px solid var(--ios-border);
    border-radius: 24px;
    box-shadow: var(--ios-soft-shadow);
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(360px, 1fr) auto auto;
    min-height: 76px;
    padding: 12px 18px 12px 24px;
    backdrop-filter: blur(28px) saturate(170%);
}

.ios-content,
.ios-auth-content {
    box-sizing: border-box;
    margin: 0;
    max-width: none;
    padding: 20px 0 0;
    width: 100%;
}

.ios-auth-shell {
    display: block;
    overflow: hidden auto;
}

.ios-auth-main {
    min-height: 100vh;
}

.topbar-copy strong {
    color: var(--ios-text);
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.15;
}

.topbar-copy p {
    color: var(--ios-muted);
    font-size: 0.94rem;
    line-height: 1.4;
}

.topbar-tabs {
    background: rgba(234, 244, 247, 0.72);
    border: 1px solid rgba(104, 135, 150, 0.16);
    border-radius: 999px;
    padding: 4px;
}

.topbar-tab,
::deep .topbar-tab {
    background: transparent;
    border-radius: 999px;
    color: #48616b;
    font-size: 0.92rem;
    min-height: 34px;
    padding: 0 14px;
}

.topbar-tab.active,
::deep .topbar-tab.active {
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 8px 20px rgba(21, 55, 71, 0.08);
    color: var(--ios-teal);
}

.operator-status {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--ios-border);
    border-radius: 999px;
    min-height: 44px;
}

.operator-status-mark {
    background: rgba(15, 123, 126, 0.12);
    border-radius: 999px;
    color: var(--ios-teal);
    height: 30px;
    min-width: 30px;
}

.brand-block {
    background: transparent;
    padding: 10px 4px 20px;
}

.brand-name {
    color: var(--ios-text);
    font-size: 1.62rem;
    font-weight: 850;
}

.brand-subtitle {
    color: var(--ios-muted);
    font-size: 0.78rem;
    margin-top: 6px;
}

.nav-stack {
    gap: 10px;
    padding: 0;
}

.nav-stack--secondary {
    border-top: 1px solid var(--ios-hairline);
    margin-top: 14px;
    padding-top: 14px;
}

.nav-item-link,
.nav-stack ::deep .nav-item-link {
    background: rgba(255, 255, 255, 0.42);
    border: 1px solid rgba(104, 135, 150, 0.15);
    border-radius: 17px;
    color: #2f4853;
    display: flex;
    gap: 10px;
    min-height: 46px;
    padding: 8px 10px;
}

.nav-item-link.active,
.nav-stack ::deep .nav-item-link.active {
    background: rgba(218, 245, 244, 0.86);
    border-color: rgba(15, 123, 126, 0.2);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
    color: var(--ios-teal);
}

.nav-item-index {
    background: rgba(15, 123, 126, 0.1);
    border-radius: 12px;
    color: var(--ios-teal);
    height: 30px;
    min-width: 30px;
}

.nav-item-copy strong {
    color: inherit;
    font-size: 0.93rem;
    font-weight: 760;
    max-width: none;
}

.nav-stack--secondary .nav-item-link,
.nav-stack--secondary ::deep .nav-item-link {
    font-size: 0.86rem;
    min-height: 38px;
}

.sidebar-card--highlight {
    background: rgba(10, 28, 36, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 20px;
    box-shadow: 0 18px 40px rgba(10, 28, 36, 0.18);
    color: #d8eef1;
    margin: auto 0 0;
    padding: 14px;
    width: auto;
}

.sidebar-card-label,
.sidebar-card strong {
    color: #ffffff;
}

.sidebar-card p {
    color: #c5d8dd;
    font-size: 0.76rem;
}

.sidebar-user {
    background: transparent;
    border-top: 1px solid var(--ios-hairline);
    margin-top: 14px;
}

.sidebar-user-role {
    color: var(--ios-muted);
}

.sidebar-logout-btn {
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid var(--ios-border);
    color: var(--ios-text);
}

.ios-card {
    background: var(--ios-card);
    border: 1px solid var(--ios-border);
    border-radius: 24px;
    box-shadow: var(--ios-soft-shadow);
    box-sizing: border-box;
    backdrop-filter: blur(26px) saturate(160%);
}

.ios-page {
    display: grid;
    gap: 20px;
}

.ios-hero-grid,
.ios-dashboard-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(0, 1.18fr) minmax(360px, 0.82fr);
}

.ios-hero-card {
    min-height: 238px;
    padding: 30px;
}

.ios-kicker {
    color: var(--ios-teal);
    display: block;
    font-size: 0.8rem;
    font-weight: 850;
    letter-spacing: 0.02em;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.ios-hero-card h1,
.ios-login-copy h1 {
    color: var(--ios-text);
    font-size: clamp(2.35rem, 4vw, 4rem);
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1.02;
    margin: 0;
    max-width: 980px;
}

.ios-login-copy h1 {
    font-size: clamp(2.3rem, 3.6vw, 3.65rem);
}

.ios-hero-card p,
.ios-login-copy p,
.ios-panel-header p {
    color: var(--ios-muted);
    font-size: 1.04rem;
    line-height: 1.62;
    margin: 14px 0 0;
}

.ios-hero-actions {
    display: flex;
    gap: 12px;
    margin-top: 26px;
}

.ios-hero-actions .primary-action,
.ios-hero-actions .secondary-action,
.ios-action-row .primary-action,
.ios-action-row .secondary-action {
    border-radius: 16px;
    font-size: 1rem;
    min-height: 52px;
    min-width: 154px;
    width: auto;
}

.primary-action {
    background: linear-gradient(180deg, #15a2a0 0%, #0f7478 100%);
    border-radius: 16px;
    box-shadow: 0 16px 34px rgba(15, 123, 126, 0.22);
    font-size: 1rem;
    min-height: 50px;
}

.secondary-action {
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid var(--ios-border);
    border-radius: 16px;
    color: var(--ios-text);
    font-size: 1rem;
    min-height: 50px;
}

.ios-dashboard-glance {
    align-items: center;
    display: grid;
    gap: 22px;
    grid-template-columns: 160px minmax(0, 1fr);
    min-height: 238px;
    padding: 24px;
}

.ios-dashboard-glance strong {
    color: var(--ios-text);
    display: block;
    font-size: 3.8rem;
    font-weight: 850;
    line-height: 0.95;
}

.ios-dashboard-glance p {
    color: var(--ios-muted);
    font-size: 1rem;
    line-height: 1.5;
    margin: 12px 0 0;
}

.ios-metric-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ios-metric-card {
    min-height: 148px;
    padding: 20px;
}

.ios-metric-card__top {
    align-items: center;
    color: var(--ios-muted);
    display: flex;
    font-size: 0.96rem;
    font-weight: 780;
    gap: 8px;
}

.ios-dot,
.ios-status-item__dot,
.ios-timeline__pin {
    background: var(--dot);
    border-radius: 999px;
    display: inline-block;
    height: 10px;
    width: 10px;
}

.ios-metric-card strong {
    color: var(--ios-text);
    display: block;
    font-size: clamp(2rem, 2.8vw, 3rem);
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1;
    margin-top: 18px;
}

.ios-metric-card p {
    color: var(--ios-muted);
    font-size: 0.95rem;
    line-height: 1.4;
    margin: 10px 0 0;
}

.ios-meter,
.ios-login-bars span {
    background: rgba(108, 134, 145, 0.14);
    border-radius: 999px;
    display: block;
    height: 8px;
    margin-top: 16px;
    overflow: hidden;
}

.ios-meter span,
.ios-login-bars span::before {
    background: var(--meter-color);
    border-radius: inherit;
    content: "";
    display: block;
    height: 100%;
    width: var(--meter);
}

.ios-panel-header {
    margin-bottom: 20px;
}

.ios-panel-header h2 {
    color: var(--ios-text);
    font-size: clamp(1.55rem, 2vw, 2.1rem);
    font-weight: 840;
    line-height: 1.1;
    margin: 0;
}

.ios-visual-panel,
.ios-dashboard-grid > .ios-card {
    padding: 26px;
}

.ios-ring-row {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 28px;
}

.ios-ring-chart {
    aspect-ratio: 1;
    margin: 0 auto;
    max-width: 154px;
    min-width: 118px;
    position: relative;
    width: 100%;
}

.ios-ring-chart svg {
    height: 100%;
    overflow: visible;
    transform: rotate(-90deg);
    width: 100%;
}

.ios-ring-chart circle {
    fill: none;
    stroke-linecap: round;
    stroke-width: 12;
}

.ios-ring-chart__track {
    stroke: rgba(108, 134, 145, 0.14);
}

.ios-ring-chart__value {
    stroke: var(--ring-color);
    stroke-dasharray: 301.59;
    stroke-dashoffset: calc(301.59 - (301.59 * var(--ring-number, 0) / 100));
}

.ios-ring-chart__copy {
    align-items: center;
    display: flex;
    flex-direction: column;
    inset: 0;
    justify-content: center;
    position: absolute;
    text-align: center;
}

.ios-ring-chart__copy strong {
    color: var(--ios-text);
    font-size: 1.75rem;
    font-weight: 850;
    line-height: 1;
}

.ios-ring-chart__copy span {
    color: var(--ios-muted);
    font-size: 0.84rem;
    font-weight: 720;
    margin-top: 8px;
}

.ios-waterfall {
    display: grid;
    gap: 18px;
}

.ios-waterfall div {
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.ios-waterfall span {
    color: var(--ios-muted);
    font-weight: 730;
}

.ios-waterfall b {
    color: var(--ios-text);
}

.ios-waterfall i {
    background: rgba(108, 134, 145, 0.14);
    border-radius: 999px;
    grid-column: 1 / -1;
    height: 10px;
    overflow: hidden;
}

.ios-waterfall em {
    background: var(--meter-color);
    border-radius: inherit;
    display: block;
    height: 100%;
    width: var(--meter);
}

.ios-status-list {
    display: grid;
    gap: 14px;
}

.ios-status-item {
    align-items: flex-start;
    display: grid;
    gap: 12px;
    grid-template-columns: 12px minmax(0, 1fr);
}

.ios-status-item strong {
    color: var(--ios-text);
    display: block;
    font-size: 1.02rem;
    line-height: 1.25;
}

.ios-status-item p {
    color: var(--ios-muted);
    font-size: 0.94rem;
    line-height: 1.45;
    margin: 4px 0 0;
}

.ios-module-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ios-module-card {
    color: inherit;
    min-height: 248px;
    padding: 20px;
    text-decoration: none;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.ios-module-card:hover {
    box-shadow: var(--ios-shadow);
    transform: translateY(-2px);
}

.ios-module-card .ios-ring-chart {
    margin: 0 0 22px;
    width: 118px;
}

.ios-module-card strong {
    color: var(--ios-text);
    display: block;
    font-size: 1.38rem;
    font-weight: 820;
}

.ios-module-card span {
    color: var(--ios-muted);
    display: block;
    font-size: 0.95rem;
    margin-top: 8px;
}

.ios-dashboard-grid--bottom {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.82fr);
}

.ios-timeline {
    display: grid;
    gap: 0;
}

.ios-timeline__item {
    display: grid;
    gap: 12px;
    grid-template-columns: 12px minmax(0, 1fr);
    padding: 0 0 18px;
    position: relative;
}

.ios-timeline__item::before {
    background: rgba(108, 134, 145, 0.18);
    content: "";
    left: 5px;
    position: absolute;
    top: 14px;
    bottom: 0;
    width: 2px;
}

.ios-timeline__item:last-child {
    padding-bottom: 0;
}

.ios-timeline__item:last-child::before {
    display: none;
}

.ios-timeline__pin {
    margin-top: 5px;
    position: relative;
    z-index: 1;
}

.ios-timeline time {
    color: var(--ios-subtle);
    display: block;
    font-size: 0.82rem;
    font-weight: 740;
    margin-bottom: 3px;
}

.ios-timeline strong {
    color: var(--ios-text);
    display: block;
    font-size: 1rem;
}

.ios-timeline p,
.ios-empty-copy {
    color: var(--ios-muted);
    line-height: 1.45;
    margin: 4px 0 0;
}

.ios-empty {
    color: var(--ios-muted);
    padding: 28px;
}

.ios-login-page {
    display: grid;
    gap: 22px;
    min-height: calc(100vh - 126px);
}

.ios-login-hero {
    align-items: stretch;
    background:
        radial-gradient(circle at 12% 20%, rgba(52, 120, 246, 0.16), transparent 28%),
        radial-gradient(circle at 88% 10%, rgba(15, 123, 126, 0.2), transparent 26%),
        rgba(255, 255, 255, 0.62);
    border: 1px solid var(--ios-border);
    border-radius: 30px;
    box-shadow: var(--ios-shadow);
    display: grid;
    gap: 28px;
    grid-template-columns: minmax(0, 1fr) 260px;
    min-height: 330px;
    padding: 34px;
    position: relative;
    backdrop-filter: blur(30px) saturate(180%);
}

.ios-login-brand {
    align-items: center;
    display: flex;
    gap: 14px;
    grid-column: 1 / -1;
}

.ios-brand-mark {
    align-items: center;
    background: rgba(10, 28, 36, 0.92);
    border-radius: 18px;
    color: #ffffff;
    display: inline-flex;
    font-weight: 850;
    height: 54px;
    justify-content: center;
    width: 54px;
}

.ios-login-brand span:not(.ios-brand-mark) {
    color: var(--ios-text);
    display: block;
    font-size: 1.52rem;
    font-weight: 850;
}

.ios-login-brand small {
    color: var(--ios-muted);
    display: block;
    font-size: 0.92rem;
}

.ios-login-copy {
    align-self: end;
}

.ios-login-visual {
    align-self: end;
    display: grid;
    gap: 18px;
    justify-items: center;
}

.ios-login-visual .ios-ring-chart {
    width: 190px;
}

.ios-login-bars {
    display: grid;
    gap: 10px;
    width: 100%;
}

.ios-login-panel-grid {
    display: grid;
    gap: 22px;
    grid-template-columns: minmax(520px, 0.85fr) minmax(360px, 0.55fr);
}

.ios-login-form,
.ios-login-health {
    padding: 28px;
}

.ios-login-form {
    min-height: 520px;
}

.ios-field {
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid var(--ios-border);
    border-radius: 18px;
    display: grid;
    gap: 8px;
    margin: 0 0 16px;
    padding: 16px 18px;
}

.ios-field span,
.ios-check {
    color: #37505a;
    font-size: 1rem;
    font-weight: 760;
}

.ios-field input.form-control {
    background: transparent;
    border: 0;
    color: var(--ios-text);
    font-size: 1.12rem;
    min-height: 34px;
    padding: 0;
}

.ios-field input.form-control:focus {
    box-shadow: none;
    outline: 3px solid rgba(52, 120, 246, 0.16);
    outline-offset: 5px;
}

.ios-check {
    align-items: center;
    display: flex;
    gap: 10px;
    margin: 6px 0 20px;
}

.ios-action-row {
    display: flex;
    gap: 14px;
    margin: 22px 0;
}

.ios-form-note {
    color: var(--ios-muted);
    font-size: 0.94rem;
    line-height: 1.45;
}

.ios-alert {
    border-radius: 18px;
    font-weight: 760;
    margin-bottom: 16px;
    padding: 14px 16px;
}

.ios-alert--danger {
    background: rgba(255, 232, 230, 0.82);
    border: 1px solid rgba(194, 65, 59, 0.22);
    color: #9d2925;
}

.ios-access-map {
    background: rgba(10, 28, 36, 0.9);
    border-radius: 22px;
    color: #dceff2;
    display: grid;
    gap: 1px;
    margin-top: 26px;
    overflow: hidden;
}

.ios-access-map div {
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    display: grid;
    gap: 12px;
    grid-template-columns: 110px minmax(0, 1fr);
    min-height: 58px;
    padding: 14px 16px;
}

.ios-access-map span {
    color: #9eb5bd;
}

.ios-access-map strong {
    color: #ffffff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 1280px) {
    .ios-context-bar,
    .ios-auth-topbar {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .operator-status {
        display: none;
    }

    .ios-metric-grid,
    .ios-module-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ios-login-panel-grid,
    .ios-hero-grid,
    .ios-dashboard-grid,
    .ios-dashboard-grid--bottom {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 960px) {
    .ios-shell {
        display: block;
        padding: 10px;
    }

    .ios-main,
    .ios-auth-main {
        padding: 10px;
    }

    .ios-rail.shell-sidebar {
        height: auto;
        margin: 0 0 10px;
        padding: 12px;
        position: static;
        width: auto;
    }

    .ios-context-bar,
    .ios-auth-topbar {
        border-radius: 22px;
        grid-template-columns: 1fr;
        min-height: 0;
        padding: 16px;
    }

    .topbar-copy strong {
        font-size: 1.35rem;
    }

    .topbar-copy p {
        font-size: 0.9rem;
    }

    .ios-content,
    .ios-auth-content {
        padding-top: 10px;
    }

    .ios-login-page {
        min-height: auto;
    }

    .ios-login-hero {
        grid-template-columns: 1fr;
        min-height: 0;
        padding: 24px;
    }

    .ios-login-copy h1,
    .ios-hero-card h1 {
        font-size: 2.25rem;
    }

    .ios-login-visual {
        display: none;
    }

    .ios-login-panel-grid,
    .ios-metric-grid,
    .ios-module-grid,
    .ios-ring-row {
        grid-template-columns: 1fr;
    }

    .ios-action-row,
    .ios-hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .ios-action-row .primary-action,
    .ios-action-row .secondary-action,
    .ios-hero-actions .primary-action,
    .ios-hero-actions .secondary-action {
        width: 100%;
    }
}

@media (max-width: 560px) {
    body {
        font-size: 15px;
    }

    .ios-shell,
    .ios-auth-shell {
        background: linear-gradient(180deg, #edf6f8 0%, #f8fbfd 100%);
    }

    .ios-main,
    .ios-auth-main {
        padding: 6px;
    }

    .ios-card {
        border-radius: 22px;
    }

    .ios-hero-card,
    .ios-visual-panel,
    .ios-dashboard-grid > .ios-card,
    .ios-login-form,
    .ios-login-health {
        padding: 20px;
    }

    .ios-login-hero {
        border-radius: 26px;
        margin-bottom: 12px;
        padding: 20px;
    }

    .ios-login-copy h1,
    .ios-hero-card h1 {
        font-size: 2rem;
    }

    .ios-login-copy p,
    .ios-hero-card p,
    .ios-panel-header p {
        font-size: 0.98rem;
    }

    .ios-metric-card strong {
        font-size: 2.2rem;
    }

    .nav-stack {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .nav-stack--secondary,
    .sidebar-user,
    .sidebar-card--highlight {
        display: none !important;
    }
}

/* Final Figma V3 route-frame lock.
   This block intentionally lives at EOF: older V3 and iOS experiments above it
   still exist while the UI is being converged, so desktop parity needs the last
   word until the style debt is cleaned up. */
@media (min-width: 961px) {
    html,
    body {
        background: #eef2f5 !important;
        margin: 0 !important;
        min-height: 100% !important;
        overflow-x: hidden !important;
    }

    .omni-shell.omni-shell--service.ios-shell {
        background: #eef2f5 !important;
        box-sizing: border-box !important;
        display: flex !important;
        gap: 0 !important;
        min-height: 100vh !important;
        padding: 0 !important;
        width: 100% !important;
    }

    .omni-shell.omni-shell--service.ios-shell .shell-sidebar.ios-rail {
        background: #0b171b !important;
        border: 0 !important;
        border-radius: 10px !important;
        box-shadow: none !important;
        box-sizing: border-box !important;
        flex: 0 0 184px !important;
        height: 835px !important;
        margin: 20px 0 20px 24px !important;
        max-height: none !important;
        min-height: 835px !important;
        overflow: hidden !important;
        padding: 0 !important;
        position: sticky !important;
        top: 20px !important;
        width: 184px !important;
        backdrop-filter: none !important;
    }

    .omni-shell.omni-shell--service.ios-shell .shell-main.ios-main {
        box-sizing: border-box !important;
        flex: 1 1 auto !important;
        margin: 0 !important;
        min-width: 0 !important;
        padding: 20px 24px 28px 16px !important;
    }

    .omni-shell.omni-shell--service.ios-shell .shell-topbar.ios-context-bar {
        align-items: center !important;
        background: #ffffff !important;
        border: 1px solid #dde5ea !important;
        border-radius: 8px !important;
        box-shadow: none !important;
        box-sizing: border-box !important;
        display: grid !important;
        gap: 24px !important;
        grid-template-columns: 470px 260px 142px !important;
        height: 72px !important;
        margin: 0 0 20px !important;
        max-width: none !important;
        min-height: 72px !important;
        overflow: hidden !important;
        padding: 18px !important;
        position: static !important;
        width: 952px !important;
        backdrop-filter: none !important;
    }

    .omni-shell.omni-shell--service.ios-shell .shell-content.ios-content {
        box-sizing: border-box !important;
        margin: 0 !important;
        max-width: none !important;
        overflow: visible !important;
        padding: 0 !important;
        width: 1192px !important;
    }

    .omni-shell.omni-shell--service.ios-shell .brand-block {
        align-items: flex-start !important;
        background: transparent !important;
        display: block !important;
        padding: 18px 18px 0 !important;
    }

    .omni-shell.omni-shell--service.ios-shell .brand-name {
        color: #ffffff !important;
        font-size: 24px !important;
        font-weight: 800 !important;
        line-height: 32px !important;
    }

    .omni-shell.omni-shell--service.ios-shell .brand-subtitle {
        color: #9db1b8 !important;
        font-size: 11px !important;
        line-height: 15px !important;
        margin-top: 18px !important;
    }

    .omni-shell.omni-shell--service.ios-shell .nav-stack {
        display: flex !important;
        flex-direction: column !important;
        gap: 18px !important;
        margin-top: 18px !important;
        padding: 0 18px !important;
    }

    .omni-shell.omni-shell--service.ios-shell .nav-stack--secondary,
    .omni-shell.omni-shell--service.ios-shell .sidebar-user {
        display: none !important;
    }

    .omni-shell.omni-shell--service.ios-shell .nav-item-link,
    .omni-shell.omni-shell--service.ios-shell .nav-stack .nav-item-link {
        align-items: center !important;
        background: transparent !important;
        border: 0 !important;
        border-radius: 8px !important;
        box-shadow: none !important;
        color: #b7c6ca !important;
        display: flex !important;
        gap: 10px !important;
        min-height: 42px !important;
        padding: 0 !important;
        text-decoration: none !important;
        width: fit-content !important;
    }

    .omni-shell.omni-shell--service.ios-shell .nav-item-link.active,
    .omni-shell.omni-shell--service.ios-shell .nav-stack .nav-item-link.active {
        background: #203338 !important;
        color: #ffffff !important;
        padding: 0 8px !important;
    }

    .omni-shell.omni-shell--service.ios-shell .nav-item-index {
        align-items: center !important;
        background: #22363c !important;
        border-radius: 10px !important;
        color: #9db1b8 !important;
        display: inline-flex !important;
        font-size: 13px !important;
        font-weight: 800 !important;
        height: 38px !important;
        justify-content: center !important;
        min-width: 26px !important;
        padding: 0 4px !important;
    }

    .omni-shell.omni-shell--service.ios-shell .nav-item-link.active .nav-item-index {
        background: #176c72 !important;
        color: #ffffff !important;
    }

    .omni-shell.omni-shell--service.ios-shell .nav-item-copy strong {
        color: inherit !important;
        display: block !important;
        font-size: 13px !important;
        font-weight: 600 !important;
        line-height: 18px !important;
        max-width: none !important;
        overflow: visible !important;
        text-overflow: clip !important;
        white-space: nowrap !important;
    }

    .omni-shell.omni-shell--service.ios-shell .sidebar-card--highlight {
        background: #12252a !important;
        border: 1px solid #254046 !important;
        border-radius: 8px !important;
        box-shadow: none !important;
        color: #afc0c5 !important;
        margin: 298px 18px 0 !important;
        padding: 12px !important;
        width: 148px !important;
    }

    .omni-shell.omni-shell--service.ios-shell .sidebar-card-label,
    .omni-shell.omni-shell--service.ios-shell .sidebar-card strong {
        color: #ffffff !important;
        font-size: 12px !important;
        line-height: 16px !important;
    }

    .omni-shell.omni-shell--service.ios-shell .sidebar-card p {
        color: #afc0c5 !important;
        font-size: 11px !important;
        line-height: 16px !important;
        margin: 6px 0 0 !important;
    }

    .omni-shell.omni-shell--service.ios-shell .topbar-copy {
        display: flex !important;
        flex-direction: column !important;
        gap: 3px !important;
        min-width: 0 !important;
        width: 470px !important;
    }

    .omni-shell.omni-shell--service.ios-shell .topbar-copy strong {
        color: #0b171b !important;
        font-size: 23px !important;
        font-weight: 800 !important;
        line-height: 31px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    .omni-shell.omni-shell--service.ios-shell .topbar-copy p {
        color: #61737b !important;
        font-size: 12px !important;
        line-height: 16px !important;
        margin: 0 !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    .omni-shell.omni-shell--service.ios-shell .topbar-tabs {
        align-items: center !important;
        background: transparent !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        box-sizing: border-box !important;
        display: flex !important;
        gap: 8px !important;
        height: 40px !important;
        overflow: hidden !important;
        padding: 0 !important;
        width: 260px !important;
    }

    .omni-shell.omni-shell--service.ios-shell .topbar-tab {
        align-items: center !important;
        background: #f7fafc !important;
        border: 0 !important;
        border-radius: 999px !important;
        color: #61737b !important;
        display: inline-flex !important;
        flex: 0 0 auto !important;
        font-size: 12px !important;
        font-weight: 700 !important;
        height: 28px !important;
        line-height: 16px !important;
        padding: 0 8px !important;
        text-decoration: none !important;
        white-space: nowrap !important;
    }

    .omni-shell.omni-shell--service.ios-shell .topbar-tab.active {
        background: #176c72 !important;
        color: #ffffff !important;
    }

    .omni-shell.omni-shell--service.ios-shell .operator-status {
        align-items: center !important;
        background: #f7fafc !important;
        border: 1px solid #dde5ea !important;
        border-radius: 8px !important;
        box-sizing: border-box !important;
        display: flex !important;
        gap: 8px !important;
        height: 40px !important;
        padding: 8px !important;
        width: 142px !important;
    }

    .omni-shell.omni-shell--service.ios-shell .operator-status-mark {
        align-items: center !important;
        background: #e8f4f4 !important;
        border-radius: 10px !important;
        color: #176c72 !important;
        display: inline-flex !important;
        flex: 0 0 28px !important;
        font-size: 13px !important;
        font-weight: 800 !important;
        height: 28px !important;
        justify-content: center !important;
        width: 28px !important;
    }

    .omni-shell.omni-shell--service.ios-shell .operator-status strong,
    .omni-shell.omni-shell--service.ios-shell .operator-status small {
        display: block !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    .omni-shell.omni-shell--service.ios-shell .operator-status strong {
        color: #132126 !important;
        font-size: 12px !important;
        line-height: 16px !important;
    }

    .omni-shell.omni-shell--service.ios-shell .operator-status small {
        color: #61737b !important;
        font-size: 11px !important;
        line-height: 15px !important;
    }

    .figma-home {
        box-sizing: border-box !important;
        display: grid !important;
        gap: 0 !important;
        height: 860px !important;
        position: relative !important;
        width: 1192px !important;
    }

    .figma-stat-grid {
        display: grid !important;
        gap: 18px !important;
        grid-template-columns: repeat(4, 268px) !important;
        height: 121px !important;
        width: 1126px !important;
    }

    .figma-middle-grid {
        display: grid !important;
        gap: 18px !important;
        grid-template-columns: 760px 414px !important;
        height: 345px !important;
        margin-top: 25px !important;
    }

    .figma-bottom-grid {
        display: grid !important;
        gap: 18px !important;
        grid-template-columns: 580px 594px !important;
        height: 306px !important;
        margin-top: 64px !important;
    }

    .figma-stat-card {
        border-radius: 8px !important;
        height: 121px !important;
        padding: 16px !important;
    }

    .figma-stat-top strong {
        font-size: 12px !important;
        line-height: 16px !important;
    }

    .figma-stat-top small {
        font-size: 11px !important;
        line-height: 15px !important;
    }

    .figma-stat-card b {
        font-size: 32px !important;
        line-height: 43px !important;
        margin-top: 10px !important;
    }

    .figma-panel {
        border-radius: 8px !important;
        padding: 18px !important;
    }

    .figma-panel h2 {
        font-size: 20px !important;
        line-height: 27px !important;
    }

    .figma-lane strong {
        font-size: 18px !important;
        line-height: 24px !important;
        margin-top: 14px !important;
    }

    .figma-lane p,
    .figma-progress-row,
    .figma-risk-row span,
    .figma-risk-row b,
    .figma-feed-row time,
    .figma-feed-row span,
    .figma-empty {
        font-size: 12px !important;
        line-height: 16px !important;
    }

    .figma-todo strong {
        font-size: 13px !important;
        line-height: 18px !important;
    }

    .figma-module-panel {
        height: 345px !important;
        width: 760px !important;
    }

    .figma-todo-panel {
        height: 335px !important;
        width: 414px !important;
    }

    .figma-risk-panel {
        height: 255px !important;
        width: 580px !important;
    }

    .figma-feed-panel {
        height: 263px !important;
        width: 594px !important;
    }

    .agent-debug-json-input {
        min-height: 220px !important;
        overflow: auto !important;
    }
}

@media (max-width: 960px) {
    html,
    body {
        background: #eef2f5 !important;
        margin: 0 !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    .omni-shell.omni-shell--service.ios-shell {
        background: #eef2f5 !important;
        box-sizing: border-box !important;
        display: block !important;
        min-height: 100vh !important;
        overflow-x: hidden !important;
        padding: 10px !important;
        width: 100% !important;
    }

    .omni-shell.omni-shell--service.ios-shell .shell-sidebar.ios-rail {
        background: #0b171b !important;
        border: 0 !important;
        border-radius: 12px !important;
        box-shadow: none !important;
        box-sizing: border-box !important;
        height: auto !important;
        margin: 0 0 10px !important;
        max-height: none !important;
        min-height: 0 !important;
        overflow: hidden !important;
        padding: 10px !important;
        position: static !important;
        top: auto !important;
        width: 100% !important;
        backdrop-filter: none !important;
    }

    .omni-shell.omni-shell--service.ios-shell .shell-main.ios-main {
        box-sizing: border-box !important;
        display: block !important;
        min-height: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }

    .omni-shell.omni-shell--service.ios-shell .shell-topbar.ios-context-bar {
        background: #ffffff !important;
        border: 1px solid #dde5ea !important;
        border-radius: 12px !important;
        box-shadow: none !important;
        box-sizing: border-box !important;
        display: grid !important;
        gap: 12px !important;
        grid-template-columns: 1fr !important;
        height: auto !important;
        margin: 0 0 10px !important;
        min-height: 0 !important;
        overflow: hidden !important;
        padding: 14px !important;
        position: static !important;
        width: 100% !important;
    }

    .omni-shell.omni-shell--service.ios-shell .shell-content.ios-content {
        box-sizing: border-box !important;
        margin: 0 !important;
        max-width: 100% !important;
        overflow: visible !important;
        padding: 0 !important;
        width: 100% !important;
    }

    .omni-shell.omni-shell--service.ios-shell .brand-block {
        align-items: center !important;
        display: flex !important;
        justify-content: space-between !important;
        padding: 0 !important;
    }

    .omni-shell.omni-shell--service.ios-shell .brand-name {
        color: #ffffff !important;
        font-size: 16px !important;
        line-height: 20px !important;
    }

    .omni-shell.omni-shell--service.ios-shell .brand-subtitle,
    .omni-shell.omni-shell--service.ios-shell .nav-stack--secondary,
    .omni-shell.omni-shell--service.ios-shell .sidebar-card--highlight,
    .omni-shell.omni-shell--service.ios-shell .sidebar-user,
    .omni-shell.omni-shell--service.ios-shell .operator-status {
        display: none !important;
    }

    .omni-shell.omni-shell--service.ios-shell .nav-stack {
        display: grid !important;
        gap: 6px !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        margin: 8px 0 0 !important;
        padding: 0 !important;
    }

    .omni-shell.omni-shell--service.ios-shell .nav-item-link,
    .omni-shell.omni-shell--service.ios-shell .nav-stack .nav-item-link,
    .omni-shell.omni-shell--service.ios-shell .nav-item-link.active,
    .omni-shell.omni-shell--service.ios-shell .nav-stack .nav-item-link.active {
        align-items: center !important;
        border-radius: 10px !important;
        box-sizing: border-box !important;
        display: flex !important;
        gap: 8px !important;
        min-height: 34px !important;
        overflow: hidden !important;
        padding: 4px 6px !important;
        width: 100% !important;
    }

    .omni-shell.omni-shell--service.ios-shell .nav-item-index {
        border-radius: 8px !important;
        font-size: 11px !important;
        height: 24px !important;
        min-width: 24px !important;
    }

    .omni-shell.omni-shell--service.ios-shell .nav-item-copy strong {
        font-size: 12px !important;
        line-height: 16px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .omni-shell.omni-shell--service.ios-shell .topbar-copy {
        width: 100% !important;
    }

    .omni-shell.omni-shell--service.ios-shell .topbar-copy strong {
        font-size: 20px !important;
        line-height: 26px !important;
        white-space: normal !important;
    }

    .omni-shell.omni-shell--service.ios-shell .topbar-copy p {
        font-size: 13px !important;
        line-height: 18px !important;
        white-space: normal !important;
    }

    .omni-shell.omni-shell--service.ios-shell .topbar-tabs {
        background: transparent !important;
        border: 0 !important;
        display: flex !important;
        gap: 8px !important;
        height: auto !important;
        overflow-x: auto !important;
        padding: 0 0 2px !important;
        width: 100% !important;
    }

    .omni-shell.omni-shell--service.ios-shell .topbar-tab {
        flex: 0 0 auto !important;
        height: 30px !important;
    }

    .figma-home,
    .figma-stat-grid,
    .figma-middle-grid,
    .figma-bottom-grid,
    .figma-module-panel,
    .figma-todo-panel,
    .figma-risk-panel,
    .figma-feed-panel {
        height: auto !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .figma-home {
        display: grid !important;
        gap: 12px !important;
    }

    .figma-stat-grid,
    .figma-middle-grid,
    .figma-bottom-grid,
    .figma-module-lanes {
        display: grid !important;
        gap: 12px !important;
        grid-template-columns: 1fr !important;
        margin-top: 0 !important;
    }

    .figma-stat-card,
    .figma-panel,
    .figma-lane {
        height: auto !important;
        width: 100% !important;
    }

    .figma-risk-row .figma-track {
        width: 100% !important;
    }

    .agent-debug-json-input {
        min-height: 220px !important;
        overflow: auto !important;
    }
}

.manual-library-page .manual-page-preview-link {
    background: #eef4f7;
    border: 1px solid rgba(40, 65, 74, 0.14);
    border-radius: 18px;
    display: block;
    margin: 14px 0 12px;
    overflow: hidden;
    text-decoration: none;
}

.manual-library-page .manual-page-preview {
    aspect-ratio: 16 / 10;
    background: #f6f9fb;
    display: block;
    height: auto;
    max-height: 360px;
    object-fit: contain;
    padding: 10px;
    width: 100%;
}

@media (max-width: 720px) {
    .manual-library-page .manual-page-preview {
        max-height: 260px;
        padding: 8px;
    }
}

/* Final iOS Liquid V4 direction lock.
   The user explicitly chose the iOS/Liquid Glass direction over the fixed V3
   Figma shell. Keep this block last so earlier Figma/V3 experiments cannot
   pull the product back into the dark-sidebar V2/V3 look. */
:root {
    --ios-v4-bg: #edf6f8;
    --ios-v4-bg-deep: #e5eff4;
    --ios-v4-card: rgba(255, 255, 255, 0.68);
    --ios-v4-card-strong: rgba(255, 255, 255, 0.86);
    --ios-v4-border: rgba(104, 135, 150, 0.22);
    --ios-v4-hairline: rgba(8, 31, 38, 0.08);
    --ios-v4-text: #071a21;
    --ios-v4-muted: #5d7680;
    --ios-v4-teal: #0f7b7e;
    --ios-v4-blue: #3478f6;
    --ios-v4-amber: #c46a1b;
    --ios-v4-green: #1f8a5b;
    --ios-v4-red: #c2413b;
    --ios-v4-shadow: 0 18px 54px rgba(21, 55, 71, 0.12);
    --ios-v4-soft-shadow: 0 10px 30px rgba(21, 55, 71, 0.08);
}

html,
body {
    background:
        radial-gradient(circle at 12% 0%, rgba(52, 120, 246, 0.14), transparent 28%),
        radial-gradient(circle at 88% 12%, rgba(15, 123, 126, 0.16), transparent 26%),
        linear-gradient(180deg, var(--ios-v4-bg) 0%, #f8fbfd 56%, var(--ios-v4-bg-deep) 100%) !important;
    color: var(--ios-v4-text) !important;
    font-family: "Segoe UI Variable Text", "Microsoft YaHei UI", "PingFang SC", "Segoe UI", Arial, sans-serif !important;
    letter-spacing: 0 !important;
    overflow-x: hidden !important;
}

.omni-shell.omni-shell--service.ios-shell {
    background:
        radial-gradient(circle at 14% 8%, rgba(52, 120, 246, 0.12), transparent 24%),
        radial-gradient(circle at 82% 18%, rgba(15, 123, 126, 0.14), transparent 26%),
        linear-gradient(180deg, var(--ios-v4-bg) 0%, #f8fbfd 62%, var(--ios-v4-bg-deep) 100%) !important;
    box-sizing: border-box !important;
    display: flex !important;
    gap: 0 !important;
    min-height: 100vh !important;
    padding: 0 !important;
    width: 100% !important;
}

.omni-shell.omni-shell--service.ios-shell .shell-sidebar.ios-rail {
    background: rgba(255, 255, 255, 0.58) !important;
    border: 1px solid var(--ios-v4-border) !important;
    border-radius: 24px !important;
    box-shadow: var(--ios-v4-soft-shadow) !important;
    box-sizing: border-box !important;
    flex: 0 0 168px !important;
    height: calc(100vh - 44px) !important;
    margin: 22px 0 22px 24px !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow: hidden auto !important;
    padding: 18px !important;
    position: sticky !important;
    top: 22px !important;
    width: 168px !important;
    backdrop-filter: blur(24px) saturate(160%) !important;
}

.omni-shell.omni-shell--service.ios-shell .shell-main.ios-main {
    box-sizing: border-box !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    padding: 22px 24px 28px 16px !important;
}

.omni-shell.omni-shell--service.ios-shell .shell-topbar.ios-context-bar {
    align-items: center !important;
    background: var(--ios-v4-card-strong) !important;
    border: 1px solid var(--ios-v4-border) !important;
    border-radius: 24px !important;
    box-shadow: var(--ios-v4-soft-shadow) !important;
    box-sizing: border-box !important;
    display: grid !important;
    gap: 18px !important;
    grid-template-columns: minmax(360px, 1fr) auto auto !important;
    height: auto !important;
    margin: 0 !important;
    min-height: 76px !important;
    overflow: visible !important;
    padding: 12px 18px 12px 24px !important;
    position: static !important;
    width: 100% !important;
    backdrop-filter: blur(28px) saturate(170%) !important;
}

.omni-shell.omni-shell--service.ios-shell .shell-content.ios-content {
    box-sizing: border-box !important;
    margin: 0 !important;
    max-width: none !important;
    overflow: visible !important;
    padding: 20px 0 0 !important;
    width: 100% !important;
}

.omni-shell.omni-shell--service.ios-shell .brand-block {
    background: transparent !important;
    display: block !important;
    padding: 10px 4px 20px !important;
}

.omni-shell.omni-shell--service.ios-shell .brand-name {
    color: var(--ios-v4-text) !important;
    font-size: 26px !important;
    font-weight: 850 !important;
    line-height: 31px !important;
}

.omni-shell.omni-shell--service.ios-shell .brand-subtitle {
    color: var(--ios-v4-muted) !important;
    display: block !important;
    font-size: 12px !important;
    line-height: 16px !important;
    margin-top: 6px !important;
}

.omni-shell.omni-shell--service.ios-shell .nav-stack {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    margin: 0 !important;
    padding: 0 !important;
}

.omni-shell.omni-shell--service.ios-shell .nav-stack--secondary {
    border-top: 1px solid var(--ios-v4-hairline) !important;
    display: flex !important;
    gap: 8px !important;
    margin-top: 14px !important;
    padding-top: 14px !important;
}

.omni-shell.omni-shell--service.ios-shell .nav-item-link,
.omni-shell.omni-shell--service.ios-shell .nav-stack .nav-item-link {
    align-items: center !important;
    background: rgba(255, 255, 255, 0.42) !important;
    border: 1px solid rgba(104, 135, 150, 0.15) !important;
    border-radius: 17px !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    color: #2f4853 !important;
    display: flex !important;
    gap: 10px !important;
    min-height: 42px !important;
    padding: 8px !important;
    text-decoration: none !important;
    width: 100% !important;
}

.omni-shell.omni-shell--service.ios-shell .nav-item-link.active,
.omni-shell.omni-shell--service.ios-shell .nav-stack .nav-item-link.active {
    background: rgba(218, 245, 244, 0.9) !important;
    color: var(--ios-v4-teal) !important;
    padding: 8px !important;
}

.omni-shell.omni-shell--service.ios-shell .nav-item-index {
    align-items: center !important;
    background: rgba(15, 123, 126, 0.1) !important;
    border-radius: 12px !important;
    color: var(--ios-v4-teal) !important;
    display: inline-flex !important;
    flex: 0 0 38px !important;
    font-size: 12px !important;
    font-weight: 850 !important;
    height: 38px !important;
    justify-content: center !important;
    min-width: 38px !important;
    padding: 0 !important;
}

.omni-shell.omni-shell--service.ios-shell .nav-item-link.active .nav-item-index {
    background: var(--ios-v4-teal) !important;
    color: #ffffff !important;
}

.omni-shell.omni-shell--service.ios-shell .nav-item-copy strong {
    color: inherit !important;
    display: block !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 18px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.omni-shell.omni-shell--service.ios-shell .sidebar-card--highlight,
.omni-shell.omni-shell--service.ios-shell .sidebar-user {
    background: rgba(255, 255, 255, 0.48) !important;
    border: 1px solid rgba(104, 135, 150, 0.18) !important;
    border-radius: 18px !important;
    color: var(--ios-v4-text) !important;
    display: block !important;
    margin: 14px 0 0 !important;
    padding: 12px !important;
    width: auto !important;
}

.omni-shell.omni-shell--service.ios-shell .sidebar-card-label,
.omni-shell.omni-shell--service.ios-shell .sidebar-card strong {
    color: var(--ios-v4-text) !important;
}

.omni-shell.omni-shell--service.ios-shell .sidebar-card p,
.omni-shell.omni-shell--service.ios-shell .sidebar-user-role {
    color: var(--ios-v4-muted) !important;
}

.omni-shell.omni-shell--service.ios-shell .topbar-copy {
    width: auto !important;
}

.omni-shell.omni-shell--service.ios-shell .topbar-copy strong {
    color: var(--ios-v4-text) !important;
    font-size: 25px !important;
    font-weight: 850 !important;
    line-height: 31px !important;
    white-space: normal !important;
}

.omni-shell.omni-shell--service.ios-shell .topbar-copy p {
    color: var(--ios-v4-muted) !important;
    font-size: 14px !important;
    line-height: 20px !important;
    margin: 0 !important;
    white-space: normal !important;
}

.omni-shell.omni-shell--service.ios-shell .topbar-tabs {
    align-items: center !important;
    background: rgba(234, 244, 247, 0.72) !important;
    border: 1px solid rgba(104, 135, 150, 0.16) !important;
    border-radius: 999px !important;
    box-shadow: none !important;
    display: flex !important;
    gap: 0 !important;
    height: auto !important;
    overflow-x: auto !important;
    padding: 4px !important;
    width: auto !important;
}

.omni-shell.omni-shell--service.ios-shell .topbar-tab {
    background: transparent !important;
    border-radius: 999px !important;
    color: #48616b !important;
    flex: 0 0 auto !important;
    font-size: 14px !important;
    font-weight: 750 !important;
    height: 34px !important;
    line-height: 18px !important;
    padding: 0 14px !important;
}

.omni-shell.omni-shell--service.ios-shell .topbar-tab.active {
    background: rgba(255, 255, 255, 0.92) !important;
    box-shadow: 0 8px 20px rgba(21, 55, 71, 0.08) !important;
    color: var(--ios-v4-teal) !important;
}

.omni-shell.omni-shell--service.ios-shell .operator-status {
    background: rgba(255, 255, 255, 0.72) !important;
    border: 1px solid var(--ios-v4-border) !important;
    border-radius: 999px !important;
    display: flex !important;
    height: auto !important;
    min-height: 44px !important;
    padding: 6px 12px !important;
    width: auto !important;
}

.omni-shell.omni-shell--service.ios-shell .operator-status-mark {
    background: rgba(15, 123, 126, 0.12) !important;
    border-radius: 999px !important;
    color: var(--ios-v4-teal) !important;
    flex: 0 0 30px !important;
    height: 30px !important;
    width: 30px !important;
}

.ios-card {
    background: var(--ios-v4-card) !important;
    border: 1px solid var(--ios-v4-border) !important;
    border-radius: 26px !important;
    box-shadow: var(--ios-v4-soft-shadow) !important;
    box-sizing: border-box !important;
    backdrop-filter: blur(28px) saturate(170%) !important;
}

.ios-page {
    display: grid !important;
    gap: 20px !important;
    width: 100% !important;
}

.ios-hero-grid,
.ios-dashboard-grid {
    display: grid !important;
    gap: 20px !important;
    grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.72fr) !important;
}

.ios-hero-card,
.ios-visual-panel,
.ios-dashboard-grid > .ios-card {
    padding: 30px !important;
}

.ios-hero-card {
    min-height: 246px !important;
}

.ios-hero-card h1 {
    color: var(--ios-v4-text) !important;
    font-size: clamp(42px, 5vw, 68px) !important;
    font-weight: 850 !important;
    letter-spacing: 0 !important;
    line-height: 0.98 !important;
    margin: 10px 0 16px !important;
}

.ios-hero-card p,
.ios-panel-header p {
    color: var(--ios-v4-muted) !important;
    font-size: 16px !important;
    line-height: 1.55 !important;
}

.ios-kicker {
    color: var(--ios-v4-teal) !important;
    font-size: 12px !important;
    font-weight: 850 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
}

.ios-metric-grid,
.ios-module-grid {
    display: grid !important;
    gap: 18px !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

.ios-dashboard-glance,
.ios-module-card {
    align-items: center !important;
    display: grid !important;
    gap: 18px !important;
    padding: 24px !important;
}

.ios-ring-row {
    display: grid !important;
    gap: 16px !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.ios-waterfall {
    display: grid !important;
    gap: 14px !important;
    margin-top: 20px !important;
}

.ios-dashboard-grid--bottom {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.82fr) !important;
}

@media (max-width: 1280px) {
    .omni-shell.omni-shell--service.ios-shell .operator-status {
        display: none !important;
    }

    .ios-metric-grid,
    .ios-module-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .ios-hero-grid,
    .ios-dashboard-grid,
    .ios-dashboard-grid--bottom {
        grid-template-columns: 1fr !important;
    }
}

/* Manual answer coverage gaps: real missing-source queue for the Q&A library. */
.manual-library-page .manual-gap-panel {
    background: rgba(255, 255, 255, 0.82) !important;
    border: 1px solid rgba(28, 54, 64, 0.12) !important;
    border-radius: 22px !important;
    box-shadow: 0 18px 44px rgba(23, 47, 57, 0.08) !important;
    display: grid !important;
    gap: 16px !important;
    margin-top: 18px !important;
    padding: 20px !important;
}

.manual-library-page .manual-yrc-intake {
    background:
        linear-gradient(135deg, rgba(238, 250, 248, 0.96), rgba(255, 255, 255, 0.92)) !important;
    border: 1px solid rgba(23, 108, 114, 0.16) !important;
    border-radius: 24px !important;
    box-shadow: 0 22px 48px rgba(23, 47, 57, 0.09) !important;
    display: grid !important;
    gap: 16px !important;
    margin-top: 18px !important;
    padding: 20px !important;
}

.manual-library-page .manual-yrc-intake-heading {
    align-items: center !important;
    display: flex !important;
    gap: 16px !important;
    justify-content: space-between !important;
}

.manual-library-page .manual-yrc-intake-heading strong {
    color: #12353a !important;
    display: block !important;
    font-size: 1.08rem !important;
    font-weight: 850 !important;
    line-height: 1.25 !important;
}

.manual-library-page .manual-yrc-intake-heading span {
    color: #526b72 !important;
    display: block !important;
    font-size: 0.94rem !important;
    font-weight: 680 !important;
    line-height: 1.45 !important;
    margin-top: 4px !important;
}

.manual-library-page .manual-yrc-intake-score {
    align-items: center !important;
    background: rgba(23, 108, 114, 0.1) !important;
    border: 1px solid rgba(23, 108, 114, 0.2) !important;
    border-radius: 18px !important;
    display: grid !important;
    justify-items: center !important;
    min-width: 92px !important;
    padding: 10px 14px !important;
}

.manual-library-page .manual-yrc-intake-score strong {
    color: #176c72 !important;
    font-size: 1.9rem !important;
    line-height: 1 !important;
}

.manual-library-page .manual-yrc-intake-score span {
    color: #315a60 !important;
    font-size: 0.82rem !important;
    margin: 5px 0 0 !important;
    white-space: nowrap !important;
}

.manual-library-page .manual-yrc-intake-strip {
    margin: 0 !important;
}

.manual-library-page .manual-yrc-intake-grid {
    display: grid !important;
    gap: 12px !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.manual-library-page .manual-yrc-intake-item {
    background: rgba(255, 255, 255, 0.78) !important;
    border: 1px solid rgba(36, 66, 74, 0.12) !important;
    border-radius: 18px !important;
    display: grid !important;
    gap: 10px !important;
    min-width: 0 !important;
    padding: 15px !important;
}

.manual-library-page .manual-yrc-intake-item--missing {
    border-left: 5px solid #f08a34 !important;
}

.manual-library-page .manual-yrc-intake-item--complete {
    border-left: 5px solid #2f9b78 !important;
}

.manual-library-page .manual-yrc-intake-item-top {
    align-items: flex-start !important;
    display: flex !important;
    gap: 10px !important;
    justify-content: space-between !important;
}

.manual-library-page .manual-yrc-intake-item-top strong {
    color: #172f37 !important;
    font-size: 1rem !important;
    font-weight: 850 !important;
    line-height: 1.3 !important;
}

.manual-library-page .manual-yrc-intake-item-top span {
    background: rgba(23, 108, 114, 0.1) !important;
    border-radius: 999px !important;
    color: #176c72 !important;
    flex: 0 0 auto !important;
    font-size: 0.78rem !important;
    font-weight: 850 !important;
    padding: 5px 9px !important;
    white-space: nowrap !important;
}

.manual-library-page .manual-yrc-intake-item p,
.manual-library-page .manual-yrc-intake-item small {
    color: #455f66 !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    line-height: 1.45 !important;
    margin: 0 !important;
}

.manual-library-page .manual-yrc-unlocks,
.manual-library-page .manual-yrc-gap-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
}

.manual-library-page .manual-yrc-gap-actions .secondary-action {
    min-height: 34px !important;
}

.manual-library-page .manual-yrc-import-row {
    align-items: end !important;
    display: grid !important;
    gap: 10px !important;
    grid-template-columns: minmax(0, 1fr) auto auto !important;
}

.manual-library-page .manual-yrc-import-row label {
    min-width: 0 !important;
}

.manual-library-page .manual-gap-heading {
    align-items: center !important;
    display: flex !important;
    gap: 14px !important;
    justify-content: space-between !important;
}

.manual-library-page .manual-gap-heading strong {
    color: #182f37 !important;
    display: block !important;
    font-size: 1.08rem !important;
    font-weight: 850 !important;
    letter-spacing: 0 !important;
    line-height: 1.25 !important;
}

.manual-library-page .manual-gap-heading span:not(.v3-pill) {
    color: #5d7178 !important;
    display: block !important;
    font-size: 0.95rem !important;
    font-weight: 650 !important;
    line-height: 1.45 !important;
    margin-top: 4px !important;
}

.manual-library-page .manual-gap-list {
    display: grid !important;
    gap: 12px !important;
}

.manual-library-page .manual-gap-item {
    align-items: center !important;
    background: rgba(248, 251, 252, 0.92) !important;
    border: 1px solid rgba(41, 66, 74, 0.12) !important;
    border-left: 5px solid #8fa5ad !important;
    border-radius: 18px !important;
    display: grid !important;
    gap: 14px !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    padding: 16px !important;
}

.manual-library-page .manual-gap-item--critical {
    border-left-color: #d84d4d !important;
}

.manual-library-page .manual-gap-item--high {
    border-left-color: #f08a34 !important;
}

.manual-library-page .manual-gap-item--medium {
    border-left-color: #d5a934 !important;
}

.manual-library-page .manual-gap-item--low {
    border-left-color: #2f9b78 !important;
}

.manual-library-page .manual-gap-item strong {
    color: #162e35 !important;
    display: block !important;
    font-size: 1rem !important;
    font-weight: 850 !important;
    line-height: 1.3 !important;
}

.manual-library-page .manual-gap-item span,
.manual-library-page .manual-gap-item small {
    color: #556b73 !important;
    display: block !important;
    font-size: 0.92rem !important;
    font-weight: 700 !important;
    line-height: 1.45 !important;
    margin-top: 4px !important;
}

.manual-library-page .manual-gap-item p {
    color: #243d45 !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    line-height: 1.5 !important;
    margin: 8px 0 0 !important;
}

.manual-library-page .manual-gap-item .secondary-action {
    min-width: 76px !important;
    white-space: nowrap !important;
}

@media (max-width: 720px) {
    .manual-library-page .manual-yrc-intake-heading,
    .manual-library-page .manual-gap-heading,
    .manual-library-page .manual-gap-item {
        align-items: stretch !important;
        grid-template-columns: 1fr !important;
    }

    .manual-library-page .manual-yrc-intake-heading,
    .manual-library-page .manual-gap-heading {
        display: grid !important;
    }

    .manual-library-page .manual-yrc-intake-grid,
    .manual-library-page .manual-yrc-import-row {
        grid-template-columns: 1fr !important;
    }

    .manual-library-page .manual-yrc-intake-score {
        justify-items: start !important;
        min-width: 0 !important;
    }

    .manual-library-page .manual-gap-item .secondary-action {
        width: 100% !important;
    }
}

.manual-library-page .manual-preview-status {
    background: rgba(255, 193, 7, 0.11) !important;
    border: 1px solid rgba(196, 143, 0, 0.22) !important;
    border-radius: 16px !important;
    color: #6b5300 !important;
    font-size: 0.95rem !important;
    font-weight: 720 !important;
    line-height: 1.5 !important;
    margin: 14px 0 0 !important;
    padding: 12px 14px !important;
}

.manual-library-page .manual-answer-hero-preview {
    background: linear-gradient(180deg, rgba(246, 249, 251, 0.96), rgba(236, 243, 246, 0.96)) !important;
    border: 1px solid rgba(32, 49, 57, 0.14) !important;
    border-radius: 24px !important;
    box-shadow: 0 18px 45px rgba(18, 39, 48, 0.12) !important;
    color: #1b2d33 !important;
    display: grid !important;
    gap: 14px !important;
    margin: 18px 0 !important;
    overflow: hidden !important;
    padding: 14px !important;
    text-decoration: none !important;
}

.manual-library-page .manual-answer-hero-preview img {
    aspect-ratio: 16 / 8.5 !important;
    background: #fff !important;
    border-radius: 18px !important;
    display: block !important;
    height: auto !important;
    max-height: 420px !important;
    object-fit: contain !important;
    padding: 10px !important;
    width: 100% !important;
}

.manual-library-page .manual-answer-hero-preview span {
    align-items: center !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px 12px !important;
    justify-content: space-between !important;
}

.manual-library-page .manual-answer-hero-preview strong {
    font-size: 1rem !important;
    font-weight: 850 !important;
}

.manual-library-page .manual-answer-hero-preview small {
    color: #607079 !important;
    font-size: 0.92rem !important;
    font-weight: 720 !important;
}

.manual-library-page .manual-drawing-regions {
    background: rgba(255, 255, 255, 0.78) !important;
    border: 1px solid rgba(23, 108, 114, 0.16) !important;
    border-radius: 16px !important;
    display: grid !important;
    gap: 10px !important;
    margin-top: 12px !important;
    padding: 12px !important;
}

.manual-library-page .manual-drawing-regions > strong {
    color: #12272f !important;
    font-size: 0.92rem !important;
    font-weight: 850 !important;
    line-height: 1.3 !important;
}

.manual-library-page .manual-drawing-regions > div {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
}

.manual-library-page .manual-drawing-region {
    align-items: center !important;
    background: rgba(23, 108, 114, 0.08) !important;
    border: 1px solid rgba(23, 108, 114, 0.18) !important;
    border-radius: 999px !important;
    color: #123940 !important;
    display: inline-flex !important;
    font-size: 0.92rem !important;
    font-weight: 780 !important;
    gap: 8px !important;
    line-height: 1.3 !important;
    max-width: 100% !important;
    padding: 8px 11px !important;
}

.manual-library-page .manual-drawing-region--link {
    text-decoration: none !important;
}

.manual-library-page .manual-drawing-region--link:hover {
    background: rgba(23, 108, 114, 0.14) !important;
    border-color: rgba(23, 108, 114, 0.32) !important;
}

.manual-library-page .manual-drawing-region small {
    background: rgba(255, 255, 255, 0.72) !important;
    border-radius: 999px !important;
    color: #607079 !important;
    font-size: 0.78rem !important;
    font-weight: 760 !important;
    line-height: 1.2 !important;
    padding: 4px 7px !important;
    white-space: nowrap !important;
}

.manual-library-page .manual-drawing-catalog-panel {
    background: rgba(255, 255, 255, 0.82) !important;
    border: 1px solid rgba(23, 108, 114, 0.14) !important;
    border-radius: 22px !important;
    box-shadow: 0 18px 44px rgba(23, 47, 57, 0.08) !important;
    display: grid !important;
    gap: 16px !important;
    margin-top: 18px !important;
    padding: 20px !important;
}

.manual-library-page .manual-drawing-review-board {
    background: rgba(248, 251, 252, 0.94) !important;
    border: 1px solid rgba(41, 66, 74, 0.1) !important;
    border-radius: 18px !important;
    display: grid !important;
    gap: 14px !important;
    padding: 14px !important;
}

.manual-library-page .manual-drawing-review-stats {
    display: grid !important;
    gap: 10px !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

.manual-library-page .manual-drawing-review-stats article {
    background: rgba(255, 255, 255, 0.84) !important;
    border: 1px solid rgba(23, 108, 114, 0.12) !important;
    border-radius: 14px !important;
    display: grid !important;
    gap: 4px !important;
    min-width: 0 !important;
    padding: 12px !important;
}

.manual-library-page .manual-drawing-review-stats span {
    color: #667981 !important;
    font-size: 0.82rem !important;
    font-weight: 760 !important;
    line-height: 1.2 !important;
}

.manual-library-page .manual-drawing-review-stats strong {
    color: #17363c !important;
    font-size: 1.45rem !important;
    font-weight: 860 !important;
    letter-spacing: 0 !important;
    line-height: 1.05 !important;
}

.manual-library-page .manual-drawing-review-log,
.manual-library-page .manual-drawing-review-snapshots {
    background: rgba(255, 255, 255, 0.78) !important;
    border: 1px solid rgba(23, 108, 114, 0.12) !important;
    border-radius: 16px !important;
    display: grid !important;
    gap: 10px !important;
    padding: 12px !important;
}

.manual-library-page .manual-drawing-review-snapshots {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(232, 246, 246, 0.74)) !important;
}

.manual-library-page .manual-drawing-review-log > div:first-child,
.manual-library-page .manual-drawing-review-snapshots > div:first-child {
    align-items: end !important;
    display: flex !important;
    gap: 10px !important;
    justify-content: space-between !important;
}

.manual-library-page .manual-drawing-review-log > div:first-child strong,
.manual-library-page .manual-drawing-review-snapshots > div:first-child strong {
    color: #17363c !important;
    font-size: 1rem !important;
    font-weight: 850 !important;
}

.manual-library-page .manual-drawing-review-log > div:first-child span,
.manual-library-page .manual-drawing-review-snapshots > div:first-child span {
    color: #607079 !important;
    font-size: 0.84rem !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    text-align: right !important;
}

.manual-library-page .manual-drawing-review-log-list,
.manual-library-page .manual-drawing-review-snapshot-list {
    display: grid !important;
    gap: 8px !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.manual-library-page .manual-drawing-review-log-list article,
.manual-library-page .manual-drawing-review-snapshot-list article {
    background: rgba(248, 251, 252, 0.92) !important;
    border: 1px solid rgba(23, 108, 114, 0.1) !important;
    border-radius: 12px !important;
    display: grid !important;
    gap: 4px !important;
    min-width: 0 !important;
    padding: 10px !important;
}

.manual-library-page .manual-drawing-review-snapshot-list article {
    border-left: 3px solid rgba(23, 108, 114, 0.38) !important;
}

.manual-library-page .manual-drawing-review-log-list article > span,
.manual-library-page .manual-drawing-review-snapshot-list article > span {
    color: #176c72 !important;
    font-size: 0.78rem !important;
    font-weight: 820 !important;
}

.manual-library-page .manual-drawing-review-log-list article > strong,
.manual-library-page .manual-drawing-review-snapshot-list article > strong {
    color: #162e35 !important;
    font-size: 0.92rem !important;
    font-weight: 850 !important;
    line-height: 1.25 !important;
    overflow-wrap: anywhere !important;
}

.manual-library-page .manual-drawing-review-log-list article > small,
.manual-library-page .manual-drawing-review-snapshot-list article > small,
.manual-library-page .manual-drawing-region-review-log small,
.manual-library-page .manual-drawing-region-review-snapshots small {
    color: #65777f !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
}

.manual-library-page .manual-drawing-snapshot-diff {
    display: grid !important;
    gap: 6px !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    margin-top: 4px !important;
}

.manual-library-page .manual-drawing-snapshot-diff span {
    background: rgba(255, 255, 255, 0.76) !important;
    border: 1px solid rgba(23, 108, 114, 0.12) !important;
    border-radius: 10px !important;
    color: #334951 !important;
    display: grid !important;
    font-size: 0.76rem !important;
    font-weight: 760 !important;
    gap: 2px !important;
    line-height: 1.25 !important;
    min-width: 0 !important;
    overflow-wrap: anywhere !important;
    padding: 7px 8px !important;
}

.manual-library-page .manual-drawing-snapshot-diff b {
    color: #176c72 !important;
    font-size: 0.68rem !important;
    font-weight: 880 !important;
    letter-spacing: 0.04em !important;
}

.manual-library-page .manual-drawing-snapshot-diff em {
    color: #87969c !important;
    font-style: normal !important;
    font-weight: 800 !important;
}

.manual-library-page .manual-drawing-snapshot-diff.compact {
    grid-template-columns: 1fr !important;
    gap: 4px !important;
}

.manual-library-page .manual-drawing-snapshot-diff.compact span {
    align-items: center !important;
    display: flex !important;
    gap: 6px !important;
    justify-content: space-between !important;
    padding: 6px 7px !important;
}

.manual-library-page .manual-drawing-region-snapshot-card {
    background: rgba(248, 251, 252, 0.86) !important;
    border: 1px solid rgba(23, 108, 114, 0.1) !important;
    border-radius: 11px !important;
    display: grid !important;
    gap: 6px !important;
    padding: 8px !important;
}

.manual-library-page .manual-drawing-region-snapshot-card small {
    color: #176c72 !important;
    font-weight: 840 !important;
}

.manual-library-page .manual-drawing-snapshot-field-diff {
    background: rgba(255, 255, 255, 0.66) !important;
    border: 1px solid rgba(23, 108, 114, 0.1) !important;
    border-radius: 11px !important;
    display: grid !important;
    gap: 5px !important;
    margin-top: 2px !important;
    padding: 8px !important;
}

.manual-library-page .manual-drawing-snapshot-field-diff > b {
    color: #17363c !important;
    font-size: 0.74rem !important;
    font-weight: 880 !important;
}

.manual-library-page .manual-drawing-snapshot-field-diff span {
    border-radius: 999px !important;
    color: #44575f !important;
    font-size: 0.74rem !important;
    font-weight: 760 !important;
    line-height: 1.28 !important;
    overflow-wrap: anywhere !important;
    padding: 5px 8px !important;
}

.manual-library-page .manual-drawing-snapshot-field-diff span.is-added {
    background: rgba(23, 108, 114, 0.1) !important;
    color: #0f5d62 !important;
}

.manual-library-page .manual-drawing-snapshot-field-diff span.is-removed {
    background: rgba(183, 89, 51, 0.1) !important;
    color: #91502c !important;
}

.manual-library-page .manual-drawing-snapshot-field-diff span.is-changed {
    background: rgba(192, 142, 45, 0.13) !important;
    color: #765a18 !important;
}

.manual-library-page .manual-drawing-snapshot-field-diff span.is-empty {
    background: rgba(105, 119, 127, 0.1) !important;
    color: #65777f !important;
}

.manual-library-page .manual-drawing-snapshot-field-diff.compact {
    padding: 7px !important;
}

.manual-library-page .manual-drawing-review-queue {
    display: grid !important;
    gap: 10px !important;
}

.manual-library-page .manual-drawing-review-queue > div:first-child {
    align-items: end !important;
    display: flex !important;
    gap: 10px !important;
    justify-content: space-between !important;
}

.manual-library-page .manual-drawing-review-queue strong {
    color: #17363c !important;
    font-size: 1rem !important;
    font-weight: 850 !important;
}

.manual-library-page .manual-drawing-review-queue span {
    color: #607079 !important;
    font-size: 0.86rem !important;
    font-weight: 700 !important;
}

.manual-library-page .manual-drawing-review-filters {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    min-width: 0 !important;
}

.manual-library-page .manual-drawing-review-filter {
    align-items: center !important;
    border-color: rgba(23, 108, 114, 0.16) !important;
    display: inline-flex !important;
    gap: 6px !important;
    min-height: 34px !important;
}

.manual-library-page .manual-drawing-review-filter strong {
    color: inherit !important;
    font-size: 0.78rem !important;
    font-weight: 860 !important;
    line-height: 1 !important;
}

.manual-library-page .manual-drawing-review-filter--active {
    background: rgba(23, 108, 114, 0.13) !important;
    border-color: rgba(23, 108, 114, 0.34) !important;
    color: #135e64 !important;
    box-shadow: inset 0 0 0 1px rgba(23, 108, 114, 0.08) !important;
}

.manual-library-page .manual-drawing-review-queue-list {
    display: grid !important;
    gap: 8px !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.manual-library-page .manual-drawing-review-queue-item {
    appearance: none !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(23, 108, 114, 0.15) !important;
    border-radius: 14px !important;
    color: inherit !important;
    cursor: pointer !important;
    display: grid !important;
    gap: 5px !important;
    min-width: 0 !important;
    padding: 12px !important;
    text-align: left !important;
}

.manual-library-page .manual-drawing-review-queue-item:hover:not(:disabled) {
    background: rgba(237, 249, 250, 0.96) !important;
    border-color: rgba(23, 108, 114, 0.32) !important;
}

.manual-library-page .manual-drawing-review-queue-item--active {
    background: rgba(234, 249, 249, 0.98) !important;
    border-color: rgba(23, 108, 114, 0.38) !important;
    box-shadow: 0 10px 28px rgba(23, 108, 114, 0.1) !important;
}

.manual-library-page .manual-drawing-review-queue-item span {
    color: #176c72 !important;
    font-size: 0.78rem !important;
    font-weight: 820 !important;
}

.manual-library-page .manual-drawing-review-queue-item strong {
    color: #162e35 !important;
    font-size: 0.96rem !important;
    font-weight: 850 !important;
    line-height: 1.25 !important;
}

.manual-library-page .manual-drawing-review-queue-item small {
    color: #65777f !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
}

.manual-library-page .manual-drawing-review-impact {
    background: rgba(23, 108, 114, 0.06) !important;
    border: 1px solid rgba(23, 108, 114, 0.1) !important;
    border-radius: 10px !important;
    color: #27484f !important;
    display: block !important;
    font-size: 0.8rem !important;
    font-weight: 760 !important;
    line-height: 1.42 !important;
    margin-top: 2px !important;
    padding: 7px 8px !important;
}

.manual-library-page .manual-drawing-catalog-grid {
    display: grid !important;
    gap: 14px !important;
    grid-template-columns: 1fr !important;
}

.manual-library-page .manual-drawing-catalog-item {
    background: rgba(248, 251, 252, 0.94) !important;
    border: 1px solid rgba(41, 66, 74, 0.12) !important;
    border-radius: 18px !important;
    display: grid !important;
    gap: 12px !important;
    min-width: 0 !important;
    padding: 16px !important;
}

.manual-library-page .manual-drawing-catalog-top {
    align-items: start !important;
    display: flex !important;
    gap: 12px !important;
    justify-content: space-between !important;
}

.manual-library-page .manual-drawing-catalog-top strong,
.manual-library-page .manual-drawing-region-row strong {
    color: #162e35 !important;
    display: block !important;
    font-size: 1rem !important;
    font-weight: 850 !important;
    line-height: 1.32 !important;
}

.manual-library-page .manual-drawing-catalog-top span:not(.soft-badge),
.manual-library-page .manual-drawing-region-row span {
    color: #607079 !important;
    display: block !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    margin-top: 4px !important;
}

.manual-library-page .manual-drawing-region-list {
    display: grid !important;
    gap: 8px !important;
}

.manual-library-page .manual-drawing-region-row {
    align-items: start !important;
    background: rgba(23, 108, 114, 0.06) !important;
    border: 1px solid rgba(23, 108, 114, 0.13) !important;
    border-radius: 14px !important;
    display: grid !important;
    gap: 10px !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    padding: 10px 12px !important;
    position: relative !important;
}

.manual-library-page .manual-drawing-region-row > div:first-child {
    min-width: 0 !important;
}

.manual-library-page .manual-drawing-region-row small {
    color: #6f7f88 !important;
    display: block !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    margin-top: 4px !important;
}

.manual-library-page .manual-drawing-upgrade-preview {
    background: rgba(255, 255, 255, 0.74) !important;
    border: 1px solid rgba(23, 108, 114, 0.14) !important;
    border-radius: 12px !important;
    display: grid !important;
    gap: 5px !important;
    margin-top: 8px !important;
    max-width: 680px !important;
    padding: 8px 10px !important;
}

.manual-library-page .manual-drawing-upgrade-preview .soft-badge {
    display: inline-flex !important;
    width: fit-content !important;
}

.manual-library-page .manual-drawing-upgrade-preview strong {
    color: #13383e !important;
    font-size: 0.9rem !important;
    font-weight: 860 !important;
    letter-spacing: 0 !important;
    line-height: 1.25 !important;
    overflow-wrap: anywhere !important;
}

.manual-library-page .manual-drawing-upgrade-preview small {
    color: #29434a !important;
    font-size: 0.86rem !important;
    line-height: 1.45 !important;
}

.manual-library-page .manual-drawing-upgrade-preview--editor {
    background: linear-gradient(135deg, rgba(232, 247, 248, 0.96), rgba(255, 255, 255, 0.94)) !important;
    border-color: rgba(23, 108, 114, 0.28) !important;
    box-shadow: 0 14px 34px rgba(27, 95, 110, 0.1) !important;
    grid-column: 1 / -1 !important;
    padding: 10px 12px !important;
}

.manual-library-page .manual-drawing-upgrade-preview--editor strong {
    color: #12383d !important;
    font-size: 0.92rem !important;
    letter-spacing: 0 !important;
}

.manual-library-page .manual-drawing-field-summary {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    margin-top: 8px !important;
}

.manual-library-page .manual-drawing-field-summary span {
    background: rgba(23, 108, 114, 0.08) !important;
    border: 1px solid rgba(23, 108, 114, 0.14) !important;
    border-radius: 999px !important;
    color: #176c72 !important;
    display: inline-flex !important;
    font-size: 0.78rem !important;
    font-weight: 780 !important;
    line-height: 1.25 !important;
    max-width: 100% !important;
    padding: 5px 8px !important;
}

.manual-library-page .manual-drawing-region-review-log,
.manual-library-page .manual-drawing-region-review-snapshots {
    background: rgba(255, 255, 255, 0.58) !important;
    border: 1px dashed rgba(23, 108, 114, 0.2) !important;
    border-radius: 10px !important;
    display: grid !important;
    gap: 3px !important;
    margin-top: 8px !important;
    max-width: 680px !important;
    padding: 7px 9px !important;
}

.manual-library-page .manual-drawing-region-review-snapshots {
    background: rgba(232, 246, 246, 0.58) !important;
    border-style: solid !important;
}

.manual-library-page .soft-badge--success {
    background: rgba(28, 128, 111, 0.12) !important;
    border-color: rgba(28, 128, 111, 0.22) !important;
    color: #176c72 !important;
}

.manual-library-page .manual-drawing-review-actions {
    align-items: center !important;
    display: flex !important;
    flex: 0 0 auto !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    justify-content: flex-end !important;
    position: relative !important;
    z-index: 2 !important;
}

.manual-library-page .manual-drawing-region-editor {
    background: rgba(255, 255, 255, 0.88) !important;
    border: 1px solid rgba(23, 108, 114, 0.16) !important;
    border-radius: 14px !important;
    display: grid !important;
    flex: 1 0 100% !important;
    gap: 10px !important;
    grid-template-columns: minmax(220px, 1fr) repeat(4, minmax(72px, 0.18fr)) minmax(86px, auto) !important;
    grid-column: 1 / -1 !important;
    margin-top: 10px !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 12px !important;
    position: relative !important;
    z-index: 3 !important;
    width: 100% !important;
}

.manual-library-page .manual-drawing-region-editor label {
    color: #53676f !important;
    display: grid !important;
    font-size: 0.78rem !important;
    font-weight: 820 !important;
    gap: 5px !important;
    letter-spacing: 0 !important;
}

.manual-library-page .manual-drawing-region-editor input,
.manual-library-page .manual-drawing-region-editor textarea {
    background: #fff !important;
    border: 1px solid rgba(45, 68, 76, 0.18) !important;
    border-radius: 10px !important;
    color: #162e35 !important;
    font-family: inherit !important;
    font-size: 0.92rem !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    min-height: 38px !important;
    padding: 8px 10px !important;
    width: 100% !important;
}

.manual-library-page .manual-drawing-region-editor textarea {
    resize: vertical !important;
}

.manual-library-page .manual-drawing-field-editor {
    border-top: 1px solid rgba(45, 68, 76, 0.12) !important;
    display: grid !important;
    gap: 10px !important;
    grid-column: 1 / -1 !important;
    min-width: 0 !important;
    padding-top: 10px !important;
}

.manual-library-page .manual-drawing-field-heading {
    align-items: center !important;
    display: flex !important;
    gap: 10px !important;
    justify-content: space-between !important;
    min-width: 0 !important;
}

.manual-library-page .manual-drawing-field-heading strong {
    color: #162e35 !important;
    display: block !important;
    font-size: 0.95rem !important;
    font-weight: 860 !important;
    line-height: 1.2 !important;
}

.manual-library-page .manual-drawing-field-heading span,
.manual-library-page .manual-drawing-field-hint {
    color: #53676f !important;
    font-size: 0.84rem !important;
    font-weight: 680 !important;
    line-height: 1.35 !important;
    margin: 0 !important;
}

.manual-library-page .manual-drawing-field-row {
    align-items: end !important;
    display: grid !important;
    gap: 8px !important;
    grid-template-columns: minmax(140px, 0.9fr) minmax(180px, 1.2fr) minmax(86px, 0.5fr) minmax(170px, 1fr) auto !important;
    min-width: 0 !important;
}

.manual-library-page .soft-badge--button {
    background: rgba(255, 255, 255, 0.86) !important;
    cursor: pointer !important;
    font-family: inherit !important;
}

.manual-library-page .soft-badge--button:disabled {
    cursor: wait !important;
    opacity: 0.64 !important;
}

@media (max-width: 900px) {
    .manual-library-page .manual-drawing-catalog-grid {
        grid-template-columns: 1fr !important;
    }

    .manual-library-page .manual-drawing-review-stats,
    .manual-library-page .manual-drawing-review-queue-list {
        grid-template-columns: 1fr 1fr !important;
    }

    .manual-library-page .manual-drawing-region-row {
        grid-template-columns: 1fr !important;
    }

    .manual-library-page .manual-drawing-review-actions {
        justify-content: flex-start !important;
    }

    .manual-library-page .manual-drawing-region-editor {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .manual-library-page .manual-drawing-region-editor label:first-child,
    .manual-library-page .manual-drawing-region-editor button {
        grid-column: 1 / -1 !important;
    }

    .manual-library-page .manual-drawing-field-heading {
        align-items: stretch !important;
        display: grid !important;
    }

    .manual-library-page .manual-drawing-field-row {
        grid-template-columns: 1fr !important;
    }

    .manual-library-page .manual-drawing-field-row button {
        width: 100% !important;
    }
}

@media (max-width: 560px) {
    .manual-library-page .manual-drawing-review-stats,
    .manual-library-page .manual-drawing-review-log-list,
    .manual-library-page .manual-drawing-review-queue-list {
        grid-template-columns: 1fr !important;
    }

    .manual-library-page .manual-drawing-review-filter {
        flex: 1 1 calc(50% - 8px) !important;
        justify-content: center !important;
    }

    .manual-library-page .manual-drawing-review-queue > div:first-child {
        align-items: start !important;
        flex-direction: column !important;
    }

    .manual-library-page .manual-drawing-review-log > div:first-child {
        align-items: start !important;
        display: grid !important;
        gap: 4px !important;
    }

    .manual-library-page .manual-drawing-review-log > div:first-child span {
        text-align: left !important;
    }
}

/* Manual answer must read as a Q&A workspace, not a narrow search sidebar. */
.manual-library-page .workspace-grid--manual-library {
    align-items: start !important;
    grid-template-columns: minmax(0, 1.15fr) minmax(460px, 1.85fr) !important;
}

.manual-library-page .workspace-grid--manual-library > .column-stack {
    display: contents !important;
}

.manual-library-page .manual-answer-card {
    grid-column: 1 / -1 !important;
}

.manual-library-page .manual-drawing-review-entry-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.manual-library-page .manual-answer-card .manual-search-grid {
    align-items: end !important;
    grid-template-columns: minmax(360px, 1.45fr) minmax(150px, 0.55fr) minmax(150px, 0.55fr) auto !important;
}

.manual-library-page .manual-answer-card .queue-stack--scroll {
    display: grid !important;
    gap: 18px !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    max-height: none !important;
    overflow: visible !important;
}

.manual-library-page .manual-answer-card .manual-result-item {
    min-width: 0 !important;
    padding: 16px !important;
}

.manual-library-page .manual-answer-card .manual-page-preview-link {
    background: #eef4f7 !important;
    border: 1px solid rgba(40, 65, 74, 0.14) !important;
    border-radius: 18px !important;
    display: block !important;
    margin: 14px 0 12px !important;
    overflow: hidden !important;
    text-decoration: none !important;
}

.manual-library-page .manual-answer-card .manual-page-preview {
    aspect-ratio: 16 / 10 !important;
    background: #f6f9fb !important;
    display: block !important;
    height: auto !important;
    max-height: 280px !important;
    object-fit: contain !important;
    padding: 10px !important;
    width: 100% !important;
}

.manual-library-page .manual-answer-card .manual-excerpt {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 6 !important;
    line-height: 1.55 !important;
    max-height: none !important;
    overflow: hidden !important;
}

@media (max-width: 1180px) {
    .manual-library-page .workspace-grid--manual-library,
    .manual-library-page .manual-answer-card .manual-search-grid,
    .manual-library-page .manual-answer-card .queue-stack--scroll {
        grid-template-columns: 1fr !important;
    }

    .manual-library-page .manual-drawing-review-entry-actions {
        justify-content: flex-start;
        width: 100%;
    }
}

/* EOF lock: mobile iOS rail must stay compact. */
@media (max-width: 960px) {
    .omni-shell.omni-shell--service.ios-shell .shell-sidebar.ios-rail {
        border-radius: 24px !important;
        display: grid !important;
        gap: 10px !important;
        height: auto !important;
        margin: 0 0 10px !important;
        max-height: 126px !important;
        overflow: hidden !important;
        padding: 12px !important;
        position: static !important;
        width: 100% !important;
    }

    .omni-shell.omni-shell--service.ios-shell .brand-block {
        align-items: center !important;
        display: flex !important;
        min-height: 26px !important;
        padding: 0 !important;
    }

    .omni-shell.omni-shell--service.ios-shell .brand-name {
        font-size: 18px !important;
        line-height: 22px !important;
    }

    .omni-shell.omni-shell--service.ios-shell .brand-subtitle,
    .omni-shell.omni-shell--service.ios-shell .nav-stack--secondary,
    .omni-shell.omni-shell--service.ios-shell .sidebar-card--highlight,
    .omni-shell.omni-shell--service.ios-shell .sidebar-user {
        display: none !important;
    }

    .omni-shell.omni-shell--service.ios-shell .nav-stack {
        display: flex !important;
        flex-direction: row !important;
        gap: 8px !important;
        grid-template-columns: none !important;
        margin: 0 !important;
        overflow-x: auto !important;
        padding: 0 0 2px !important;
        scrollbar-width: none !important;
    }

    .omni-shell.omni-shell--service.ios-shell .nav-stack::-webkit-scrollbar {
        display: none !important;
    }

    .omni-shell.omni-shell--service.ios-shell .nav-item-link,
    .omni-shell.omni-shell--service.ios-shell .nav-stack .nav-item-link {
        flex: 0 0 auto !important;
        gap: 8px !important;
        min-height: 44px !important;
        padding: 6px 10px 6px 6px !important;
        width: auto !important;
    }

    .omni-shell.omni-shell--service.ios-shell .nav-item-index {
        flex: 0 0 32px !important;
        height: 32px !important;
        min-width: 32px !important;
    }
}

/* Absolute final mobile iOS rail correction. Keep this at EOF. */
@media (max-width: 960px) {
    .omni-shell.omni-shell--service.ios-shell .shell-sidebar.ios-rail {
        border-radius: 24px !important;
        display: grid !important;
        gap: 10px !important;
        height: auto !important;
        margin: 0 0 10px !important;
        max-height: 126px !important;
        overflow: hidden !important;
        padding: 12px !important;
        position: static !important;
        width: 100% !important;
    }

    .omni-shell.omni-shell--service.ios-shell .brand-block {
        align-items: center !important;
        display: flex !important;
        min-height: 26px !important;
        padding: 0 !important;
    }

    .omni-shell.omni-shell--service.ios-shell .brand-name {
        font-size: 18px !important;
        line-height: 22px !important;
    }

    .omni-shell.omni-shell--service.ios-shell .brand-subtitle,
    .omni-shell.omni-shell--service.ios-shell .nav-stack--secondary,
    .omni-shell.omni-shell--service.ios-shell .sidebar-card--highlight,
    .omni-shell.omni-shell--service.ios-shell .sidebar-user {
        display: none !important;
    }

    .omni-shell.omni-shell--service.ios-shell .nav-stack {
        display: flex !important;
        flex-direction: row !important;
        gap: 8px !important;
        grid-template-columns: none !important;
        margin: 0 !important;
        overflow-x: auto !important;
        padding: 0 0 2px !important;
        scrollbar-width: none !important;
    }

    .omni-shell.omni-shell--service.ios-shell .nav-stack::-webkit-scrollbar {
        display: none !important;
    }

    .omni-shell.omni-shell--service.ios-shell .nav-item-link,
    .omni-shell.omni-shell--service.ios-shell .nav-stack .nav-item-link {
        flex: 0 0 auto !important;
        gap: 8px !important;
        min-height: 44px !important;
        padding: 6px 10px 6px 6px !important;
        width: auto !important;
    }

    .omni-shell.omni-shell--service.ios-shell .nav-item-index {
        flex: 0 0 32px !important;
        height: 32px !important;
        min-width: 32px !important;
    }

    .omni-shell.omni-shell--service.ios-shell .shell-topbar.ios-context-bar {
        border-radius: 24px !important;
        display: grid !important;
        gap: 10px !important;
        grid-template-columns: 1fr !important;
        margin: 0 0 10px !important;
        min-height: 82px !important;
        padding: 14px 16px !important;
    }

    .omni-shell.omni-shell--service.ios-shell .topbar-copy strong {
        font-size: 24px !important;
        line-height: 29px !important;
    }

    .omni-shell.omni-shell--service.ios-shell .topbar-copy p {
        display: none !important;
    }
}

/* iOS Liquid V4 final convergence.
   This is intentionally the last layer: V3 class names still exist in Razor,
   but visually they now render as restrained iOS glass components. */
.omni-shell.omni-shell--service.ios-shell,
.operator-shell {
    background:
        radial-gradient(circle at 8% 0%, rgba(52, 120, 246, 0.16), transparent 25%),
        radial-gradient(circle at 88% 10%, rgba(15, 123, 126, 0.18), transparent 28%),
        linear-gradient(180deg, #edf6f8 0%, #f8fbfd 58%, #e4eef4 100%) !important;
}

.v3-page,
.figma-page {
    color: var(--ios-v4-text) !important;
    display: grid !important;
    gap: 20px !important;
    font-family: "Segoe UI Variable Text", "Microsoft YaHei UI", "PingFang SC", "Segoe UI", Arial, sans-serif !important;
    width: 100% !important;
}

.v3-card,
.v3-card--nested,
.v3-stat,
.v3-row,
.v3-photo-tile,
.figma-panel,
.figma-stat,
.figma-lane,
.agent-card,
.document-card,
.diagnosis-feedback-card {
    background: rgba(255, 255, 255, 0.68) !important;
    border: 1px solid var(--ios-v4-border) !important;
    border-radius: 24px !important;
    box-shadow: var(--ios-v4-soft-shadow) !important;
    color: var(--ios-v4-text) !important;
    overflow: hidden !important;
    backdrop-filter: blur(24px) saturate(165%) !important;
}

.v3-card,
.v3-stat,
.figma-panel,
.figma-stat {
    padding: 24px !important;
}

.v3-card--nested,
.v3-row,
.figma-lane {
    border-radius: 18px !important;
    padding: 16px !important;
}

.v3-card h1,
.v3-card h2,
.v3-card h3,
.v3-stat strong,
.v3-large-title,
.figma-title,
.figma-panel h2,
.workbench-input-panel h2,
.workbench-evidence-panel h2,
.workbench-result-topline h2 {
    color: var(--ios-v4-text) !important;
    font-weight: 850 !important;
    letter-spacing: 0 !important;
}

.v3-card h2,
.figma-panel h2,
.workbench-input-panel h2,
.workbench-evidence-panel h2,
.workbench-result-topline h2 {
    font-size: clamp(24px, 2.2vw, 34px) !important;
    line-height: 1.08 !important;
}

.v3-large-title,
.v3-stat strong {
    font-size: clamp(34px, 4vw, 54px) !important;
    line-height: 1 !important;
}

.v3-muted,
.v3-note,
.v3-row span,
.v3-row p,
.figma-copy,
.figma-panel p,
.muted {
    color: var(--ios-v4-muted) !important;
    font-size: 15px !important;
    line-height: 1.5 !important;
}

.v3-label,
.v3-pill,
.soft-badge,
.workbench-kicker,
.eyebrow {
    letter-spacing: 0 !important;
}

.v3-pill,
.soft-badge,
.workbench-hero-status span {
    background: rgba(255, 255, 255, 0.7) !important;
    border: 1px solid var(--ios-v4-border) !important;
    border-radius: 999px !important;
    color: #31515b !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72) !important;
}

.v3-row--teal,
.v3-icon--teal {
    background: rgba(15, 123, 126, 0.08) !important;
}

.v3-row--blue,
.v3-icon--blue {
    background: rgba(52, 120, 246, 0.08) !important;
}

.v3-row--green,
.v3-icon--green {
    background: rgba(31, 138, 91, 0.08) !important;
}

.v3-row--amber,
.v3-icon--amber {
    background: rgba(196, 106, 27, 0.08) !important;
}

.v3-row--red,
.v3-icon--red {
    background: rgba(194, 65, 59, 0.08) !important;
}

.v3-grid,
.v3-grid--work-order,
.v3-grid--diagnosis,
.v3-grid--documents,
.v3-grid--system,
.v3-grid--operator {
    display: grid !important;
    gap: 20px !important;
}

.workbench-hero {
    align-items: center !important;
    background:
        radial-gradient(circle at 12% 8%, rgba(52, 120, 246, 0.14), transparent 32%),
        rgba(255, 255, 255, 0.66) !important;
    border: 1px solid var(--ios-v4-border) !important;
    border-radius: 28px !important;
    box-shadow: var(--ios-v4-soft-shadow) !important;
    grid-template-columns: minmax(0, 0.9fr) minmax(430px, 0.8fr) !important;
    margin-bottom: 20px !important;
    min-height: 210px !important;
    padding: 30px !important;
    backdrop-filter: blur(28px) saturate(170%) !important;
}

.workbench-hero-copy h1 {
    font-size: clamp(42px, 4vw, 62px) !important;
}

.workbench-hero-visual {
    align-items: center !important;
    display: grid !important;
    gap: 16px !important;
}

.workbench-hero-rings {
    display: grid !important;
    gap: 18px !important;
    grid-template-columns: repeat(3, minmax(108px, 1fr)) !important;
}

.workbench-layout {
    align-items: start !important;
    display: grid !important;
    gap: 20px !important;
    grid-template-columns: minmax(320px, 0.58fr) minmax(420px, 0.9fr) minmax(280px, 0.52fr) !important;
}

.workbench-input-panel,
.workbench-result-area,
.workbench-evidence-panel,
.workbench-result-content,
.workbench-empty-start,
.workbench-insufficient,
.diagnosis-loading-state {
    background: rgba(255, 255, 255, 0.7) !important;
    border: 1px solid var(--ios-v4-border) !important;
    border-radius: 26px !important;
    box-shadow: var(--ios-v4-soft-shadow) !important;
    backdrop-filter: blur(26px) saturate(165%) !important;
}

.workbench-input-panel,
.workbench-evidence-panel {
    padding: 24px !important;
}

.workbench-result-area {
    min-height: 520px !important;
    padding: 18px !important;
}

.workbench-empty-start {
    background:
        radial-gradient(circle at 50% 0%, rgba(15, 123, 126, 0.1), transparent 34%),
        rgba(255, 255, 255, 0.56) !important;
    min-height: 482px !important;
}

.workbench-form {
    gap: 16px !important;
}

.form-control,
.workbench-form .form-control,
.ios-field .form-control {
    background: rgba(255, 255, 255, 0.78) !important;
    border: 1px solid rgba(104, 135, 150, 0.24) !important;
    border-radius: 16px !important;
    color: var(--ios-v4-text) !important;
    font-size: 16px !important;
    min-height: 50px !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7) !important;
}

.primary-action,
button.primary-action,
a.primary-action {
    background: linear-gradient(180deg, #16aaa8 0%, #0f7478 100%) !important;
    border: 0 !important;
    border-radius: 17px !important;
    box-shadow: 0 18px 34px rgba(15, 123, 126, 0.22) !important;
    color: #fff !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    min-height: 52px !important;
}

.secondary-action,
a.secondary-action,
button.secondary-action {
    background: rgba(255, 255, 255, 0.76) !important;
    border: 1px solid var(--ios-v4-border) !important;
    border-radius: 17px !important;
    color: var(--ios-v4-text) !important;
    font-size: 16px !important;
    font-weight: 780 !important;
    min-height: 52px !important;
}

@media (max-width: 1280px) {
    .workbench-hero {
        grid-template-columns: 1fr !important;
    }

    .workbench-layout {
        grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1fr) !important;
    }

    .workbench-evidence-panel {
        grid-column: 1 / -1 !important;
    }
}

@media (max-width: 960px) {
    .omni-shell.omni-shell--service.ios-shell {
        display: block !important;
        padding: 10px !important;
    }

    .omni-shell.omni-shell--service.ios-shell .shell-sidebar.ios-rail {
        border-radius: 24px !important;
        display: grid !important;
        gap: 10px !important;
        height: auto !important;
        margin: 0 0 10px !important;
        max-height: 126px !important;
        overflow: hidden !important;
        padding: 12px !important;
        position: static !important;
        width: 100% !important;
    }

    .omni-shell.omni-shell--service.ios-shell .brand-block {
        align-items: center !important;
        display: flex !important;
        min-height: 26px !important;
        padding: 0 !important;
    }

    .omni-shell.omni-shell--service.ios-shell .brand-name {
        font-size: 18px !important;
        line-height: 22px !important;
    }

    .omni-shell.omni-shell--service.ios-shell .brand-subtitle,
    .omni-shell.omni-shell--service.ios-shell .nav-stack--secondary,
    .omni-shell.omni-shell--service.ios-shell .sidebar-card--highlight,
    .omni-shell.omni-shell--service.ios-shell .sidebar-user {
        display: none !important;
    }

    .omni-shell.omni-shell--service.ios-shell .nav-stack {
        display: flex !important;
        flex-direction: row !important;
        gap: 8px !important;
        margin: 0 !important;
        overflow-x: auto !important;
        padding: 0 0 2px !important;
        scrollbar-width: none !important;
    }

    .omni-shell.omni-shell--service.ios-shell .nav-stack::-webkit-scrollbar {
        display: none !important;
    }

    .omni-shell.omni-shell--service.ios-shell .nav-item-link,
    .omni-shell.omni-shell--service.ios-shell .nav-stack .nav-item-link {
        flex: 0 0 auto !important;
        gap: 8px !important;
        min-height: 44px !important;
        padding: 6px 10px 6px 6px !important;
        width: auto !important;
    }

    .omni-shell.omni-shell--service.ios-shell .nav-item-index {
        flex-basis: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
    }

    .omni-shell.omni-shell--service.ios-shell .shell-topbar.ios-context-bar {
        border-radius: 24px !important;
        display: grid !important;
        gap: 10px !important;
        grid-template-columns: 1fr !important;
        margin: 0 0 10px !important;
        min-height: 82px !important;
        padding: 14px 16px !important;
    }

    .omni-shell.omni-shell--service.ios-shell .topbar-copy strong {
        font-size: 24px !important;
        line-height: 29px !important;
    }

    .omni-shell.omni-shell--service.ios-shell .topbar-copy p {
        display: none !important;
    }

    .omni-shell.omni-shell--service.ios-shell .topbar-tabs {
        max-width: 100% !important;
    }

    .omni-shell.omni-shell--service.ios-shell .shell-main.ios-main {
        padding: 0 !important;
    }

    .omni-shell.omni-shell--service.ios-shell .shell-content.ios-content {
        padding: 0 !important;
    }

    .ios-hero-card {
        min-height: auto !important;
    }

    .ios-hero-card h1,
    .ios-login-copy h1 {
        font-size: 38px !important;
        line-height: 1.03 !important;
    }

    .ios-hero-card,
    .ios-visual-panel,
    .ios-dashboard-grid > .ios-card,
    .v3-card,
    .v3-stat,
    .figma-panel {
        padding: 20px !important;
    }

    .ios-metric-grid,
    .ios-module-grid,
    .ios-ring-row,
    .ios-hero-grid,
    .ios-dashboard-grid,
    .ios-dashboard-grid--bottom,
    .v3-grid,
    .v3-grid--work-order,
    .v3-grid--diagnosis,
    .v3-grid--documents,
    .v3-grid--system,
    .v3-grid--operator,
    .workbench-layout,
    .workbench-hero,
    .workbench-priority-grid,
    .workbench-result-utilities,
    .workbench-inline-fields,
    .workbench-advanced-grid {
        grid-template-columns: 1fr !important;
    }

    .workbench-hero {
        min-height: 0 !important;
        padding: 22px !important;
    }

    .workbench-hero-copy h1 {
        font-size: 38px !important;
    }

    .workbench-hero-copy .muted,
    .workbench-hero-rings {
        display: none !important;
    }

    .workbench-hero-status {
        justify-content: flex-start !important;
    }

    .workbench-result-area {
        min-height: 340px !important;
    }

    .workbench-empty-start {
        min-height: 300px !important;
    }
}

@media (max-width: 960px) {
    .omni-shell.omni-shell--service.ios-shell {
        display: block !important;
        padding: 10px !important;
    }

    .omni-shell.omni-shell--service.ios-shell .shell-sidebar.ios-rail {
        height: auto !important;
        margin: 0 0 10px !important;
        padding: 12px !important;
        position: static !important;
        width: 100% !important;
    }

    .omni-shell.omni-shell--service.ios-shell .shell-main.ios-main {
        padding: 0 !important;
    }

    .omni-shell.omni-shell--service.ios-shell .shell-topbar.ios-context-bar {
        border-radius: 22px !important;
        grid-template-columns: 1fr !important;
        margin: 0 0 10px !important;
        min-height: 0 !important;
        padding: 16px !important;
    }

    .omni-shell.omni-shell--service.ios-shell .shell-content.ios-content {
        padding-top: 0 !important;
    }

    .omni-shell.omni-shell--service.ios-shell .brand-block {
        padding: 0 !important;
    }

    .omni-shell.omni-shell--service.ios-shell .brand-name {
        font-size: 17px !important;
        line-height: 22px !important;
    }

    .omni-shell.omni-shell--service.ios-shell .brand-subtitle,
    .omni-shell.omni-shell--service.ios-shell .sidebar-card--highlight,
    .omni-shell.omni-shell--service.ios-shell .sidebar-user {
        display: none !important;
    }

    .omni-shell.omni-shell--service.ios-shell .nav-stack {
        display: grid !important;
        gap: 8px !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        margin-top: 10px !important;
    }

    .omni-shell.omni-shell--service.ios-shell .nav-stack--secondary {
        display: flex !important;
        overflow-x: auto !important;
    }

    .ios-card {
        border-radius: 22px !important;
    }

    .ios-hero-card,
    .ios-visual-panel,
    .ios-dashboard-grid > .ios-card {
        padding: 22px !important;
    }

    .ios-hero-card h1 {
        font-size: 38px !important;
    }

    .ios-metric-grid,
    .ios-module-grid,
    .ios-ring-row,
    .ios-hero-grid,
    .ios-dashboard-grid,
    .ios-dashboard-grid--bottom {
        grid-template-columns: 1fr !important;
    }
}
