/* =========================================
   北京景山学校采购比价管理系统 — 样式
   设计风格：午夜色系  professional & clean
   ========================================= */

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
    font-family: -apple-system, "Microsoft YaHei", "PingFang SC", "Helvetica Neue", sans-serif;
    background: #0a0e1a;
    color: #e0e4ed;
    min-height: 100vh;
    line-height: 1.6;
}

a { color: #64b5f6; text-decoration: none; }
a:hover { color: #90caf9; }
code { background: rgba(255,255,255,0.08); padding: 2px 6px; border-radius: 3px; font-size: 0.9em; }
hr { border: none; border-top: 1px solid rgba(255,255,255,0.08); margin: 20px 0; }

/* ---- Layout ---- */
.container { max-width: 1200px; margin: 0 auto; padding: 20px; }

/* ---- Navigation ---- */
.navbar {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    position: sticky; top: 0; z-index: 100;
}
.nav-inner {
    max-width: 1200px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 20px; height: 56px;
}
.nav-brand { font-size: 1.1rem; font-weight: 700; color: #e0e4ed !important; }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links a { padding: 6px 14px; border-radius: 6px; font-size: 0.9rem; transition: all 0.2s; color: #94a3b8; }
.nav-links a:hover { background: rgba(255,255,255,0.06); color: #e0e4ed; }
.nav-user { padding: 6px 12px; color: #94a3b8; font-size: 0.85rem; }
.btn-logout { color: #ef5350 !important; }

/* ---- Hero (首页) ---- */
.hero { text-align: center; padding: 60px 20px 40px; }
.hero h1 { font-size: 2.2rem; font-weight: 800; color: #ffffff; line-height: 1.3; margin-bottom: 12px; }
.hero-sub { font-size: 1.1rem; color: #94a3b8; margin-bottom: 30px; }
.hero-actions { display: flex; gap: 16px; justify-content: center; margin-bottom: 50px; }

.hero-features {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px; max-width: 1000px; margin: 0 auto;
}
.feature-card {
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px; padding: 28px 20px; text-align: center;
    transition: all 0.3s;
}
.feature-card:hover { background: rgba(255,255,255,0.06); transform: translateY(-2px); }
.feature-icon { font-size: 2.2rem; margin-bottom: 12px; }
.feature-card h3 { font-size: 1.05rem; margin-bottom: 8px; color: #e0e4ed; }
.feature-card p { font-size: 0.85rem; color: #94a3b8; line-height: 1.5; }

/* ---- Footer ---- */
.footer { text-align: center; padding: 30px; color: #64748b; font-size: 0.85rem; border-top: 1px solid rgba(255,255,255,0.04); margin-top: 60px; }

/* ---- Login ---- */
.login-page {
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh; background: linear-gradient(135deg, #0a0e1a 0%, #111827 100%);
}
.login-box {
    background: rgba(30, 41, 59, 0.9); backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.08); border-radius: 16px;
    padding: 40px; width: 400px; max-width: 90vw; box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.login-header { text-align: center; margin-bottom: 30px; }
.login-header h1 { font-size: 1.5rem; color: #ffffff; margin-bottom: 6px; }
.login-header p { color: #94a3b8; font-size: 0.9rem; }
.login-form { display: flex; flex-direction: column; gap: 18px; }
.login-footer { text-align: center; margin-top: 20px; color: #64748b; font-size: 0.85rem; }
.login-footer a { color: #64b5f6; }

/* ---- Buttons ---- */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 24px; border-radius: 8px; font-size: 0.95rem;
    font-weight: 500; cursor: pointer; border: none; transition: all 0.2s;
    text-decoration: none; white-space: nowrap;
}
.btn-primary { background: #1e3a5f; color: #fff; }
.btn-primary:hover { background: #264d78; transform: translateY(-1px); }
.btn-success { background: #1b5e20; color: #fff; }
.btn-success:hover { background: #2e7d32; }
.btn-warning { background: #e65100; color: #fff; }
.btn-warning:hover { background: #f57c00; }
.btn-danger { background: #b71c1c; color: #fff; }
.btn-danger:hover { background: #d32f2f; }
.btn-outline { background: transparent; border: 1px solid rgba(255,255,255,0.15); color: #94a3b8; }
.btn-outline:hover { border-color: #64b5f6; color: #64b5f6; }
.btn-lg { padding: 12px 32px; font-size: 1.05rem; }
.btn-block { width: 100%; justify-content: center; }
.btn-sm {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 5px 12px; border-radius: 6px; font-size: 0.82rem;
    background: rgba(255,255,255,0.06); color: #94a3b8;
    border: 1px solid rgba(255,255,255,0.08); cursor: pointer;
    text-decoration: none; white-space: nowrap; transition: all 0.2s;
}
.btn-sm:hover { background: rgba(255,255,255,0.1); color: #e0e4ed; }
.btn-compare { background: #1e3a5f; color: #fff !important; border-color: #1e3a5f; }
.btn-compare:hover { background: #264d78; }

/* ---- Cards ---- */
.card {
    background: rgba(30, 41, 59, 0.6); border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px; padding: 24px; margin-bottom: 20px;
}
.card-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 16px;
}
.card-header h3 { font-size: 1.05rem; color: #e0e4ed; }

/* ---- Page Header ---- */
.page-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
}
.page-header h2 { font-size: 1.4rem; color: #ffffff; }
.header-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---- Stats ---- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
    background: rgba(30, 41, 59, 0.6); border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px; padding: 24px; text-align: center;
}
.stat-card.accent { border-color: rgba(100, 181, 246, 0.2); }
.stat-num { font-size: 2.4rem; font-weight: 800; color: #64b5f6; }
.stat-label { font-size: 0.85rem; color: #94a3b8; margin-top: 4px; }

/* ---- Tables ---- */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.06); }
.table th { font-weight: 600; font-size: 0.85rem; color: #94a3b8; text-transform: none; background: rgba(255,255,255,0.02); white-space: nowrap; }
.table tr:hover td { background: rgba(255,255,255,0.02); }
.empty { text-align: center; color: #64748b; padding: 40px !important; }
.text-muted { color: #64748b; }

/* ---- Badges ---- */
.badge {
    display: inline-block; padding: 3px 10px; border-radius: 20px;
    font-size: 0.8rem; font-weight: 500; white-space: nowrap;
}
.badge-open { background: rgba(100, 181, 246, 0.15); color: #64b5f6; }
.badge-pending_approval { background: rgba(255, 167, 38, 0.15); color: #ffa726; }
.badge-closed, .badge-inactive { background: rgba(255,167,38,0.12); color: #ffa726; }
.badge-awarded, .badge-active { background: rgba(102, 187, 106, 0.15); color: #66bb6a; }
.badge-draft { background: rgba(255,255,255,0.06); color: #94a3b8; }
.badge-submitted { background: rgba(102, 187, 106, 0.12); color: #66bb6a; }
.badge-pending { background: rgba(255, 193, 7, 0.12); color: #ffd54f; }

/* ---- Forms ---- */
.form { max-width: 700px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.9rem; color: #94a3b8; margin-bottom: 5px; font-weight: 500; }
.required { color: #ef5350; }
.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group textarea,
.form-group select {
    width: 100%; padding: 10px 14px; border-radius: 8px;
    background: rgba(0,0,0,0.25); border: 1px solid rgba(255,255,255,0.1);
    color: #e0e4ed; font-size: 0.95rem; transition: border-color 0.2s;
    font-family: inherit;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none; border-color: #64b5f6; box-shadow: 0 0 0 2px rgba(100,181,246,0.15);
}
.form-group small { display: block; color: #64748b; font-size: 0.8rem; margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.form-group textarea { resize: vertical; min-height: 80px; }
.checkbox-label { display: flex; align-items: center; gap: 8px; padding: 6px 0; cursor: pointer; font-size: 0.95rem; }
.checkbox-label input[type="checkbox"] { width: 18px; height: 18px; accent-color: #64b5f6; }
.checkbox-label small { color: #64748b; }

/* ---- Supplier Checkboxes ---- */
.supplier-checkboxes { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 6px; }

/* ---- Item Row (采购项) ---- */
.item-row {
    display: grid;
    grid-template-columns: 36px 1.5fr 1.2fr 0.8fr 0.8fr 0.9fr 1.3fr 40px;
    gap: 6px;
    align-items: center;
    margin-bottom: 6px;
}
.item-header-row {
    font-size: 0.82rem;
    color: #94a3b8;
    font-weight: 500;
    padding: 0 4px;
    margin-bottom: 8px;
}
.item-header-row span {
    padding: 4px 0;
    text-align: center;
}
.item-header-row .item-name,
.item-header-row .item-spec,
.item-header-row .item-remark {
    text-align: left;
}
.item-index {
    text-align: center;
    color: #64748b;
    font-size: 0.85rem;
}
.item-row input,
.item-row select {
    width: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.08);
    color: #e0e4ed;
    font-size: 0.9rem;
    box-sizing: border-box;
}
.item-row input:focus {
    outline: none;
    border-color: #64b5f6;
    box-shadow: 0 0 0 2px rgba(100,181,246,0.15);
}
.item-row .item-qty-input,
.item-row .item-price-input {
    text-align: right;
}

/* ---- Flash Messages ---- */
.flash { padding: 12px 18px; border-radius: 8px; margin-bottom: 16px; font-size: 0.95rem; }
.flash-success { background: rgba(102, 187, 106, 0.12); border: 1px solid rgba(102, 187, 106, 0.2); color: #66bb6a; }
.flash-danger { background: rgba(239, 83, 80, 0.12); border: 1px solid rgba(239, 83, 80, 0.2); color: #ef5350; }
.flash-warning { background: rgba(255, 193, 7, 0.12); border: 1px solid rgba(255, 193, 7, 0.2); color: #ffd54f; }
.flash-info { background: rgba(100, 181, 246, 0.12); border: 1px solid rgba(100, 181, 246, 0.2); color: #64b5f6; }
.alert { padding: 12px 18px; border-radius: 8px; margin: 12px 0; }
.alert-success { background: rgba(102, 187, 106, 0.1); border: 1px solid rgba(102, 187, 106, 0.15); color: #66bb6a; }

/* ---- Detail Grid ---- */
.detail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.detail-item label { display: block; font-size: 0.82rem; color: #64748b; margin-bottom: 4px; }
.detail-item span { font-size: 0.95rem; }

/* ---- Compare Table ---- */
.compare-table-wrapper { overflow-x: auto; }
.compare-table { min-width: 800px; }
.compare-table th, .compare-table td { vertical-align: middle; text-align: center; }
.compare-table .supplier-th { background: rgba(30, 58, 95, 0.3); }
.supplier-name { font-weight: 700; color: #e0e4ed; }
.supplier-meta { font-size: 0.78rem; color: #94a3b8; }
.supplier-time { font-size: 0.75rem; color: #64748b; }
.item-cell { text-align: left !important; }
.item-cell small { color: #94a3b8; }
.quote-cell { transition: background 0.2s; }
.quote-cell.has-price { background: rgba(255,255,255,0.02); }
.quote-cell:hover.has-price { background: rgba(100, 181, 246, 0.05); }
.price-value { font-weight: 700; font-size: 1rem; color: #e0e4ed; }
.price-total { font-size: 0.8rem; color: #94a3b8; }
.price-remark { font-size: 0.78rem; color: #ffa726; margin-top: 2px; }

.award-select {
    padding: 6px 8px; border-radius: 6px; background: rgba(0,0,0,0.3);
    border: 1px solid rgba(100, 181, 246, 0.2); color: #e0e4ed;
    font-size: 0.85rem; width: 100%; cursor: pointer;
}
.award-select:focus { border-color: #64b5f6; outline: none; }

/* ---- Action Group ---- */
.action-group { display: flex; gap: 4px; flex-wrap: wrap; }

/* ---- Empty State ---- */
.empty-state { text-align: center; padding: 40px; color: #64748b; }

/* ---- Hint ---- */
.hint { font-size: 0.85rem; color: #64748b; margin: 8px 0; }

/* ---- Quote Table (供应商) ---- */
.quote-table td { vertical-align: middle; }
.price-input {
    width: 100%; padding: 8px 10px; border-radius: 6px;
    background: rgba(0,0,0,0.25); border: 1px solid rgba(255,255,255,0.1);
    color: #e0e4ed; font-size: 0.95rem; text-align: right;
}
.price-input:focus { outline: none; border-color: #66bb6a; box-shadow: 0 0 0 2px rgba(102, 187, 106, 0.15); }
.remark-input {
    width: 100%; padding: 6px 8px; border-radius: 6px;
    background: rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.06);
    color: #e0e4ed; font-size: 0.85rem;
}
.remark-input:focus { outline: none; border-color: #64b5f6; }

/* ---- Deadline Info ---- */
.deadline-info { font-size: 0.9rem; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .form-row { grid-template-columns: 1fr; }
    .nav-links { gap: 4px; }
    .nav-links a { padding: 6px 8px; font-size: 0.8rem; }
    .hero h1 { font-size: 1.6rem; }
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }
