/* 塔台：同一套卡通语言，换成深蓝控制台的气质 */
.tower .sky-bg { background: linear-gradient(180deg, #e6e9ff 0%, #f3ecff 45%, #ffeef5 100%); }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 42px; height: 42px; }
.brand b { display: block; font-size: 1.15em; font-weight: 900; letter-spacing: .06em; line-height: 1.1; }
.brand small { display: block; font-size: .72em; font-weight: 800; letter-spacing: .12em; opacity: .75; }

/* ── 登录 ── */
.tw-login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.tw-login-stage { display: flex; align-items: flex-end; gap: 10px; }
.tw-login-dz { height: min(480px, 64vh); }
.tw-login-dz img { height: calc(100% - 10px); }
.tw-login-dz .bubble { position: absolute; top: 0; left: 60%; width: 200px; z-index: 2; }
.tw-login-dz .bubble::after { left: 24px; }
.tw-login-card { width: min(420px, 92vw); padding: 28px; margin-bottom: 40px; }
.tw-login-card h1 { margin: 16px 0 14px; font-weight: 900; }

/* ── 框架 ── */
.tw { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.tw-nav {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 18px; padding: 20px 16px;
  background: var(--navy); color: #fff; border-right: var(--line);
}
.tw-nav .brand small { color: var(--pink-2); opacity: 1; }
.tw-nav nav { display: flex; flex-direction: column; gap: 8px; }
.tw-nav nav button {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 14px; border: 2.5px solid transparent;
  background: transparent; color: #dfe4ff; font-weight: 800; text-align: left; cursor: pointer; font-size: 1em;
}
.tw-nav nav button:hover { background: rgba(255, 255, 255, .08); }
.tw-nav nav button.on { background: var(--pink); color: #fff; border-color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.badge { margin-left: auto; min-width: 24px; padding: 0 7px; border-radius: 999px; background: var(--lemon); color: var(--ink); border: 2px solid var(--ink); font-size: .8em; font-weight: 900; text-align: center; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.12); } }
.tw-main { padding: 24px 28px 80px; min-width: 0; }
.view-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.view-head h1 { margin: 0; font-size: 1.7em; font-weight: 900; }
.note { margin: -6px 0 14px; font-weight: 700; }
.small-note { margin: -6px 0 12px; font-size: .85em; font-weight: 700; }

/* ── 总览 ── */
.ov-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin-bottom: 20px; }
.ov-card { padding: 14px 16px; border: var(--line); border-radius: 18px; background: var(--st-2, #fff); box-shadow: var(--shadow); }
.ov-card b { display: block; font-size: 2em; font-weight: 900; line-height: 1.1; }
.ov-card span { font-weight: 800; color: var(--ink-2); font-size: .9em; }
.ov-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.ov-map svg { display: block; width: 100%; height: auto; border-radius: 18px; border: var(--line); }
.mini { display: flex; flex-direction: column; gap: 10px; }
.mini-item {
  display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border: 2.5px solid var(--ink);
  border-radius: 14px; background: #fff; cursor: pointer; transition: transform .12s, box-shadow .12s;
}
.mini-item:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }
.mini-item .t { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-item small { display: block; color: var(--ink-2); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-item .cd { font-family: var(--mono); font-weight: 800; font-size: .9em; }
.mini-item .cd.low { color: var(--red); }

/* ── 表格 ── */
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 18px; padding: 14px 16px; }
.filters .select { width: auto; min-width: 160px; }
.filters .input { width: 260px; flex: 1; min-width: 180px; }
.check { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--grape); }
.table-card { padding: 6px 0 0; overflow: auto; margin-bottom: 20px; }
.tbl-tools { padding: 10px 16px 6px; }
.tbl { width: 100%; border-collapse: collapse; font-size: .93em; }
.tbl th { text-align: left; padding: 10px 14px; font-size: .82em; letter-spacing: .06em; color: var(--ink-2); border-bottom: var(--line); white-space: nowrap; }
.tbl td { padding: 11px 14px; border-bottom: 2px dashed #e4e2f2; vertical-align: middle; }
.tbl tbody tr { transition: background .1s; }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr.click:hover { background: var(--lemon-2); }
.tbl tr.unseen td:first-child { box-shadow: inset 6px 0 0 var(--pink); }
.tbl .new { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 6px; background: var(--pink); color: #fff; font-size: .72em; font-weight: 900; border: 2px solid var(--ink); vertical-align: 1px; }
.tbl .name { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; }
.tbl .right { text-align: right; white-space: nowrap; }
.tbl .cd { font-family: var(--mono); font-weight: 700; white-space: nowrap; }
.tbl .cd.low { color: var(--red); }
.tbl .route { white-space: nowrap; font-weight: 700; }
.tbl .acts { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.vip { display: inline-block; padding: 0 8px; margin-left: 6px; border: 2px solid var(--ink); border-radius: 999px; background: var(--lemon); font-size: .75em; font-weight: 900; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 12px; font-weight: 800; }

/* ── 机场 ── */
.ap-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-bottom: 20px; }
.ap-tile { padding: 14px; border: var(--line); border-radius: 18px; background: #fff; box-shadow: var(--shadow); }
.ap-tile header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ap-tile .code { font-weight: 900; font-size: .8em; padding: 0 8px; border: 2px solid var(--ink); border-radius: 8px; background: var(--lemon); letter-spacing: .1em; }
.ap-tile b { font-weight: 900; }
.ap-tile .planes { display: flex; flex-wrap: wrap; gap: 6px; }
.ap-tile .planes span { padding: 1px 10px; border: 2px solid var(--ink); border-radius: 999px; background: var(--mint-2); font-size: .82em; font-weight: 800; }
.ap-tile .none { color: var(--ink-3); font-weight: 700; font-size: .88em; }

/* ── 任务详情抽屉 ── */
#drawer-body { padding: 26px 26px 60px; }
.td-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 50px 6px 0; }
.td-head .no { font-family: var(--mono); font-weight: 900; font-size: 1.1em; }
#drawer-body h2 { margin: 6px 0 12px; font-weight: 900; overflow-wrap: anywhere; }
.route-big { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center; padding: 14px 16px; border: var(--line); border-radius: 18px; background: #fff; margin-bottom: 14px; }
.route-big b { display: block; font-size: 1.9em; font-weight: 900; line-height: 1; }
.route-big small { font-weight: 800; color: var(--ink-2); }
.route-big .to { text-align: right; }
.route-big .mid { font-size: 1.7em; }
.kv { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 18px; margin: 0 0 6px; }
.kv dt { font-size: .76em; font-weight: 900; color: var(--ink-3); letter-spacing: .08em; }
.kv dd { margin: 0; font-weight: 800; overflow-wrap: anywhere; }
#drawer-body h4 { margin: 18px 0 8px; font-weight: 900; }
.text-box { padding: 12px 14px; border: 2.5px solid var(--ink); border-radius: 14px; background: #fff; max-height: 340px; overflow: auto; }
.text-box.reply { background: var(--mint-2); }
.crash-box { padding: 12px 14px; border: 2.5px solid var(--ink); border-radius: 14px; background: var(--red-2); font-weight: 800; }
.actions { margin-top: 20px; padding: 18px; border: var(--line); border-radius: 20px; background: var(--grape-2); box-shadow: var(--shadow); }
.actions h3 { margin: 0 0 12px; font-weight: 900; }
.actions .row { margin-top: 10px; }
.old-files { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.old-files label { display: flex; align-items: center; gap: 8px; font-weight: 700; padding: 6px 10px; border: 2px solid var(--ink); border-radius: 12px; background: #fff; }
.old-files label.rm { text-decoration: line-through; background: var(--red-2); }
.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 3px dashed var(--ink-3); }
.timeline li { position: relative; padding: 0 0 10px 10px; font-size: .9em; }
.timeline li::before { content: ""; position: absolute; left: -27px; top: 3px; width: 14px; height: 14px; border-radius: 50%; border: 2.5px solid var(--ink); background: var(--lemon); }
.timeline time { font-family: var(--mono); color: var(--ink-2); margin-right: 8px; }
.drop { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 16px; border: 3px dashed var(--ink-3); border-radius: 16px; background: #fff; cursor: pointer; font-weight: 800; color: var(--ink-2); margin-bottom: 10px; }
.drop:hover, .drop.over { background: var(--sky-2); border-color: var(--sky); }

/* ── 弹窗 ── */
.tw-modal { position: relative; width: min(520px, 100%); padding: 26px; }
.tw-modal h3 { margin: 0 46px 14px 0; font-weight: 900; font-size: 1.3em; }
.secret {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px; border: var(--line); border-radius: 16px; background: var(--lemon-2);
  font-family: var(--mono); font-size: 1.12em; font-weight: 800; word-break: break-all; margin: 10px 0 14px;
}
.secret span { flex: 1; }
.err-line { color: var(--red); font-weight: 800; min-height: 1.4em; margin: 0 0 8px; }

@media (max-width: 900px) {
  .tw { grid-template-columns: 1fr; }
  .tw-nav { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px 12px; }
  .tw-nav nav { flex-direction: row; flex-wrap: wrap; }
  .tw-nav .spacer { display: none; }
  .tw-nav #logout { width: auto; }
  .ov-grid { grid-template-columns: 1fr; }
  .tw-main { padding: 16px 12px 60px; }
  .kv { grid-template-columns: 1fr; }
  .tw-login-stage { flex-direction: column; align-items: center; }
  .tw-login-dz { height: 220px; }
}
