/* ========== 全局 ========== */
:root {
    --primary: #4f46e5;
    --primary-dark: #3730a3;
    --accent: #06b6d4;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text: #1e293b;
    --muted: #64748b;
    --border: #e2e8f0;
    --radius: 12px;
    --shadow: 0 4px 20px rgba(0,0,0,.08);
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ========== 导航栏 ========== */
.navbar-brand {
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: -.5px;
}
.navbar.bg-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
}
.navbar .nav-link {
    font-weight: 500;
    transition: opacity .2s;
}
.navbar .nav-link:hover { opacity: .8; }

/* ========== 主内容区 ========== */
main.container {
    flex: 1;
    padding-top: 2rem;
    padding-bottom: 3rem;
}

/* ========== 商品卡片 ========== */
.product-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform .2s, box-shadow .2s;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(79,70,229,.15);
}
.product-card img.product-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.product-img-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--primary);
}
.product-card .card-body {
    flex: 1;
    padding: 1.25rem;
}
.product-card .card-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text);
}
.product-card .price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
}
.product-card .card-text {
    color: var(--muted);
    font-size: .9rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    border-radius: 8px;
    font-weight: 600;
    transition: background .2s, transform .1s;
}
.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
}

/* ========== 登录页 ========== */
.login-wrapper {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-card {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,.12);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
}
.login-card h2 {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

/* ========== 表单 ========== */
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(79,70,229,.2);
}
.form-label { font-weight: 600; font-size: .9rem; color: var(--muted); }

/* ========== 订单列表 ========== */
.page-header {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    border-radius: var(--radius);
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
}
.page-header h1 { font-size: 1.5rem; font-weight: 700; margin: 0; }

.status-badge {
    padding: .3em .8em;
    border-radius: 50px;
    font-size: .8rem;
    font-weight: 600;
}
.status-PENDING   { background: #fef3c7; color: #92400e; }
.status-CONFIRMED { background: #d1fae5; color: #065f46; }
.status-CANCELLED { background: #fee2e2; color: #991b1b; }

/* ========== 页脚 ========== */
footer {
    background: #1e293b;
    color: #94a3b8;
    text-align: center;
    padding: 1.5rem;
    font-size: .875rem;
    margin-top: auto;
}
footer a { color: #818cf8; text-decoration: none; }

/* ========== 响应式 ========== */
@media (max-width: 576px) {
    .page-header { padding: 1rem 1.25rem; }
}
