* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Microsoft YaHei", "PingFang SC", sans-serif; background: #f1f5f9; color: #1e293b; font-size: 13.5px; }
.hidden { display: none !important; }

/* 紧急停用旧价顶部红色闪烁熔断条 */
@keyframes pulseUrgent { 0%, 100% { background: #dc2626; } 50% { background: #991b1b; } }
.urgent-banner { animation: pulseUrgent 1.6s infinite; color: #fff; padding: 12px 22px; font-size: 14px; border-bottom: 3px solid #fef08a; box-shadow: 0 4px 14px rgba(220,38,38,0.4); }
.urgent-row-item { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 4px 0; }
.btn-ack-stop { background: #fef08a; color: #7f1d1d; border: none; padding: 6px 14px; border-radius: 6px; font-weight: 800; cursor: pointer; }
.btn-ack-stop:hover { background: #fde047; }

.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%); padding: 20px; }
.auth-card { width: 100%; max-width: 430px; background: #fff; border-radius: 12px; padding: 34px 30px; box-shadow: 0 20px 45px rgba(0,0,0,0.3); }
.brand-badge { display: inline-block; background: #e0f2fe; color: #0369a1; font-weight: 700; font-size: 11px; letter-spacing: 0.8px; padding: 4px 10px; border-radius: 99px; margin-bottom: 10px; }
.auth-card h1 { font-size: 22px; margin-bottom: 6px; color: #0f172a; }
.auth-card .sub { color: #64748b; font-size: 12.5px; margin-bottom: 20px; line-height: 1.5; }
.auth-card label { display: block; font-weight: 600; margin: 12px 0 6px; font-size: 13px; }
.auth-card input { width: 100%; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 7px; font-size: 14px; }
.err-box { margin-top: 12px; padding: 10px 12px; background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; border-radius: 6px; font-size: 13px; }

.topbar { background: #0f172a; color: #fff; height: 54px; padding: 0 22px; display: flex; align-items: center; justify-content: space-between; }
.topbar-left { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.logo-dot { width: 10px; height: 10px; border-radius: 50%; background: #38bdf8; display: inline-block; }
.divider { color: #475569; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.user-pill { background: #1e293b; border: 1px solid #334155; padding: 4px 12px; border-radius: 99px; font-size: 12px; color: #e2e8f0; }
.badge-red { background: #ef4444; color: #fff; border-radius: 99px; padding: 1px 6px; font-size: 11px; font-weight: 700; margin-left: 3px; }

.notif-drawer { position: fixed; right: 18px; top: 60px; width: 420px; max-width: 94vw; background: #fff; border: 1px solid #cbd5e1; border-radius: 10px; box-shadow: 0 16px 36px rgba(0,0,0,0.2); z-index: 80; overflow: hidden; }
.notif-hdr { background: #f8fafc; padding: 10px 14px; border-bottom: 1px solid #e2e8f0; display: flex; justify-content: space-between; align-items: center; }
.notif-list { max-height: 420px; overflow-y: auto; }
.notif-item { padding: 10px 14px; border-bottom: 1px solid #f1f5f9; font-size: 12.5px; }
.notif-item.unread { background: #f0f9ff; }
.notif-item.URGENT_STOP { background: #fef2f2; border-left: 4px solid #dc2626; }
.notif-item.WARN { background: #fffbeb; border-left: 4px solid #f59e0b; }

.subnav { background: #fff; border-bottom: 1px solid #e2e8f0; padding: 0 22px; display: flex; gap: 6px; flex-wrap: wrap; }
.tab-btn { background: none; border: none; border-bottom: 3px solid transparent; padding: 12px 15px; font-weight: 600; color: #64748b; cursor: pointer; font-size: 13.5px; }
.tab-btn.active { color: #0284c7; border-bottom-color: #0284c7; }

.container { max-width: 1500px; margin: 16px auto; padding: 0 16px 42px; }
.card { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 16px 18px; box-shadow: 0 1px 3px rgba(0,0,0,0.03); }
.card h3 { font-size: 15px; margin-bottom: 10px; color: #0f172a; }
.grid-2 { display: grid; grid-template-columns: 1fr 1.15fr; gap: 16px; }
@media (max-width: 960px) { .grid-2 { grid-template-columns: 1fr; } }

.supplier-bar { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 14px; }
@media (max-width: 960px) { .supplier-bar { grid-template-columns: repeat(2, 1fr); } }
.sup-card { background: #fff; border: 2px solid #e2e8f0; border-radius: 10px; padding: 12px 14px; cursor: pointer; transition: 0.15s; display: flex; flex-direction: column; gap: 4px; }
.sup-card:hover { border-color: #7dd3fc; }
.sup-card.active { border-color: #0284c7; background: #f0f9ff; }
.sup-card.empty { opacity: 0.68; }
.sup-name { font-size: 15px; font-weight: 700; color: #0f172a; display: flex; justify-content: space-between; align-items: center; }
.sup-qty-badge { font-size: 12px; padding: 2px 8px; border-radius: 99px; background: #e2e8f0; color: #334155; font-weight: 700; }
.sup-card.active .sup-qty-badge { background: #0284c7; color: #fff; }
.sup-meta { font-size: 12px; color: #64748b; }

.btn-primary { background: #0284c7; color: #fff; border: none; padding: 8px 15px; border-radius: 7px; font-weight: 600; cursor: pointer; }
.btn-primary:hover { background: #0369a1; }
.btn-primary.full { width: 100%; margin-top: 18px; padding: 11px; font-size: 15px; }
.btn-approve { background: #16a34a; color: #fff; border: none; padding: 9px 18px; border-radius: 7px; font-weight: 700; cursor: pointer; font-size: 13.5px; box-shadow: 0 2px 8px rgba(22,163,74,0.28); }
.btn-approve:hover { background: #15803d; }
.btn-export { background: #0f766e; color: #fff; border: none; padding: 8px 14px; border-radius: 7px; font-weight: 600; cursor: pointer; }
.btn-yellow-dl { background: #eab308; color: #0f172a; border: none; padding: 6px 11px; border-radius: 6px; font-weight: 700; cursor: pointer; font-size: 12px; }
.btn-ghost { background: transparent; border: 1px solid #475569; color: #e2e8f0; padding: 5px 11px; border-radius: 6px; cursor: pointer; font-size: 12px; }
.topbar .btn-ghost.danger { border-color: #ef4444; color: #fca5a5; }
.card .btn-ghost, .notif-hdr .btn-ghost, .toolbar .btn-ghost { color: #334155; border-color: #cbd5e1; background: #fff; }

.filter-chip { border: 1px solid #cbd5e1; background: #fff; padding: 6px 12px; border-radius: 6px; cursor: pointer; font-weight: 600; font-size: 12.5px; }
.filter-chip.active { background: #0f172a; color: #fff; border-color: #0f172a; }
.filter-chip.danger-chip.active { background: #dc2626; border-color: #dc2626; color: #fff; }
.filter-chip.warn-chip.active { background: #ca8a04; border-color: #ca8a04; color: #fff; }

.batch-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.batch-pill { border: 2px solid #cbd5e1; background: #f8fafc; padding: 8px 13px; border-radius: 8px; cursor: pointer; font-size: 12.5px; }
.batch-pill.pending { border-color: #f59e0b; background: #fffbeb; }
.batch-pill.active { border-color: #0284c7; background: #e0f2fe; font-weight: 700; }

.urgent-chk { display: flex; align-items: center; gap: 6px; padding: 7px 12px; background: #fef2f2; border: 1px solid #fca5a5; border-radius: 7px; color: #b91c1c; font-weight: 700; cursor: pointer; }

.upload-dropzone { border: 2px dashed #94a3b8; background: #f8fafc; border-radius: 10px; padding: 26px 18px; text-align: center; cursor: pointer; transition: 0.15s; }
.upload-dropzone:hover { border-color: #0284c7; background: #f0f9ff; }
.drop-title { font-size: 15.5px; font-weight: 700; color: #0f172a; margin-bottom: 5px; }
.drop-hint { color: #64748b; font-size: 12.5px; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.toolbar-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
input, select { padding: 7px 10px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 13px; background: #fff; }
.chk-inline { display: flex; align-items: center; gap: 5px; font-size: 13px; cursor: pointer; user-select: none; }
.inspect-bar { background: #fffbeb; border: 1px solid #fde68a; padding: 10px 16px; border-radius: 8px; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.stock-tabs { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.stock-chip { background: #fff; border: 1px solid #cbd5e1; padding: 7px 14px; border-radius: 8px; cursor: pointer; font-weight: 600; color: #334155; }
.stock-chip.active { background: #1e3a8a; color: #fff; border-color: #1e3a8a; }

.summary-banner { border-radius: 9px; padding: 12px 16px; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-weight: 700; }
.summary-banner.client-mode { background: #fff799; border: 1px solid #eab308; color: #1e293b; }
.summary-banner.vz-self-mode { background: #ffedd5; border: 1px solid #fdba74; color: #7c2d12; }
.summary-banner.cost-self-mode { background: #dbeafe; border: 1px solid #93c5fd; color: #1e3a8a; }
.summary-banner.review-mode { background: #0f172a; color: #f8fafc; }
.metric-big { font-size: 17px; color: #dc2626; margin-left: 4px; }
.review-mode .metric-big { color: #facc15; }

.table-card { padding: 0; overflow: hidden; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
th { background: #e2efda; color: #1e293b; font-weight: 700; text-align: center; padding: 9px 8px; border-bottom: 2px solid #cbd5e1; white-space: nowrap; }
th.vz-yel { background: #ffff00; color: #000; }
table.cost-tbl th { background: #1e3a5f; color: #fff; }
td { padding: 7px 8px; border-bottom: 1px solid #e2e8f0; text-align: center; }
td.left-col { text-align: left; font-family: Arial, sans-serif; }
td.num-col { text-align: right; font-family: Arial, sans-serif; }

/* 老板审价台特殊高亮行 */
tr.neg-diff-row td { background: #fef2f2; }
tr.modified-row td { background: #fef9c3 !important; }
.diff-neg { color: #dc2626; font-weight: 800; }
.diff-pos { color: #15803d; font-weight: 700; }
.inline-price-in { width: 92px; text-align: right; font-weight: 700; padding: 5px 7px; border: 1px solid #94a3b8; border-radius: 5px; }
.inline-cust-in { width: 118px; font-weight: 600; padding: 5px 7px; border: 1px solid #94a3b8; border-radius: 5px; }
.cell-edited { background: #fef08a !important; border-color: #ca8a04 !important; }

tr.vz-self-row td { background: #fce4d6; }
tr.std-row:nth-child(even) td { background: #f8fafc; }
tr.std-row:hover td { background: #f0f9ff; }

.tag-pill { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11.5px; font-weight: 600; background: #e2e8f0; color: #334155; }
.tag-pill.unlock { background: #dcfce7; color: #166534; }
.tag-pill.lock { background: #fee2e2; color: #991b1b; }
.tag-pill.yellow { background: #fef08a; color: #854d0e; }
.form-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.form-row input, .form-row select { flex: 1; min-width: 120px; }

.modal { position: fixed; inset: 0; background: rgba(15,23,42,0.55); display: flex; align-items: center; justify-content: center; z-index: 99; }
.modal-box { background: #fff; padding: 24px; border-radius: 10px; width: 340px; }
.modal-box h3 { margin-bottom: 14px; }
.modal-box input { width: 100%; margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
