﻿:root {
    --bg: #ffffff;
    --text: #303133;
    --muted: #606266;
    --line: #e5e5e5;
    --primary: #3c9cff;
    --danger: #f44336;
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
}

body {
    padding-bottom: 210px;
}

.page {
    width: min(860px, 100%);
    margin: 0 auto;
    background: #fff;
}

.mutebox-single {
    padding: 10px;
}

.group-card {
    border: 1px solid #efefef;
    border-radius: 8px;
    background: #fff;
    padding: 10px;
}

.group-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.group-title {
    font-size: 16px;
    font-weight: 700;
    color: #303133;
}

.selected-count {
    font-size: 12px;
    color: #909399;
}

.loading-text {
    padding: 12px 4px;
    font-size: 13px;
    color: #909399;
}

.category-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.item-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
}

.item-row + .item-row {
    border-top: 1px dashed #f0f0f0;
}

.item-label {
    flex: 0 0 34%;
    max-width: 220px;
    font-size: 14px;
    color: #303133;
    font-weight: 600;
    line-height: 1.4;
}

.item-input {
    flex: 1;
}

.select-control {
    width: 100%;
    height: 36px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 0 10px;
    font-size: 14px;
    color: #303133;
    background: #fff;
    outline: none;
}

.select-control:focus {
    border-color: #3c9cff;
}

.option-block {
    margin-top: 10px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 10px 10px 6px;
}

.option-title {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 700;
    color: #303133;
}

.option-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 10px;
}

.option-item {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 13px;
    color: #303133;
    line-height: 1.35;
}

.option-item input {
    margin-top: 2px;
    width: 15px;
    height: 15px;
}

.option-price {
    color: var(--danger);
    font-weight: 600;
}

.result-panel {
    margin-top: 10px;
    border: 1px solid #efefef;
    border-radius: 8px;
    background: #fff;
    padding: 10px;
}

.result-empty {
    font-size: 13px;
    color: #909399;
}

.result-card {
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 10px;
    background: #fafafa;
}

.result-head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
    font-size: 13px;
}

.result-head strong {
    color: #2e6bb8;
}

.result-total {
    color: #f44336;
    font-weight: 700;
}

.result-date {
    font-size: 12px;
    color: #909399;
}

.result-actions {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.result-actions a,
.result-actions button {
    border: none;
    border-radius: 6px;
    background: #3c9cff;
    color: #fff;
    padding: 7px 10px;
    font-size: 12px;
    text-decoration: none;
    cursor: pointer;
}

.sticky-wrap {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: min(860px, 100%);
    background: #fff;
    border-top: 1px solid #ececec;
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.08);
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
}

.price-box {
    border: 1px solid #ff4d4f;
    border-radius: 4px;
    padding: 8px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-line {
    display: flex;
    align-items: flex-end;
    gap: 4px;
}

.price-label {
    font-size: 28px;
    font-weight: 700;
    color: #1f1f1f;
    line-height: 1;
}

.price-value {
    display: inline-flex;
    align-items: flex-end;
    gap: 4px;
    color: #f44336;
    font-weight: 800;
    font-size: 34px;
    line-height: 1;
}

.price-value em {
    font-style: normal;
    font-size: 16px;
    color: #f44336;
    margin-bottom: 3px;
}

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

.tax-item {
    font-size: 16px;
    color: #606266;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.tax-item input {
    margin: 0;
}

.quote-btn {
    width: 100%;
    margin-top: 10px;
    height: 52px;
    border: none;
    border-radius: 28px;
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    background: var(--primary);
    cursor: pointer;
}

.quick-actions {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.quick-btn {
    border: none;
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    height: 40px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.toast {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    background: rgba(0, 0, 0, 0.82);
    color: #fff;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 12px;
}

.popup-mask {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: grid;
    place-items: center;
    z-index: 3000;
    padding: 14px;
}

.popup-mask.hidden {
    display: none;
}

.popup-card {
    width: min(760px, 100%);
    max-height: 86vh;
    overflow: auto;
    background: #fff;
    border-radius: 10px;
    padding: 14px;
    position: relative;
}

.popup-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: #f1f1f1;
    color: #606266;
    font-size: 18px;
    cursor: pointer;
}

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

.image-item-title {
    margin: 0 0 6px;
    font-size: 12px;
    color: #606266;
}

.image-grid img {
    width: 100%;
    border-radius: 6px;
    border: 1px solid #e5e5e5;
}

.contract-preview {
    width: 100%;
    margin-top: 8px;
    border-radius: 6px;
    border: 1px solid #e5e5e5;
}

.quote-form-panel {
    margin-top: 6px;
}

.quote-form-title {
    margin: 0;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: #1f2a44;
}

.quote-form-tip {
    margin: 8px 0 12px;
    text-align: center;
    font-size: 12px;
    color: #4a8f3f;
}

.quote-form-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quote-form-row {
    display: grid;
    grid-template-columns: 128px 1fr;
    align-items: center;
    gap: 8px;
}

.quote-form-label {
    font-size: 13px;
    color: #303133;
    text-align: right;
    line-height: 1.4;
}

.quote-form-input,
.quote-form-textarea {
    width: 100%;
    border: 1px solid #77bd66;
    border-radius: 4px;
    background: #f7fff5;
    color: #303133;
    font-size: 13px;
    padding: 8px 10px;
    outline: none;
}

.quote-form-textarea {
    min-height: 58px;
    resize: vertical;
    font-family: inherit;
}

.quote-form-input:focus,
.quote-form-textarea:focus {
    border-color: #3f9b2f;
    box-shadow: 0 0 0 2px rgba(74, 143, 63, 0.15);
}

.quote-form-submit {
    margin-top: 8px;
    width: 100%;
    height: 42px;
    border: none;
    border-radius: 8px;
    background: #3c9cff;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

@media (max-width: 720px) {
    body {
        padding-bottom: 190px;
    }

    .item-row {
        gap: 8px;
    }

    .item-label {
        flex-basis: 38%;
        font-size: 13px;
    }

    .select-control {
        height: 34px;
        font-size: 13px;
    }

    .option-grid {
        grid-template-columns: 1fr;
    }

    .price-box {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .price-label {
        font-size: 24px;
    }

    .price-value {
        font-size: 30px;
    }

    .tax-item {
        font-size: 14px;
    }

    .quote-btn {
        height: 48px;
        font-size: 24px;
    }

    .quick-btn {
        height: 38px;
        font-size: 14px;
    }

    .image-grid {
        grid-template-columns: 1fr;
    }

    .quote-form-row {
        grid-template-columns: 96px 1fr;
    }

    .quote-form-title {
        font-size: 20px;
    }

    .quote-form-label {
        font-size: 12px;
    }

    .quote-form-input,
    .quote-form-textarea {
        font-size: 12px;
        padding: 7px 8px;
    }
}
