﻿/* ===== 重置 & 基础 ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #A48658;
    --primary-light: #C9A97A;
    --primary-dark: #6B5434;
    --accent: #C8A66A;
    --bg: #FAF7F3;
    --card-bg: #FFFFFF;
    --text: #2D2419;
    --text-sub: #8A7466;
    --border: #EAE0D5;
    --shadow: rgba(106,84,52,.12);
    --radius: 14px;
}

html, body {
    height: 100%;
    font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-tap-highlight-color: transparent;
    -webkit-text-size-adjust: 100%;
}

/* ===== 整体布局 ===== */
.page-wrapper {
    min-height: 56vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
}

/* ===== 统一卡片（标题 + 查询 + 结果合成一体）===== */
.unified-card {
    width: 100%;
    max-width: 760px;
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: 0 6px 40px rgba(106,84,52,.14);
    overflow: hidden; /* 让 Header 渐变顶部圆角包裹进去 */
}

/* ===== 顶部 Header（融入卡片，无独立阴影）===== */
.header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--primary-light) 100%);
    padding: 36px 28px 28px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

    .header::before {
        content: '';
        position: absolute;
        top: -40px;
        right: -60px;
        width: 200px;
        height: 200px;
        border-radius: 50%;
        background: rgba(255,255,255,.06);
    }

    .header::after {
        content: '';
        position: absolute;
        bottom: -60px;
        left: -40px;
        width: 180px;
        height: 180px;
        border-radius: 50%;
        background: rgba(255,255,255,.04);
    }

.header-logo {
    font-size: 12px;
    letter-spacing: 4px;
    color: rgba(255,255,255,.65);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.header-title {
    font-size: 30px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 2px;
}

.header-sub {
    margin-top: 6px;
    font-size: 15px;
    color: rgba(255,255,255,.7);
    letter-spacing: 1px;
}

/* ===== 搜索区（嵌入卡片内部，无独立圆角/阴影）===== */
.search-card {
    padding: 24px 26px 22px;
    border-top: 1px solid var(--border);
}

.search-label {
    font-size: 15px;
    color: var(--text-sub);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

    .search-label::before {
        content: '';
        display: inline-block;
        width: 4px;
        height: 14px;
        border-radius: 2px;
        background: var(--primary);
        flex-shrink: 0;
    }

.search-row {
    display: flex;
    gap: 10px;
}

.search-input {
    flex: 1;
    height: 48px;
    min-width: 0;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 0 14px;
    font-size: 16px;
    color: var(--text);
    background: var(--bg);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    letter-spacing: 1px;
    -webkit-appearance: none;
    appearance: none;
}

    .search-input:focus {
        border-color: var(--primary-light);
        box-shadow: 0 0 0 3px rgba(164,134,88,.12);
    }

    .search-input::placeholder {
        color: #C0B3A8;
    }

.search-btn {
    height: 48px;
    padding: 0 20px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 1px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: transform .15s, box-shadow .15s, opacity .15s;
    box-shadow: 0 4px 14px rgba(164,134,88,.35);
    -webkit-appearance: none;
    touch-action: manipulation;
}

    .search-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 6px 18px rgba(164,134,88,.45);
    }

    .search-btn:active {
        transform: translateY(0);
        opacity: .88;
    }

/* ===== 提示区 ===== */
.hint {
    text-align: center;
    color: var(--text-sub);
    font-size: 15px;
    padding: 26px 20px 22px;
}

.hint-icon {
    font-size: 44px;
    display: block;
    margin-bottom: 10px;
}

/* ===== 结果区（嵌入卡片，无独立阴影）===== */
.result-wrap {
    padding: 20px 24px 24px;
    border-top: 1px solid var(--border);
}

.result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.result-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 6px;
}

    .result-title::before {
        content: '';
        display: inline-block;
        width: 4px;
        height: 16px;
        border-radius: 2px;
        background: var(--primary);
        flex-shrink: 0;
    }

.result-count {
    font-size: 13px;
    color: var(--text-sub);
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 2px 10px;
    border-radius: 20px;
    flex-shrink: 0;
}

/* ===== 订单列表 ===== */
.order-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.order-item {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    border: 1.5px solid var(--border);
    transition: transform .18s, box-shadow .18s, border-color .18s;
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
}

    .order-item::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
        background: linear-gradient(180deg, var(--primary), var(--accent));
        border-radius: 4px 0 0 4px;
    }

    .order-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(164,134,88,.14);
        border-color: var(--primary-light);
    }

    .order-item:active {
        transform: translateY(0);
        background: #F5EFE6;
    }

.order-index {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.order-info {
    flex: 1;
    min-width: 0;
}

.order-no {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.order-meta {
    font-size: 14px;
    color: var(--text-sub);
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 4px;
}

    .order-meta .nav-icon-sm {
        width: 13px;
        height: 13px;
        flex-shrink: 0;
        display: inline-flex;
    }

.order-arrow {
    color: var(--primary-light);
    font-size: 20px;
    flex-shrink: 0;
    transition: transform .2s;
    line-height: 1;
}

.order-item:hover .order-arrow {
    transform: translateX(3px);
}

/* ===== 弹窗遮罩 ===== */
.overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: flex-end; /* 移动端从底部弹出 */
    justify-content: center;
    animation: fadeIn .2s ease;
}

    .overlay.active {
        display: flex;
    }

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(40px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ===== 弹窗主体 ===== */
.modal {
    background: var(--card-bg);
    border-radius: 20px 20px 0 0; /* 移动端底部弹出圆角 */
    width: 100%;
    max-width: 100%;
    box-shadow: 0 -8px 40px rgba(0,0,0,.18);
    overflow: hidden;
    animation: slideUp .28s ease;
    max-height: 92vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    padding: 14px 20px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255,255,255,.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.modal-subtitle {
    font-size: 12px;
    color: rgba(255,255,255,.65);
    margin-top: 2px;
}

.modal-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
    flex-shrink: 0;
    touch-action: manipulation;
}

    .modal-close:hover {
        background: rgba(255,255,255,.28);
    }

    .modal-close:active {
        background: rgba(255,255,255,.35);
    }

.modal-body {
    padding: 14px 20px 4px;
}

.info-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

    .info-row:last-of-type {
        border-bottom: none;
    }

.info-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(164,134,88,.12), rgba(201,169,122,.1));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .info-icon svg {
        width: 20px;
        height: 20px;
    }

.info-content {
    flex: 1;
    min-width: 0;
    padding-top: 2px;
}

.info-label {
    font-size: 13px;
    color: var(--text-sub);
    letter-spacing: .5px;
    margin-bottom: 4px;
}

.info-value {
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
    word-break: break-all;
    line-height: 1.5;
}

/* ===== 品牌寄语卡片 ===== */
.brand-card {
    margin: 16px 20px 20px;
    background: linear-gradient(135deg, #FFF8F0, #FFF3E6);
    border: 1px solid rgba(200,166,106,.4);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.brand-card-icon {
    flex-shrink: 0;
    margin-top: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .brand-card-icon svg {
        width: 22px;
        height: 22px;
    }

.brand-card-text {
    font-size: 15px;
    line-height: 1.85;
    color: var(--primary-dark);
}

    .brand-card-text strong {
        color: var(--primary);
    }

/* ===== 无结果 ===== */
.no-result {
    text-align: center;
    padding: 40px 0 20px;
}

.no-result-icon {
    font-size: 52px;
    display: block;
    margin-bottom: 12px;
}

.no-result-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.no-result-sub {
    font-size: 15px;
    color: var(--text-sub);
}

/* ===== 响应式：平板 & 桌面端 ===== */
@media (min-width: 640px) {
    .page-wrapper {
        padding: 50px 32px;
    }

    /* 桌面弹窗：居中显示，四周圆角 */
    .overlay {
        align-items: center;
        padding: 24px;
    }

    .modal {
        border-radius: 20px;
        max-width: 560px;
        max-height: 88vh;
    }

        .modal::before {
            display: none;
        }
}

/* ===== 安全区适配（刘海屏/底部横条）===== */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .modal {
        padding-bottom: env(safe-area-inset-bottom);
    }
}
