:root {
    --bg: #f3f3f3;
    --panel: #ffffff;
    --panel-alt: #fafafa;
    --panel-soft: #f7f7f7;
    --border: #d7d7d7;
    --border-soft: #e8e8e8;
    --text: #1f1f1f;
    --muted: #5a5a5a;
    --accent: #0078d7;
    --accent-hover: #106ebe;
    --accent-press: #005a9e;
    --selection: #d9ecff;
    --selection-border: #9cc9f5;
    --warn-bg: #fff4eb;
    --warn-line: #d83b01;
    --ok: #107c10;
    --warn: #d83b01;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-strong: 0 10px 24px rgba(0, 0, 0, 0.16);
    --radius: 2px;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
    font-size: 14px;
}

.page-watermark {
    position: fixed;
    inset: 0;
    z-index: 120;
    pointer-events: none;
    opacity: 1;
    background-repeat: repeat;
    background-position: 0 0;
    background-size: 280px 170px;
}

a {
    color: inherit;
    text-decoration: none;
}

.topbar {
    position: sticky;
    top: 0;
    /* V2.7: 必须高于 page-watermark (z-index 120)，否则水印会盖到导航字上 */
    z-index: 200;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
}

.topbar__frame {
    max-width: 1500px;
    margin: 0 auto;
    padding: 12px 24px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 18px;
    align-items: center;
}

.topbar__brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-badge {
    width: 34px;
    height: 34px;
    border-radius: 2px;
    background:
        linear-gradient(90deg, transparent 48%, rgba(255, 255, 255, 0.92) 48%, rgba(255, 255, 255, 0.92) 52%, transparent 52%),
        linear-gradient(0deg, transparent 48%, rgba(255, 255, 255, 0.92) 48%, rgba(255, 255, 255, 0.92) 52%, transparent 52%),
        linear-gradient(135deg, var(--accent), var(--accent-hover));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.brand-title {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.1;
}

.brand-subtitle {
    margin-top: 2px;
    font-size: 12px;
    color: var(--muted);
}

.topbar__nav {
    display: flex;
    gap: 4px;
    align-items: center;
    /* V2.7: nav 项整体可换行（项之间），而不是字内被挤断 */
    flex-wrap: wrap;
}

.topbar__nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: 2px;
    color: var(--muted);
    font-weight: 500;
    /* V2.7: 防中文导航字内被强制换行（"首/页"竖排）— 入口多时是必须 */
    white-space: nowrap;
    gap: 4px;
}

.topbar__nav a:hover,
.topbar__nav a:focus-visible {
    background: var(--panel-soft);
    border-color: var(--border);
    color: var(--text);
}

/* V3.2: 当前页 active 状态 — 蓝色背景标识用户在哪页 */
.topbar__nav a.topbar__nav--active,
.topbar__mobile-nav a.topbar__nav--active {
    background: #e6f0ff;
    border-color: #b6d1ff;
    color: #1d4ed8;
    font-weight: 600;
}
.topbar__nav a.topbar__nav--active:hover {
    background: #d6e6ff;
    border-color: #93b8ff;
    color: #1d4ed8;
}

.topbar__meta {
    display: flex;
    justify-content: flex-end;
}

.status-chip,
.pill {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border: 1px solid var(--selection-border);
    border-radius: 999px;
    background: #eff6fc;
    color: var(--accent-hover);
    font-size: 12px;
    font-weight: 600;
}

.shell {
    max-width: 1500px;
    margin: 0 auto;
    padding: 18px 24px 28px;
}

.panel,
.entry-card,
.modal__dialog {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.shell,
.topbar {
    position: relative;
    z-index: 10;
}

.app-card {
    position: relative;
}

.app-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 2px;
    background: var(--accent);
}

.page-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    padding: 18px 20px 20px;
}

.page-head--compact h1,
.home-main h1 {
    margin: 10px 0 8px;
    font-size: 32px;
    font-weight: 600;
    line-height: 1.15;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 8px;
    background: #edf5fc;
    color: var(--accent-hover);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.page-head p,
.panel-copy,
.sidebar-sub,
.entry-card p,
.summary-box,
small {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.head-actions,
.inline-actions,
.dataset-toolbar,
.analysis-form,
.row-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.analysis-form__field {
    min-width: 220px;
    flex: 1 1 220px;
}

.design-model-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: end;
    margin-top: 12px;
}

.design-model-form__field {
    display: grid;
    gap: 6px;
}

.design-model-form__field--model {
    flex: 1 1 460px;
    min-width: 320px;
}

.design-model-form__field--interval {
    flex: 0 0 160px;
    min-width: 160px;
}

.design-model-form__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 2px;
    background: var(--panel-alt);
    color: var(--text);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.button:hover,
.button:focus-visible {
    background: #f3f8fd;
    border-color: #b9d8f6;
}

.button--primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
}

.button--primary:hover,
.button--primary:focus-visible {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.button--small {
    min-height: 28px;
    padding: 0 10px;
    font-size: 12px;
}

.button--ghost {
    background: transparent;
}

.button--danger {
    border-color: #d96b6b;
    background: #fff4f4;
    color: #b42318;
}

.button--danger:hover,
.button--danger:focus-visible {
    border-color: #c85353;
    background: #ffe8e8;
    color: #952010;
}

.button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.home-layout,
.workspace {
    display: grid;
    gap: 16px;
}

.home-layout {
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.72fr);
    align-items: start;
}

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

.home-main,
.home-side,
.workspace__main,
.workspace__sidebar {
    min-width: 0;
}

.home-main,
.compact-panel,
.sidebar-card,
.dataset-card,
.notebook,
.swimlane-stage {
    padding: 18px;
}

.home-side {
    display: grid;
    gap: 16px;
}

.entry-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 8px;
}

.entry-card {
    min-height: 220px;
    padding: 22px 20px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}

.entry-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 2px;
    background: var(--accent);
}

.entry-card:hover {
    border-color: var(--selection-border);
    box-shadow: 0 8px 20px rgba(0, 120, 215, 0.08);
}

.entry-card__tag {
    color: var(--accent-hover);
    font-size: 12px;
    font-weight: 700;
}

.entry-card h2 {
    margin: 0;
    font-size: 26px;
    font-weight: 600;
}

.entry-card span {
    margin-top: auto;
    color: var(--accent);
    font-weight: 600;
}

.entry-points,
.hint-list,
.compact-list,
.well-list,
.data-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.entry-points,
.well-list,
.compact-list,
.data-list {
    display: grid;
    gap: 8px;
}

.entry-points li,
.hint-list li,
.compact-list li,
.data-list li {
    padding: 10px 12px;
    border: 1px solid var(--border-soft);
    border-radius: 2px;
    background: var(--panel-alt);
    line-height: 1.6;
}

.compact-list li,
.data-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.workspace {
    grid-template-columns: 320px minmax(0, 1fr);
}

.workspace__sidebar {
    display: grid;
    gap: 16px;
    align-content: start;
    position: sticky;
    top: 78px;
    height: fit-content;
}

.workspace--design {
    grid-template-columns: 340px minmax(0, 1fr);
}

.sidebar-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
}

.stack-form,
.import-form {
    display: grid;
    gap: 12px;
}

label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
}

input,
textarea,
select {
    width: 100%;
    min-height: 36px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 2px;
    background: #ffffff;
    color: var(--text);
    font: inherit;
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 1px solid var(--accent);
    border-color: var(--accent);
}

textarea {
    min-height: 88px;
    resize: vertical;
}

.mini-metrics,
.summary-strip,
.kv-grid,
.recommend-grid,
.recommend-list,
.dataset-grid,
.panel-grid {
    display: grid;
    gap: 12px;
}

.mini-metrics,
.summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 14px;
}

.summary-strip {
    margin: 0 0 16px;
}

.metric-tile,
.kv-card,
.recommend-card {
    padding: 12px 14px;
    border: 1px solid var(--border-soft);
    border-radius: 2px;
    background: var(--panel-alt);
    display: grid;
    gap: 6px;
}

.metric-tile span,
.kv-card span {
    color: var(--muted);
}

.metric-tile strong,
.kv-card strong,
.recommend-card strong,
.recommend-row strong {
    font-weight: 600;
}

.metric-tile strong {
    font-size: 15px;
}

.panel__title,
.sub-title {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
}

.dataset-head,
.latest-run {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.dataset-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel-grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dataset-toolbar {
    margin-top: 10px;
}

.well-pill {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-left: 3px solid transparent;
    border-radius: 2px;
    background: #ffffff;
}

.well-pill span {
    color: var(--muted);
    font-size: 12px;
}

.well-pill.is-active {
    background: #f1f7fd;
    border-color: var(--selection-border);
    border-left-color: var(--accent);
}

.notebook {
    padding-top: 0;
}

.notebook__tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    margin: 0 -18px;
    padding: 0 18px;
    background: var(--bg);
}

.notebook__tab {
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-bottom: 0;
    border-radius: 2px 2px 0 0;
    background: #e9e9e9;
    color: var(--text);
    font: inherit;
    font-weight: 500;
    cursor: pointer;
    margin-right: 6px;
    margin-top: 10px;
}

.notebook__tab.is-active {
    background: #ffffff;
    color: var(--accent);
    border-color: var(--accent);
    position: relative;
    top: 1px;
}

.notebook__body {
    padding-top: 18px;
}

.notebook__pane {
    display: none;
}

.notebook__pane.is-active {
    display: block;
}

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

.well-form-grid {
    align-items: start;
}

.form-span-2 {
    grid-column: span 2;
}

.location-helper {
    display: grid;
    gap: 10px;
    margin-top: 14px;
    padding: 14px;
    border: 1px solid var(--selection-border);
    border-radius: 10px;
    background: linear-gradient(180deg, #f8fbff 0%, #eef5fd 100%);
}

.location-helper__head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.location-helper__status {
    margin: 0;
}

.location-helper__map {
    width: 100%;
    min-height: 240px;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    background: #ffffff;
}

.table-wrap {
    overflow: auto;
    margin-top: 12px;
    border: 1px solid var(--border);
    border-radius: 2px;
    background: #ffffff;
}

table {
    width: 100%;
    min-width: 820px;
    border-collapse: collapse;
}

th,
td {
    padding: 10px 12px;
    border-bottom: 1px solid #ececec;
    text-align: left;
    vertical-align: top;
    font-size: 13px;
}

thead th {
    position: sticky;
    top: 0;
    background: #f6f6f6;
    z-index: 1;
    font-weight: 600;
}

tbody tr:nth-child(even) {
    background: #fcfcfc;
}

tbody tr:hover {
    background: #f3f8fd;
}

.file-field {
    padding: 12px;
    border: 1px dashed var(--border);
    border-radius: 2px;
    background: var(--panel-soft);
}

.file-field input {
    margin-top: 8px;
}

.kv-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.recommend-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.recommend-list {
    margin-bottom: 16px;
}

.recommend-row {
    display: grid;
    gap: 5px;
    padding: 10px 12px;
    border: 1px solid var(--border-soft);
    border-radius: 2px;
    background: var(--panel-alt);
}

.recommend-row span,
.recommend-card span {
    color: var(--accent-hover);
    font-weight: 600;
}

.summary-box {
    margin-top: 12px;
    padding: 14px;
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 2px;
    background: var(--panel-soft);
    white-space: pre-wrap;
    font-family: inherit;
}

.swimlane-controls,
.swimlane-empty,
.swimlane-loading {
    display: grid;
    gap: 12px;
}

.swimlane-loading,
.swimlane-empty {
    min-height: 200px;
    place-items: center;
    border: 1px solid var(--border);
    background: #ffffff;
    color: var(--muted);
}

.swimlane-controls__bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.swimlane-controls__zoom {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    padding: 8px 10px;
    border: 1px solid var(--border);
    background: var(--panel-soft);
}

.swimlane-controls__zoom label,
.swimlane-controls__search label {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 12px;
    color: var(--muted);
}

.swimlane-controls__zoom input[type="range"] {
    width: 180px;
    min-height: auto;
    padding: 0;
}

.swimlane-controls__search {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    padding: 8px 10px;
    border: 1px solid var(--border);
    background: var(--panel-soft);
}

.swimlane-controls__search input {
    width: 130px;
    min-height: 30px;
}

.swimlane-controls__selector {
    display: grid;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    background: #ffffff;
}

.swimlane-selector__presets {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.swimlane-selector__title {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.swimlane-selector__preset,
.swimlane-selector__track {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid var(--border);
    background: var(--panel-alt);
    color: var(--muted);
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}

.swimlane-selector__preset:hover,
.swimlane-selector__track:hover {
    border-color: var(--selection-border);
    background: #f3f8fd;
    color: var(--text);
}

.swimlane-selector__preset.is-active,
.swimlane-selector__track.is-active {
    border-color: var(--accent);
    background: #eaf4fe;
    color: var(--accent-hover);
}

.swimlane-selector__tracks {
    display: grid;
    gap: 10px;
}

.swimlane-selector__group {
    display: grid;
    gap: 8px;
}

.swimlane-selector__group-title {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.swimlane-selector__group-items {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.swimlane-controls__inspector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.swimlane-readout {
    padding: 12px;
    border: 1px solid var(--border);
    background: #ffffff;
}

.swimlane-readout strong {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    color: var(--muted);
}

.swimlane-readout__value {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
}

.swimlane-readout__sub {
    margin-top: 6px;
    color: var(--muted);
    line-height: 1.6;
    white-space: pre-wrap;
}

.swimlane-readout__sub--tight {
    font-size: 12px;
}

.swimlane-controls__stage {
    border: 1px solid var(--border);
    background: #ffffff;
}

.swimlane-controls__grid {
    display: grid;
    gap: 14px;
    padding: 0 10px 10px;
}

.swimlane-row {
    display: grid;
    gap: 0;
}

.swimlane-row__title {
    display: flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-bottom: none;
    background: var(--swimlane-row-accent, var(--panel-soft));
    color: #1f3553;
    font-size: 13px;
    font-weight: 700;
}

.swimlane-row__scroll {
    overflow: auto;
    max-height: 26vh;
    padding: 0 10px 10px;
    border: 1px solid var(--border);
    background: #ffffff;
}

.swimlane-row__tracks {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    width: max-content;
    min-width: 100%;
}

.swimlane-track {
    flex: 0 0 auto;
    border-left: 1px solid var(--border-soft);
    border-right: 1px solid var(--border-soft);
    background: #ffffff;
}

.swimlane-track__head {
    position: sticky;
    top: 0;
    z-index: 3;
    padding: 10px 8px 8px;
    border-bottom: 1px solid var(--border);
    background: #ffffff;
}

.swimlane-track__group {
    display: inline-flex;
    align-items: center;
    min-height: 18px;
    padding: 0 6px;
    font-size: 11px;
    color: #37506a;
    background: var(--panel-soft);
}

.swimlane-track__title {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.45;
}

.swimlane-track__meta {
    margin-top: 4px;
    font-size: 11px;
    color: var(--muted);
}

.swimlane-track__body {
    position: relative;
    background:
        linear-gradient(to bottom, rgba(0, 0, 0, 0.03) 1px, transparent 1px) 0 0 / 100% 50px,
        linear-gradient(to right, rgba(0, 0, 0, 0.035) 1px, transparent 1px) 0 0 / 25% 100%;
}

.swimlane-track__body svg {
    display: block;
    width: 100%;
    height: 100%;
}

.swimlane-track__cursor {
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(0, 120, 215, 0.8);
    pointer-events: none;
    z-index: 2;
}

.swimlane-track__body--categorical {
    background:
        linear-gradient(to bottom, rgba(0, 0, 0, 0.03) 1px, transparent 1px) 0 0 / 100% 50px,
        #ffffff;
}

.swimlane-interval-block {
    position: absolute;
    left: 8px;
    right: 8px;
    padding: 6px 5px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: #1f1f1f;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    line-height: 1.35;
    overflow: hidden;
    cursor: pointer;
}

.swimlane-interval-block.is-active {
    outline: 2px solid var(--accent);
    z-index: 3;
}

.swimlane-interval-block span {
    display: block;
}

.swimlane-axis-tick {
    position: absolute;
    left: 0;
    right: 0;
    height: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.15);
}

.swimlane-axis-tick strong {
    position: absolute;
    left: 8px;
    top: -10px;
    font-size: 11px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.95);
    padding: 0 4px;
}

.swimlane-legend {
    padding: 10px 12px 0;
    color: var(--muted);
    font-size: 12px;
}

.swimlane-legend strong {
    color: var(--text);
}

.swimlane-point-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    margin-left: -4px;
    margin-top: -4px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
    pointer-events: none;
    z-index: 4;
}

.flash,
.warning-box {
    margin: 0 0 16px;
    padding: 12px 14px;
    border: 1px solid #d3def0;
    border-left: 4px solid var(--accent);
    border-radius: 2px;
    background: #eef4fb;
    color: #1a3559;
}

.flash--ok {
    border-color: #b8e0c2;
    border-left-color: var(--ok);
    background: #ecf6ee;
    color: #1f5b25;
}

.flash--warn {
    border-color: #ffd8b1;
    border-left-color: var(--warn-line);
    background: var(--warn-bg);
    color: #8a3700;
}

.flash--error {
    border-color: #f4c1c1;
    border-left-color: #c5221f;
    background: #fdecec;
    color: #8a1f1c;
}

.page-head__desc {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

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

.audit-log-item {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #ffffff;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.audit-log-item__head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: start;
    padding: 15px 16px;
    border-bottom: 1px solid var(--border-soft);
    background: linear-gradient(180deg, #fbfdff 0%, #f5f9fd 100%);
}

.audit-log-item__lead {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.audit-log-item__time {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.3;
    color: #17324d;
}

.audit-log-item__actor {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.audit-log-item__actor-name {
    color: var(--text);
    font-weight: 600;
}

.audit-log-item__badges {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.audit-log-item__body {
    display: grid;
    gap: 12px;
    padding: 16px;
}

.audit-log-item__action {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.4;
}

.audit-log-item__request {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.audit-log-item__method {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid var(--selection-border);
    border-radius: 999px;
    background: #edf5fd;
    color: #0d5b9f;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.audit-log-item__path {
    display: inline-block;
    padding: 6px 10px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: #f8fafc;
    color: #334155;
    font-size: 12px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.audit-log-item__details {
    padding-top: 12px;
    border-top: 1px dashed var(--border);
}

.audit-log-item__summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    list-style: none;
    color: var(--accent-hover);
    font-weight: 600;
}

.audit-log-item__summary::-webkit-details-marker {
    display: none;
}

.audit-log-item__summary::before {
    content: "+";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border: 1px solid var(--selection-border);
    border-radius: 999px;
    background: #edf5fd;
    color: var(--accent);
    font-size: 12px;
    line-height: 1;
}

.audit-log-item__details[open] .audit-log-item__summary::before {
    content: "-";
}

.audit-log-item__detail {
    margin: 12px 0 0;
    padding: 12px 14px;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    background: #fbfcfe;
    color: #425466;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 12px;
    line-height: 1.6;
    overflow: auto;
    font-family: Consolas, "SFMono-Regular", Menlo, Monaco, monospace;
}

.audit-summary {
    margin-bottom: 16px;
}

.audit-filter-form {
    grid-template-columns: minmax(220px, 1.5fr) minmax(160px, 1fr) minmax(260px, 1.7fr) auto;
}

.audit-filter-form__actions {
    align-self: end;
}

.audit-status-chip--warn {
    background: #fff4eb;
    border-color: #f1c5a6;
    color: #a14b13;
}

.audit-log-empty {
    padding: 28px 22px;
    border: 1px dashed var(--border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.72);
    text-align: center;
}

@media (max-width: 920px) {
    .audit-filter-form {
        grid-template-columns: 1fr;
    }

    .audit-filter-form__actions {
        justify-content: flex-start;
    }

    .audit-log-item__head {
        grid-template-columns: 1fr;
    }

    .audit-log-item__badges {
        justify-content: flex-start;
    }

    .audit-log-item__request {
        align-items: flex-start;
    }

    .audit-log-item__path {
        width: 100%;
    }
}

/* Engineering workstation refresh */
:root {
    --bg: #eef2f6;
    --panel: #ffffff;
    --panel-alt: #f8fafc;
    --panel-soft: #f2f6fa;
    --border: #cfd8e3;
    --border-soft: #e4eaf1;
    --text: #16212f;
    --muted: #5b697a;
    --accent: #0f5e9c;
    --accent-hover: #0a4d82;
    --accent-press: #073b63;
    --selection: #e6f1fb;
    --selection-border: #8bb8dd;
    --ok: #1f7a3d;
    --warn: #b75c12;
    --warn-bg: #fff6ed;
    --warn-line: #d06a16;
    --radius: 8px;
    --shadow: 0 8px 24px rgba(25, 49, 75, 0.08);
    --shadow-strong: 0 18px 42px rgba(16, 35, 56, 0.18);
}

body {
    background:
        radial-gradient(circle at 18% -10%, rgba(15, 94, 156, 0.12), transparent 34%),
        linear-gradient(180deg, #f7f9fc 0%, #eef2f6 48%, #e9eef4 100%);
    color: var(--text);
    font-family: "Microsoft YaHei UI", "Microsoft YaHei", "HarmonyOS Sans SC", "Segoe UI", sans-serif;
}

.shell {
    max-width: 1500px;
}

.topbar {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
    border-bottom-color: rgba(155, 174, 197, 0.58);
    box-shadow: 0 10px 30px rgba(19, 43, 68, 0.06);
}

.topbar__frame {
    max-width: 1500px;
    padding-top: 12px;
    padding-bottom: 12px;
}

.topbar__nav a {
    border-radius: 10px;
}

.topbar__nav a:hover,
.topbar__nav a:focus-visible {
    background: #eef5fb;
    border-color: #c6d9eb;
    color: #123b5d;
}

/* V3.2: active 状态 — 必须在 V1.1 主题覆盖之后才能赢过 hover 色 */
.topbar__nav a.topbar__nav--active {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1d4ed8;
    font-weight: 600;
    box-shadow: 0 1px 0 rgba(29, 78, 216, 0.08);
}
.topbar__nav a.topbar__nav--active:hover,
.topbar__nav a.topbar__nav--active:focus-visible {
    background: #bfdbfe;
    border-color: #60a5fa;
    color: #1d4ed8;
}

.panel,
.entry-card,
.modal__dialog,
.section-toggle,
.dataset-disclosure,
.account-disclosure {
    border-color: rgba(180, 195, 214, 0.88);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.page-head--bare {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    padding: 18px 20px;
    border: 1px solid rgba(180, 195, 214, 0.88);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(245, 249, 253, 0.96)),
        linear-gradient(90deg, rgba(15, 94, 156, 0.06), transparent);
}

.page-head--bare h1 {
    color: #122c43;
    font-weight: 700;
}

.page-head__desc {
    max-width: 920px;
}

.head-actions {
    justify-content: flex-end;
    align-items: center;
}

.button {
    border-radius: 8px;
    transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease, border-color 0.14s ease;
}

.button:hover,
.button:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(15, 94, 156, 0.11);
}

.button--primary {
    background: linear-gradient(180deg, #1272b9 0%, #0f5e9c 100%);
    border-color: #0f5e9c;
}

.button--danger {
    border-color: #d49a8d;
}

input,
select,
textarea {
    border-radius: 8px;
    border-color: #cbd6e2;
    background: #ffffff;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid rgba(15, 94, 156, 0.18);
    border-color: #7fb0d8;
}

.ops-ribbon {
    display: grid;
    grid-template-columns: minmax(260px, 1.25fr) minmax(380px, 2fr) auto;
    gap: 16px;
    align-items: center;
    margin-bottom: 12px;
    padding: 16px 18px;
    background:
        linear-gradient(90deg, rgba(14, 69, 112, 0.06), rgba(255, 255, 255, 0.96) 38%),
        #ffffff;
}

.ops-ribbon__lead {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.ops-ribbon__eyebrow,
.design-hero__eyebrow {
    color: #6f7f91;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.ops-ribbon__lead strong {
    color: #102d45;
    font-size: 24px;
    line-height: 1.2;
}

.ops-ribbon__lead span:last-child {
    color: var(--muted);
    line-height: 1.5;
}

.ops-ribbon__metrics {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.ops-metric {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid #d8e2ec;
    border-radius: 999px;
    background: #f7fafc;
    color: #526273;
    font-size: 12px;
    font-weight: 700;
}

.ops-metric b {
    color: #17324d;
    font-size: 16px;
}

.ops-metric--ok {
    border-color: #bddfc8;
    background: #edf8f0;
    color: #1f7a3d;
}

.ops-metric--warn {
    border-color: #efd0ad;
    background: #fff6ed;
    color: #a95712;
}

.ops-ribbon__actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
}

.notebook--compact {
    border-radius: 10px;
}

.notebook--compact .notebook__tabs {
    position: sticky;
    top: 73px;
    z-index: 16;
    padding: 10px 12px 0;
    border-bottom: 1px solid #dbe4ee;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
}

.notebook--compact .notebook__tab {
    min-height: 42px;
    border-radius: 10px 10px 0 0;
    border-color: #d8e2ec;
    background: #f1f5f9;
    color: #516274;
}

.notebook--compact .notebook__tab.is-active {
    background: #ffffff;
    color: #0f5e9c;
    border-top: 3px solid #0f5e9c;
}

.analysis-card {
    padding: 16px !important;
    border: 1px solid #d8e2ec !important;
    border-radius: 10px;
    background: linear-gradient(180deg, #ffffff, #f8fbfe) !important;
}

.analysis-card__head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 10px;
}

.analysis-card .compact-note {
    margin-bottom: 10px;
}

.analysis-form--compact {
    display: grid;
    grid-template-columns: minmax(280px, 1.5fr) 170px repeat(3, auto);
    gap: 12px;
    align-items: end;
    margin-top: 12px;
}

.analysis-form__field {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.analysis-form__field span,
.design-model-form__field span,
.page-strip__field span {
    color: #536678;
    font-size: 12px;
    font-weight: 700;
}

.status-pill {
    border-radius: 999px;
    font-weight: 700;
}

.status-pill.is-ok {
    background: #eaf7ee;
}

.status-pill.is-warn {
    background: #fff2e6;
}

.table-wrap {
    border-radius: 10px;
    border-color: #d7e1eb;
}

table {
    border-collapse: separate;
    border-spacing: 0;
}

thead th {
    top: 0;
    background: #edf3f8;
    color: #263b50;
    font-size: 12px;
    letter-spacing: 0.02em;
}

th,
td {
    border-bottom-color: #e7edf3;
}

tbody tr:hover {
    background: #eef6fd;
}

.recommend-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.recommend-card {
    position: relative;
    border-radius: 10px;
    background: linear-gradient(180deg, #ffffff, #f8fbfe);
    overflow: hidden;
}

.recommend-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: #0f5e9c;
}

.recommend-card strong {
    color: #43576b;
    font-size: 12px;
}

.recommend-card span {
    color: #102d45;
    font-size: 17px;
}

.summary-box {
    border-radius: 10px;
    border-left-width: 5px;
    background: #f8fbfe;
    line-height: 1.72;
}

.design-hero {
    background:
        linear-gradient(135deg, rgba(9, 55, 91, 0.96), rgba(15, 94, 156, 0.9)),
        #0f5e9c;
    color: #ffffff;
    overflow: hidden;
}

.design-hero h1,
.design-hero .design-hero__eyebrow,
.design-hero .design-hero__meta {
    color: #ffffff;
}

.design-hero__meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.design-hero__meta span {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    font-size: 12px;
    font-weight: 700;
}

.design-hero .button {
    border-color: rgba(255, 255, 255, 0.38);
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.design-hero .button--primary {
    background: #ffffff;
    color: #0f5e9c;
}

.model-control-panel {
    background: linear-gradient(180deg, #ffffff, #f8fbfe);
}

.design-model-form {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) 170px auto;
    align-items: end;
}

.swimlane-controls {
    gap: 14px;
}

.swimlane-controls__bar,
.swimlane-controls__selector,
.swimlane-controls__inspector,
.swimlane-controls__stage {
    border-radius: 10px;
}

.swimlane-controls__zoom,
.swimlane-controls__search,
.swimlane-controls__selector {
    border-color: #d7e1eb;
    border-radius: 10px;
    background: #f8fbfe;
}

.swimlane-selector__preset,
.swimlane-selector__track {
    border-radius: 999px;
}

.swimlane-selector__preset.is-active,
.swimlane-selector__track.is-active {
    background: #e5f1fb;
    box-shadow: inset 0 0 0 1px rgba(15, 94, 156, 0.18);
}

.swimlane-controls__inspector {
    grid-template-columns: repeat(4, minmax(210px, 1fr));
}

.swimlane-readout {
    position: relative;
    border-color: #d7e1eb;
    border-radius: 10px;
    background: #ffffff;
    overflow: hidden;
}

.swimlane-readout::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: #0f5e9c;
}

.swimlane-readout__value {
    color: #102d45;
}

.swimlane-controls__stage {
    border-color: #d7e1eb;
    overflow: hidden;
}

.swimlane-legend {
    padding: 12px 14px;
    border-bottom: 1px solid #dbe4ee;
    background: #f8fbfe;
}

.swimlane-controls__grid {
    padding: 12px;
}

.swimlane-row__title {
    border-radius: 8px 8px 0 0;
}

.swimlane-row__scroll {
    max-height: 34vh;
    border-radius: 0 0 8px 8px;
}

.swimlane-track {
    border-color: #dbe4ee;
    border-radius: 8px;
    overflow: hidden;
}

.swimlane-track__head {
    background: #fbfdff;
}

.swimlane-interval-block {
    border-radius: 6px;
}

.section-toggle > summary,
.dataset-disclosure__summary,
.account-disclosure__summary {
    background: #f8fbfe;
    color: #17324d;
}

@media (max-width: 1280px) {
    .ops-ribbon,
    .analysis-form--compact,
    .design-model-form {
        grid-template-columns: 1fr;
    }

    .ops-ribbon__actions {
        justify-content: flex-start;
    }

    .swimlane-controls__inspector {
        grid-template-columns: repeat(2, minmax(220px, 1fr));
    }

    .recommend-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 920px) {
    .page-head--bare,
    .ops-ribbon {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .notebook--compact .notebook__tabs {
        top: 0;
    }

    .swimlane-controls__inspector,
    .recommend-grid {
        grid-template-columns: 1fr;
    }
}

.secure-placeholder {
    margin-top: 12px;
    padding: 12px 14px;
    border: 1px solid var(--selection-border);
    border-left: 4px solid var(--accent);
    border-radius: 2px;
    background: #f3f8fd;
    color: var(--muted);
    line-height: 1.7;
}

.hint-list {
    display: grid;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}

.ok {
    color: var(--ok);
}

.warn {
    color: var(--warn);
}

.empty,
.empty-cell,
.empty-inline {
    color: var(--muted);
}

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

.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.32);
    z-index: 100;
}

.modal.is-open {
    display: flex;
}

.modal__dialog {
    width: min(1080px, 100%);
    max-height: 92vh;
    overflow: auto;
    box-shadow: var(--shadow-strong);
}

.modal__dialog--form {
    width: min(980px, 100%);
}

.modal__head,
.modal__foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
    background: #ffffff;
}

.modal__foot {
    border-top: 1px solid var(--border);
    border-bottom: 0;
    background: var(--panel-soft);
}

.modal__body {
    padding: 18px;
    background: #ffffff;
}

.modal__close {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    border-radius: 2px;
    background: #ffffff;
    color: var(--muted);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.mapping-grid {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}

.mapping-row {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(280px, 1fr);
    gap: 12px;
    align-items: center;
}

/* 没认出来的列标一下 —— 一长串下拉框里，光靠「不导入」这三个字看不出来 */
.mapping-row--unmatched {
    background: #fdf6e7;
    border-left: 3px solid #d9902b;
    padding: 4px 0 4px 9px;
    margin-left: -12px;
    border-radius: 0 3px 3px 0;
}

.import-note--warn {
    color: #b4791f;
    font-weight: 600;
}

@media (max-width: 1280px) {
    .home-layout,
    .workspace,
    .workspace--design,
    .dataset-grid,
    .panel-grid--two,
    .entry-grid {
        grid-template-columns: 1fr;
    }

    .workspace__sidebar {
        position: static;
    }
}

@media (max-width: 920px) {
    .shell {
        padding: 14px 16px 24px;
    }

    .topbar__frame {
        grid-template-columns: 1fr;
        justify-items: start;
        padding: 12px 16px;
    }

    .topbar__nav {
        flex-wrap: wrap;
    }

    .notebook__tabs {
        overflow: auto;
        white-space: nowrap;
    }

    .form-grid,
    .kv-grid,
    .mini-metrics,
    .summary-strip,
    .recommend-grid {
        grid-template-columns: 1fr;
    }

    .form-span-2 {
        grid-column: span 1;
    }

    .page-head,
    .dataset-head,
    .latest-run {
        flex-direction: column;
    }
}

/* Simplified workstation layout */
.topbar {
    box-shadow: none;
}

.topbar__frame {
    max-width: 1280px;
    grid-template-columns: auto 1fr;
    gap: 12px;
    padding: 10px 20px;
}

.topbar__brand {
    gap: 10px;
}

.topbar__frame--single {
    grid-template-columns: 1fr;
}

.brand-badge {
    width: 28px;
    height: 28px;
}

.brand-title {
    font-size: 20px;
}

.topbar__nav {
    justify-content: flex-end;
}

.topbar__nav a {
    min-height: 32px;
    padding: 0 12px;
    font-size: 13px;
}

.shell {
    max-width: 1280px;
    padding: 16px 20px 24px;
}

.workspace--single {
    grid-template-columns: 1fr;
}

.workspace__main--full {
    min-width: 0;
}

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

.section-block {
    padding: 14px;
}

.section-toggle {
    border: 1px solid var(--border);
    border-radius: 2px;
    background: #ffffff;
    overflow: hidden;
}

.section-toggle > summary {
    padding: 12px 14px;
    background: #fafafa;
    cursor: pointer;
    font-weight: 600;
    list-style: none;
}

.section-toggle > summary::-webkit-details-marker {
    display: none;
}

.section-body {
    padding: 12px 14px 14px;
}

.page-head--bare {
    padding: 14px 16px;
    box-shadow: none;
}

.page-head--bare h1,
.page-head--compact h1,
.home-main--simple h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.2;
}

.home-main--simple {
    padding: 0;
}

.entry-grid--compact {
    margin: 0;
    padding: 0 16px 16px;
    gap: 12px;
}

.entry-card--simple {
    min-height: 132px;
    padding: 16px;
    gap: 10px;
    justify-content: space-between;
    box-shadow: none;
}

.entry-card--simple h2 {
    font-size: 22px;
}

.entry-card--simple span {
    font-size: 13px;
}

.notebook--compact {
    padding: 0;
    overflow: hidden;
    box-shadow: none;
}

.notebook--compact .notebook__tabs {
    margin: 0;
    padding: 0 12px;
    background: #ffffff;
}

.notebook--compact .notebook__tab {
    min-height: 38px;
    padding: 0 14px;
    background: #f2f2f2;
}

.notebook--compact .notebook__body {
    padding: 12px;
}

.notebook--compact .simple-panel {
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
}

.notebook--compact .simple-panel::before {
    display: none;
}

.disclosure-stack {
    display: grid;
    gap: 10px;
}

.dataset-disclosure {
    border: 1px solid var(--border);
    border-radius: 2px;
    background: #ffffff;
    overflow: hidden;
}

.account-disclosure {
    margin-bottom: 12px;
    overflow: hidden;
}

.account-disclosure__summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #fafafa;
    cursor: pointer;
    list-style: none;
}

.account-disclosure__summary::-webkit-details-marker {
    display: none;
}

.account-disclosure__summary span {
    color: var(--muted);
    font-size: 13px;
}

.account-disclosure__body {
    padding: 12px 14px 14px;
    display: grid;
    gap: 12px;
}

.form-grid--password {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dataset-disclosure__summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #fafafa;
    cursor: pointer;
    list-style: none;
}

.dataset-disclosure__summary::-webkit-details-marker {
    display: none;
}

.dataset-disclosure__body {
    padding: 12px 14px 14px;
    display: grid;
    gap: 12px;
}

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

.compact-panel--minimal {
    padding: 16px;
}

.import-history-panel {
    margin-bottom: 12px;
}

.history-list {
    display: grid;
    gap: 10px;
}

.history-item {
    border: 1px solid var(--border);
    background: #fafafa;
    padding: 12px;
    display: grid;
    gap: 10px;
}

.history-item__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
    font-size: 12px;
}

.history-item__name {
    font-weight: 600;
    word-break: break-all;
}

.history-item__form,
.history-item__delete {
    display: grid;
    gap: 8px;
}

.history-item__delete {
    margin: 0;
}

.dataset-toolbar--summary {
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.table-action-cell {
    white-space: nowrap;
}

.table-action-cell .row-actions {
    flex-wrap: nowrap;
}

.table-action-cell form {
    margin: 0;
}

.compact-status {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.compact-status--wrap {
    margin-bottom: 10px;
}

.status-pill {
    min-height: 28px;
    border-radius: 2px;
    border-color: var(--border);
    background: #f6f6f6;
    color: var(--muted);
}

.status-pill.is-ok {
    border-color: #b7dfb6;
    background: #eef9ee;
    color: #0d6f0d;
}

.status-pill.is-warn {
    border-color: #f1c5a6;
    background: #fff5ed;
    color: #a14b13;
}

.compact-note {
    margin: -2px 0 12px;
    color: var(--muted);
    line-height: 1.6;
}

.field-flag {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    padding: 0 6px;
    min-height: 18px;
    border: 1px solid var(--border);
    border-radius: 2px;
    background: #f6f6f6;
    color: var(--muted);
    font-size: 11px;
    font-style: normal;
    font-weight: 600;
    vertical-align: middle;
}

.field-flag--required {
    border-color: #f1c5a6;
    background: #fff5ed;
    color: #a14b13;
}

.analysis-form--compact {
    align-items: flex-end;
}

.analysis-form__field {
    min-width: 190px;
}

.analysis-form__field input {
    width: 100%;
}

.table-wrap {
    margin-top: 10px;
}

.table-wrap table {
    min-width: 100%;
}

.recommend-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.recommend-card {
    min-height: 78px;
}

.summary-box {
    margin-top: 0;
}

.secure-placeholder {
    margin-top: 0;
}

@media (max-width: 920px) {
    .topbar__frame {
        grid-template-columns: 1fr;
        padding: 10px 16px;
    }

    .topbar__nav {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .shell {
        padding: 14px 16px 24px;
    }

    .entry-grid--compact,
    .recommend-grid,
    .form-grid,
    .dataset-upload-grid {
        grid-template-columns: 1fr;
    }

    .form-span-2 {
        grid-column: span 1;
    }

    .dataset-disclosure__summary {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-grid--password {
        grid-template-columns: 1fr;
    }

    .location-helper__map {
        min-height: 200px;
    }

    .dataset-toolbar--summary,
    .table-action-cell .row-actions {
        flex-wrap: wrap;
    }
}

/* Brand, login and admin */
.topbar {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(243, 248, 255, 0.96));
    border-bottom: 1px solid #d7e1f0;
}

.topbar__frame {
    max-width: 1320px;
    grid-template-columns: auto 1fr auto;
    gap: 16px;
}

.topbar__brand {
    gap: 16px;
}

.brand-badge--logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 136px;
    height: 48px;
    padding: 8px 12px;
    border: 1px solid rgba(191, 209, 236, 0.92);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 26px rgba(18, 51, 114, 0.08);
}

.brand-logo {
    width: 100%;
    max-height: 26px;
    object-fit: contain;
    display: block;
}

.brand-copy {
    display: grid;
    gap: 3px;
}

.brand-kicker {
    color: #6980a5;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.brand-title {
    color: #183b8c;
    font-size: 22px;
    font-weight: 600;
}

.topbar__nav {
    justify-content: center;
}

.topbar__nav a {
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    color: #2d4260;
}

.topbar__meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-chip {
    display: grid;
    gap: 2px;
    padding: 8px 12px;
    border: 1px solid rgba(191, 209, 236, 0.92);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.92);
    color: #2d4260;
}

.user-chip strong {
    font-size: 13px;
}

.user-chip span {
    font-size: 12px;
    color: #6980a5;
}

.page-strip {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: end;
    padding: 14px 16px;
    margin-bottom: 12px;
}

.page-strip__title {
    font-size: 16px;
    font-weight: 600;
}

.page-strip__form {
    display: flex;
    gap: 10px;
    align-items: end;
    flex-wrap: wrap;
}

.page-strip__field {
    min-width: 320px;
}

.login-shell {
    min-height: calc(100vh - 180px);
    display: grid;
    place-items: center;
}

.login-card {
    width: min(440px, 100%);
    padding: 28px 24px;
    border-radius: 18px;
    box-shadow: 0 18px 48px rgba(26, 67, 150, 0.1);
}

.login-head {
    display: grid;
    gap: 6px;
    margin-bottom: 18px;
}

.login-head h1 {
    margin: 0;
    color: #183b8c;
    font-size: 28px;
}

.login-head p {
    margin: 0;
    color: var(--muted);
}

.login-kicker {
    color: #6980a5;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.captcha-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.captcha-prompt {
    flex: 1 1 auto;
    min-height: 36px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    border: 1px dashed #9cc9f5;
    border-radius: 2px;
    background: #eff6fc;
    color: #106ebe;
    font-weight: 700;
}

.captcha-refresh {
    flex: 0 0 auto;
    white-space: nowrap;
}

.captcha-note {
    min-height: 18px;
    color: var(--warn-line);
    font-size: 12px;
    line-height: 1.5;
}

.button--full {
    width: 100%;
}

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

.admin-card {
    padding: 16px;
}

.admin-user-list {
    display: grid;
    gap: 12px;
}

.admin-user-row {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fafcff;
}

.admin-user-row--collapsible {
    padding: 0;
    overflow: hidden;
}

.admin-user-row--collapsible > .admin-user-summary {
    padding: 14px 16px;
}

.admin-user-row--collapsible[open] > .admin-user-summary {
    border-bottom: 1px solid var(--border-soft);
    background: #f4f8fc;
}

.admin-user-summary {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    list-style: none;
}

.admin-user-summary::-webkit-details-marker {
    display: none;
}

.admin-user-summary__chevron {
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(-45deg);
    transition: transform 0.18s ease;
    flex-shrink: 0;
}

.admin-user-row--collapsible[open] .admin-user-summary__chevron {
    transform: rotate(45deg);
}

.admin-user-summary__main {
    flex: 1;
    min-width: 0;
}

.admin-user-summary__state {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.admin-user-body {
    display: grid;
    gap: 12px;
    padding: 14px 16px 16px;
}

.admin-user-meta--detail {
    margin-top: 0;
    font-size: 12px;
}

.admin-user-time--hide-narrow {
    display: inline;
}

@media (max-width: 720px) {
    .admin-user-time--hide-narrow {
        display: none;
    }

    .admin-user-summary {
        flex-wrap: wrap;
    }

    .admin-user-summary__state {
        justify-content: flex-start;
        width: 100%;
    }
}

.admin-user-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px 14px;
}

.admin-user-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.admin-summary {
    display: grid;
    gap: 14px;
    margin-bottom: 16px;
}

.admin-summary__chips {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-filter-form {
    display: grid;
    grid-template-columns: minmax(260px, 2fr) minmax(180px, 1fr) minmax(180px, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.status-chip--ok {
    background: #eef8ef;
    border-color: #b6d8bc;
    color: #237244;
}

.status-chip--muted {
    background: #f5f7fa;
    border-color: #d7dde5;
    color: #62748a;
}

.admin-user-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.admin-user-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
}

.admin-user-meta {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

.admin-user-state {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
}

.admin-user-time {
    color: var(--muted);
    font-size: 12px;
}

.admin-row-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
    border-top: 1px dashed var(--border);
    padding-top: 10px;
}

.checkbox-field {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
}

.checkbox-field input {
    width: 16px;
    min-height: 16px;
    margin: 0;
}

@media (max-width: 920px) {
    .topbar__meta {
        flex-wrap: wrap;
    }

    .brand-badge--logo {
        width: 120px;
        height: 44px;
    }

    .page-strip {
        flex-direction: column;
        align-items: stretch;
    }

    .page-strip__field,
    .admin-user-grid {
        grid-template-columns: 1fr;
        min-width: 0;
    }

    .admin-filter-form {
        grid-template-columns: 1fr;
    }

    .admin-row-actions,
    .admin-user-state {
        justify-content: flex-start;
    }
}

/* Codex UI polish 2026-05-05: keep the existing enterprise style, add clearer hierarchy. */
body {
    background:
        radial-gradient(circle at 14% 0%, rgba(0, 120, 215, 0.11), transparent 31%),
        linear-gradient(180deg, #f7fbff 0%, #eef4f9 46%, #f3f3f3 100%);
}

.topbar {
    background: rgba(255, 255, 255, 0.95);
    border-bottom-color: #c8d8e8;
    box-shadow: 0 8px 24px rgba(16, 45, 75, 0.06);
    backdrop-filter: blur(12px);
}

.panel,
.entry-card,
.modal__dialog {
    border-color: #ccd8e4;
    box-shadow: 0 10px 26px rgba(16, 45, 75, 0.055), 0 1px 2px rgba(16, 45, 75, 0.05);
}

.page-head--bare,
.page-strip,
.account-disclosure,
.notebook--compact,
.simple-panel,
.section-block {
    border-radius: 12px;
}

.page-head--bare {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(247, 251, 255, 0.98) 56%, rgba(235, 245, 253, 0.92)),
        #ffffff;
    border-color: #c7d7e7;
}

.page-head--bare h1,
.ops-ribbon__lead strong,
.panel__title,
.sidebar-title {
    color: #0d2f4f;
}

.status-pill,
.ops-metric,
.pill,
.status-chip {
    box-shadow: inset 0 0 0 1px rgba(15, 94, 156, 0.06);
}

.page-strip {
    background: linear-gradient(90deg, #ffffff 0%, #f7fbff 100%);
}

.notebook--compact {
    overflow: hidden;
}

.notebook--compact .notebook__tabs {
    border-bottom-color: #cbd9e8;
}

.notebook--compact .notebook__tab {
    transition: background 120ms ease, border-color 120ms ease, color 120ms ease, transform 120ms ease;
}

.notebook--compact .notebook__tab:hover {
    transform: translateY(-1px);
    border-color: #b9d2ea;
    background: #eef6fd;
    color: #17324d;
}

.button {
    transition: background 120ms ease, border-color 120ms ease, color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.button:hover,
.button:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(16, 45, 75, 0.08);
}

.button--primary {
    box-shadow: 0 6px 14px rgba(0, 120, 215, 0.18);
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    box-shadow: 0 0 0 3px rgba(0, 120, 215, 0.12);
}

.table-wrap,
.location-helper,
.recommend-card,
.swimlane-readout,
.history-item,
.dataset-disclosure {
    border-color: #d3dfeb;
}

.table-wrap {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

tbody tr:hover {
    background: #edf6fd;
}

.login-card.panel {
    border-radius: 16px;
    box-shadow: 0 22px 56px rgba(16, 45, 75, 0.12), 0 2px 6px rgba(16, 45, 75, 0.06);
}

.login-head h1 {
    color: #0d3a66;
}

.file-field,
.secure-placeholder,
.summary-box {
    border-radius: 10px;
}

@media (max-width: 920px) {
    .shell {
        padding: 14px 12px 22px;
    }

    .topbar {
        backdrop-filter: none;
    }

    .page-head--bare,
    .page-strip,
    .account-disclosure,
    .notebook--compact,
    .simple-panel,
    .section-block {
        border-radius: 10px;
    }
}

/* ----- Password strength meter ----- */
.password-strength {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 6px;
    font-size: 12px;
}

.password-strength__bar {
    width: 100%;
    height: 5px;
    background: #ececec;
    border-radius: 3px;
    overflow: hidden;
}

.password-strength__fill {
    height: 100%;
    width: 0%;
    background: #c5221f;
    border-radius: 3px;
    transition: width 0.18s ease, background 0.18s ease;
}

.password-strength--level-1 .password-strength__fill {
    width: 25%;
    background: #c5221f;
}

.password-strength--level-2 .password-strength__fill {
    width: 50%;
    background: #d83b01;
}

.password-strength--level-3 .password-strength__fill {
    width: 75%;
    background: #c19c00;
}

.password-strength--level-4 .password-strength__fill {
    width: 100%;
    background: var(--ok);
}

.password-strength__label {
    color: var(--muted);
}

.password-strength--level-1 .password-strength__label,
.password-strength--level-2 .password-strength__label {
    color: var(--warn);
}

.password-strength--level-3 .password-strength__label {
    color: #8a6d00;
}

.password-strength--level-4 .password-strength__label {
    color: var(--ok);
}

.password-confirm-feedback {
    margin-top: 4px;
    font-size: 12px;
    min-height: 16px;
}

.password-confirm-feedback--mismatch {
    color: var(--warn);
}

.password-confirm-feedback--match {
    color: var(--ok);
}

/* ----- Backup status page ----- */
.backup-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    padding: 14px 16px;
}

.backup-status-cell {
    background: #fafcff;
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    padding: 10px 12px;
}

.backup-status-cell__label {
    font-size: 12px;
    color: var(--muted);
    font-weight: 600;
    letter-spacing: 0.03em;
    margin-bottom: 4px;
}

.backup-status-cell__value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.backup-status-cell__value.status-chip--ok {
    color: #237244;
}

.backup-status-cell__value.status-chip--muted {
    color: #62748a;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table th,
.data-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-soft);
    text-align: left;
    vertical-align: middle;
}

.data-table th {
    background: #f5f7fa;
    font-weight: 600;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.04em;
}

.data-table td.num,
.data-table th.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.data-table tr:hover td {
    background: #f9fbff;
}

/* ----- Log-curve viewer ----- */
.log-curve-shell .page-head {
    padding: 18px 20px 14px;
}

.log-curve-controls {
    padding: 14px 16px;
    margin-bottom: 12px;
}

.log-curve-controls__row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 18px;
    align-items: flex-end;
}

.log-curve-controls label > span {
    display: block;
    font-size: 12px;
    color: var(--muted);
    font-weight: 600;
    letter-spacing: 0.03em;
    margin-bottom: 4px;
}

.log-curve-controls input[type="number"] {
    width: 130px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 13px;
}

.log-curve-toggle-row {
    display: flex !important;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-top: 2px;
}

.log-curve-toggle {
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
    margin: 0 !important;
    font-size: 12px;
    color: var(--text);
    font-weight: 500 !important;
}

.log-curve-toggle input {
    margin: 0 4px 0 0;
}

.log-curve-controls__actions {
    margin-left: auto;
}

.log-curve-meta {
    margin-top: 12px;
    padding: 8px 12px;
    background: #f4f8fb;
    border: 1px solid var(--border-soft);
    border-radius: 4px;
    font-size: 12px;
    color: var(--muted);
}

.log-curve-tracks {
    padding: 8px;
    margin-bottom: 16px;
}

.log-curve-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--muted);
}

@media (max-width: 720px) {
    .log-curve-controls__row {
        flex-direction: column;
        align-items: stretch;
    }

    .log-curve-controls__actions {
        margin-left: 0;
    }
}

/* ----- Button loading state ----- */
.button.is-loading,
button.is-loading {
    position: relative;
    cursor: progress;
    opacity: 0.85;
    pointer-events: none;
    padding-right: 32px !important;
}

.button.is-loading::after,
button.is-loading::after {
    content: "";
    position: absolute;
    right: 12px;
    top: 50%;
    width: 14px;
    height: 14px;
    margin-top: -7px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: rgba(255, 255, 255, 0.95);
    animation: btn-spin 0.7s linear infinite;
}

.button--ghost.is-loading::after,
.button.button--ghost.is-loading::after {
    border-color: rgba(0, 0, 0, 0.2);
    border-top-color: var(--accent);
}

@keyframes btn-spin {
    to { transform: rotate(360deg); }
}

/* ----- Well picker + recent chips ----- */
[data-well-picker] #well-search-input {
    min-width: 320px;
    width: 100%;
    max-width: 520px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
}

[data-well-picker] #well-search-input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -1px;
    border-color: var(--accent);
}

.well-recent-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.well-recent-bar__label {
    font-size: 12px;
    color: var(--muted);
    font-weight: 600;
    letter-spacing: 0.04em;
}

.well-recent-bar__chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.well-recent-chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    color: var(--text);
    font-size: 13px;
    text-decoration: none;
    transition: background 0.12s ease, border-color 0.12s ease;
}

.well-recent-chip:hover,
.well-recent-chip:focus-visible {
    background: var(--selection);
    border-color: var(--selection-border);
    color: var(--accent-press);
}

/* ----- Confirm modal ----- */
.confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 23, 42, 0.42);
}

.confirm-modal[data-confirm-modal-open] {
    display: flex;
}

.confirm-modal__dialog {
    width: 100%;
    max-width: 440px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: var(--shadow-strong);
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.confirm-modal__title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.confirm-modal__message {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
    margin: 0;
}

.confirm-modal__token-display {
    display: inline-block;
    padding: 1px 8px;
    margin-left: 4px;
    background: #f5f7fa;
    border: 1px solid var(--border);
    border-radius: 3px;
    font-family: "Consolas", "Source Han Mono SC", monospace;
    font-size: 13px;
    color: var(--text);
}

.confirm-modal__input {
    width: 100%;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
}

.confirm-modal__input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -1px;
    border-color: var(--accent);
}

.confirm-modal__error {
    min-height: 18px;
    color: var(--warn);
    font-size: 12px;
}

.confirm-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 4px;
}

body.confirm-modal-open {
    overflow: hidden;
}

/* ----- Mobile hamburger menu ----- */
.topbar__menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    margin-left: auto;
    padding: 0;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.topbar__menu-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.topbar__menu-icon,
.topbar__menu-icon::before,
.topbar__menu-icon::after {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.18s ease, opacity 0.18s ease, top 0.18s ease;
}

.topbar__menu-icon {
    position: relative;
}

.topbar__menu-icon::before,
.topbar__menu-icon::after {
    content: "";
    position: absolute;
    left: 0;
}

.topbar__menu-icon::before {
    top: -6px;
}

.topbar__menu-icon::after {
    top: 6px;
}

.topbar__menu-toggle[aria-expanded="true"] .topbar__menu-icon {
    background: transparent;
}

.topbar__menu-toggle[aria-expanded="true"] .topbar__menu-icon::before {
    top: 0;
    transform: rotate(45deg);
}

.topbar__menu-toggle[aria-expanded="true"] .topbar__menu-icon::after {
    top: 0;
    transform: rotate(-45deg);
}

.topbar__mobile-panel {
    display: none;
    border-top: 1px solid var(--border);
    background: var(--panel);
    padding: 12px 16px 16px;
}

.topbar__mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.topbar__mobile-nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 4px;
    color: var(--text);
    font-weight: 500;
}

.topbar__mobile-nav a:hover,
.topbar__mobile-nav a:focus-visible {
    background: var(--panel-soft);
}

.topbar__mobile-meta {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-soft);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.user-chip--block {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.button--full {
    width: 100%;
    justify-content: center;
}

@media (max-width: 720px) {
    .topbar__frame {
        grid-template-columns: 1fr auto;
        padding: 10px 14px;
        gap: 10px;
    }

    .topbar__menu-toggle {
        display: inline-flex;
    }

    .topbar__nav,
    .topbar__meta {
        display: none;
    }

    .brand-title {
        font-size: 18px;
    }

    .brand-kicker {
        display: none;
    }

    .topbar__mobile-panel:not([hidden]) {
        display: block;
    }
}

/* =====================================================================
   V2.1.1 视觉升级层 (2026-05-18)
   ---------------------------------------------------------------------
   这一层不重写既有规则，只覆盖关键 selector 引入：
   - 现代色板（深蓝/钴蓝/中性灰，提高对比度）
   - 字体堆栈（PingFang / HarmonyOS Sans / Inter）
   - 8 档间距 / 5 档阴影 / 3 档圆角 阶梯
   - 按钮 / 卡片 / 输入框 / 表格 polish
   - SVG 图标系统（svg-icon class，配合 templates/_icons.html macro）
   - 空状态、加载、横幅、徽章等通用组件
   ===================================================================== */
:root {
    /* ----- Color tokens ----- */
    --xt-color-bg: #f7f8fa;
    --xt-color-bg-elevated: #ffffff;
    --xt-color-bg-soft: #f1f4f8;
    --xt-color-bg-muted: #ebeef3;
    --xt-color-border: #e3e7ee;
    --xt-color-border-strong: #cbd2dc;
    --xt-color-text: #0f172a;
    --xt-color-text-muted: #475569;
    --xt-color-text-subtle: #64748b;

    --xt-color-primary-50: #eff6ff;
    --xt-color-primary-100: #dbeafe;
    --xt-color-primary-200: #bfdbfe;
    --xt-color-primary-500: #3b82f6;
    --xt-color-primary-600: #2563eb;
    --xt-color-primary-700: #1d4ed8;
    --xt-color-primary-800: #1e40af;

    --xt-color-success-100: #dcfce7;
    --xt-color-success-600: #16a34a;
    --xt-color-success-700: #15803d;

    --xt-color-warning-100: #fef3c7;
    --xt-color-warning-600: #d97706;
    --xt-color-warning-700: #b45309;

    --xt-color-danger-100: #fee2e2;
    --xt-color-danger-600: #dc2626;
    --xt-color-danger-700: #b91c1c;

    --xt-color-info-100: #e0f2fe;
    --xt-color-info-600: #0891b2;
    --xt-color-info-700: #0e7490;

    /* ----- Shadow scale ----- */
    --xt-shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
    --xt-shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.06), 0 1px 2px -1px rgba(15, 23, 42, 0.04);
    --xt-shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
    --xt-shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.10), 0 4px 6px -4px rgba(15, 23, 42, 0.05);
    --xt-shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.12), 0 8px 10px -6px rgba(15, 23, 42, 0.06);

    /* ----- Radius scale ----- */
    --xt-radius-sm: 4px;
    --xt-radius-md: 6px;
    --xt-radius-lg: 10px;
    --xt-radius-xl: 14px;
    --xt-radius-pill: 999px;

    /* ----- Spacing scale ----- */
    --xt-space-1: 4px;
    --xt-space-2: 8px;
    --xt-space-3: 12px;
    --xt-space-4: 16px;
    --xt-space-5: 20px;
    --xt-space-6: 24px;
    --xt-space-8: 32px;
    --xt-space-10: 40px;
    --xt-space-12: 48px;

    /* ----- Type ----- */
    --xt-font-sans: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --xt-font-mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, "Source Han Mono SC", monospace;

    /* ----- Override legacy tokens so existing components inherit upgrade ----- */
    --bg: var(--xt-color-bg);
    --panel: var(--xt-color-bg-elevated);
    --panel-alt: var(--xt-color-bg-soft);
    --panel-soft: var(--xt-color-bg-soft);
    --border: var(--xt-color-border);
    --border-soft: var(--xt-color-border);
    --text: var(--xt-color-text);
    --muted: var(--xt-color-text-muted);
    --accent: var(--xt-color-primary-600);
    --accent-hover: var(--xt-color-primary-700);
    --accent-press: var(--xt-color-primary-800);
    --selection: var(--xt-color-primary-100);
    --selection-border: var(--xt-color-primary-200);
    --warn-bg: var(--xt-color-warning-100);
    --warn-line: var(--xt-color-warning-600);
    --ok: var(--xt-color-success-600);
    --warn: var(--xt-color-warning-600);
    --shadow: var(--xt-shadow-sm);
    --shadow-strong: var(--xt-shadow-xl);
    --radius: var(--xt-radius-md);
}

/* ----- Body & typography upgrade ----- */
body {
    font-family: var(--xt-font-sans);
    font-size: 14px;
    line-height: 1.55;
    color: var(--xt-color-text);
    background:
        radial-gradient(circle at 0% 0%, rgba(37, 99, 235, 0.05), transparent 35%),
        radial-gradient(circle at 100% 0%, rgba(14, 116, 144, 0.04), transparent 40%),
        linear-gradient(180deg, #f6f9fd 0%, #f1f4f8 50%, #ecf0f5 100%);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
    color: var(--xt-color-text);
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

code, pre, .num {
    font-family: var(--xt-font-mono);
    font-variant-numeric: tabular-nums;
}

/* ----- Topbar refresh ----- */
.topbar {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px) saturate(120%);
    border-bottom: 1px solid var(--xt-color-border);
    box-shadow: var(--xt-shadow-xs);
}

.topbar__nav a {
    border-radius: var(--xt-radius-md);
    color: var(--xt-color-text-muted);
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease;
}

.topbar__nav a:hover,
.topbar__nav a:focus-visible,
.topbar__nav a.is-active {
    background: var(--xt-color-primary-50);
    border-color: transparent;
    color: var(--xt-color-primary-700);
}

.user-chip {
    padding: 6px 12px;
    background: var(--xt-color-bg-soft);
    border-radius: var(--xt-radius-pill);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--xt-color-text-muted);
}

.user-chip strong {
    color: var(--xt-color-text);
    font-weight: 600;
}

/* ----- Panels (cards) refresh ----- */
.panel,
.entry-card,
.modal__dialog {
    background: var(--xt-color-bg-elevated);
    border: 1px solid var(--xt-color-border);
    border-radius: var(--xt-radius-lg);
    box-shadow: var(--xt-shadow-sm);
}

.panel__title {
    font-size: 13px;
    font-weight: 600;
    color: var(--xt-color-text-subtle);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: var(--xt-space-3) var(--xt-space-4) 0;
    margin-bottom: var(--xt-space-3);
}

.page-head {
    padding: var(--xt-space-5) var(--xt-space-5) var(--xt-space-4);
}

.page-head h1 {
    font-size: 24px;
    font-weight: 600;
}

.page-head__desc {
    color: var(--xt-color-text-muted);
    font-size: 13px;
    margin-top: var(--xt-space-2);
}

/* ----- Buttons refresh ----- */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 36px;
    padding: 0 16px;
    border-radius: var(--xt-radius-md);
    border: 1px solid var(--xt-color-border-strong);
    background: var(--xt-color-bg-elevated);
    color: var(--xt-color-text);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.06s ease, box-shadow 0.15s ease;
    text-decoration: none;
    white-space: nowrap;
}

.button:hover {
    background: var(--xt-color-bg-soft);
    border-color: var(--xt-color-text-subtle);
}

.button:active {
    transform: translateY(0.5px);
}

.button:focus-visible {
    outline: 2px solid var(--xt-color-primary-500);
    outline-offset: 2px;
}

.button--primary {
    background: linear-gradient(180deg, var(--xt-color-primary-600), var(--xt-color-primary-700));
    border-color: var(--xt-color-primary-700);
    color: #fff;
    box-shadow: 0 1px 2px rgba(29, 78, 216, 0.25);
}

.button--primary:hover {
    background: linear-gradient(180deg, var(--xt-color-primary-700), var(--xt-color-primary-800));
    border-color: var(--xt-color-primary-800);
    color: #fff;
}

.button--ghost {
    background: transparent;
    border-color: transparent;
    color: var(--xt-color-text-muted);
}

.button--ghost:hover {
    background: var(--xt-color-bg-soft);
    color: var(--xt-color-text);
}

.button--danger {
    background: linear-gradient(180deg, var(--xt-color-danger-600), var(--xt-color-danger-700));
    border-color: var(--xt-color-danger-700);
    color: #fff;
}

.button--danger:hover {
    background: var(--xt-color-danger-700);
}

.button--small {
    min-height: 28px;
    padding: 0 10px;
    font-size: 12px;
}

/* ----- Inputs refresh ----- */
input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
input[type="tel"],
input[type="search"],
select,
textarea {
    font-family: inherit;
    font-size: 13px;
    color: var(--xt-color-text);
    background: var(--xt-color-bg-elevated);
    border: 1px solid var(--xt-color-border-strong);
    border-radius: var(--xt-radius-md);
    padding: 8px 12px;
    min-height: 36px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: none;
    border-color: var(--xt-color-primary-500);
    box-shadow: 0 0 0 3px var(--xt-color-primary-100);
}

input::placeholder {
    color: #94a3b8;
}

/* ----- Status pills & chips refresh ----- */
.status-pill,
.status-chip,
.pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 22px;
    padding: 2px 10px;
    border-radius: var(--xt-radius-pill);
    background: var(--xt-color-primary-50);
    border: 1px solid var(--xt-color-primary-200);
    color: var(--xt-color-primary-700);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.status-chip--ok {
    background: var(--xt-color-success-100);
    border-color: rgba(22, 163, 74, 0.25);
    color: var(--xt-color-success-700);
}

.status-chip--muted {
    background: var(--xt-color-bg-muted);
    border-color: var(--xt-color-border);
    color: var(--xt-color-text-subtle);
}

.status-chip--warn {
    background: var(--xt-color-warning-100);
    border-color: rgba(217, 119, 6, 0.25);
    color: var(--xt-color-warning-700);
}

.status-chip--danger {
    background: var(--xt-color-danger-100);
    border-color: rgba(220, 38, 38, 0.25);
    color: var(--xt-color-danger-700);
}

/* ----- Flash messages refresh ----- */
.flash,
.warning-box {
    padding: var(--xt-space-3) var(--xt-space-4);
    border-radius: var(--xt-radius-md);
    border: 1px solid var(--xt-color-primary-200);
    background: var(--xt-color-primary-50);
    color: var(--xt-color-primary-800);
    font-size: 13px;
    box-shadow: var(--xt-shadow-xs);
    border-left: 4px solid var(--xt-color-primary-600);
}

.flash--ok {
    background: var(--xt-color-success-100);
    border-color: rgba(22, 163, 74, 0.25);
    border-left-color: var(--xt-color-success-600);
    color: var(--xt-color-success-700);
}

.flash--warn {
    background: var(--xt-color-warning-100);
    border-color: rgba(217, 119, 6, 0.25);
    border-left-color: var(--xt-color-warning-600);
    color: var(--xt-color-warning-700);
}

.flash--error {
    background: var(--xt-color-danger-100);
    border-color: rgba(220, 38, 38, 0.25);
    border-left-color: var(--xt-color-danger-600);
    color: var(--xt-color-danger-700);
}

/* ----- SVG icons ----- */
.svg-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    vertical-align: -3px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.svg-icon--lg { width: 20px; height: 20px; }
.svg-icon--xl { width: 28px; height: 28px; }
.svg-icon--brand { width: 32px; height: 32px; }

.button .svg-icon { margin-right: -2px; }

/* ----- Empty states ----- */
.empty {
    text-align: center;
    padding: var(--xt-space-10) var(--xt-space-6);
    color: var(--xt-color-text-muted);
    font-size: 13px;
}

.empty .svg-icon {
    color: var(--xt-color-border-strong);
    margin-bottom: var(--xt-space-3);
}

.empty__title {
    font-size: 16px;
    color: var(--xt-color-text);
    font-weight: 600;
    margin: var(--xt-space-2) 0;
}

.empty__hint {
    font-size: 13px;
    color: var(--xt-color-text-muted);
    margin-bottom: var(--xt-space-4);
}

/* ----- Index (home) refresh ----- */
.home-shell {
    max-width: 960px;
    margin: 64px auto 0;
    padding: 0 24px;
}

.home-shell h1 {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 12px;
    letter-spacing: -0.02em;
}

.home-shell .panel-copy,
.home-shell p {
    color: var(--xt-color-text-muted);
    font-size: 15px;
}

.home-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--xt-space-4);
    margin-top: var(--xt-space-6);
}

.home-card {
    background: var(--xt-color-bg-elevated);
    border: 1px solid var(--xt-color-border);
    border-radius: var(--xt-radius-xl);
    padding: var(--xt-space-5) var(--xt-space-5) var(--xt-space-4);
    box-shadow: var(--xt-shadow-sm);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: var(--xt-space-2);
}

.home-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--xt-shadow-md);
    border-color: var(--xt-color-primary-200);
}

.home-card__icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--xt-radius-lg);
    background: var(--xt-color-primary-50);
    color: var(--xt-color-primary-700);
}

.home-card__title {
    font-size: 16px;
    font-weight: 600;
    color: var(--xt-color-text);
}

.home-card__desc {
    font-size: 13px;
    color: var(--xt-color-text-muted);
    line-height: 1.5;
}

/* ----- Login refresh ----- */
.login-shell {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--xt-space-6);
}

.login-head__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: var(--xt-radius-lg);
    background: linear-gradient(135deg, var(--xt-color-primary-50), var(--xt-color-primary-100));
    color: var(--xt-color-primary-700);
    margin-bottom: var(--xt-space-3);
    box-shadow: var(--xt-shadow-sm);
}

.captcha-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--xt-space-3);
    margin-bottom: var(--xt-space-2);
}

.captcha-prompt {
    flex: 1;
    padding: 8px 12px;
    background: var(--xt-color-bg-soft);
    border: 1px dashed var(--xt-color-border-strong);
    border-radius: var(--xt-radius-md);
    font-family: var(--xt-font-mono);
    font-size: 14px;
    color: var(--xt-color-text);
    text-align: center;
    letter-spacing: 0.05em;
}

.captcha-note {
    margin-top: var(--xt-space-1);
    font-size: 12px;
    color: var(--xt-color-warning-600);
    min-height: 16px;
}

/* ===== V2.3.1: Business-level "one-click drill bit design" wizard ===== */

/* ----- Featured home card (强调"一键设计")----- */
.home-card--featured {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-color: var(--xt-color-primary-200);
    position: relative;
    overflow: hidden;
}

.home-card--featured::before {
    content: "推荐";
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 2px 10px;
    background: var(--xt-color-primary-600);
    color: #fff;
    border-radius: var(--xt-radius-pill);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.home-card--featured:hover {
    border-color: var(--xt-color-primary-500);
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.home-card__icon--accent {
    background: linear-gradient(135deg, var(--xt-color-primary-600), var(--xt-color-primary-700));
    color: #fff;
    box-shadow: 0 4px 12px rgba(29, 78, 216, 0.3);
}

.home-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    color: var(--xt-color-primary-700);
    font-weight: 600;
    font-size: 13px;
}

/* ----- Top nav accent link ("一键设计")----- */
.topbar__nav .topbar__nav--accent {
    background: var(--xt-color-primary-50);
    color: var(--xt-color-primary-700);
    font-weight: 600;
}

.topbar__nav .topbar__nav--accent:hover {
    background: var(--xt-color-primary-100);
}

/* ----- Wizard upload (V2.3.2) ----- */
.wizard-upload {
    margin-bottom: var(--xt-space-4);
    padding: var(--xt-space-3) var(--xt-space-4) var(--xt-space-4);
    background: linear-gradient(135deg, #eff6ff, #ffffff);
    border-color: var(--xt-color-primary-200);
}

.wizard-upload__form {
    padding: var(--xt-space-2) 0 0;
}

.wizard-upload__grid {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(180px, 1fr) minmax(280px, 2fr);
    gap: var(--xt-space-3) var(--xt-space-4);
    align-items: flex-start;
    margin-bottom: var(--xt-space-3);
}

.wizard-upload__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wizard-upload__field > span {
    font-size: 12px;
    font-weight: 600;
    color: var(--xt-color-text);
    letter-spacing: 0.02em;
}

.wizard-upload__required {
    color: var(--xt-color-danger-600);
    font-style: normal;
    margin-left: 2px;
}

.wizard-upload__field small {
    font-size: 11px;
    color: var(--xt-color-text-subtle);
    line-height: 1.5;
}

.wizard-upload__field strong {
    color: var(--xt-color-primary-700);
    font-weight: 600;
}

.wizard-upload__field input[type="file"] {
    padding: 6px 8px;
    background: var(--xt-color-bg-elevated);
    cursor: pointer;
}

.wizard-upload__actions {
    display: flex;
    justify-content: flex-end;
    padding-top: var(--xt-space-2);
    border-top: 1px solid var(--xt-color-border);
}

@media (max-width: 720px) {
    .wizard-upload__grid {
        grid-template-columns: 1fr;
    }
}

/* ----- Wizard layout ----- */
.design-wizard .wizard-section {
    margin-bottom: var(--xt-space-4);
    padding: var(--xt-space-3) var(--xt-space-4);
}

.wizard-section__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--xt-space-3);
    padding: var(--xt-space-2) 0 var(--xt-space-3);
    border-bottom: 1px solid var(--xt-color-border);
    margin-bottom: var(--xt-space-3);
}

.wizard-section__title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--xt-color-text);
}

.wizard-section__title .svg-icon {
    color: var(--xt-color-primary-600);
}

.wizard-section__hint {
    font-size: 12px;
    color: var(--xt-color-text-subtle);
}

.wizard-well-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--xt-space-3);
}

.wizard-well-card {
    display: flex;
    flex-direction: column;
    gap: var(--xt-space-2);
    padding: var(--xt-space-4);
    background: var(--xt-color-bg-elevated);
    border: 1px solid var(--xt-color-border);
    border-radius: var(--xt-radius-lg);
    box-shadow: var(--xt-shadow-xs);
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.wizard-well-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--xt-shadow-md);
    border-color: var(--xt-color-primary-300, var(--xt-color-primary-500));
}

.wizard-well-card--disabled {
    background: var(--xt-color-bg-soft);
    opacity: 0.92;
}

.wizard-well-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--xt-space-2);
}

.wizard-well-card__title {
    font-size: 15px;
    font-weight: 600;
    color: var(--xt-color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wizard-well-card__meta {
    font-size: 12px;
    color: var(--xt-color-text-subtle);
    min-height: 16px;
}

.wizard-well-card__stat {
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding: 8px 12px;
    background: var(--xt-color-primary-50);
    border-radius: var(--xt-radius-md);
}

.wizard-well-card__stat-num {
    font-size: 22px;
    font-weight: 700;
    color: var(--xt-color-primary-700);
    font-variant-numeric: tabular-nums;
}

.wizard-well-card__stat-label {
    font-size: 11px;
    color: var(--xt-color-text-subtle);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.wizard-well-card__action {
    margin-top: auto;
}

/* ----- Business recommendation card on design page ----- */
.business-recommendation {
    padding: var(--xt-space-4) var(--xt-space-5) var(--xt-space-4);
    margin-bottom: var(--xt-space-4);
    background: linear-gradient(135deg, var(--xt-color-bg-elevated), var(--xt-color-primary-50));
    border: 1px solid var(--xt-color-primary-200);
    box-shadow: var(--xt-shadow-md);
}

.business-recommendation__head {
    display: flex;
    align-items: center;
    gap: var(--xt-space-4);
    margin-bottom: var(--xt-space-3);
}

.business-recommendation__icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--xt-radius-lg);
    background: linear-gradient(135deg, var(--xt-color-primary-600), var(--xt-color-primary-700));
    color: #fff;
    box-shadow: 0 4px 12px rgba(29, 78, 216, 0.3);
    flex-shrink: 0;
}

.business-recommendation__title-block {
    flex: 1;
    min-width: 0;
}

.business-recommendation__eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--xt-color-primary-700);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.business-recommendation__title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--xt-color-text);
    letter-spacing: -0.01em;
}

.business-recommendation__confidence {
    text-align: right;
    padding: 8px 16px;
    border-radius: var(--xt-radius-md);
    background: var(--xt-color-bg-elevated);
    border: 1px solid var(--xt-color-border);
    flex-shrink: 0;
}

.business-recommendation__confidence-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--xt-color-text-subtle);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.business-recommendation__confidence-value {
    font-size: 22px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.business-recommendation__confidence--high {
    background: var(--xt-color-success-100);
    border-color: rgba(22, 163, 74, 0.3);
}

.business-recommendation__confidence--high .business-recommendation__confidence-value {
    color: var(--xt-color-success-700);
}

.business-recommendation__confidence--mid {
    background: var(--xt-color-warning-100);
    border-color: rgba(217, 119, 6, 0.3);
}

.business-recommendation__confidence--mid .business-recommendation__confidence-value {
    color: var(--xt-color-warning-700);
}

.business-recommendation__confidence--low {
    background: var(--xt-color-danger-100);
    border-color: rgba(220, 38, 38, 0.3);
}

.business-recommendation__confidence--low .business-recommendation__confidence-value {
    color: var(--xt-color-danger-700);
}

.business-recommendation__sentence {
    padding: var(--xt-space-3) var(--xt-space-4);
    background: var(--xt-color-bg-elevated);
    border-radius: var(--xt-radius-md);
    font-size: 14px;
    line-height: 1.7;
    color: var(--xt-color-text);
    margin-bottom: var(--xt-space-3);
}

.business-recommendation__sentence strong {
    color: var(--xt-color-primary-700);
    font-weight: 700;
    background: var(--xt-color-primary-50);
    padding: 1px 6px;
    border-radius: var(--xt-radius-sm);
}

.business-recommendation__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

@media (max-width: 720px) {
    .business-recommendation__head {
        flex-wrap: wrap;
    }
    .business-recommendation__confidence {
        width: 100%;
        text-align: left;
    }
}

/* ===== End V2.3.1 ===== */

/* ----- Mini log-curve preview on design page (V2.3.2) ----- */
.mini-curves-panel {
    padding: var(--xt-space-3) var(--xt-space-2) var(--xt-space-2);
    margin-bottom: var(--xt-space-3);
}

.mini-curves-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--xt-space-3) var(--xt-space-2);
    margin-bottom: var(--xt-space-2);
}

.mini-curves-empty {
    padding: var(--xt-space-6) var(--xt-space-4);
    text-align: center;
    color: var(--xt-color-text-subtle);
    font-size: 13px;
}

/* ----- Confidence radar (design page) - V2.2.1-E ----- */
.confidence-panel {
    padding: var(--xt-space-2) var(--xt-space-2) var(--xt-space-4);
    margin-bottom: var(--xt-space-3);
}

.confidence-grid {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(280px, 1fr);
    gap: var(--xt-space-4);
    padding: 0 var(--xt-space-4);
}

.confidence-radar {
    display: flex;
    flex-direction: column;
}

.confidence-radar__note {
    margin-top: 8px;
    padding: 8px 12px;
    background: var(--xt-color-primary-50);
    border-radius: var(--xt-radius-md);
    color: var(--xt-color-primary-700);
    font-size: 12px;
    line-height: 1.5;
}

.confidence-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--xt-space-2);
    align-content: start;
}

.confidence-cell {
    padding: 8px 10px;
    background: var(--xt-color-bg-soft);
    border: 1px solid var(--xt-color-border);
    border-radius: var(--xt-radius-md);
}

.confidence-cell--high {
    background: var(--xt-color-success-100);
    border-color: rgba(22, 163, 74, 0.25);
}

.confidence-cell--mid {
    background: var(--xt-color-warning-100);
    border-color: rgba(217, 119, 6, 0.25);
}

.confidence-cell--low {
    background: var(--xt-color-danger-100);
    border-color: rgba(220, 38, 38, 0.25);
}

.confidence-cell__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.confidence-cell__label {
    font-size: 12px;
    font-weight: 700;
    color: var(--xt-color-text);
    font-family: var(--xt-font-mono);
}

.confidence-cell__pct {
    font-size: 13px;
    font-weight: 700;
    color: var(--xt-color-text);
    font-variant-numeric: tabular-nums;
}

.confidence-cell--high .confidence-cell__pct { color: var(--xt-color-success-700); }
.confidence-cell--mid .confidence-cell__pct { color: var(--xt-color-warning-700); }
.confidence-cell--low .confidence-cell__pct { color: var(--xt-color-danger-700); }

.confidence-cell__bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: var(--xt-radius-pill);
    overflow: hidden;
    margin-bottom: 4px;
}

.confidence-cell__bar span {
    display: block;
    height: 100%;
    background: var(--xt-color-primary-600);
    border-radius: var(--xt-radius-pill);
    transition: width 0.4s ease;
}

.confidence-cell--high .confidence-cell__bar span { background: var(--xt-color-success-600); }
.confidence-cell--mid .confidence-cell__bar span { background: var(--xt-color-warning-600); }
.confidence-cell--low .confidence-cell__bar span { background: var(--xt-color-danger-600); }

.confidence-cell__count {
    font-size: 10px;
    color: var(--xt-color-text-subtle);
    font-variant-numeric: tabular-nums;
}

@media (max-width: 720px) {
    .confidence-grid {
        grid-template-columns: 1fr;
    }
}

/* ----- Well completeness card (workbench head) - V2.2.1-B ----- */
.well-completeness {
    padding: var(--xt-space-2) var(--xt-space-2) var(--xt-space-3);
    margin-bottom: var(--xt-space-3);
}

.well-completeness__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--xt-space-2) var(--xt-space-3) var(--xt-space-3);
    border-bottom: 1px solid var(--xt-color-border);
    margin-bottom: var(--xt-space-3);
}

.well-completeness__title {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--xt-color-text-subtle);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
}

.well-completeness__grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: var(--xt-space-2);
    padding: 0 var(--xt-space-3) var(--xt-space-2);
}

.well-dim-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: var(--xt-space-3) var(--xt-space-2);
    border-radius: var(--xt-radius-md);
    background: var(--xt-color-bg-soft);
    color: var(--xt-color-text-subtle);
    border: 1px solid var(--xt-color-border);
    text-decoration: none;
    transition: all 0.15s ease;
    text-align: center;
}

.well-dim-cell:hover {
    background: var(--xt-color-primary-50);
    border-color: var(--xt-color-primary-200);
    color: var(--xt-color-primary-700);
    transform: translateY(-1px);
}

.well-dim-cell--has {
    background: var(--xt-color-primary-50);
    color: var(--xt-color-primary-700);
    border-color: var(--xt-color-primary-200);
}

.well-dim-cell--has .well-dim-cell__icon {
    color: var(--xt-color-primary-600);
}

.well-dim-cell__icon {
    color: var(--xt-color-text-subtle);
}

.well-dim-cell__label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.well-dim-cell__count {
    font-size: 17px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--xt-color-text);
}

.well-dim-cell--has .well-dim-cell__count {
    color: var(--xt-color-primary-800);
}

@media (max-width: 720px) {
    .well-completeness__grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 4px;
    }
    .well-dim-cell {
        padding: 8px 4px;
    }
    .well-dim-cell__label {
        font-size: 10px;
    }
    .well-dim-cell__count {
        font-size: 14px;
    }
}

/* ----- Wells overview (/wells) - V2.2.1-A ----- */
.wells-overview .admin-stats-grid {
    margin-bottom: var(--xt-space-4);
}

.wells-region {
    padding: var(--xt-space-2) var(--xt-space-2) var(--xt-space-3);
    margin-bottom: var(--xt-space-4);
}

.wells-region__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--xt-space-3) var(--xt-space-4);
    border-bottom: 1px solid var(--xt-color-border);
    margin-bottom: var(--xt-space-2);
}

.wells-region__title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--xt-color-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.wells-region__title .svg-icon {
    color: var(--xt-color-primary-600);
}

.wells-region__list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wells-row {
    display: grid;
    grid-template-columns: minmax(220px, 2fr) minmax(380px, 3fr) minmax(140px, auto);
    align-items: center;
    gap: var(--xt-space-4);
    padding: var(--xt-space-3) var(--xt-space-4);
    background: var(--xt-color-bg-elevated);
    border: 1px solid transparent;
    border-radius: var(--xt-radius-md);
    text-decoration: none;
    color: inherit;
    transition: background 0.12s ease, border-color 0.12s ease, transform 0.06s ease;
}

.wells-row:hover {
    background: var(--xt-color-primary-50);
    border-color: var(--xt-color-primary-200);
    transform: translateX(2px);
}

.wells-row__name {
    min-width: 0;
}

.wells-row__title {
    font-size: 14px;
    font-weight: 600;
    color: var(--xt-color-text);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wells-row__meta {
    font-size: 12px;
    color: var(--xt-color-text-subtle);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 「还不能分析，缺：…」——比普通说明显眼一点，但不做成报错的红 */
.wells-row__meta--lack {
    color: #b4791f;
    margin-top: 2px;
}

.wells-row__dims {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
}

.wells-row__dim {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 4px;
    border-radius: var(--xt-radius-sm);
    background: var(--xt-color-bg-soft);
    color: var(--xt-color-text-subtle);
    font-size: 11px;
    line-height: 1.1;
    text-align: center;
    min-width: 0;
}

.wells-row__dim--has {
    background: var(--xt-color-primary-50);
    color: var(--xt-color-primary-700);
    box-shadow: inset 0 0 0 1px var(--xt-color-primary-200);
}

.wells-row__dim--empty {
    background: transparent;
    border: 1px dashed var(--xt-color-border);
    color: #cbd2dc;
}

.wells-row__dim-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.wells-row__dim-count {
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.wells-row__score {
    text-align: right;
    min-width: 130px;
}

.wells-row__score-num {
    font-size: 13px;
    font-weight: 600;
    color: var(--xt-color-text);
    margin-bottom: 4px;
    font-variant-numeric: tabular-nums;
}

.wells-row__score-bar {
    width: 100px;
    margin-left: auto;
    height: 5px;
    background: var(--xt-color-bg-soft);
    border-radius: var(--xt-radius-pill);
    overflow: hidden;
}

.wells-row__score-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--xt-color-primary-500), var(--xt-color-primary-700));
    border-radius: var(--xt-radius-pill);
    transition: width 0.3s ease;
}

@media (max-width: 920px) {
    .wells-row {
        grid-template-columns: 1fr;
        gap: var(--xt-space-2);
    }
    .wells-row__score {
        text-align: left;
    }
    .wells-row__score-bar {
        margin-left: 0;
        width: 100%;
    }
}

/* ----- Design list (analysis tasks) card grid ----- */
.design-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--xt-space-4);
    margin-top: var(--xt-space-4);
}

.design-card {
    display: flex;
    flex-direction: column;
    gap: var(--xt-space-3);
    padding: var(--xt-space-4) var(--xt-space-5);
    background: var(--xt-color-bg-elevated);
    border: 1px solid var(--xt-color-border);
    border-radius: var(--xt-radius-lg);
    box-shadow: var(--xt-shadow-sm);
    text-decoration: none;
    color: inherit;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.design-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--xt-shadow-md);
    border-color: var(--xt-color-primary-200);
}

.design-card__head {
    display: flex;
    align-items: flex-start;
    gap: var(--xt-space-3);
}

.design-card__icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--xt-radius-md);
    background: var(--xt-color-primary-50);
    color: var(--xt-color-primary-700);
    flex-shrink: 0;
}

.design-card__meta {
    flex: 1;
    min-width: 0;
}

.design-card__title {
    font-size: 15px;
    font-weight: 600;
    color: var(--xt-color-text);
    margin-bottom: 2px;
}

.design-card__sub {
    font-size: 12px;
    color: var(--xt-color-text-subtle);
}

.design-card__status {
    flex-shrink: 0;
}

.design-card__body {
    display: flex;
    flex-direction: column;
    gap: var(--xt-space-2);
    padding-top: var(--xt-space-2);
    border-top: 1px dashed var(--xt-color-border);
}

.design-card__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--xt-space-3);
    font-size: 13px;
    color: var(--xt-color-text-muted);
}

.design-card__label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--xt-color-text-subtle);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}

.design-card__footer {
    display: flex;
    justify-content: flex-end;
    padding-top: var(--xt-space-2);
    border-top: 1px dashed var(--xt-color-border);
}

.design-card__cta {
    font-size: 13px;
    font-weight: 600;
    color: var(--xt-color-primary-700);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.design-card:hover .design-card__cta {
    color: var(--xt-color-primary-800);
}

/* ----- Audit logs page polish ----- */
.audit-summary {
    padding: var(--xt-space-4);
    margin-bottom: var(--xt-space-3);
}

.audit-filter-form {
    grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) minmax(220px, 2fr) auto;
}

.audit-log-list {
    display: grid;
    gap: var(--xt-space-3);
}

.audit-log-item {
    background: var(--xt-color-bg-elevated);
    border: 1px solid var(--xt-color-border);
    border-radius: var(--xt-radius-lg);
    padding: var(--xt-space-4);
    box-shadow: var(--xt-shadow-xs);
    transition: box-shadow 0.15s ease;
}

.audit-log-item:hover {
    box-shadow: var(--xt-shadow-sm);
}

.audit-log-item__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--xt-space-3);
    margin-bottom: var(--xt-space-2);
    flex-wrap: wrap;
}

.audit-log-item__time {
    font-family: var(--xt-font-mono);
    font-size: 12px;
    color: var(--xt-color-text-subtle);
}

.audit-log-item__actor {
    font-size: 13px;
    color: var(--xt-color-text-muted);
    margin-top: 2px;
}

.audit-log-item__actor-name {
    font-weight: 600;
    color: var(--xt-color-text);
}

.audit-log-item__badges {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.audit-status-chip--warn {
    background: var(--xt-color-danger-100);
    border-color: rgba(220, 38, 38, 0.25);
    color: var(--xt-color-danger-700);
}

.audit-log-item__body {
    padding-top: var(--xt-space-2);
    border-top: 1px dashed var(--xt-color-border);
}

.audit-log-item__action {
    font-size: 14px;
    font-weight: 600;
    color: var(--xt-color-text);
    margin-bottom: 6px;
}

.audit-log-item__request {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--xt-color-text-muted);
    margin-bottom: 6px;
}

.audit-log-item__method {
    display: inline-block;
    padding: 1px 6px;
    background: var(--xt-color-bg-soft);
    border: 1px solid var(--xt-color-border);
    border-radius: var(--xt-radius-sm);
    font-family: var(--xt-font-mono);
    font-size: 11px;
    font-weight: 600;
    color: var(--xt-color-primary-700);
}

.audit-log-item__path {
    font-family: var(--xt-font-mono);
    font-size: 12px;
    color: var(--xt-color-text);
    background: transparent;
    padding: 0;
}

.audit-log-item__summary {
    cursor: pointer;
    font-size: 12px;
    color: var(--xt-color-primary-700);
    padding: 4px 0;
}

.audit-log-item__detail {
    margin-top: 6px;
    padding: 8px 10px;
    background: var(--xt-color-bg-soft);
    border-radius: var(--xt-radius-sm);
    font-family: var(--xt-font-mono);
    font-size: 11px;
    color: var(--xt-color-text);
    overflow-x: auto;
    max-height: 280px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.audit-log-empty {
    padding: var(--xt-space-8);
}

/* ----- Admin stats grid (top-of-page KPI cards) ----- */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--xt-space-3);
    margin-bottom: var(--xt-space-3);
}

.admin-stat-card {
    display: flex;
    align-items: center;
    gap: var(--xt-space-3);
    padding: var(--xt-space-4) var(--xt-space-5);
    background: var(--xt-color-bg-elevated);
    border: 1px solid var(--xt-color-border);
    border-radius: var(--xt-radius-lg);
    box-shadow: var(--xt-shadow-sm);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.admin-stat-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--xt-shadow-md);
}

.admin-stat-card__icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--xt-radius-md);
    background: var(--xt-color-primary-50);
    color: var(--xt-color-primary-700);
    flex-shrink: 0;
}

.admin-stat-card--ok .admin-stat-card__icon {
    background: var(--xt-color-success-100);
    color: var(--xt-color-success-700);
}

.admin-stat-card--muted .admin-stat-card__icon {
    background: var(--xt-color-bg-muted);
    color: var(--xt-color-text-subtle);
}

.admin-stat-card--warn .admin-stat-card__icon {
    background: var(--xt-color-warning-100);
    color: var(--xt-color-warning-700);
}

.admin-stat-card--warn {
    border-color: rgba(217, 119, 6, 0.35);
    background: linear-gradient(135deg, var(--xt-color-warning-100), var(--xt-color-bg-elevated) 60%);
}

.admin-stat-card__body {
    flex: 1;
    min-width: 0;
}

.admin-stat-card__label {
    font-size: 12px;
    font-weight: 600;
    color: var(--xt-color-text-subtle);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
}

.admin-stat-card__value {
    font-size: 28px;
    font-weight: 700;
    color: var(--xt-color-text);
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

/* ----- Admin user list refresh ----- */
.admin-summary__chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-summary {
    padding: var(--xt-space-4);
}

.admin-grid {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(380px, 2fr);
    gap: var(--xt-space-4);
    margin-top: var(--xt-space-3);
}

@media (max-width: 920px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }
}

/* ----- Workbench tab polish (with icons) ----- */
.notebook__tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.notebook__tab .svg-icon {
    width: 14px;
    height: 14px;
}

/* ----- Page-head with icon prefix ----- */
.page-head h1 .svg-icon {
    margin-right: 6px;
    color: var(--xt-color-primary-600);
    vertical-align: -4px;
}

/* ----- Home page (index) hero ----- */
.home-hero {
    text-align: center;
    padding: var(--xt-space-8) 0 var(--xt-space-6);
}

.home-hero h1 {
    font-size: 28px;
    font-weight: 700;
    margin: 4px 0 8px;
    letter-spacing: -0.02em;
}

.home-hero p {
    color: var(--xt-color-text-muted);
    font-size: 14px;
    max-width: 560px;
    margin: 0 auto;
}

.login-card.panel,
.login-card {
    width: 100%;
    max-width: 420px;
    border-radius: var(--xt-radius-xl);
    box-shadow: var(--xt-shadow-xl);
    padding: var(--xt-space-8);
    background: var(--xt-color-bg-elevated);
}

.login-head {
    text-align: center;
    margin-bottom: var(--xt-space-6);
}

.login-kicker {
    font-size: 12px;
    color: var(--xt-color-text-subtle);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 600;
    margin: 0 0 var(--xt-space-2);
}

.login-head h1 {
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 var(--xt-space-2);
    color: var(--xt-color-text);
}

.login-head p {
    font-size: 13px;
    color: var(--xt-color-text-muted);
}

/* ----- Tabs refresh ----- */
.notebook__tabs {
    background: var(--xt-color-bg-soft);
    border-radius: var(--xt-radius-md);
    padding: 4px;
    display: inline-flex;
    gap: 2px;
}

.notebook__tab {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--xt-color-text-muted);
    padding: 6px 14px;
    border-radius: var(--xt-radius-sm);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.notebook__tab:hover {
    color: var(--xt-color-text);
}

.notebook__tab.is-active,
.notebook__tab[aria-selected="true"] {
    background: var(--xt-color-bg-elevated);
    color: var(--xt-color-primary-700);
    box-shadow: var(--xt-shadow-xs);
}

/* ----- Data table refresh ----- */
.data-table th {
    background: var(--xt-color-bg-soft);
    color: var(--xt-color-text-subtle);
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.data-table tr:hover td {
    background: var(--xt-color-primary-50);
}

/* ----- Recent chips refresh ----- */
.well-recent-chip {
    background: var(--xt-color-bg-elevated);
    border: 1px solid var(--xt-color-border);
    color: var(--xt-color-text);
    transition: all 0.15s ease;
}

.well-recent-chip:hover,
.well-recent-chip:focus-visible {
    background: var(--xt-color-primary-50);
    border-color: var(--xt-color-primary-200);
    color: var(--xt-color-primary-700);
}

/* ----- Admin user card refresh ----- */
.admin-user-row--collapsible {
    border-radius: var(--xt-radius-lg);
    background: var(--xt-color-bg-elevated);
    box-shadow: var(--xt-shadow-xs);
    transition: box-shadow 0.15s ease;
}

.admin-user-row--collapsible:hover {
    box-shadow: var(--xt-shadow-sm);
}

.admin-user-row--collapsible[open] > .admin-user-summary {
    background: var(--xt-color-primary-50);
}

/* ----- Mobile hamburger refresh ----- */
.topbar__menu-toggle {
    border-color: var(--xt-color-border-strong);
    background: var(--xt-color-bg-elevated);
}

.topbar__menu-toggle:hover {
    background: var(--xt-color-bg-soft);
}

/* ----- Backup status grid refresh ----- */
.backup-status-cell {
    background: var(--xt-color-bg-elevated);
    border: 1px solid var(--xt-color-border);
    border-radius: var(--xt-radius-lg);
    padding: var(--xt-space-3) var(--xt-space-4);
}

.backup-status-cell__label {
    font-size: 11px;
    color: var(--xt-color-text-subtle);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.backup-status-cell__value {
    font-size: 14px;
    font-weight: 600;
    color: var(--xt-color-text);
    margin-top: 4px;
}

/* ----- Log-curve viewer refresh ----- */
.log-curve-controls {
    border-radius: var(--xt-radius-lg);
}

.log-curve-controls input[type="number"] {
    border-radius: var(--xt-radius-md);
}

.log-curve-meta {
    background: var(--xt-color-primary-50);
    border-color: var(--xt-color-primary-200);
    color: var(--xt-color-primary-700);
    border-radius: var(--xt-radius-md);
    font-weight: 500;
}

.log-curve-tracks {
    border-radius: var(--xt-radius-lg);
}

/* ----- Brand mark in topbar ----- */
.brand-title {
    font-weight: 700;
    color: var(--xt-color-text);
    letter-spacing: -0.01em;
}

.brand-kicker {
    color: var(--xt-color-text-subtle);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.brand-badge {
    box-shadow: var(--xt-shadow-sm);
}

/* ----- Scrollbar (webkit) ----- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--xt-color-border-strong); border-radius: var(--xt-radius-pill); }
::-webkit-scrollbar-thumb:hover { background: var(--xt-color-text-subtle); }
::-webkit-scrollbar-track { background: var(--xt-color-bg-soft); }

/* ----- Mobile polish ----- */
@media (max-width: 720px) {
    .home-grid {
        grid-template-columns: 1fr;
    }
    .page-head h1 {
        font-size: 20px;
    }
    .login-card,
    .login-card.panel {
        padding: var(--xt-space-6);
        border-radius: var(--xt-radius-lg);
    }
}

/* ===================================================================== */
/* V2.4 系统健康卡 + 参考井库 + 邻井对比                                  */
/* ===================================================================== */

.system-health-card {
    background: linear-gradient(135deg, var(--xt-color-bg-elevated) 0%, color-mix(in srgb, var(--xt-color-primary-50) 50%, var(--xt-color-bg-elevated)) 100%);
    border: 1px solid var(--xt-color-border);
    border-left: 4px solid var(--xt-color-primary-600);
    padding: var(--xt-space-5);
    margin-bottom: var(--xt-space-5);
}
.system-health-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--xt-space-3);
    margin-bottom: var(--xt-space-4);
}
.system-health-card__title {
    display: flex;
    align-items: center;
    gap: var(--xt-space-2);
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}
.system-health-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--xt-space-4);
}
.system-health-item {
    padding: var(--xt-space-3) var(--xt-space-4);
    background: var(--xt-color-bg-elevated);
    border: 1px solid var(--xt-color-border);
    border-radius: var(--xt-radius-md);
}
.system-health-item__label {
    font-size: 12px;
    color: var(--xt-color-text-muted);
    margin-bottom: 4px;
}
.system-health-item__value {
    font-size: 14px;
    font-weight: 600;
    color: var(--xt-color-text);
    line-height: 1.4;
    word-break: break-word;
}
.system-health-item__hint {
    display: inline-block;
    margin-left: 6px;
    font-size: 11px;
    font-weight: 400;
    color: var(--xt-color-text-muted);
}
@media (max-width: 768px) {
    .system-health-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* 参考井库 section */
.reference-wells-section {
    border: 1px solid var(--xt-color-border);
    border-top: 3px solid var(--xt-color-success-600, #16a34a);
    background: var(--xt-color-bg-elevated);
    padding: var(--xt-space-5);
    margin-bottom: var(--xt-space-5);
}
.reference-wells-section__head {
    margin-bottom: var(--xt-space-4);
}
.reference-wells-section__title {
    display: flex;
    align-items: center;
    gap: var(--xt-space-2);
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 6px;
}
.reference-wells-section__badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    background: var(--xt-color-success-100, #dcfce7);
    color: var(--xt-color-success-700, #15803d);
    border-radius: var(--xt-radius-full, 999px);
    font-size: 12px;
    font-weight: 600;
}
.reference-wells-section__hint {
    margin: 0;
    font-size: 13px;
    color: var(--xt-color-text-muted);
    line-height: 1.5;
}

.reference-wells-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--xt-space-3);
}
.reference-well-card {
    display: block;
    padding: var(--xt-space-4);
    background: var(--xt-color-bg-elevated);
    border: 1px solid var(--xt-color-border);
    border-radius: var(--xt-radius-md);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.reference-well-card:hover {
    border-color: var(--xt-color-primary-400);
    box-shadow: var(--xt-shadow-md);
    transform: translateY(-1px);
}
.reference-well-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--xt-space-2);
    margin-bottom: 8px;
}
.reference-well-card__title {
    font-size: 14px;
    font-weight: 600;
    color: var(--xt-color-text);
    word-break: break-all;
}
.reference-well-card__source-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: var(--xt-color-bg-muted, #f1f5f9);
    color: var(--xt-color-text-muted);
    border-radius: var(--xt-radius-sm);
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.reference-well-card__source-badge--force {
    background: #fef3c7;
    color: #b45309;
}
.reference-well-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--xt-space-2);
    font-size: 12px;
    color: var(--xt-color-text-muted);
    margin-bottom: var(--xt-space-3);
}
.reference-well-card__meta span:not(:last-child)::after {
    content: " ·";
    margin-left: 6px;
    color: var(--xt-color-border);
}
.reference-well-card__dims {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.reference-well-card__dim {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: color-mix(in srgb, var(--xt-color-primary-50) 70%, transparent);
    border: 1px solid var(--xt-color-primary-200, #bfdbfe);
    border-radius: var(--xt-radius-sm);
    font-size: 11px;
    color: var(--xt-color-text-muted);
}
.reference-well-card__dim-key {
    font-weight: 500;
}
.reference-well-card__dim strong {
    color: var(--xt-color-primary-700);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* wells-row 现场井类型标签 */
.wells-row__type-tag {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 8px;
    background: var(--xt-color-bg-muted, #f1f5f9);
    color: var(--xt-color-text-muted);
    border-radius: var(--xt-radius-sm);
    font-size: 11px;
    font-weight: 500;
    vertical-align: middle;
}

/* 邻井对比区块（在 design.html 和 workbench.html 中使用） */
.neighbor-wells-panel {
    border: 1px solid var(--xt-color-border);
    border-radius: var(--xt-radius-lg);
    background: var(--xt-color-bg-elevated);
    padding: var(--xt-space-5);
    margin: var(--xt-space-5) 0;
}
.neighbor-wells-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--xt-space-2);
    margin-bottom: var(--xt-space-3);
}
.neighbor-wells-panel__title {
    display: flex;
    align-items: center;
    gap: var(--xt-space-2);
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}
.neighbor-wells-panel__hint {
    margin: 0 0 var(--xt-space-4);
    font-size: 13px;
    color: var(--xt-color-text-muted);
}
.neighbor-wells-list {
    display: flex;
    flex-direction: column;
    gap: var(--xt-space-3);
}
.neighbor-well-row {
    display: grid;
    grid-template-columns: 1fr auto 80px;
    align-items: center;
    gap: var(--xt-space-4);
    padding: var(--xt-space-3) var(--xt-space-4);
    background: var(--xt-color-bg);
    border: 1px solid var(--xt-color-border);
    border-radius: var(--xt-radius-md);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.neighbor-well-row:hover {
    border-color: var(--xt-color-primary-400);
    box-shadow: var(--xt-shadow-sm);
}
.neighbor-well-row__name {
    font-weight: 600;
    font-size: 14px;
}
.neighbor-well-row__reasons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}
.neighbor-well-row__reason {
    display: inline-block;
    padding: 2px 6px;
    background: var(--xt-color-bg-muted, #f1f5f9);
    color: var(--xt-color-text-muted);
    border-radius: var(--xt-radius-sm);
    font-size: 11px;
}
.neighbor-well-row__score {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}
.neighbor-well-row__score-num {
    font-size: 18px;
    font-weight: 700;
    color: var(--xt-color-primary-700);
    font-variant-numeric: tabular-nums;
}
.neighbor-well-row__score-bar {
    width: 60px;
    height: 4px;
    background: var(--xt-color-bg-muted, #f1f5f9);
    border-radius: 2px;
    overflow: hidden;
}
.neighbor-well-row__score-bar span {
    display: block;
    height: 100%;
    background: var(--xt-color-primary-500);
}
.neighbor-well-row__mini-chart {
    width: 120px;
    height: 40px;
}
.neighbor-wells-panel__loading,
.neighbor-wells-panel__empty {
    padding: var(--xt-space-4);
    text-align: center;
    color: var(--xt-color-text-muted);
    font-size: 13px;
}

@media (max-width: 768px) {
    .neighbor-well-row {
        grid-template-columns: 1fr 60px;
    }
    .neighbor-well-row__mini-chart {
        display: none;
    }
}

/* ===================================================================== */
/* V2.5 账号管理升级（角色色彩 + 卡片化 + 角色分布）                       */
/* ===================================================================== */

.user-admin-page .user-admin-stats {
    display: grid;
    grid-template-columns: 2.5fr 1.4fr;
    gap: var(--xt-space-4);
    margin-bottom: var(--xt-space-5);
}
@media (max-width: 960px) {
    .user-admin-page .user-admin-stats { grid-template-columns: 1fr; }
}

/* role-pill: 角色徽章统一组件 */
.role-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: var(--xt-radius-full, 999px);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    background: var(--xt-color-bg-muted, #f1f5f9);
    color: var(--xt-color-text);
    border: 1px solid transparent;
    white-space: nowrap;
}
.role-pill strong {
    margin-left: 4px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.role-pill--admin {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fecaca;
}
.role-pill--designer {
    background: #dbeafe;
    color: #1d4ed8;
    border-color: #bfdbfe;
}
.role-pill--engineer {
    background: #ffedd5;
    color: #c2410c;
    border-color: #fed7aa;
}

/* role-distribution card */
.role-distribution-card {
    padding: var(--xt-space-4) var(--xt-space-5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--xt-space-3);
}
.role-distribution-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.role-distribution-card__title {
    display: flex;
    align-items: center;
    gap: var(--xt-space-2);
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}
.role-distribution-card__hint {
    font-size: 12px;
    color: var(--xt-color-text-muted);
}
.role-distribution-bar {
    display: flex;
    height: 12px;
    border-radius: var(--xt-radius-full, 999px);
    overflow: hidden;
    background: var(--xt-color-bg-muted, #f1f5f9);
}
.role-distribution-bar__seg {
    height: 100%;
    transition: width 0.4s ease;
}
.role-distribution-bar__seg--admin    { background: #ef4444; }
.role-distribution-bar__seg--designer { background: #3b82f6; }
.role-distribution-bar__seg--engineer { background: #f97316; }
.role-distribution-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* registration section 待审高亮 */
.registration-section--has-pending {
    border-left: 4px solid #ef4444;
}
.registration-section__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--xt-space-3);
}
.registration-section__title {
    display: flex;
    align-items: center;
    gap: var(--xt-space-2);
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}
.registration-section__pending-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    background: #ef4444;
    color: white;
    border-radius: var(--xt-radius-full, 999px);
    font-size: 12px;
    font-weight: 700;
    margin-left: 6px;
}
.admin-user-row--pending {
    background: #fef9c3;
    border-left: 3px solid #facc15;
}

/* user card grid */
.user-cards-grid {
    display: flex;
    flex-direction: column;
    gap: var(--xt-space-3);
}
.user-card {
    border: 1px solid var(--xt-color-border);
    border-radius: var(--xt-radius-lg);
    background: var(--xt-color-bg-elevated);
    overflow: hidden;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.user-card:hover {
    border-color: var(--xt-color-primary-300);
    box-shadow: var(--xt-shadow-sm);
}
.user-card[open] {
    box-shadow: var(--xt-shadow-md);
}
.user-card--inactive {
    opacity: 0.6;
}
.user-card--admin    { border-left: 4px solid #ef4444; }
.user-card--designer { border-left: 4px solid #3b82f6; }
.user-card--engineer { border-left: 4px solid #f97316; }

.user-card__summary {
    display: grid;
    grid-template-columns: 48px 1fr 24px;
    align-items: center;
    gap: var(--xt-space-4);
    padding: var(--xt-space-4);
    cursor: pointer;
    list-style: none;
}
.user-card__summary::-webkit-details-marker { display: none; }
.user-card__summary::marker { content: ''; }
.user-card__avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 18px;
    user-select: none;
}
.user-card__avatar--admin    { background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%); }
.user-card__avatar--designer { background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%); }
.user-card__avatar--engineer { background: linear-gradient(135deg, #f97316 0%, #c2410c 100%); }

.user-card__head { min-width: 0; }
.user-card__name-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 4px;
}
.user-card__name {
    font-size: 15px;
    font-weight: 600;
    color: var(--xt-color-text);
}
.user-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--xt-space-3);
    font-size: 12px;
    color: var(--xt-color-text-muted);
}
.user-card__meta .svg-icon {
    width: 13px;
    height: 13px;
    vertical-align: -2px;
    margin-right: 2px;
}
.user-card__meta--dim { opacity: 0.55; }
.user-card__chevron {
    color: var(--xt-color-text-muted);
    font-size: 18px;
    transition: transform 0.15s;
}
.user-card[open] .user-card__chevron { transform: rotate(180deg); }

.user-card__body {
    padding: 0 var(--xt-space-4) var(--xt-space-4);
    border-top: 1px solid var(--xt-color-border);
    margin-top: var(--xt-space-2);
}
.user-card__body > form {
    margin-top: var(--xt-space-4);
}
.user-card__actions-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--xt-space-3);
    margin-top: var(--xt-space-3);
}
.user-card__danger-zone {
    display: flex;
    flex-wrap: wrap;
    gap: var(--xt-space-2);
    margin-top: var(--xt-space-4);
    padding-top: var(--xt-space-3);
    border-top: 1px dashed var(--xt-color-border);
}
.user-card__danger-zone .inline-form {
    display: inline-block;
    margin: 0;
}

.panel__title-count {
    margin-left: 8px;
    padding: 1px 8px;
    background: var(--xt-color-bg-muted, #f1f5f9);
    color: var(--xt-color-text-muted);
    border-radius: var(--xt-radius-sm);
    font-size: 11px;
    font-weight: 600;
    vertical-align: middle;
}

@media (max-width: 768px) {
    .user-card__summary {
        grid-template-columns: 40px 1fr 16px;
        gap: var(--xt-space-3);
        padding: var(--xt-space-3);
    }
    .user-card__avatar { width: 36px; height: 36px; font-size: 14px; }
    .user-card__name-row { gap: 4px; }
}

/* ===================================================================== */
/* V2.6 钻头库 / 邻井钻头 / 钻头照片画廊                                   */
/* ===================================================================== */

/* /bits 钻头分布 chart 区 */
.bits-charts__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--xt-space-4);
}
.bits-chart {
    padding: var(--xt-space-3);
    background: var(--xt-color-bg);
    border: 1px solid var(--xt-color-border);
    border-radius: var(--xt-radius-md);
}
.bits-chart__title {
    font-size: 12px;
    color: var(--xt-color-text-muted);
    text-align: center;
    margin-bottom: 4px;
    font-weight: 600;
}
@media (max-width: 768px) {
    .bits-charts__grid { grid-template-columns: 1fr; }
}

/* 型号卡 */
.bit-spec-grid {
    display: flex;
    flex-direction: column;
    gap: var(--xt-space-3);
}
.bit-spec-card {
    border: 1px solid var(--xt-color-border);
    border-radius: var(--xt-radius-lg);
    background: var(--xt-color-bg-elevated);
    overflow: hidden;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.bit-spec-card:hover {
    border-color: var(--xt-color-primary-300);
    box-shadow: var(--xt-shadow-sm);
}
.bit-spec-card--pdc    { border-left: 4px solid #3b82f6; }
.bit-spec-card--roller { border-left: 4px solid #f97316; }
.bit-spec-card--steel  { border-left: 4px solid #6b7280; }

.bit-spec-card__summary {
    display: grid;
    grid-template-columns: 1fr 24px;
    align-items: center;
    gap: var(--xt-space-3);
    padding: var(--xt-space-4);
    cursor: pointer;
    list-style: none;
}
.bit-spec-card__summary::-webkit-details-marker { display: none; }
.bit-spec-card__title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.bit-spec-card__title {
    font-size: 15px;
    font-weight: 600;
    color: var(--xt-color-text);
    word-break: break-all;
}
.bit-spec-card__metrics {
    display: flex;
    flex-wrap: wrap;
    gap: var(--xt-space-3);
    font-size: 12px;
    color: var(--xt-color-text-muted);
}
.bit-spec-card__metrics strong {
    color: var(--xt-color-primary-700);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.bit-spec-card__chevron {
    color: var(--xt-color-text-muted);
    font-size: 18px;
    transition: transform 0.15s;
}
.bit-spec-card[open] .bit-spec-card__chevron { transform: rotate(180deg); }

.bit-spec-card__body {
    padding: 0 var(--xt-space-4) var(--xt-space-4);
    border-top: 1px solid var(--xt-color-border);
    margin-top: var(--xt-space-2);
}

.bit-wells-table {
    width: 100%;
    margin-top: var(--xt-space-3);
    border-collapse: collapse;
    font-size: 13px;
}
.bit-wells-table thead th {
    text-align: left;
    padding: 6px 10px;
    background: var(--xt-color-bg-muted, #f1f5f9);
    color: var(--xt-color-text-muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.bit-wells-table tbody td {
    padding: 8px 10px;
    border-top: 1px solid var(--xt-color-border);
    vertical-align: middle;
}
.bit-wells-table td.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.bit-wells-table tbody tr:hover {
    background: color-mix(in srgb, var(--xt-color-primary-50) 30%, transparent);
}
.bit-wells-table code {
    font-size: 11px;
    color: var(--xt-color-text-muted);
}

/* 类别 pill */
.bit-category-pill {
    display: inline-flex;
    padding: 2px 8px;
    border-radius: var(--xt-radius-full, 999px);
    font-size: 11px;
    font-weight: 600;
    background: var(--xt-color-bg-muted, #f1f5f9);
    color: var(--xt-color-text-muted);
}
.bit-category-pill--pdc    { background: #dbeafe; color: #1d4ed8; }
.bit-category-pill--roller { background: #ffedd5; color: #c2410c; }
.bit-category-pill--steel  { background: #f3f4f6; color: #4b5563; }
.bit-size-pill {
    display: inline-flex;
    padding: 2px 8px;
    background: var(--xt-color-bg-muted, #f1f5f9);
    color: var(--xt-color-text-muted);
    border-radius: var(--xt-radius-sm);
    font-size: 11px;
    font-weight: 600;
}
.bit-iadc-summary code {
    display: inline-block;
    padding: 1px 4px;
    margin-left: 4px;
    background: var(--xt-color-bg-muted, #f1f5f9);
    border-radius: 3px;
    font-size: 11px;
    color: var(--xt-color-text);
}

/* /wells/{id}/bit-gallery */
.bit-life-summary {
    display: flex;
    align-items: center;
    gap: var(--xt-space-4);
    padding: var(--xt-space-4) var(--xt-space-5);
    flex-wrap: wrap;
}
.bit-life-summary__sep {
    color: var(--xt-color-text-muted);
    font-size: 22px;
    font-weight: 300;
}
.bit-life-summary__item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.bit-life-summary__label {
    font-size: 11px;
    color: var(--xt-color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.bit-life-summary__value {
    font-size: 22px;
    font-weight: 700;
    color: var(--xt-color-text);
    font-variant-numeric: tabular-nums;
}
.bit-life-summary__value span {
    font-size: 13px;
    font-weight: 400;
    color: var(--xt-color-text-muted);
    margin-left: 4px;
}
.bit-life-summary__item--highlight .bit-life-summary__value {
    color: var(--xt-color-primary-700);
}

.bit-gallery-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--xt-space-4);
}
@media (max-width: 960px) {
    .bit-gallery-grid { grid-template-columns: 1fr; }
}
.bit-gallery-column {
    padding: var(--xt-space-4);
}
.bit-gallery-column--in  { border-left: 4px solid #10b981; }
.bit-gallery-column--out { border-left: 4px solid #f97316; }
.bit-gallery-column__head {
    margin-bottom: var(--xt-space-3);
}
.bit-gallery-column__title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}
.bit-gallery-column__count {
    margin-left: 6px;
    font-size: 12px;
    color: var(--xt-color-text-muted);
    font-weight: 500;
}
.bit-gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: var(--xt-space-2);
}
.bit-gallery-thumb {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--xt-color-border);
    border-radius: var(--xt-radius-sm);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    background: var(--xt-color-bg);
    transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.bit-gallery-thumb:hover {
    border-color: var(--xt-color-primary-400);
    box-shadow: var(--xt-shadow-md);
    transform: translateY(-2px);
}
.bit-gallery-thumb img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    background: #f3f4f6;
    display: block;
}
.bit-gallery-thumb__caption {
    padding: 4px 6px;
    font-size: 11px;
    color: var(--xt-color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 邻井钻头卡（design.html 内） */
.neighbor-bits-panel { background: linear-gradient(135deg, var(--xt-color-bg-elevated) 0%, color-mix(in srgb, #fef3c7 25%, var(--xt-color-bg-elevated)) 100%); }
.neighbor-bits-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--xt-space-3);
}
.neighbor-bit-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: var(--xt-space-3) var(--xt-space-4);
    background: var(--xt-color-bg);
    border: 1px solid var(--xt-color-border);
    border-radius: var(--xt-radius-md);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.neighbor-bit-card:hover {
    border-color: var(--xt-color-primary-400);
    box-shadow: var(--xt-shadow-sm);
    transform: translateY(-1px);
}
.neighbor-bit-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.neighbor-bit-card__well {
    font-weight: 600;
    font-size: 13px;
    color: var(--xt-color-text);
}
.neighbor-bit-card__sim {
    font-size: 11px;
    color: var(--xt-color-primary-700);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.neighbor-bit-card__model {
    font-size: 13px;
    color: var(--xt-color-text);
    word-break: break-all;
}
.neighbor-bit-card__serial {
    color: var(--xt-color-text-muted);
    font-size: 11px;
    margin-left: 4px;
}
.neighbor-bit-card__metrics {
    display: flex;
    flex-wrap: wrap;
    gap: var(--xt-space-3);
    font-size: 12px;
    color: var(--xt-color-text-muted);
}
.neighbor-bit-card__metrics b {
    color: var(--xt-color-text);
    font-variant-numeric: tabular-nums;
}
.neighbor-bit-card__depth-range {
    margin-left: auto;
    font-size: 11px;
}
.neighbor-bit-iadc {
    font-size: 11px;
    padding: 2px 6px;
    background: var(--xt-color-bg-muted, #f1f5f9);
    border-radius: 3px;
    color: var(--xt-color-text);
}
.neighbor-bit-iadc-char {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 6px;
    background: #fef3c7;
    color: #b45309;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
}
.neighbor-bit-empty {
    font-size: 11px;
    color: var(--xt-color-text-muted);
    font-style: italic;
}

/* ===================================================================== */
/* V2.7 闭环看板（lifecycle）                                              */
/* ===================================================================== */

/* lifecycle 总览页：5 stage 完成度 summary */
.lifecycle-stage-summary {
    padding: var(--xt-space-4) var(--xt-space-5);
}
.lifecycle-stage-summary .panel__hint {
    margin: 0 0 var(--xt-space-3);
    font-size: 12px;
    color: var(--xt-color-text-muted);
}
.lifecycle-stage-summary__grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--xt-space-3);
}
.lifecycle-stage-summary__cell {
    padding: var(--xt-space-3);
    background: var(--xt-color-bg);
    border: 1px solid var(--xt-color-border);
    border-radius: var(--xt-radius-md);
    text-align: center;
}
.lifecycle-stage-summary__order {
    display: inline-block;
    padding: 1px 8px;
    background: var(--xt-color-bg-muted, #f1f5f9);
    color: var(--xt-color-text-muted);
    border-radius: var(--xt-radius-sm);
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 6px;
}
.lifecycle-stage-summary__icon { color: var(--xt-color-primary-600); margin: 4px 0; }
.lifecycle-stage-summary__label {
    font-size: 12px;
    font-weight: 600;
    color: var(--xt-color-text);
    margin-bottom: 6px;
}
.lifecycle-stage-summary__bar {
    height: 6px;
    background: var(--xt-color-bg-muted, #f1f5f9);
    border-radius: 3px;
    overflow: hidden;
    margin: 4px 0 6px;
}
.lifecycle-stage-summary__bar span {
    display: block;
    height: 100%;
    background: var(--xt-color-primary-500);
    transition: width 0.4s ease;
}
.lifecycle-stage-summary__pct {
    font-size: 14px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--xt-color-text);
}
.lifecycle-stage-summary__cell--low  .lifecycle-stage-summary__bar span { background: #ef4444; }
.lifecycle-stage-summary__cell--mid  .lifecycle-stage-summary__bar span { background: #eab308; }
.lifecycle-stage-summary__cell--high .lifecycle-stage-summary__bar span { background: #16a34a; }
@media (max-width: 768px) {
    .lifecycle-stage-summary__grid { grid-template-columns: repeat(2, 1fr); }
}

/* lifecycle 总览：井列表 */
.lifecycle-well-list {
    display: flex;
    flex-direction: column;
    gap: var(--xt-space-2);
}
.lifecycle-well-row {
    display: grid;
    grid-template-columns: 1.6fr 2.2fr 0.9fr;
    grid-template-areas: "head stages score" "head stages score" "next next next";
    gap: var(--xt-space-3) var(--xt-space-4);
    padding: var(--xt-space-3) var(--xt-space-4);
    background: var(--xt-color-bg-elevated);
    border: 1px solid var(--xt-color-border);
    border-radius: var(--xt-radius-md);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}
.lifecycle-well-row:hover {
    border-color: var(--xt-color-primary-400);
    box-shadow: var(--xt-shadow-sm);
    transform: translateY(-1px);
}
.lifecycle-well-row--excellent { border-left: 4px solid #16a34a; }
.lifecycle-well-row--good      { border-left: 4px solid #3b82f6; }
.lifecycle-well-row--partial   { border-left: 4px solid #eab308; }
.lifecycle-well-row--early     { border-left: 4px solid #94a3b8; }

.lifecycle-well-row__head { grid-area: head; display: flex; align-items: center; justify-content: space-between; gap: var(--xt-space-2); }
.lifecycle-well-row__name { font-weight: 600; font-size: 14px; }
.lifecycle-well-row__health-pill {
    padding: 2px 8px;
    border-radius: var(--xt-radius-full, 999px);
    font-size: 11px;
    font-weight: 700;
}
.lifecycle-well-row__health-pill--excellent { background: #dcfce7; color: #15803d; }
.lifecycle-well-row__health-pill--good      { background: #dbeafe; color: #1d4ed8; }
.lifecycle-well-row__health-pill--partial   { background: #fef9c3; color: #a16207; }
.lifecycle-well-row__health-pill--early     { background: #f1f5f9; color: #475569; }

.lifecycle-well-row__stages {
    grid-area: stages;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
}
.lifecycle-mini-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 24px;
    padding: 0 6px;
    border-radius: var(--xt-radius-sm);
    font-size: 11px;
    font-weight: 700;
    background: var(--xt-color-bg-muted, #f1f5f9);
    color: var(--xt-color-text-muted);
    border: 1px solid var(--xt-color-border);
}
.lifecycle-mini-stage--low  { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.lifecycle-mini-stage--mid  { background: #fef3c7; color: #a16207; border-color: #fde68a; }
.lifecycle-mini-stage--high { background: #dcfce7; color: #15803d; border-color: #bbf7d0; }
.lifecycle-mini-arrow { color: var(--xt-color-text-muted); font-size: 12px; }

.lifecycle-well-row__score { grid-area: score; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.lifecycle-well-row__score-num {
    font-size: 22px;
    font-weight: 700;
    color: var(--xt-color-primary-700);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}
.lifecycle-well-row__score-bar {
    width: 80px;
    height: 4px;
    background: var(--xt-color-bg-muted, #f1f5f9);
    border-radius: 2px;
    overflow: hidden;
}
.lifecycle-well-row__score-bar span {
    display: block;
    height: 100%;
    background: var(--xt-color-primary-500);
}
.lifecycle-well-row__next {
    grid-area: next;
    font-size: 12px;
    color: var(--xt-color-text-muted);
    padding-top: 4px;
    border-top: 1px dashed var(--xt-color-border);
}
.lifecycle-well-row__next .svg-icon { width: 12px; height: 12px; vertical-align: -2px; }
@media (max-width: 768px) {
    .lifecycle-well-row { grid-template-columns: 1fr; grid-template-areas: "head" "stages" "score" "next"; }
    .lifecycle-well-row__score { flex-direction: row; align-items: center; }
}

/* lifecycle 单井页：闭环 hero */
.lifecycle-score-hero {
    padding: var(--xt-space-5) var(--xt-space-5);
    background: linear-gradient(135deg, var(--xt-color-bg-elevated) 0%, color-mix(in srgb, var(--xt-color-primary-50) 40%, var(--xt-color-bg-elevated)) 100%);
}
.lifecycle-score-hero--excellent { border-left: 4px solid #16a34a; }
.lifecycle-score-hero--good      { border-left: 4px solid #3b82f6; }
.lifecycle-score-hero--partial   { border-left: 4px solid #eab308; }
.lifecycle-score-hero--early     { border-left: 4px solid #94a3b8; }

.lifecycle-score-hero__main {
    display: flex;
    align-items: baseline;
    gap: var(--xt-space-3);
    margin-bottom: var(--xt-space-4);
}
.lifecycle-score-hero__label {
    font-size: 13px;
    color: var(--xt-color-text-muted);
    font-weight: 600;
}
.lifecycle-score-hero__value {
    font-size: 48px;
    font-weight: 800;
    color: var(--xt-color-primary-700);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}
.lifecycle-score-hero__value span {
    font-size: 18px;
    font-weight: 400;
    color: var(--xt-color-text-muted);
    margin-left: 4px;
}
.lifecycle-score-hero__health {
    padding: 4px 12px;
    border-radius: var(--xt-radius-full, 999px);
    background: var(--xt-color-primary-100);
    color: var(--xt-color-primary-800);
    font-size: 13px;
    font-weight: 700;
}
.lifecycle-score-hero__chain {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: var(--xt-space-3);
    flex-wrap: wrap;
}
.lifecycle-chain-node {
    flex: 1;
    min-width: 120px;
    padding: var(--xt-space-3) var(--xt-space-2);
    text-align: center;
    background: var(--xt-color-bg);
    border: 1px solid var(--xt-color-border);
    border-radius: var(--xt-radius-md);
}
.lifecycle-chain-node--completed { border-color: #16a34a; background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%); }
.lifecycle-chain-node--partial   { border-color: #eab308; background: linear-gradient(135deg, #ffffff 0%, #fefce8 100%); }
.lifecycle-chain-node--empty     { opacity: 0.55; }
.lifecycle-chain-node__icon { color: var(--xt-color-primary-600); }
.lifecycle-chain-node--completed .lifecycle-chain-node__icon { color: #16a34a; }
.lifecycle-chain-node--partial .lifecycle-chain-node__icon { color: #eab308; }
.lifecycle-chain-node__label {
    font-size: 12px;
    font-weight: 600;
    margin: 4px 0 2px;
}
.lifecycle-chain-node__pct {
    font-size: 13px;
    font-weight: 700;
    color: var(--xt-color-text);
    font-variant-numeric: tabular-nums;
}
.lifecycle-chain-arrow {
    color: var(--xt-color-text-muted);
    font-size: 18px;
}
.lifecycle-score-hero__next {
    padding: var(--xt-space-3) var(--xt-space-4);
    background: #fef9c3;
    border: 1px solid #fde68a;
    border-radius: var(--xt-radius-md);
    font-size: 13px;
    color: #713f12;
}

/* 5 个阶段详情卡 */
.lifecycle-stage-card {
    padding: var(--xt-space-4);
    margin-bottom: var(--xt-space-3);
}
.lifecycle-stage-card--done {
    border-left: 3px solid #16a34a;
}
.lifecycle-stage-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--xt-space-3);
    margin-bottom: var(--xt-space-3);
}
.lifecycle-stage-card__title {
    display: flex;
    align-items: center;
    gap: var(--xt-space-2);
    font-size: 16px;
    font-weight: 600;
}
.lifecycle-stage-card__step {
    display: inline-block;
    padding: 2px 8px;
    background: var(--xt-color-primary-600);
    color: white;
    border-radius: var(--xt-radius-sm);
    font-size: 12px;
    font-weight: 700;
}
.lifecycle-stage-card--done .lifecycle-stage-card__step { background: #16a34a; }
.lifecycle-stage-card__status {
    font-size: 12px;
    font-weight: 600;
    color: var(--xt-color-text-muted);
}
.lifecycle-stage-card--done .lifecycle-stage-card__status { color: #15803d; }

.lifecycle-metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--xt-space-3);
    margin-bottom: var(--xt-space-3);
}
.lifecycle-metric {
    padding: var(--xt-space-3);
    background: var(--xt-color-bg);
    border: 1px solid var(--xt-color-border);
    border-radius: var(--xt-radius-sm);
}
.lifecycle-metric__label {
    font-size: 11px;
    color: var(--xt-color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}
.lifecycle-metric__value {
    font-size: 18px;
    font-weight: 700;
    color: var(--xt-color-text);
    font-variant-numeric: tabular-nums;
    line-height: 1.3;
}
.lifecycle-metric__value span {
    font-size: 12px;
    font-weight: 400;
    color: var(--xt-color-text-muted);
    margin-left: 4px;
}
.lifecycle-metric__value--text { font-size: 14px; font-weight: 600; }
.lifecycle-metric__value--code { font-size: 13px; font-family: ui-monospace, "SFMono-Regular", monospace; }
.lifecycle-metric--highlight {
    background: linear-gradient(135deg, var(--xt-color-bg) 0%, color-mix(in srgb, var(--xt-color-primary-50) 60%, var(--xt-color-bg)) 100%);
    border-color: var(--xt-color-primary-300);
}
.lifecycle-metric--highlight .lifecycle-metric__value { color: var(--xt-color-primary-700); }

.lifecycle-docs {
    margin-top: var(--xt-space-3);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.lifecycle-docs__label {
    font-size: 12px;
    color: var(--xt-color-text-muted);
    margin-right: 4px;
}
.lifecycle-doc-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: var(--xt-color-bg-muted, #f1f5f9);
    border: 1px solid var(--xt-color-border);
    border-radius: var(--xt-radius-sm);
    font-size: 11px;
    color: var(--xt-color-text);
    text-decoration: none;
}
.lifecycle-doc-chip:hover { border-color: var(--xt-color-primary-400); background: var(--xt-color-primary-50); }
.lifecycle-doc-chip__type {
    font-size: 10px;
    color: var(--xt-color-text-muted);
    text-transform: uppercase;
}
.lifecycle-next-action {
    padding: 6px 10px;
    margin-top: var(--xt-space-3);
    background: #fef9c3;
    border-left: 3px solid #facc15;
    border-radius: var(--xt-radius-sm);
    font-size: 12px;
    color: #713f12;
}
.lifecycle-next-action .svg-icon { width: 12px; height: 12px; vertical-align: -2px; }
.lifecycle-stage-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: var(--xt-space-3);
    padding-top: var(--xt-space-3);
    border-top: 1px dashed var(--xt-color-border);
}

/* calibration 推荐 vs 实际 */
.calibration-card {
    padding: var(--xt-space-5);
    background: linear-gradient(135deg, var(--xt-color-bg-elevated) 0%, color-mix(in srgb, #fef3c7 30%, var(--xt-color-bg-elevated)) 100%);
    border-left: 4px solid #f59e0b;
}
.calibration-card--empty { background: var(--xt-color-bg-elevated); border-left-color: var(--xt-color-border); }
.calibration-card__head { margin-bottom: var(--xt-space-3); }
.calibration-card__title {
    display: flex;
    align-items: center;
    gap: var(--xt-space-2);
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 600;
}
.calibration-card__hint { margin: 0; font-size: 12px; color: var(--xt-color-text-muted); }
.calibration-card__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--xt-space-3);
    margin-bottom: var(--xt-space-3);
}
.calibration-card__label { font-size: 11px; color: var(--xt-color-text-muted); margin-bottom: 4px; }
.calibration-card__value { font-size: 15px; font-weight: 600; color: var(--xt-color-text); }
.calibration-card__value code {
    display: inline-block;
    padding: 1px 5px;
    background: #fef3c7;
    color: #b45309;
    border-radius: 3px;
    font-size: 11px;
    margin-right: 4px;
}
.calibration-card__value small { font-size: 11px; font-weight: 400; color: var(--xt-color-text-muted); }
.calibration-card__interpretation {
    padding: var(--xt-space-3);
    background: var(--xt-color-bg);
    border: 1px solid var(--xt-color-border);
    border-radius: var(--xt-radius-sm);
    font-size: 13px;
    line-height: 1.6;
    color: var(--xt-color-text);
}

/* ===================================================================== */
/* V2.8 另存为方案 + IADC 8-slot 编辑器                                    */
/* ===================================================================== */

.save-proposal-panel {
    padding: 0;
    border-left: 4px solid #f59e0b;
    background: linear-gradient(135deg, var(--xt-color-bg-elevated) 0%, color-mix(in srgb, #fef3c7 25%, var(--xt-color-bg-elevated)) 100%);
    margin-bottom: var(--xt-space-5);
}
.save-proposal-panel__summary {
    list-style: none;
    cursor: pointer;
    padding: var(--xt-space-3) var(--xt-space-4);
    display: flex;
    align-items: center;
    gap: var(--xt-space-2);
    font-weight: 600;
    font-size: 14px;
}
.save-proposal-panel__summary::-webkit-details-marker { display: none; }
.save-proposal-panel__summary::marker { content: ''; }
.save-proposal-panel__summary::after {
    content: '▾';
    margin-left: auto;
    color: var(--xt-color-text-muted);
    transition: transform 0.15s;
}
.save-proposal-panel[open] .save-proposal-panel__summary::after { transform: rotate(180deg); }
.save-proposal-panel__hint {
    margin-left: 8px;
    font-size: 11px;
    color: var(--xt-color-text-muted);
    font-weight: 400;
}
.save-proposal-form {
    padding: 0 var(--xt-space-4) var(--xt-space-4);
    border-top: 1px solid var(--xt-color-border);
}
.save-proposal-form textarea {
    resize: vertical;
    min-height: 70px;
}
.form-helper {
    font-size: 12px;
    color: var(--xt-color-text-muted);
    margin-left: var(--xt-space-2);
}

/* IADC 8-slot 编辑器 */
.iadc-editor {
    padding: var(--xt-space-3) var(--xt-space-4);
    background: var(--xt-color-bg);
    border: 1px solid var(--xt-color-border);
    border-radius: var(--xt-radius-md);
}
.iadc-editor__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--xt-space-3);
    margin-bottom: var(--xt-space-3);
    flex-wrap: wrap;
}
.iadc-editor__label {
    font-size: 13px;
    font-weight: 600;
    color: var(--xt-color-text);
}
.iadc-editor__label small {
    color: var(--xt-color-text-muted);
    font-weight: 400;
    margin-left: 4px;
}
.iadc-editor__preview {
    padding: 4px 10px;
    background: var(--xt-color-primary-50);
    border: 1px solid var(--xt-color-primary-200);
    color: var(--xt-color-primary-800);
    border-radius: var(--xt-radius-sm);
    font-size: 13px;
    font-weight: 700;
    font-family: ui-monospace, "SFMono-Regular", monospace;
    letter-spacing: 0.04em;
}
.iadc-editor__slots {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--xt-space-2);
}
@media (max-width: 960px) {
    .iadc-editor__slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.iadc-slot {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.iadc-slot__label {
    font-size: 11px;
    color: var(--xt-color-text-muted);
    font-weight: 500;
}
.iadc-slot select {
    padding: 4px 6px;
    font-size: 12px;
    background: var(--xt-color-bg-elevated);
    border: 1px solid var(--xt-color-border);
    border-radius: var(--xt-radius-sm);
}
.iadc-editor__hint {
    margin-top: var(--xt-space-2);
    font-size: 11px;
    color: var(--xt-color-text-muted);
    font-style: italic;
}

/* workbench 钻头信息 panel — 闭环 S5 录入端语义标识 */
.bit-info-panel { border-left: 3px solid var(--xt-color-primary-500); }
.bit-info-panel__title {
    display: flex;
    align-items: center;
    gap: var(--xt-space-2);
    flex-wrap: wrap;
}
.bit-info-panel__chip {
    padding: 2px 8px;
    background: var(--xt-color-primary-100);
    color: var(--xt-color-primary-800);
    border-radius: var(--xt-radius-full, 999px);
    font-size: 11px;
    font-weight: 700;
}
.bit-info-panel__lifecycle-link {
    margin-left: auto;
    padding: 3px 10px;
    background: var(--xt-color-bg-elevated);
    border: 1px solid var(--xt-color-border);
    border-radius: var(--xt-radius-sm);
    font-size: 12px;
    color: var(--xt-color-primary-700);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
}
.bit-info-panel__lifecycle-link:hover { background: var(--xt-color-primary-50); border-color: var(--xt-color-primary-300); }
.bit-info-panel__lifecycle-link .svg-icon { width: 14px; height: 14px; }
.bit-info-panel__lifecycle-hint {
    padding: 6px 10px;
    margin: var(--xt-space-2) 0;
    background: #f0f9ff;
    border-left: 3px solid #38bdf8;
    border-radius: var(--xt-radius-sm);
    font-size: 12px;
    color: #0369a1;
}

/* ===================================================================== */
/* V3.0 钻头成绩单 + 批量 IADC 录入                                        */
/* ===================================================================== */

/* /bits 顶部批量录入引导 */
.bulk-iadc-hint {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--xt-space-3);
    padding: var(--xt-space-3) var(--xt-space-5);
    background: linear-gradient(135deg, var(--xt-color-bg-elevated) 0%, color-mix(in srgb, #fef9c3 35%, var(--xt-color-bg-elevated)) 100%);
    border-left: 4px solid #facc15;
    margin-bottom: var(--xt-space-4);
    font-size: 13px;
    color: #713f12;
    flex-wrap: wrap;
}
.bulk-iadc-hint .svg-icon { width: 14px; height: 14px; vertical-align: -2px; color: #ca8a04; }

/* /bits 型号卡内 scorecard 跳转 */
.bit-spec-card__scorecard-link {
    margin: var(--xt-space-3) 0;
    text-align: right;
}

/* /bits/scorecard 综合评定卡 */
.bit-scorecard-page__spec {
    display: inline-block;
    padding: 2px 8px;
    background: var(--xt-color-primary-100);
    color: var(--xt-color-primary-800);
    border-radius: var(--xt-radius-sm);
    font-size: 14px;
    font-family: ui-monospace, "SFMono-Regular", monospace;
}
.bit-scorecard-page__meta {
    display: flex;
    gap: 6px;
    margin-top: 6px;
}

.verdict-card {
    padding: var(--xt-space-5);
    margin-bottom: var(--xt-space-4);
    background: var(--xt-color-bg-elevated);
    border-left: 4px solid var(--xt-color-border);
}
.verdict-card--good    { border-left-color: #16a34a; background: linear-gradient(135deg, var(--xt-color-bg-elevated) 0%, #f0fdf4 100%); }
.verdict-card--bad     { border-left-color: #dc2626; background: linear-gradient(135deg, var(--xt-color-bg-elevated) 0%, #fef2f2 100%); }
.verdict-card--fair    { border-left-color: #eab308; background: linear-gradient(135deg, var(--xt-color-bg-elevated) 0%, #fefce8 100%); }
.verdict-card--neutral { border-left-color: #94a3b8; }

.verdict-card__head {
    display: flex;
    align-items: baseline;
    gap: var(--xt-space-3);
    margin-bottom: 6px;
}
.verdict-card__label {
    font-size: 13px;
    color: var(--xt-color-text-muted);
    font-weight: 600;
}
.verdict-card__verdict {
    font-size: 28px;
    font-weight: 800;
    color: var(--xt-color-text);
}
.verdict-card--good .verdict-card__verdict    { color: #15803d; }
.verdict-card--bad .verdict-card__verdict     { color: #b91c1c; }
.verdict-card--fair .verdict-card__verdict    { color: #a16207; }
.verdict-card__hint {
    font-size: 14px;
    color: var(--xt-color-text);
    margin-bottom: var(--xt-space-3);
    line-height: 1.5;
}
.verdict-card__stats {
    padding: var(--xt-space-3);
    background: var(--xt-color-bg);
    border: 1px solid var(--xt-color-border);
    border-radius: var(--xt-radius-sm);
    font-size: 13px;
    color: var(--xt-color-text-muted);
    font-variant-numeric: tabular-nums;
}

/* IADC 磨损分布 bar */
.scorecard-iadc { padding: var(--xt-space-4) var(--xt-space-5); }
.scorecard-iadc .panel__hint {
    margin: 0 0 var(--xt-space-3);
    font-size: 12px;
    color: var(--xt-color-text-muted);
}
.scorecard-iadc__bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.scorecard-iadc__row {
    display: grid;
    grid-template-columns: 70px 1fr 130px;
    align-items: center;
    gap: var(--xt-space-3);
    padding: 6px 0;
}
.scorecard-iadc__char code {
    display: inline-block;
    padding: 2px 8px;
    background: var(--xt-color-bg-muted, #f1f5f9);
    border-radius: var(--xt-radius-sm);
    font-size: 12px;
    font-weight: 700;
}
.scorecard-iadc__bar {
    height: 14px;
    background: var(--xt-color-bg-muted, #f1f5f9);
    border-radius: 7px;
    overflow: hidden;
}
.scorecard-iadc__bar span {
    display: block;
    height: 100%;
    background: var(--xt-color-primary-500);
    transition: width 0.4s ease;
}
.scorecard-iadc__row--good .scorecard-iadc__bar span    { background: #22c55e; }
.scorecard-iadc__row--bad .scorecard-iadc__bar span     { background: #ef4444; }
.scorecard-iadc__row--neutral .scorecard-iadc__bar span { background: #94a3b8; }
.scorecard-iadc__count {
    font-size: 13px;
    color: var(--xt-color-text-muted);
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.scorecard-secondary { grid-template-columns: 1fr 1fr; }
.scorecard-rank-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.scorecard-rank-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 10px;
    background: var(--xt-color-bg);
    border: 1px solid var(--xt-color-border);
    border-radius: var(--xt-radius-sm);
    font-size: 13px;
}
.scorecard-rank-list code {
    padding: 1px 6px;
    background: var(--xt-color-bg-muted, #f1f5f9);
    border-radius: 3px;
    font-size: 11px;
}
.scorecard-rank-list strong {
    color: var(--xt-color-primary-700);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.scorecard-formation { color: var(--xt-color-text); font-weight: 500; }

.scorecard-main-char {
    display: inline-block;
    padding: 1px 6px;
    background: var(--xt-color-bg-muted, #f1f5f9);
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
}
.scorecard-main-char--good { background: #dcfce7; color: #15803d; }
.scorecard-main-char--bad  { background: #fee2e2; color: #b91c1c; }
.iadc-cell { font-size: 11px; color: var(--xt-color-text-muted); }

/* /lifecycle/bulk-iadc */
.bulk-iadc-form { display: flex; flex-direction: column; gap: var(--xt-space-3); }
.bulk-iadc-toolbar {
    display: flex;
    align-items: center;
    gap: var(--xt-space-3);
    padding: var(--xt-space-3) var(--xt-space-4);
    background: var(--xt-color-bg-elevated);
    border: 1px solid var(--xt-color-border);
    border-radius: var(--xt-radius-md);
    position: sticky;
    top: 64px;
    z-index: 30;
    flex-wrap: wrap;
}
.bulk-iadc-toolbar--bottom { position: static; }
.bulk-iadc-toolbar__count {
    padding: 2px 10px;
    background: var(--xt-color-primary-100);
    color: var(--xt-color-primary-800);
    border-radius: var(--xt-radius-full, 999px);
    font-size: 12px;
    font-weight: 700;
}
.bulk-iadc-toolbar__hint {
    font-size: 11px;
    color: var(--xt-color-text-muted);
    flex: 1;
}
.bulk-iadc-toolbar__actions { margin-left: auto; }

.bulk-iadc-list { display: flex; flex-direction: column; gap: var(--xt-space-2); }
.bulk-iadc-row {
    padding: var(--xt-space-3) var(--xt-space-4);
    background: var(--xt-color-bg-elevated);
    border: 1px solid var(--xt-color-border);
    border-radius: var(--xt-radius-md);
}
.bulk-iadc-row__head {
    display: flex;
    align-items: center;
    gap: var(--xt-space-3);
    margin-bottom: var(--xt-space-2);
    flex-wrap: wrap;
}
.bulk-iadc-row__name {
    font-weight: 600;
    font-size: 14px;
    color: var(--xt-color-text);
}
.bulk-iadc-row__spec {
    padding: 2px 8px;
    background: var(--xt-color-bg-muted, #f1f5f9);
    border-radius: var(--xt-radius-sm);
    font-size: 11px;
    color: var(--xt-color-text);
}
.bulk-iadc-row__serial {
    font-size: 11px;
    color: var(--xt-color-text-muted);
}
.bulk-iadc-row__preview {
    margin-left: auto;
    padding: 2px 8px;
    background: var(--xt-color-primary-50);
    border: 1px solid var(--xt-color-primary-200);
    border-radius: var(--xt-radius-sm);
    font-size: 12px;
    color: var(--xt-color-primary-800);
    font-weight: 700;
    font-family: ui-monospace, "SFMono-Regular", monospace;
}
.bulk-iadc-row__slots {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 6px;
}
@media (max-width: 1200px) { .bulk-iadc-row__slots { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 768px)  { .bulk-iadc-row__slots { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ===================================================================== */
/* V3.1 设计套件着陆页 + 算法说明页                                        */
/* ===================================================================== */

/* 双端协作示意 */
.duo-system-diagram { padding: var(--xt-space-5); }
.duo-system-diagram__title {
    display: flex; align-items: center; gap: var(--xt-space-2);
    margin: 0 0 var(--xt-space-4);
    font-size: 16px; font-weight: 600;
}
.duo-system-diagram__flow {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: stretch;
    gap: var(--xt-space-4);
}
@media (max-width: 960px) {
    .duo-system-diagram__flow { grid-template-columns: 1fr; }
}
.duo-system-side {
    padding: var(--xt-space-4);
    background: var(--xt-color-bg);
    border: 1px solid var(--xt-color-border);
    border-radius: var(--xt-radius-md);
    text-align: center;
}
.duo-system-side--web     { border-top: 3px solid #3b82f6; }
.duo-system-side--desktop { border-top: 3px solid #16a34a; }
.duo-system-side__icon { color: var(--xt-color-primary-600); margin-bottom: var(--xt-space-2); }
.duo-system-side--desktop .duo-system-side__icon { color: #16a34a; }
.duo-system-side__title {
    font-size: 16px; font-weight: 700;
    color: var(--xt-color-text);
}
.duo-system-side__subtitle {
    font-size: 12px;
    color: var(--xt-color-text-muted);
    margin: 4px 0 var(--xt-space-3);
}
.duo-system-side ul {
    margin: 0; padding-left: 20px;
    text-align: left;
    font-size: 13px;
    line-height: 1.7;
    color: var(--xt-color-text);
}
.duo-system-arrows {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: var(--xt-space-3);
}
.duo-system-arrow {
    padding: 6px 12px;
    background: var(--xt-color-primary-50);
    border: 1px solid var(--xt-color-primary-200);
    border-radius: var(--xt-radius-sm);
    font-size: 11px;
    color: var(--xt-color-primary-800);
    white-space: nowrap;
}
.duo-system-arrow--reverse { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; }
.duo-system-arrow code {
    background: rgba(255, 255, 255, 0.7);
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 10px;
}
@media (max-width: 960px) {
    .duo-system-arrows { flex-direction: row; flex-wrap: wrap; }
}

/* studio 介绍 */
.studio-intro { padding: var(--xt-space-5); }
.studio-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--xt-space-3);
    margin-top: var(--xt-space-3);
}
.studio-feature {
    padding: var(--xt-space-3);
    background: var(--xt-color-bg);
    border: 1px solid var(--xt-color-border);
    border-radius: var(--xt-radius-md);
    font-size: 13px;
    line-height: 1.6;
}
.studio-feature__title {
    display: flex; align-items: center; gap: 6px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--xt-color-text);
}

/* studio 安装 */
.studio-install { padding: var(--xt-space-5); }
.studio-install__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--xt-space-3);
}
.studio-install__card {
    padding: var(--xt-space-3) var(--xt-space-4);
    background: var(--xt-color-bg);
    border: 1px solid var(--xt-color-border);
    border-radius: var(--xt-radius-md);
}
.studio-install__card-title {
    font-size: 13px; font-weight: 700;
    margin-bottom: 8px;
    color: var(--xt-color-text);
}
.studio-install__card pre {
    margin: 0 0 8px;
    padding: 8px 12px;
    background: #0f172a;
    color: #e2e8f0;
    font-family: ui-monospace, "SFMono-Regular", monospace;
    font-size: 12px;
    border-radius: var(--xt-radius-sm);
    overflow-x: auto;
    line-height: 1.5;
}
.studio-install__card p {
    margin: 0;
    font-size: 12px;
    color: var(--xt-color-text-muted);
}
.studio-install__hint {
    margin-top: var(--xt-space-3);
    padding: 8px 12px;
    background: #fef9c3;
    border-left: 3px solid #facc15;
    border-radius: var(--xt-radius-sm);
    font-size: 12px;
    color: #713f12;
}

/* API 表 */
.studio-api { padding: var(--xt-space-5); }
.studio-api__hint {
    margin: 0 0 var(--xt-space-3);
    font-size: 12px;
    color: var(--xt-color-text-muted);
}
.studio-api-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.studio-api-table thead th {
    text-align: left;
    padding: 8px 12px;
    background: var(--xt-color-bg-muted, #f1f5f9);
    color: var(--xt-color-text-muted);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.studio-api-table tbody td {
    padding: 8px 12px;
    border-top: 1px solid var(--xt-color-border);
}
.studio-api-table code {
    font-size: 12px;
    color: var(--xt-color-primary-700);
}

.studio-history-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 13px;
    line-height: 1.9;
    color: var(--xt-color-text);
}
.studio-history-list li code {
    font-size: 11px;
    color: var(--xt-color-text-muted);
}

/* /docs/algorithms 算法说明页 */
.algo-layers { padding: var(--xt-space-5); }
.algo-layers__list {
    margin: var(--xt-space-3) 0 0;
    padding-left: 20px;
    line-height: 2;
    font-size: 14px;
}
.algo-grid { grid-template-columns: 1fr 1fr; }
@media (max-width: 960px) { .algo-grid { grid-template-columns: 1fr; } }

.algo-card { padding: var(--xt-space-4); }
.algo-card__head {
    margin-bottom: var(--xt-space-3);
}
.algo-card__layer {
    display: inline-block;
    padding: 2px 8px;
    background: var(--xt-color-primary-100);
    color: var(--xt-color-primary-800);
    border-radius: var(--xt-radius-full, 999px);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}
.algo-card__title {
    display: flex; align-items: center; gap: 6px;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}
.algo-card__list {
    margin: 0; padding: 0;
    list-style: none;
}
.algo-card__list li {
    padding: 8px 0;
    border-bottom: 1px dashed var(--xt-color-border);
    font-size: 13px;
}
.algo-card__list li:last-child { border-bottom: 0; }
.algo-card__list small {
    color: var(--xt-color-text-muted);
    font-size: 12px;
    line-height: 1.5;
}
.algo-card__hint {
    font-size: 12px;
    color: var(--xt-color-text-muted);
    margin: 0 0 var(--xt-space-2);
}
.algo-card__chips {
    display: flex; flex-wrap: wrap; gap: 6px;
}
.algo-chip {
    padding: 3px 10px;
    background: var(--xt-color-bg-muted, #f1f5f9);
    border: 1px solid var(--xt-color-border);
    border-radius: var(--xt-radius-full, 999px);
    font-size: 11px;
    color: var(--xt-color-text);
}

.algo-references { padding: var(--xt-space-5); }
.algo-refs-section {
    margin: var(--xt-space-4) 0 var(--xt-space-2);
    font-size: 14px;
    font-weight: 700;
    color: var(--xt-color-primary-700);
    padding-bottom: 4px;
    border-bottom: 2px solid var(--xt-color-primary-200);
}
.algo-refs-list {
    margin: 0; padding-left: 20px;
    font-size: 13px;
    line-height: 1.6;
}
.algo-refs-list li {
    padding: 8px 0;
    border-bottom: 1px dashed var(--xt-color-border);
}
.algo-refs-list li:last-child { border-bottom: 0; }
.algo-refs-list p {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--xt-color-text-muted);
    line-height: 1.6;
}
.algo-refs-list strong { color: var(--xt-color-primary-700); }

.algo-boundary { padding: var(--xt-space-5); }
.algo-boundary__cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--xt-space-4);
}
@media (max-width: 768px) { .algo-boundary__cols { grid-template-columns: 1fr; } }
.algo-boundary__cols h4 {
    margin: 0 0 var(--xt-space-2);
    font-size: 13px;
    color: var(--xt-color-text);
}
.algo-boundary__cols ul {
    margin: 0;
    padding-left: 20px;
    font-size: 13px;
    line-height: 1.8;
}
.algo-source-note {
    margin-top: var(--xt-space-4);
    text-align: center;
}

/* ===================================================================== */
/* V3.3 工作台「井摘要 hero + 邻井 + 最近活动」信息驾驶舱                  */
/* ===================================================================== */

.wb-hero {
    padding: var(--xt-space-4) var(--xt-space-5);
    background: linear-gradient(135deg, var(--xt-color-bg-elevated) 0%, color-mix(in srgb, var(--xt-color-primary-50) 40%, var(--xt-color-bg-elevated)) 100%);
    border-left: 4px solid var(--xt-color-border);
    margin-bottom: var(--xt-space-4);
}
.wb-hero--excellent { border-left-color: #16a34a; }
.wb-hero--good      { border-left-color: #3b82f6; }
.wb-hero--partial   { border-left-color: #eab308; }
.wb-hero--early     { border-left-color: #94a3b8; }

.wb-hero__main {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: var(--xt-space-4);
    align-items: center;
    margin-bottom: var(--xt-space-3);
}
@media (max-width: 768px) {
    .wb-hero__main { grid-template-columns: 1fr; }
}

.wb-hero__score {
    padding: var(--xt-space-3);
    background: var(--xt-color-bg-elevated);
    border: 1px solid var(--xt-color-border);
    border-radius: var(--xt-radius-md);
    text-align: center;
}
.wb-hero__score-label {
    font-size: 11px;
    color: var(--xt-color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.wb-hero__score-num {
    font-size: 38px;
    font-weight: 800;
    color: var(--xt-color-primary-700);
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
    margin: 4px 0;
}
.wb-hero__score-num span {
    font-size: 14px;
    font-weight: 400;
    color: var(--xt-color-text-muted);
}
.wb-hero--excellent .wb-hero__score-num { color: #15803d; }
.wb-hero--good      .wb-hero__score-num { color: #1d4ed8; }
.wb-hero--partial   .wb-hero__score-num { color: #a16207; }
.wb-hero--early     .wb-hero__score-num { color: #475569; }

.wb-hero__score-health {
    display: inline-block;
    padding: 2px 10px;
    border-radius: var(--xt-radius-full, 999px);
    font-size: 11px;
    font-weight: 700;
    background: var(--xt-color-primary-100);
    color: var(--xt-color-primary-800);
}
.wb-hero--excellent .wb-hero__score-health { background: #dcfce7; color: #15803d; }
.wb-hero--good      .wb-hero__score-health { background: #dbeafe; color: #1d4ed8; }
.wb-hero--partial   .wb-hero__score-health { background: #fef9c3; color: #a16207; }
.wb-hero--early     .wb-hero__score-health { background: #f1f5f9; color: #475569; }

.wb-hero__info-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: var(--xt-space-2);
}
.wb-hero__chip {
    padding: 4px 12px;
    background: var(--xt-color-bg);
    border: 1px solid var(--xt-color-border);
    border-radius: var(--xt-radius-md);
    font-size: 13px;
    color: var(--xt-color-text);
    font-variant-numeric: tabular-nums;
}
.wb-hero__chip b {
    color: var(--xt-color-text-muted);
    font-weight: 500;
    margin-right: 4px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.wb-hero__chip code {
    color: var(--xt-color-primary-800);
    background: var(--xt-color-primary-50);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 12px;
}
.wb-hero__next {
    padding: 6px 12px;
    background: #fef9c3;
    border-left: 3px solid #facc15;
    border-radius: var(--xt-radius-sm);
    font-size: 12px;
    color: #713f12;
}
.wb-hero__next .svg-icon { width: 12px; height: 12px; vertical-align: -2px; }

.wb-hero__quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: var(--xt-space-3);
    border-top: 1px dashed var(--xt-color-border);
}
.wb-quick-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: var(--xt-color-bg);
    border: 1px solid var(--xt-color-border);
    border-radius: var(--xt-radius-sm);
    font-size: 12px;
    color: var(--xt-color-text);
    text-decoration: none;
    transition: border-color 0.15s, background 0.15s;
}
.wb-quick-btn:hover {
    border-color: var(--xt-color-primary-400);
    background: var(--xt-color-primary-50);
}
.wb-quick-btn--primary {
    background: var(--xt-color-primary-600);
    color: white;
    border-color: var(--xt-color-primary-600);
}
.wb-quick-btn--primary:hover {
    background: var(--xt-color-primary-700);
    border-color: var(--xt-color-primary-700);
    color: white;
}
.wb-quick-btn .svg-icon { width: 13px; height: 13px; }

/* 邻井 + 最近活动 两栏 */
.wb-side-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--xt-space-3);
    margin-bottom: var(--xt-space-4);
}
@media (max-width: 960px) { .wb-side-grid { grid-template-columns: 1fr; } }

.wb-neighbors, .wb-activity {
    padding: var(--xt-space-3) var(--xt-space-4);
}

.wb-neighbors__list, .wb-activity__list {
    list-style: none;
    padding: 0;
    margin: var(--xt-space-2) 0 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wb-neighbor-row {
    display: grid;
    grid-template-columns: 1.4fr 2fr 36px 28px;
    gap: var(--xt-space-2);
    align-items: center;
    padding: 6px 10px;
    background: var(--xt-color-bg);
    border: 1px solid var(--xt-color-border);
    border-radius: var(--xt-radius-sm);
}
.wb-neighbor-row__name {
    font-size: 13px;
    font-weight: 600;
    color: var(--xt-color-text);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wb-neighbor-row__name:hover { color: var(--xt-color-primary-700); }
.wb-neighbor-row__type {
    margin-left: 4px;
    padding: 1px 6px;
    background: var(--xt-color-bg-muted, #f1f5f9);
    color: var(--xt-color-text-muted);
    border-radius: var(--xt-radius-sm);
    font-size: 10px;
    font-weight: 500;
}
.wb-neighbor-row__reasons {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
}
.wb-neighbor-row__reason {
    padding: 1px 6px;
    background: var(--xt-color-bg-muted, #f1f5f9);
    color: var(--xt-color-text-muted);
    border-radius: 3px;
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}
.wb-neighbor-row__score {
    text-align: right;
    font-size: 14px;
    font-weight: 700;
    color: var(--xt-color-primary-700);
    font-variant-numeric: tabular-nums;
}
.wb-neighbor-row__actions a { padding: 2px 4px; }
.wb-neighbor-row__actions .svg-icon { width: 14px; height: 14px; }

.wb-activity-row {
    display: grid;
    grid-template-columns: 80px 90px 1fr;
    gap: var(--xt-space-2);
    align-items: center;
    padding: 6px 10px;
    background: var(--xt-color-bg);
    border-left: 2px solid var(--xt-color-primary-300);
    border-radius: var(--xt-radius-sm);
    font-size: 12px;
}
.wb-activity-row__time {
    color: var(--xt-color-text-muted);
    font-variant-numeric: tabular-nums;
}
.wb-activity-row__user {
    color: var(--xt-color-text);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wb-activity-row__action {
    color: var(--xt-color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* ——— 批量导入：每个文件一张卡 ——— */
.batch-file {
    border: 1px solid var(--xt-color-border, #e3e7ee);
    border-radius: 6px;
    padding: 12px 14px;
    margin: 10px 0;
    background: var(--xt-color-surface, #fff);
}

.batch-file__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

/* 判得没把握的标黄 —— 这几个必须人自己确认，不能顺手点过去 */
.batch-file--unsure {
    background: #fdf6e7;
    border-color: #e0b769;
}

.batch-file--bad {
    background: #fdf0ee;
    border-color: #e6a79e;
}

.batch-file--done {
    opacity: .62;
}

.batch-file__status {
    font-size: 12.5px;
    color: var(--xt-color-text-subtle, #6b7280);
}

/* 字段识别：没认出来的行淡一点，一眼能扫出来 */
.fieldcheck-row--miss td {
    color: var(--xt-color-text-subtle, #8b93a1);
    background: #fbfbfc;
}
