/**
 * Sheet2 尺码表网格向导 — 生产样式（网格 / 预览 / 结构化表共用）
 * 加载范围：module_lite pane-s2、mock 预览页；全表居中为 Sheet2 场景例外（C-01）
 */

.scw-wizard-steps {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 1.25rem;
}

.scw-wizard-step {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6b7280;
}

.scw-wizard-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    background: #e5e7eb;
    color: #6b7280;
    flex-shrink: 0;
}

.scw-wizard-step.is-active .scw-wizard-step-num {
    background: #2563eb;
    color: #fff;
}

.scw-wizard-step.is-done .scw-wizard-step-num {
    background: #dbeafe;
    color: #1d4ed8;
}

.scw-wizard-step.is-active {
    color: #111827;
    font-weight: 600;
}

.scw-wizard-step-connector {
    flex: 0 0 48px;
    height: 2px;
    background: #e5e7eb;
    margin: 0 12px;
}

.scw-wizard-step-connector.is-done {
    background: #93c5fd;
}

.scw-strip-fields {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 1.25rem;
}

.scw-strip-field {
    display: flex;
    align-items: center;
    gap: 8px;
}

.scw-strip-field label {
    font-size: 14px;
    color: #374151;
    margin: 0;
    white-space: nowrap;
}

.scw-strip-field select {
    width: 200px;
    height: 30px;
    font-size: 14px;
    padding: 0 8px;
}

.scw-strip-field select.scw-base-select {
    width: 100px;
}

.scw-grid-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-bottom: 10px;
}

.scw-grid-toolbar-hint {
    font-size: 12px;
    color: #6b7280;
    flex: 1 1 200px;
}

.scw-grid-wrap--ctx {
    position: relative;
}

.scw-grid-ctx-menu {
    position: absolute;
    z-index: 40;
    min-width: 88px;
    padding: 4px 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.scw-grid-ctx-menu.scw-hidden {
    display: none;
}

.scw-grid-ctx-item {
    display: block;
    width: 100%;
    padding: 8px 14px;
    border: none;
    background: transparent;
    font-size: 14px;
    color: #374151;
    text-align: left;
    cursor: pointer;
}

.scw-grid-ctx-item:hover,
.scw-grid-ctx-item:focus {
    background: #f3f4f6;
    outline: none;
}

.scw-grid-wrap {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    overflow: auto;
    max-height: min(420px, 55vh);
    box-shadow: inset 0 0 0 1px #f3f4f6;
}

.scw-grid-table {
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    width: max-content;
    min-width: 100%;
    font-size: 13px;
    font-family: Inter, "PingFang SC", ui-sans-serif, system-ui, sans-serif;
}

.scw-grid-table col.scw-grid-col-text {
    width: max-content;
    min-width: 140px;
}

.scw-grid-table col.scw-grid-col-meta {
    min-width: 72px;
}

.scw-grid-table col.scw-grid-col-size {
    min-width: 56px;
}

.scw-grid-table col.scw-grid-col-default {
    min-width: 72px;
}

.scw-grid-table th,
.scw-grid-table td {
    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    padding: 0;
    min-height: 32px;
    vertical-align: middle;
    background: #fff;
    text-align: center;
}

.scw-grid-table th.scw-grid-corner,
.scw-grid-table th.scw-grid-row-head {
    position: sticky;
    left: 0;
    z-index: 3;
    background: #f3f4f6;
    color: #6b7280;
    font-weight: 500;
    text-align: center;
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    font-size: 11px;
}

.scw-grid-table th.scw-grid-col-head {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f3f4f6;
    color: #6b7280;
    font-weight: 500;
    text-align: center;
    height: 28px;
    font-size: 11px;
}

.scw-grid-table th.scw-grid-corner {
    z-index: 4;
    left: 0;
    top: 0;
}

.scw-grid-cell {
    display: block;
    width: 100%;
    min-height: 31px;
    line-height: 1.35;
    padding: 6px 8px;
    border: none;
    outline: none;
    background: transparent;
    font-size: 13px;
    color: #111827;
    box-sizing: border-box;
    text-align: center;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.scw-grid-table td.scw-grid-col-text .scw-grid-cell {
    text-align: center;
    white-space: nowrap;
    min-height: 31px;
    height: auto;
    overflow: visible;
    text-overflow: clip;
}

.scw-grid-table td.scw-grid-col-text {
    width: max-content;
    min-width: max-content;
}

.scw-grid-table td.scw-grid-data-cell {
    height: auto;
}

.scw-grid-cell:focus {
    box-shadow: inset 0 0 0 2px #2563eb;
    background: #fff;
    z-index: 1;
    position: relative;
}

.scw-grid-table td.scw-grid-cell-active {
    box-shadow: inset 0 0 0 2px #2563eb;
}

.scw-grid-table td.scw-grid-cell-error {
    background: #fef2f2;
}

.scw-grid-table td.scw-grid-cell-error .scw-grid-cell:focus,
.scw-grid-table td.scw-grid-cell-error.scw-grid-cell-active {
    box-shadow: inset 0 0 0 2px #ef4444;
}

.scw-grid-table td.scw-grid-cell-warn {
    background: #fffbeb;
}

.scw-error-panel {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.scw-error-panel-title {
    font-size: 13px;
    font-weight: 600;
    color: #b91c1c;
    margin-bottom: 6px;
}

.scw-error-list {
    margin: 0;
    padding-left: 1.2rem;
    font-size: 13px;
    color: #991b1b;
}

.scw-error-list li {
    margin-bottom: 4px;
    cursor: pointer;
}

.scw-error-list li:hover {
    text-decoration: underline;
}

.scw-wizard-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #f3f4f6;
}

.scw-preview-note {
    padding: 10px 14px;
    border-radius: 8px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    font-size: 13px;
    color: #1e40af;
    margin-bottom: 1rem;
}

.scw-preview-table-wrap {
    overflow-x: auto;
}

.scw-preview-table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    table-layout: auto;
}

.scw-preview-table col.scw-col-part {
    width: max-content;
    min-width: 140px;
}

.scw-preview-table col.scw-col-size {
    min-width: 56px;
}

.scw-preview-table thead th {
    background: #f9fafb;
    color: #374151;
    font-weight: 600;
    padding: 10px 12px;
    border-bottom: 1px solid #f3f4f6;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}

.scw-preview-table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
    min-height: 48px;
    text-align: center;
    vertical-align: middle;
    font-variant-numeric: tabular-nums;
}

.scw-preview-table tbody td.scw-col-part {
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
    width: max-content;
    min-width: max-content;
    text-align: center;
}

.scw-preview-table tbody tr:hover {
    background: #f9fafb;
}

.scw-preview-table tbody td.scw-empty-cell {
    color: #9ca3af;
}

.scw-meta-list {
    font-size: 13px;
    color: #374151;
    margin: 0 0 1rem;
    padding: 0;
    list-style: none;
}

.scw-meta-list li {
    margin-bottom: 4px;
}

.scw-meta-list strong {
    color: #111827;
    font-weight: 600;
}

.scw-saved-shell .scw-saved-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.scw-saved-table {
    width: max-content;
    min-width: 100%;
    table-layout: auto;
}

.scw-saved-table thead th,
.scw-saved-table tbody td {
    text-align: center;
    vertical-align: middle;
}

.scw-saved-table col.scw-col-part {
    width: max-content;
    min-width: 160px;
}

.scw-saved-table tbody td.scw-col-part .form-control {
    text-align: center;
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
    width: 100%;
    min-width: max-content;
    height: auto;
    min-height: 30px;
    overflow: visible;
}

.scw-saved-table tbody td.scw-col-part {
    width: max-content;
    min-width: max-content;
}

.scw-saved-table tbody td:not(.scw-col-part) .form-control {
    text-align: center;
    min-width: 56px;
}

.scw-hidden {
    display: none !important;
}

.scw-width-probe {
    position: absolute;
    left: -9999px;
    top: -9999px;
    visibility: hidden;
    white-space: nowrap;
    font-size: 13px;
    font-family: Inter, "PingFang SC", ui-sans-serif, system-ui, sans-serif;
    padding: 0 8px;
}
