/* ===== 中控管理后台（PC）===== */
:root{ --pri:#2f6bff; --pri2:#1f4fd6; --ink:#1f2737; --sub:#6b7689; --line:#eaedf3;
  --bg:#f0f2f7; --side:#16233f; }
html,body{ background:var(--bg); height:100%; }
body{ color:var(--ink); font-size:14px; }

.a-layout{ display:flex; min-height:100vh; }

/* 侧栏 */
.a-side{ width:212px; flex:none; background:linear-gradient(180deg,#1b2b4d,#13203a);
  color:#cdd8ee; display:flex; flex-direction:column; position:sticky; top:0; height:100vh; }
.a-brand{ padding:18px 18px 16px; display:flex; align-items:center; gap:10px; border-bottom:1px solid rgba(255,255,255,.08); }
.a-brand .lg{ width:38px; height:38px; border-radius:10px; flex:none;
  background:radial-gradient(circle at 50% 40%,#ffd36b,#e8a020); color:#b3340f; font-weight:800;
  display:flex; align-items:center; justify-content:center; font-size:20px; }
.a-brand .bt b{ display:block; font-size:15px; color:#fff; letter-spacing:.5px; }
.a-brand .bt span{ font-size:11px; color:#8aa0c6; }
.a-nav{ padding:12px 10px; flex:1; }
.a-nav .it{ display:flex; align-items:center; gap:11px; padding:11px 14px; border-radius:9px;
  font-size:14.5px; color:#aebbd4; cursor:pointer; margin-bottom:3px; transition:.15s; }
.a-nav .it:hover{ background:rgba(255,255,255,.06); color:#fff; }
.a-nav .it.on{ background:linear-gradient(135deg,#2f6bff,#1f4fd6); color:#fff;
  box-shadow:0 6px 16px rgba(47,107,255,.35); }
.a-nav .it .ic{ width:20px; text-align:center; }
.a-nav .it .cnt{ margin-left:auto; font-size:11px; background:#e0322f; color:#fff; border-radius:9px;
  min-width:18px; height:18px; line-height:18px; text-align:center; padding:0 5px; }
.a-side .foot{ padding:14px 18px; font-size:11px; color:#6b7ea6; border-top:1px solid rgba(255,255,255,.08); }

/* 主区 */
.a-main{ flex:1; min-width:0; display:flex; flex-direction:column; }
.a-top{ height:60px; background:#fff; border-bottom:1px solid var(--line); display:flex; align-items:center;
  padding:0 22px; gap:16px; position:sticky; top:0; z-index:20; }
.a-top h2{ margin:0; font-size:18px; font-weight:700; }
.a-top .sp{ flex:1; }
.a-top .clock{ font-size:13px; color:var(--sub); font-variant-numeric:tabular-nums; }
.a-top .u{ display:flex; align-items:center; gap:8px; font-size:14px; }
.a-top .u .av{ width:32px; height:32px; border-radius:50%; background:var(--pri); color:#fff;
  display:flex; align-items:center; justify-content:center; font-weight:700; }
.a-content{ padding:20px 22px; flex:1; }
.a-page{ display:none; }
.a-page.on{ display:block; animation:af .2s; }
@keyframes af{ from{ opacity:0; transform:translateY(5px) } to{ opacity:1; transform:none } }

/* KPI */
.a-kpis{ display:grid; grid-template-columns:repeat(6,1fr); gap:14px; margin-bottom:18px; }
.a-kpi{ background:#fff; border-radius:13px; padding:16px 18px; position:relative; overflow:hidden;
  box-shadow:0 2px 10px rgba(20,40,80,.04); }
.a-kpi .n{ font-size:30px; font-weight:800; line-height:1; }
.a-kpi .l{ font-size:13px; color:var(--sub); margin-top:8px; }
.a-kpi .ic{ position:absolute; right:14px; top:14px; width:38px; height:38px; border-radius:10px;
  display:flex; align-items:center; justify-content:center; font-size:19px; }
.a-kpi .bar{ position:absolute; left:0; bottom:0; height:3px; width:100%; }

/* 面板 */
.a-grid2{ display:grid; grid-template-columns:1.4fr 1fr; gap:18px; }
.a-grid3{ display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
.panel{ background:#fff; border-radius:13px; box-shadow:0 2px 10px rgba(20,40,80,.04); margin-bottom:18px; }
.panel-hd{ display:flex; align-items:center; padding:15px 18px 0; }
.panel-hd .bar{ width:3px; height:15px; background:var(--pri); border-radius:2px; margin-right:8px; }
.panel-hd h3{ margin:0; font-size:15.5px; font-weight:700; }
.panel-hd .more{ margin-left:auto; font-size:13px; color:var(--pri); cursor:pointer; }
.panel-bd{ padding:16px 18px; }
.chart{ width:100%; height:260px; }

/* 工具条 / 过滤 */
.toolbar{ display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin-bottom:16px;
  background:#fff; border-radius:12px; padding:13px 16px; box-shadow:0 2px 10px rgba(20,40,80,.04); }
.toolbar select, .toolbar input{ border:1px solid #e2e7f0; border-radius:8px; padding:8px 11px;
  font-size:13.5px; color:var(--ink); background:#fafbfd; outline:none; font-family:inherit; }
.toolbar input{ width:200px; }
.toolbar .grow{ flex:1; }
.toolbar select:focus, .toolbar input:focus{ border-color:var(--pri); }

/* 表格 */
.tbl-wrap{ background:#fff; border-radius:12px; overflow:hidden; box-shadow:0 2px 10px rgba(20,40,80,.04); }
table.tbl{ width:100%; border-collapse:collapse; }
.tbl th{ text-align:left; font-size:12.5px; color:var(--sub); font-weight:600; padding:13px 14px;
  background:#f7f9fc; border-bottom:1px solid var(--line); white-space:nowrap; }
.tbl td{ padding:13px 14px; border-bottom:1px solid var(--line); font-size:13.5px; vertical-align:middle; }
.tbl tr:last-child td{ border-bottom:none; }
.tbl tr:hover td{ background:#f8faff; }
.tbl .ti{ font-weight:600; color:var(--ink); cursor:pointer; }
.tbl .ti:hover{ color:var(--pri); }
.tbl .code{ font-size:11.5px; color:#9aa6bc; }
.tbl .op{ display:flex; gap:6px; }
.tbl .op button{ font-size:12.5px; padding:6px 11px; border-radius:7px; }
.row-overdue{ color:var(--red); }

.mini-btn{ background:#eef2fa; color:#45506b; }
.mini-btn.pri{ background:linear-gradient(135deg,#2f6bff,#1f4fd6); color:#fff; }
.mini-btn.gn{ background:#e6f7ef; color:#16915c; }
.mini-btn.rd{ background:#fdeceb; color:#d4322f; }

.pager{ display:flex; justify-content:flex-end; align-items:center; gap:8px; padding:14px; font-size:13px; color:var(--sub); }
.pager button{ padding:6px 12px; border-radius:7px; background:#eef2fa; color:#45506b; }
.pager button:disabled{ opacity:.45; }

/* 网格卡 */
.grid-cards{ display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
.grid-card{ background:#fff; border-radius:13px; padding:17px; box-shadow:0 2px 10px rgba(20,40,80,.04);
  border-top:3px solid var(--c); }
.grid-card .gh{ display:flex; align-items:center; justify-content:space-between; }
.grid-card .gn{ font-size:16px; font-weight:700; }
.grid-card .gm{ font-size:12px; color:var(--sub); }
.grid-card .grow{ display:flex; gap:18px; margin-top:14px; }
.grid-card .gv{ font-size:22px; font-weight:800; }
.grid-card .gl{ font-size:11.5px; color:var(--sub); margin-top:2px; }

/* 队伍 */
.staff-card{ background:#fff; border-radius:12px; padding:15px; box-shadow:0 2px 10px rgba(20,40,80,.04);
  display:flex; align-items:center; gap:13px; }
.staff-card .av{ width:46px; height:46px; border-radius:12px; color:#fff; display:flex; align-items:center;
  justify-content:center; font-size:19px; font-weight:700; flex:none; }
.staff-card .sn{ font-size:15px; font-weight:700; }
.staff-card .sd{ font-size:12px; color:var(--sub); margin-top:3px; }
.staff-card .sx{ margin-left:auto; text-align:right; }
.staff-card .sx .v{ font-size:20px; font-weight:800; color:var(--pri); }
.staff-card .sx .l{ font-size:11px; color:var(--sub); }

/* 抽屉 */
.drawer-mask{ position:fixed; inset:0; background:rgba(15,25,45,.4); z-index:50; opacity:0;
  pointer-events:none; transition:.2s; }
.drawer-mask.on{ opacity:1; pointer-events:auto; }
.drawer{ position:fixed; top:0; right:0; bottom:0; width:480px; max-width:94vw; background:#f7f9fc;
  z-index:51; transform:translateX(100%); transition:transform .26s cubic-bezier(.3,.8,.3,1);
  display:flex; flex-direction:column; box-shadow:-10px 0 40px rgba(20,40,80,.18); }
.drawer.on{ transform:none; }
.drawer .dh{ background:#fff; padding:16px 20px; border-bottom:1px solid var(--line); display:flex;
  align-items:center; gap:12px; }
.drawer .dh h3{ margin:0; font-size:16px; flex:1; }
.drawer .dh .x{ font-size:24px; color:var(--sub); cursor:pointer; line-height:1; }
.drawer .db{ flex:1; overflow-y:auto; padding:18px 20px; }
.drawer .da{ background:#fff; border-top:1px solid var(--line); padding:13px 18px; display:flex; gap:10px; }
.drawer .da .btn{ flex:1; padding:12px; }

.dcard{ background:#fff; border-radius:12px; padding:16px; margin-bottom:14px; box-shadow:0 2px 8px rgba(20,40,80,.04); }
.dbanner{ border-radius:12px; padding:16px; color:#fff; margin-bottom:14px; }
.dbanner h3{ margin:0 0 9px; font-size:18px; }
.dbanner .pill{ background:rgba(255,255,255,.2); padding:3px 10px; border-radius:20px; font-size:12.5px; margin-right:6px; }
.info-row{ display:flex; padding:9px 0; border-bottom:1px solid var(--line); font-size:13.5px; }
.info-row:last-child{ border-bottom:none; }
.info-row .k{ width:82px; color:var(--sub); flex:none; }
.info-row .v{ flex:1; }
.gallery{ display:flex; flex-wrap:wrap; gap:8px; }
.gallery img{ width:86px; height:86px; border-radius:9px; object-fit:cover; cursor:pointer; }
.sec-title{ display:flex; align-items:center; gap:7px; font-size:14px; font-weight:700; margin-bottom:12px; }
.sec-title .bar{ width:3px; height:14px; background:var(--pri); border-radius:2px; }

/* 时间线（后台）*/
.timeline{ position:relative; }
.tl-item{ position:relative; padding:0 0 16px 24px; }
.tl-item::before{ content:""; position:absolute; left:6px; top:4px; bottom:-4px; width:2px; background:#e2e7f0; }
.tl-item:last-child::before{ display:none; }
.tl-item .node{ position:absolute; left:0; top:2px; width:13px; height:13px; border-radius:50%;
  background:var(--c,#2f6bff); border:3px solid #fff; box-shadow:0 0 0 2px var(--c,#2f6bff); }
.tl-item .act{ font-size:14px; font-weight:700; }
.tl-item .who{ font-size:12px; color:var(--sub); margin-top:2px; }
.tl-item .note{ font-size:13px; color:#3d485e; margin-top:6px; background:#f5f7fb; border-radius:8px; padding:8px 10px; line-height:1.6; }
.tl-item .ph{ display:flex; gap:6px; margin-top:7px; }
.tl-item .ph img{ width:56px; height:56px; border-radius:7px; object-fit:cover; }
.tl-item .tm{ font-size:11.5px; color:#9aa6bc; margin-top:5px; }

/* 模态 */
.modal-mask{ position:fixed; inset:0; background:rgba(15,25,45,.45); z-index:60; display:none;
  align-items:center; justify-content:center; }
.modal-mask.on{ display:flex; }
.modal{ background:#fff; border-radius:14px; width:440px; max-width:92vw; max-height:88vh; overflow-y:auto;
  padding:22px; }
.modal h3{ margin:0 0 18px; font-size:17px; }
.modal .m-field{ margin-bottom:16px; }
.modal .m-field label{ display:block; font-size:13px; font-weight:600; margin-bottom:8px; }
.modal .m-field select, .modal .m-field textarea, .modal .m-field input{ width:100%; border:1px solid #e2e7f0;
  border-radius:9px; padding:10px 12px; font-size:14px; font-family:inherit; outline:none; background:#fafbfd; }
.modal .m-field textarea{ min-height:80px; resize:none; }
.modal .mf-btns{ display:flex; gap:10px; margin-top:6px; }
.modal .mf-btns .btn{ flex:1; padding:11px; }
.handler-pick{ display:grid; grid-template-columns:1fr 1fr; gap:8px; max-height:230px; overflow-y:auto; }
.handler-opt{ border:1px solid #e2e7f0; border-radius:9px; padding:9px 11px; cursor:pointer; font-size:13px; }
.handler-opt.on{ border-color:var(--pri); background:#eef4ff; }
.handler-opt b{ display:block; font-size:14px; }
.handler-opt span{ color:var(--sub); font-size:11.5px; }

/* ===== 手机/平板自适配 ===== */
.a-burger{ display:none; width:38px; height:38px; border-radius:9px; background:#eef2fa; color:#1b2b4d;
  font-size:19px; align-items:center; justify-content:center; flex:none; }
.a-side-mask{ position:fixed; inset:0; background:rgba(15,25,45,.42); z-index:55; opacity:0;
  pointer-events:none; transition:.2s; }
.a-side-mask.on{ opacity:1; pointer-events:auto; }

@media (max-width:980px){
  .a-side{ position:fixed; left:0; top:0; bottom:0; height:100vh; z-index:60; width:230px;
    transform:translateX(-100%); transition:transform .26s cubic-bezier(.3,.8,.3,1); }
  .a-side.open{ transform:none; box-shadow:8px 0 36px rgba(0,0,0,.35); }
  .a-burger{ display:inline-flex; }
  .a-kpis{ grid-template-columns:repeat(3,1fr); }
  .a-grid2, .a-grid3{ grid-template-columns:1fr; }
  .grid-cards{ grid-template-columns:repeat(2,1fr); }
  .chart{ height:230px; }
  .tbl-wrap{ overflow-x:auto; -webkit-overflow-scrolling:touch; }
  table.tbl{ min-width:800px; }
  .drawer{ width:100%; max-width:100%; }
  .a-content{ padding:16px 14px; }
}
@media (max-width:560px){
  .a-kpis{ grid-template-columns:repeat(2,1fr); gap:10px; margin-bottom:14px; }
  .a-kpi{ padding:14px 14px; }
  .a-kpi .n{ font-size:25px; }
  .grid-cards{ grid-template-columns:1fr; }
  .a-top{ padding:0 14px; gap:9px; }
  .a-top h2{ font-size:16px; }
  .a-top .clock{ display:none; }
  .a-top .u span:not(.av){ display:none; }
  .toolbar{ padding:12px; gap:8px; }
  .toolbar input{ width:100%; order:5; }
  .toolbar select{ flex:1; min-width:46%; }
  .toolbar .grow, .toolbar #ft-reset{ display:none; }
  .modal{ padding:18px; }
  .handler-pick{ grid-template-columns:1fr; max-height:200px; }
  /* 事件表格窄屏精简：只留 事件/编号、状态、操作，其余进详情查看 */
  .tbl-wrap{ overflow-x:hidden; }
  table.tbl{ min-width:0; }
  .tbl th:nth-child(2), .tbl td:nth-child(2),
  .tbl th:nth-child(3), .tbl td:nth-child(3),
  .tbl th:nth-child(4), .tbl td:nth-child(4),
  .tbl th:nth-child(5), .tbl td:nth-child(5),
  .tbl th:nth-child(6), .tbl td:nth-child(6),
  .tbl th:nth-child(8), .tbl td:nth-child(8){ display:none; }
  .tbl th, .tbl td{ padding:12px 10px; }
  .tbl .op{ flex-direction:column; gap:5px; }
  .tbl .op button{ width:100%; }
}
