/* 通发 OA 商机/投标模块增强层样式（oam- 前缀，独立于 Tailwind 产物）
 * 配色对齐应用主色 brand-600 (#017cc2) 与 slate 灰阶 */

/* ---------- 覆盖层容器 ---------- */
.oam-wrap { max-width: 1200px; margin: 0 auto; animation: oam-in .18s ease-out; }
@keyframes oam-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.oam-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.oam-title { font-size: 18px; font-weight: 700; color: #0f172a; display: flex; align-items: center; gap: 8px; }
.oam-title .oam-title-ico { width: 34px; height: 34px; border-radius: 10px; background: #e6f4fc; color: #017cc2; display: inline-flex; align-items: center; justify-content: center; }
.oam-title .oam-title-ico svg { width: 19px; height: 19px; }
.oam-sub { font-size: 12px; color: #64748b; margin-top: 2px; }

/* ---------- 统计条 ---------- */
.oam-stats { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; scrollbar-width: thin; }
.oam-stat { flex: 0 0 auto; min-width: 108px; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 10px 12px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.oam-stat:hover { border-color: #7cc0e8; }
.oam-stat.on { border-color: #017cc2; box-shadow: 0 0 0 2px rgba(1,124,194,.12); }
.oam-stat .s-name { font-size: 11px; color: #64748b; display: flex; align-items: center; gap: 6px; }
.oam-stat .s-dot { width: 8px; height: 8px; border-radius: 99px; }
.oam-stat .s-num { font-size: 18px; font-weight: 700; color: #0f172a; margin-top: 2px; }
.oam-stat .s-amt { font-size: 11px; color: #94a3b8; margin-top: 1px; }
.oam-stat.s-total { background: linear-gradient(135deg, #017cc2, #0396e3); border-color: transparent; }
.oam-stat.s-total .s-name, .oam-stat.s-total .s-amt { color: rgba(255,255,255,.75); }
.oam-stat.s-total .s-num { color: #fff; }

/* ---------- 工具栏 ---------- */
.oam-toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.oam-search { flex: 1 1 200px; position: relative; }
.oam-search input { width: 100%; box-sizing: border-box; border: 1px solid #e2e8f0; border-radius: 10px; padding: 8px 12px 8px 32px; font-size: 13px; background: #fff; color: #0f172a; outline: none; transition: border-color .15s; }
.oam-search input:focus { border-color: #017cc2; box-shadow: 0 0 0 2px rgba(1,124,194,.1); }
.oam-search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: #94a3b8; }

.oam-btn { display: inline-flex; align-items: center; gap: 6px; border-radius: 10px; padding: 8px 14px; font-size: 13px; cursor: pointer; border: 1px solid transparent; transition: all .15s; white-space: nowrap; }
.oam-btn svg { width: 14px; height: 14px; }
.oam-btn-primary { background: #017cc2; color: #fff; }
.oam-btn-primary:hover { background: #0169a4; }
.oam-btn-ghost { background: #fff; border-color: #e2e8f0; color: #475569; }
.oam-btn-ghost:hover { border-color: #017cc2; color: #017cc2; }
.oam-btn-danger { background: #fff; border-color: #fecaca; color: #dc2626; }
.oam-btn-danger:hover { background: #fef2f2; }
.oam-btn:disabled { opacity: .5; cursor: not-allowed; }
.oam-btn-sm { padding: 4px 10px; font-size: 12px; border-radius: 8px; }

/* ---------- 列表 ---------- */
.oam-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; overflow: hidden; }
.oam-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.oam-table th { text-align: left; font-weight: 500; font-size: 11px; color: #94a3b8; padding: 10px 14px; border-bottom: 1px solid #f1f5f9; white-space: nowrap; }
.oam-table td { padding: 11px 14px; border-bottom: 1px solid #f8fafc; color: #334155; vertical-align: middle; }
.oam-table tr:last-child td { border-bottom: none; }
.oam-table tbody tr { transition: background .12s; cursor: pointer; }
.oam-table tbody tr:hover { background: #f8fafc; }
.oam-cell-main { font-weight: 600; color: #0f172a; }
.oam-cell-sub { font-size: 11px; color: #94a3b8; margin-top: 1px; }
.oam-cell-amt { font-variant-numeric: tabular-nums; font-weight: 600; }
.oam-empty { padding: 48px 16px; text-align: center; color: #94a3b8; font-size: 13px; }
.oam-empty svg { width: 36px; height: 36px; color: #cbd5e1; margin-bottom: 8px; }

/* 阶段 pill */
.oam-pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 2.5px 10px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.oam-pill .p-dot { width: 6px; height: 6px; border-radius: 99px; background: currentColor; }

/* ---------- 弹窗 ---------- */
.oam-modal { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(15,23,42,.45); backdrop-filter: blur(2px); animation: oam-fade .15s ease-out; }
@keyframes oam-fade { from { opacity: 0; } }
.oam-panel { background: #fff; border-radius: 16px; width: 100%; max-width: 520px; max-height: 86vh; display: flex; flex-direction: column; box-shadow: 0 20px 50px rgba(15,23,42,.25); animation: oam-pop .18s cubic-bezier(.2,.9,.3,1.2); }
.oam-panel.wide { max-width: 640px; }
@keyframes oam-pop { from { opacity: 0; transform: scale(.96) translateY(8px); } }
.oam-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 12px; border-bottom: 1px solid #f1f5f9; }
.oam-panel-head h3 { font-size: 15px; font-weight: 700; color: #0f172a; }
.oam-x { width: 28px; height: 28px; border-radius: 8px; border: none; background: transparent; color: #94a3b8; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.oam-x:hover { background: #f1f5f9; color: #334155; }
.oam-x svg { width: 16px; height: 16px; }
.oam-panel-body { padding: 16px 20px; overflow-y: auto; }
.oam-panel-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 16px; border-top: 1px solid #f1f5f9; }

/* 表单 */
.oam-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.oam-field { display: flex; flex-direction: column; gap: 5px; }
.oam-field.full { grid-column: 1 / -1; }
.oam-field label { font-size: 12px; font-weight: 500; color: #475569; }
.oam-field label em { color: #dc2626; font-style: normal; margin-left: 2px; }
.oam-field input, .oam-field select, .oam-field textarea { border: 1px solid #e2e8f0; border-radius: 9px; padding: 8px 10px; font-size: 13px; color: #0f172a; background: #fff; outline: none; width: 100%; box-sizing: border-box; transition: border-color .15s; font-family: inherit; }
.oam-field input:focus, .oam-field select:focus, .oam-field textarea:focus { border-color: #017cc2; box-shadow: 0 0 0 2px rgba(1,124,194,.1); }
.oam-field textarea { resize: vertical; min-height: 64px; }

/* 详情：信息块 + 时间线 */
.oam-grid-info { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin-bottom: 16px; }
.oam-info-item .k { font-size: 11px; color: #94a3b8; }
.oam-info-item .v { font-size: 13px; color: #0f172a; font-weight: 500; margin-top: 2px; }
.oam-section-t { font-size: 12px; font-weight: 700; color: #475569; margin: 4px 0 10px; display: flex; align-items: center; gap: 6px; }
.oam-timeline { position: relative; padding-left: 18px; }
.oam-timeline::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: #e2e8f0; border-radius: 2px; }
.oam-tl-item { position: relative; padding: 0 0 14px 8px; }
.oam-tl-item:last-child { padding-bottom: 2px; }
.oam-tl-dot { position: absolute; left: -18px; top: 4px; width: 10px; height: 10px; border-radius: 99px; background: #fff; border: 2.5px solid #017cc2; }
.oam-tl-item.t-flow .oam-tl-dot { border-color: #7c3aed; }
.oam-tl-item.t-create .oam-tl-dot { border-color: #017cc2; }
.oam-tl-item.t-note .oam-tl-dot { border-color: #64748b; }
.oam-tl-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.oam-tl-type { font-size: 10px; font-weight: 600; border-radius: 5px; padding: 1px 6px; }
.oam-tl-type.t-flow { background: #f3e8ff; color: #7c3aed; }
.oam-tl-type.t-create { background: #e6f4fc; color: #017cc2; }
.oam-tl-type.t-note { background: #f1f5f9; color: #64748b; }
.oam-tl-user { font-size: 11px; color: #64748b; }
.oam-tl-time { font-size: 11px; color: #cbd5e1; margin-left: auto; }
.oam-tl-content { font-size: 13px; color: #334155; margin-top: 3px; line-height: 1.5; }

/* 流转选择 */
.oam-stages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.oam-stage-opt { border: 1.5px solid #e2e8f0; border-radius: 10px; padding: 10px 6px; text-align: center; font-size: 13px; color: #334155; cursor: pointer; background: #fff; transition: all .12s; }
.oam-stage-opt:hover { border-color: #7cc0e8; }
.oam-stage-opt.on { border-color: #017cc2; background: #e6f4fc; color: #017cc2; font-weight: 600; }
.oam-stage-opt.locked { opacity: .45; cursor: not-allowed; }
.oam-stage-opt .o { font-size: 10px; color: #94a3b8; display: block; margin-top: 2px; }

/* toast */
.oam-toast { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 10000; background: #0f172a; color: #fff; font-size: 13px; padding: 9px 18px; border-radius: 10px; box-shadow: 0 8px 24px rgba(15,23,42,.3); animation: oam-in .18s ease-out; }
.oam-toast.err { background: #dc2626; }
.oam-toast.ok { background: #059669; }

/* ---------- 侧边栏合成锚点（复用原生模板类名 + 兜底基础样式） ---------- */
a.oam-navlink { display: flex; align-items: center; gap: 12px; border-radius: 8px; padding: 10px 12px; font-size: 13px; color: #475569; text-decoration: none; transition: background .15s, color .15s; }
a.oam-navlink:hover { background: #f1f5f9; }
a.oam-navlink.on { background: #017cc2; color: #fff; font-weight: 500; }
a.oam-navlink.on:hover { background: #017cc2; }
a.oam-navlink svg { width: 17px; height: 17px; flex: 0 0 auto; stroke-width: 1.8; }

/* ---------- 响应式：移动端卡片化 ---------- */
@media (max-width: 767px) {
  .oam-form { grid-template-columns: 1fr; }
  .oam-grid-info { grid-template-columns: 1fr 1fr; }
  .oam-table thead { display: none; }
  .oam-table, .oam-table tbody, .oam-table tr, .oam-table td { display: block; }
  .oam-table tr { border-bottom: 1px solid #f1f5f9; padding: 10px 12px; }
  .oam-table td { border: none; padding: 3px 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .oam-table td::before { content: attr(data-th); font-size: 11px; color: #94a3b8; flex: 0 0 auto; }
  .oam-table td.oam-td-main { display: block; }
  .oam-table td.oam-td-main::before { display: none; }
  .oam-table td.oam-td-act::before { display: none; }
  .oam-table td.oam-td-act { justify-content: flex-end; flex-wrap: wrap; }
  .oam-stat { min-width: 96px; }
}
