/* ============================================================
 * 客户公开询价 H5 页面 · 样式表 v2（品质升级）
 * 设计系统：对齐官网 site/site.css CSS 变量
 * 全部 ::before 伪元素做强调条，零 border-left
 * 全部颜色走 var(--color-*)，零硬编码色值
 * 按钮 hover 统一 opacity: 0.85，无 scale 变形
 * ============================================================ */

/* ========== 1. 设计系统 Token ========== */
:root {
    --color-primary: #1E2937;
    --color-accent: #0891B2;
    --color-bg: #F8FAFC;
    --color-surface: #FFFFFF;
    --color-border: #D1D5DB;
    --color-muted: #64748B;
    --color-subtle: #9CA3AF;
    --color-text-inverse: #FFFFFF;

    --status-critical: #EF4444;
    --status-critical-bg: #FEE2E2;
    --status-process: #0891B2;
    --status-process-bg: rgba(8, 145, 178, 0.08);
    --status-ok: #10B981;
    --status-ok-bg: #D1FAE5;
    --status-warn: #D97706;
    --status-neutral: #64748B;
    --status-neutral-bg: #F1F5F9;

    --hero-bg: #0F172A;
    --hero-text: #F8FAFC;
    --hero-muted: #94A3B8;
    --hero-logo-gradient: linear-gradient(135deg, var(--color-accent), var(--status-ok));

    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 48px;

    --font-hero: 48px;
    --font-h2: 32px;
    --font-h3: 20px;
    --font-body: 15px;
    --font-small: 13px;

    --radius-card: 12px;
    --radius-btn: 8px;
    --radius-pill: 6px;

    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-card-hover: 0 10px 25px rgba(0, 0, 0, 0.08);
    --shadow-hero-glow: 0 0 60px rgba(8, 145, 178, 0.15);

    --container-max: 1200px;
}

/* ========== 2. Reset ========== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-size: var(--font-body);
    line-height: 1.6;
    color: var(--color-primary);
    background: var(--color-bg);
    overflow-x: hidden;
}

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

img {
    max-width: 100%;
    display: block;
}

ul {
    list-style: none;
}

/* ========== 3. 容器 ========== */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

@media (max-width: 640px) {
    .container {
        padding: 0 var(--space-md);
    }
}

/* ========== 4. 视图切换 ========== */
.view {
    display: none;
}

.view.active {
    display: block;
}

/* ========== 5. 品牌顶栏（带 logo） ========== */
.brand-bar {
    background: var(--hero-bg);
    color: var(--hero-text);
    padding: var(--space-md) 0;
}

.brand-bar--compact {
    padding: var(--space-sm) 0;
}

.brand-bar__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-bar__brand {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.brand-bar__logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: contain;
    background: var(--color-surface);
    padding: 2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.brand-bar__text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.brand-bar__title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
}

.brand-bar__subtitle {
    font-size: 11px;
    color: var(--hero-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.brand-bar__date {
    font-size: var(--font-small);
    color: var(--hero-muted);
    white-space: nowrap;
}

.brand-bar__left {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.brand-bar__back {
    font-size: var(--font-body);
    color: var(--hero-muted);
    cursor: pointer;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.brand-bar__back:hover {
    opacity: 0.85;
}

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

@media (max-width: 640px) {
    .brand-bar__subtitle {
        display: none;
    }

    .brand-bar__inner {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-xs);
    }

    .brand-bar--compact .brand-bar__inner {
        flex-direction: row;
    }
}

/* ========== 6. 主内容区 ========== */
.main-content {
    padding-top: var(--space-xl);
    padding-bottom: var(--space-xl);
    min-height: calc(100vh - 180px);
}

/* ========== 7. 表单页标题（内嵌入表单容器） ========== */
.form-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--color-border);
}

.form-head__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.form-head__title {
    font-size: var(--font-h2);
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.2;
}

.form-head__desc {
    font-size: 15px;
    color: var(--color-muted);
    line-height: 1.5;
}

.form-head__link {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 14px;
    font-weight: 500;
    color: var(--color-accent);
    white-space: nowrap;
    cursor: pointer;
    transition: opacity 0.2s;
    padding: 8px 16px;
    border-radius: var(--radius-btn);
    background: var(--status-process-bg);
    margin-top: 2px;
}

.form-head__link:hover {
    opacity: 0.75;
}

@media (max-width: 640px) {
    .form-head {
        flex-direction: column;
        align-items: stretch;
    }

    .form-head__title {
        font-size: 26px;
    }

    .form-head__link {
        width: 100%;
        justify-content: center;
    }
}

/* ========== 8. 按钮 ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    font-family: inherit;
    font-size: var(--font-body);
    font-weight: 500;
    border: 1.5px solid transparent;
    border-radius: var(--radius-btn);
    cursor: pointer;
    transition: opacity 0.2s, box-shadow 0.2s;
    padding: 10px 24px;
    line-height: 1.4;
}

.btn:hover {
    opacity: 0.85;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn--primary {
    background: var(--color-accent);
    color: var(--color-text-inverse);
    border-color: var(--color-accent);
}

.btn--outline {
    background: transparent;
    border-color: var(--color-border);
    color: var(--color-primary);
}

.btn--outline:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.btn--lg {
    padding: 12px 32px;
    font-size: 16px;
}

.btn--sm {
    padding: 6px 16px;
    font-size: var(--font-small);
}

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

/* ========== 9. 表单卡片 ========== */
.inquiry-form {
    max-width: 800px;
    margin: 0 auto;
}

.form-card {
    background: var(--color-surface);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    margin-bottom: var(--space-lg);
    overflow: hidden;
}

.form-card__header {
    padding: var(--space-lg) var(--space-lg) 0;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    position: relative;
    padding-left: calc(var(--space-lg) + var(--space-md));
}

.form-card__header::before {
    content: '';
    position: absolute;
    left: var(--space-lg);
    top: var(--space-lg);
    width: 4px;
    height: 22px;
    border-radius: 2px;
    background: var(--color-accent);
}

.form-card__title {
    font-size: 18px;
    font-weight: 600;
}

.form-card__hint {
    font-size: var(--font-small);
    color: var(--color-muted);
}

.form-card__body {
    padding: var(--space-md) var(--space-lg) var(--space-lg);
}

/* 字段组 */
.form-group {
    margin-bottom: var(--space-md);
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-row {
    display: flex;
    gap: var(--space-md);
}

.form-row--three>.form-group {
    flex: 1;
    min-width: 0;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-primary);
    margin-bottom: var(--space-xs);
}

.required {
    color: var(--status-critical);
}

.form-input {
    width: 100%;
    font-family: inherit;
    font-size: var(--font-body);
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-btn);
    background: var(--color-surface);
    color: var(--color-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.form-input:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.12);
}

.form-input::placeholder {
    color: var(--color-subtle);
}

.form-input.error {
    border-color: var(--status-critical);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748B' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.form-counter {
    text-align: right;
    font-size: var(--font-small);
    color: var(--color-muted);
    margin-top: var(--space-xs);
}

.form-error {
    display: none;
    font-size: var(--font-small);
    color: var(--status-critical);
    margin-top: var(--space-xs);
}

.form-error.visible {
    display: block;
}

/* +86 前缀 */
.input-with-prefix {
    display: flex;
    align-items: stretch;
}

.input-prefix {
    display: flex;
    align-items: center;
    padding: 0 12px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-right: none;
    border-radius: var(--radius-btn) 0 0 var(--radius-btn);
    color: var(--color-muted);
    font-size: 14px;
    white-space: nowrap;
    font-weight: 500;
}

.input-with-prefix .form-input {
    border-radius: 0 var(--radius-btn) var(--radius-btn) 0;
}

/* 头像上传 */
.avatar-upload {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.avatar-upload__preview {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px dashed var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.avatar-upload__preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-upload__placeholder {
    font-size: 32px;
    color: var(--color-subtle);
}

.avatar-upload__input {
    display: none;
}

.avatar-upload__controls {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.avatar-upload__label {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-btn);
    cursor: pointer;
    font-size: 14px;
    transition: border-color 0.2s;
}

.avatar-upload__label:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.avatar-upload__remove {
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius-btn);
    background: var(--status-critical-bg);
    color: var(--status-critical);
    cursor: pointer;
    font-size: 14px;
}

/* 提交区 */
.form-submit {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: var(--space-lg) 0;
}

.form-submit .btn--primary {
    min-width: 280px;
}

.form-submit__hint {
    margin-top: var(--space-md);
    font-size: var(--font-small);
    color: var(--color-muted);
}

.form-submit__hint a {
    color: var(--color-accent);
    text-decoration: underline;
}

@media (max-width: 640px) {
    .form-row {
        flex-direction: column;
        gap: var(--space-md);
    }

    .form-row--three {
        flex-direction: column;
    }

    .form-submit .btn--primary {
        min-width: 100%;
    }
}

/* ========== 10. 附件上传 ========== */
.attachment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: var(--space-sm);
}

.attachment-add {
    aspect-ratio: 1;
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-card);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    gap: 4px;
}

.attachment-add:hover {
    border-color: var(--color-accent);
    background: var(--status-process-bg);
}

.attachment-add__label {
    font-size: 32px;
    color: var(--color-subtle);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    line-height: 1;
}

.attachment-add__text {
    font-size: 11px;
    color: var(--color-subtle);
}

.attachment-item {
    aspect-ratio: 1;
    border-radius: var(--radius-card);
    overflow: hidden;
    position: relative;
    border: 1px solid var(--color-border);
}

.attachment-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.attachment-item__status {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.attachment-item__status--loading {
    background: var(--color-surface);
    border: 2px solid var(--color-accent);
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

.attachment-item__status--done {
    background: var(--status-ok);
    color: var(--color-text-inverse);
}

.attachment-item__status--error {
    background: var(--status-critical);
    color: var(--color-text-inverse);
}

.attachment-item__delete {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background 0.2s;
}

.attachment-item__delete:hover {
    background: rgba(0, 0, 0, 0.75);
}

.attachment-status {
    margin-top: var(--space-sm);
    font-size: var(--font-small);
    color: var(--status-critical);
}

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

@media (max-width: 640px) {
    .attachment-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ========== 11. 签名 ========== */
.signature-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
}

.signature-canvas {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    cursor: crosshair;
    touch-action: none;
    max-width: 100%;
    background: #fff;
}

.signature-toolbar {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    width: 100%;
    max-width: 600px;
}

.signature-hint {
    font-size: var(--font-small);
    color: var(--color-muted);
    font-style: italic;
}

/* ========== 12. 成功视图 ========== */
.success-view {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 180px);
}

.success-card {
    text-align: center;
    padding: var(--space-xl) var(--space-lg);
    background: var(--color-surface);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    max-width: 480px;
    width: 100%;
}

.success-card__checkmark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--status-ok-bg);
    color: var(--status-ok);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
}

.success-card__title {
    font-size: var(--font-h3);
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

.success-card__desc {
    color: var(--color-muted);
    margin-bottom: var(--space-lg);
}

.success-card__info {
    background: var(--color-bg);
    border-radius: var(--radius-btn);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.success-card__label {
    font-size: var(--font-small);
    color: var(--color-muted);
}

.success-card__value {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-primary);
}

.success-card__hint {
    font-size: var(--font-small);
    color: var(--color-muted);
    margin-bottom: var(--space-lg);
}

.success-card__actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    align-items: center;
}

.success-card__actions .btn {
    min-width: 240px;
}

/* ========== 13. 页脚 ========== */
.guest-footer {
    background: var(--hero-bg);
    color: var(--hero-text);
    padding-top: var(--space-xl);
}

.guest-footer__inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--space-xl);
    padding-bottom: var(--space-xl);
}

.guest-footer__col h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: var(--space-md);
    position: relative;
    padding-left: var(--space-md);
}

.guest-footer__col h4::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    width: 3px;
    height: 14px;
    border-radius: 2px;
    background: var(--color-accent);
}

.guest-footer__col p {
    font-size: var(--font-small);
    color: var(--hero-muted);
    line-height: 1.7;
}

.guest-footer__col ul li {
    font-size: var(--font-small);
    color: var(--hero-muted);
    margin-bottom: var(--space-sm);
    line-height: 1.5;
}

.guest-footer__col ul li a {
    color: var(--hero-muted);
    transition: color 0.2s;
}

.guest-footer__col ul li a:hover {
    color: var(--color-accent);
}

.guest-footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: var(--space-md) 0;
    text-align: center;
}

.guest-footer__bottom p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.35);
}

@media (max-width: 640px) {
    .guest-footer__inner {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
}

/* ========== 14. 跟进列表页 ========== */
.followup-hero {
    margin-bottom: var(--space-lg);
}

.followup-hero__card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--color-surface);
    border-radius: var(--radius-card);
    padding: var(--space-lg) var(--space-xl);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--color-border);
}

.followup-hero__left {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.followup-hero__title {
    font-size: 26px;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.3;
}

.followup-hero__desc {
    font-size: 15px;
    color: var(--color-muted);
    line-height: 1.5;
}

.followup-hero__right {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.followup-hero__count {
    font-size: var(--font-small);
    color: var(--color-muted);
    white-space: nowrap;
    background: var(--color-bg);
    padding: 6px 16px;
    border-radius: var(--radius-pill);
}

.followup-list {
    max-height: 520px;
    overflow-y: auto;
    border-radius: var(--radius-card);
    background: var(--color-surface);
    box-shadow: var(--shadow-card);
}

.followup-list {
    scrollbar-width: thin;
    scrollbar-color: var(--color-border) transparent;
}

.followup-items {
    display: flex;
    flex-direction: column;
}

/* 空状态 */
.followup-empty {
    text-align: center;
    padding: var(--space-xl) var(--space-lg);
}

.followup-empty__icon {
    color: var(--color-subtle);
    margin-bottom: var(--space-md);
}

.followup-empty__text {
    font-size: 18px;
    font-weight: 500;
    color: var(--color-primary);
    margin-bottom: var(--space-sm);
}

.followup-empty__hint {
    font-size: var(--font-small);
    color: var(--color-muted);
    margin-bottom: var(--space-lg);
}

/* ========== 14-b. 跟进列表：表格视图（PC 重构版） ========== */
.followup-table-wrap {
    overflow-x: auto;
    padding: 0;
}

.followup-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.followup-table thead {
    background: var(--color-bg);
    border-bottom: 2px solid var(--color-border);
}

.followup-table thead th {
    padding: 14px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-muted);
    text-align: left;
    white-space: nowrap;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.followup-table__row {
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid var(--color-border);
}

.followup-table__row:last-child {
    border-bottom: none;
}

.followup-table__row:hover {
    background: var(--status-process-bg);
}

.followup-table tbody td {
    padding: 14px 16px;
    font-size: 14px;
    color: var(--color-primary);
    vertical-align: middle;
}

.followup-table__id {
    font-weight: 700;
    color: var(--color-accent);
    font-size: 14px;
    letter-spacing: 0.5px;
}

.followup-table__product {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-all;
    font-weight: 500;
}

.followup-table__delete {
    padding: 5px 14px;
    font-size: 12px;
    border: 1px solid var(--status-critical);
    background: transparent;
    color: var(--status-critical);
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    font-family: inherit;
}

.followup-table__delete:hover {
    background: var(--status-critical);
    color: #fff;
}

/* 列宽 */
.followup-table .col-id {
    width: 12%;
}

.followup-table .col-product {
    width: 24%;
}

.followup-table .col-contact {
    width: 12%;
}

.followup-table .col-phone {
    width: 15%;
}

.followup-table .col-status {
    width: 10%;
}

.followup-table .col-time {
    width: 15%;
}

.followup-table .col-action {
    width: 12%;
    text-align: center;
}

.followup-table .col-action .badge {
    background: var(--status-neutral-bg);
    color: var(--status-neutral);
}

.followup-item__status--void {
    background: var(--status-critical-bg);
    color: var(--status-critical);
}

.followup-item__date {
    font-size: var(--font-small);
    color: var(--color-muted);
    margin-left: auto;
    white-space: nowrap;
}

.followup-item__delete {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--color-subtle);
    cursor: pointer;
    font-size: 18px;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
    margin-left: var(--space-sm);
    flex-shrink: 0;
}

.followup-item__delete:hover {
    background: var(--status-critical-bg);
    color: var(--status-critical);
}

/* ========== 15. 详情页 ========== */
.detail-status {
    font-size: 13px;
    font-weight: 500;
    padding: 4px 14px;
    border-radius: var(--radius-pill);
    background: var(--status-process-bg);
    color: var(--status-process);
}

.detail-status--pending {
    background: rgba(217, 119, 6, 0.12);
    color: var(--status-warn);
}

.detail-status--quoted {
    background: var(--status-process-bg);
    color: var(--status-process);
}

.detail-status--closed {
    background: var(--status-neutral-bg);
    color: var(--status-neutral);
}

.detail-status--void {
    background: var(--status-critical-bg);
    color: var(--status-critical);
}

.detail-loading,
.detail-error {
    text-align: center;
    padding: var(--space-xl);
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto var(--space-md);
}

.detail-content {
    max-width: 800px;
    margin: 0 auto;
}

/* Tab */
.detail-tabs {
    display: flex;
    border-bottom: 2px solid var(--color-border);
    margin-bottom: var(--space-lg);
}

.detail-tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    color: var(--color-muted);
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}

.detail-tab.active {
    color: var(--color-accent);
}

.detail-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--color-accent);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 详情卡片 */
.detail-card {
    background: var(--color-surface);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.detail-card__title-row {
    margin-bottom: var(--space-md);
}

.detail-card__id {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-accent);
    letter-spacing: 0.5px;
}

.detail-card__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-md);
}

.detail-card__item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.detail-card__label {
    font-size: var(--font-small);
    color: var(--color-muted);
}

.detail-card__value {
    font-size: var(--font-body);
    font-weight: 500;
    word-break: break-word;
}

/* 详情区块 */
.detail-section {
    background: var(--color-surface);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.detail-section__title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: var(--space-md);
    position: relative;
    padding-left: var(--space-md);
}

.detail-section__title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    width: 4px;
    height: 16px;
    border-radius: 2px;
    background: var(--color-accent);
}

.detail-remark {
    margin-top: var(--space-md);
}

.detail-remark__text {
    font-size: var(--font-body);
    color: var(--color-primary);
    line-height: 1.6;
    margin-top: var(--space-xs);
    white-space: pre-wrap;
}

/* 附件预览网格 */
.attachment-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: var(--space-sm);
}

.attachment-preview-grid img {
    aspect-ratio: 1;
    border-radius: var(--radius-card);
    object-fit: cover;
    border: 1px solid var(--color-border);
    cursor: pointer;
    transition: opacity 0.2s;
}

.attachment-preview-grid img:hover {
    opacity: 0.85;
}

.attachment-preview-empty {
    font-size: var(--font-small);
    color: var(--color-muted);
    text-align: center;
    padding: var(--space-md);
}

.signature-preview {
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--color-border);
    border-radius: var(--radius-card);
    padding: var(--space-md);
}

.signature-preview__empty {
    font-size: var(--font-small);
    color: var(--color-muted);
}

/* ========== 16. 报价详情 ========== */
.quote-empty {
    text-align: center;
    padding: var(--space-xl);
    background: var(--color-surface);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
}

.quote-empty__icon {
    color: var(--color-subtle);
    margin-bottom: var(--space-md);
}

.quote-empty p {
    font-size: 18px;
    font-weight: 500;
}

.quote-empty__hint {
    font-size: var(--font-small) !important;
    color: var(--color-muted) !important;
    font-weight: 400 !important;
    margin-top: var(--space-sm) !important;
}

.quote-amount-card {
    background: var(--color-surface);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: var(--space-lg);
    text-align: center;
    margin-bottom: var(--space-lg);
    border-top: 4px solid var(--color-accent);
}

.quote-amount-card__label {
    font-size: var(--font-small);
    color: var(--color-muted);
    margin-bottom: var(--space-sm);
}

.quote-amount-card__value {
    font-size: 40px;
    font-weight: 700;
    color: var(--color-accent);
}

.quote-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.quote-summary-item {
    background: var(--color-surface);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: var(--space-md);
    text-align: center;
}

.quote-summary-item__label {
    display: block;
    font-size: var(--font-small);
    color: var(--color-muted);
    margin-bottom: var(--space-xs);
}

.quote-summary-item__value {
    font-size: 16px;
    font-weight: 600;
}

.quote-detail-table {
    overflow-x: auto;
}

.quote-detail-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.quote-detail-table th,
.quote-detail-table td {
    padding: 8px 10px;
    text-align: right;
    border-bottom: 1px solid var(--color-border);
}

.quote-detail-table th:first-child,
.quote-detail-table td:first-child {
    text-align: left;
}

.quote-detail-table th {
    font-weight: 500;
    color: var(--color-muted);
    font-size: var(--font-small);
}

.quote-detail-total {
    text-align: right;
    font-size: 14px;
    font-weight: 600;
    padding: var(--space-sm) 0;
    border-top: 2px solid var(--color-accent);
    margin-top: var(--space-xs);
}

.quote-converted-notice {
    background: var(--status-ok-bg);
    color: var(--status-ok);
    border-radius: var(--radius-card);
    padding: var(--space-md);
    text-align: center;
    font-weight: 500;
}

.detail-actions {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-lg);
    justify-content: center;
}

@media (max-width: 640px) {
    .detail-actions {
        flex-direction: column;
    }

    .detail-actions .btn {
        width: 100%;
    }

    .detail-card__grid {
        grid-template-columns: 1fr;
    }

    .quote-summary-grid {
        grid-template-columns: 1fr 1fr;
    }

    .attachment-preview-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .signature-canvas {
        width: 100%;
        height: auto;
        aspect-ratio: 600/260;
    }

    .quote-amount-card__value {
        font-size: 30px;
    }
}

/* ========== 17. Lightbox ========== */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    cursor: pointer;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 36px;
    color: #fff;
    cursor: pointer;
    transition: opacity 0.2s;
}

.lightbox-close:hover {
    opacity: 0.7;
}

.lightbox-image {
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
}

/* ========== 18. Toast（Vue transition）========== */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 2000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    pointer-events: none;
}

.toast--success {
    background: #D1FAE5;
    color: #065F46;
}

.toast--error {
    background: #FEE2E2;
    color: #991B1B;
}

.toast--info {
    background: #E0F2FE;
    color: #075985;
}

.toast-enter-active {
    animation: toastIn 0.3s ease;
}

.toast-leave-active {
    animation: toastOut 0.3s ease;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    to {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
}

/* 表单错误态 */
.form-input--error {
    border-color: #EF4444 !important;
}

/* ========== 19. Modal ========== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.modal-dialog {
    background: var(--color-surface);
    border-radius: var(--radius-card);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    max-width: 420px;
    width: calc(100% - var(--space-lg) * 2);
    overflow: hidden;
}

.modal-header {
    padding: var(--space-lg) var(--space-lg) 0;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
}

.modal-body {
    padding: var(--space-md) var(--space-lg) var(--space-lg);
    line-height: 1.6;
}

.modal-footer {
    display: flex;
    gap: var(--space-sm);
    padding: 0 var(--space-lg) var(--space-lg);
    justify-content: flex-end;
}