/* 订单查询页样式 - 设计变量见 css/theme.css */

/* 整体布局 */
.profile-content {
    padding: 16px 0 calc(var(--footer-h) + 24px);
    min-height: calc(100vh - var(--header-h));
}

.profile-container {
    display: flex;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 14px;
    gap: 14px;
    align-items: flex-start;
}

/* 侧边栏导航 */
.profile-sidebar {
    width: 176px;
    flex: 0 0 176px;
    background: var(--card);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-1);
    padding: 14px 10px;
    position: sticky;
    top: calc(var(--header-h) + 14px);
}

.sidebar-nav h3 {
    font-size: 12px;
    font-weight: 700;
    color: var(--t3);
    letter-spacing: 1px;
    margin: 0 0 10px;
    padding: 0 8px;
}

.sidebar-nav > h3:not(:first-child) {
    margin-top: 20px;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    color: var(--t2);
    text-decoration: none;
    border-radius: var(--r-md);
    font-size: 13px;
    font-weight: 500;
    transition: background 0.25s ease, color 0.25s ease;
}

.nav-link:hover {
    background: #f6f8fc;
    color: var(--brand);
}

.nav-link.active {
    background: linear-gradient(135deg, rgba(59, 108, 255, 0.12), rgba(107, 77, 255, 0.06));
    color: var(--brand);
    font-weight: 700;
}

/* 主内容区域 */
.profile-main {
    flex: 1;
    min-width: 0;
}

.page-head {
    margin-bottom: 14px;
}

.page-title {
    font-size: 19px;
    font-weight: 700;
    color: var(--t1);
    margin: 0 0 4px;
}

.page-desc {
    font-size: 13px;
    color: var(--t3);
    margin: 0;
}

/* 查询卡片 */
.order-search-section,
.search-results-section {
    background: var(--card);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-1);
    padding: 20px;
    margin-bottom: 14px;
}

.search-form-container {
    max-width: 520px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--t2);
    margin-bottom: 8px;
}

.input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: #fff;
    color: var(--t3);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.input-wrap:focus-within {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(59, 108, 255, 0.12);
    color: var(--brand);
}

.input-wrap .search-input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: var(--t1);
}

.input-wrap .search-input::placeholder {
    color: var(--t3);
}

.search-buttons {
    display: flex;
    gap: 10px;
}

.search-button,
.reset-button {
    padding: 11px 26px;
    font-size: 14px;
}

.reset-button {
    padding: 10px 24px;
}

/* 结果区域 */
.results-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--t1);
    margin: 0 0 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.results-title::before {
    content: '';
    width: 3px;
    height: 14px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--brand), var(--brand-2));
}

.no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 34px 10px;
    color: var(--t3);
    font-size: 13px;
    text-align: center;
}

.empty-icon {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #cfd8ea, #b9c4dc);
}

.empty-text {
    margin: 0;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 订单卡片 */
.order-card {
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 14px;
    background: #fff;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.order-card:hover {
    transform: translateY(-2px);
    border-color: rgba(59, 108, 255, 0.35);
    box-shadow: var(--sh-2);
}

.order-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.order-no {
    font-size: 12px;
    color: var(--t3);
    word-break: break-all;
}

.order-card-body {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}

.order-product {
    font-size: 15px;
    font-weight: 600;
    color: var(--t1);
    line-height: 1.4;
}

.order-time {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--t3);
}

.order-amount {
    flex: 0 0 auto;
    font-size: 18px;
    font-weight: 700;
    color: var(--price);
}

/* 加载/骨架 */
.results-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 30px 0;
    font-size: 13px;
    color: var(--t3);
}

.loading-dot {
    width: 16px;
    height: 16px;
    border: 2px solid var(--line);
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .profile-container {
        flex-direction: column;
        padding: 0 14px;
        gap: 12px;
    }

    .profile-sidebar {
        width: 100%;
        flex: none;
        position: static;
        padding: 10px;
    }

    .sidebar-nav ul {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .order-search-section,
    .search-results-section {
        padding: 16px;
    }

    .search-form-container {
        max-width: 100%;
    }

    .page-title {
        font-size: 17px;
    }
}

@media (max-width: 480px) {
    .profile-content {
        padding: 12px 0 calc(var(--footer-h) + 20px);
    }

    .profile-container {
        padding: 0 10px;
    }

    .order-search-section,
    .search-results-section {
        padding: 14px;
        border-radius: var(--r-md);
    }

    .search-button,
    .reset-button {
        flex: 1;
        padding: 11px 0;
        font-size: 13px;
    }

    .search-buttons {
        gap: 8px;
    }

    .order-card-body {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .order-amount {
        font-size: 17px;
    }
}
