/* ============================================================
   深圳西部公交集团 · AI赋能办公提效实战 课堂练习平台
   设计语言：公交智能调度屏 / 电子站牌
   夜幕蓝 + 公交橙 + 运营绿，线路色带区分素材
   ============================================================ */

:root {
  /* 品牌色 */
  --night: #0b2545;
  --night-2: #13315c;
  --night-3: #1d4289;
  --bus-orange: #f5821f;
  --bus-orange-deep: #dd6a0d;
  --bus-green: #16a34a;
  --bus-green-soft: #e7f6ec;
  --bus-blue: #1e6fd9;

  /* 中性色 */
  --bg: #f2f6fb;
  --card: #ffffff;
  --ink: #14263f;
  --ink-2: #34465e;
  --muted: #6b7a90;
  --line: #dfe7f1;
  --line-soft: #edf2f8;
  --lock: #9aa6b4;
  --lock-bg: #f2f4f7;

  /* 素材线路色带（每素材一色，像公交线路） */
  --m1: #f5821f; /* 橙 */
  --m2: #1e6fd9; /* 蓝 */
  --m3: #16a34a; /* 绿 */
  --m4: #7c3aed; /* 紫 */
  --m5: #0e9f9f; /* 青 */
  --m6: #d6336c; /* 玫红 */
  --m7: #b08d1f; /* 金黄 */

  --shadow: 0 1px 2px rgba(11, 37, 69, .05), 0 10px 28px rgba(11, 37, 69, .07);
  --shadow-sm: 0 1px 2px rgba(11, 37, 69, .05), 0 3px 8px rgba(11, 37, 69, .05);
  --radius: 16px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(1200px 400px at 80% -80px, rgba(245, 130, 31, .06), transparent 60%),
    radial-gradient(900px 380px at 10% -60px, rgba(30, 111, 217, .07), transparent 55%),
    var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 980px; margin: 0 auto; padding: 0 20px; }

/* ============ 顶部品牌区（调度屏） ============ */
.topbar {
  background:
    linear-gradient(105deg, rgba(255,255,255,.05) 0%, transparent 40%),
    linear-gradient(120deg, var(--night) 0%, var(--night-2) 55%, var(--night-3) 100%);
  color: #fff;
  padding: 20px 0;
  position: relative;
  overflow: hidden;
}
.topbar::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
  background: linear-gradient(90deg, var(--bus-orange) 0%, var(--bus-orange) 30%, #f8b26a 30%, #f8b26a 46%, #ffd9a0 46%, #ffd9a0 64%, #f8b26a 64%, #f8b26a 80%, var(--bus-orange) 80%);
  opacity: .9;
}
.topbar::before {
  content: '';
  position: absolute; right: -60px; top: -70px; width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(245,130,31,.16) 0%, transparent 62%);
}
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; position: relative; z-index: 1; }

.brand { display: flex; align-items: center; gap: 15px; }
.brand-icon {
  width: 52px; height: 52px; border-radius: 14px; flex: none;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.22);
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.15);
}
.brand-text { min-width: 0; }
.brand-org {
  font-size: 12px; font-weight: 700; letter-spacing: 2px;
  color: #f8b26a; text-transform: uppercase;
  margin-bottom: 2px;
}
.brand-org::before { content: '● '; color: var(--bus-green); }
.topbar h1 { margin: 0; font-size: 21px; font-weight: 800; letter-spacing: .3px; line-height: 1.3; }
.topbar .sub { margin: 3px 0 0; font-size: 12.5px; opacity: .85; }

.topbar-right { display: flex; align-items: center; gap: 14px; flex: none; }
.role-badge {
  font-size: 12px; padding: 5px 12px; border-radius: 999px; font-weight: 700;
  background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.32);
  white-space: nowrap;
}
.ghost-link { color: #fff; font-size: 13px; text-decoration: none; opacity: .92; white-space: nowrap; }
.ghost-link:hover { opacity: 1; text-decoration: underline; }

/* ============ 线路导览条 ============ */
.route-strip {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}
.route-in { display: flex; align-items: center; gap: 14px; }
.route-label {
  font-size: 12.5px; font-weight: 700; color: var(--ink-2); white-space: nowrap;
}
.route-label::before { content: '🟠 '; }
.progress-track {
  flex: 1; height: 8px; border-radius: 999px; background: var(--line-soft);
  overflow: hidden; position: relative;
}
.progress-track .fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--bus-orange), #f8a64e);
  transition: width .5s cubic-bezier(.22,.68,.3,1);
  min-width: 0;
}
.progress { font-size: 13px; color: var(--muted); font-weight: 700; white-space: nowrap; }

/* ============ 通知 ============ */
.notice {
  margin-top: 16px; background: #fff8e6; border: 1px solid #f3e2b3; color: #7a5b12;
  border-radius: var(--radius-sm); padding: 10px 14px; font-size: 13px;
}

/* ============ 工具栏 ============ */
.toolbar { display: flex; align-items: center; justify-content: space-between; margin: 20px 0 12px; }
.toolbar-title { display: flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 800; color: var(--ink); }
.toolbar-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--bus-orange); transform: rotate(45deg); }
.refresh { display: flex; align-items: center; gap: 8px; }
.muted { color: var(--muted); font-size: 12.5px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--bus-green); box-shadow: 0 0 0 3px rgba(22,163,74,.18); }
.dot.stale { background: var(--lock); box-shadow: 0 0 0 3px rgba(154,166,180,.18); }

/* ============ 素材卡片（站牌） ============ */
.cards { display: flex; flex-direction: column; gap: 18px; padding-bottom: 30px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  position: relative;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:not(.is-locked):hover { transform: translateY(-2px); box-shadow: var(--shadow), 0 14px 34px rgba(11,37,69,.1); }
/* 左侧线路色带 */
.card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 6px;
  background: var(--m-color, var(--bus-orange));
}
.card.is-locked::before { background: var(--lock); }

.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px 14px 22px; border-bottom: 1px solid var(--line);
}
.card-head .t { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; }
.card-head h2 { margin: 0; font-size: 16.5px; font-weight: 800; }
.tag {
  font-size: 11.5px; color: var(--night-3); background: #eaf1fc;
  padding: 3px 10px; border-radius: 999px; font-weight: 700; white-space: nowrap;
}
.status {
  font-size: 12.5px; font-weight: 800; display: flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 999px; white-space: nowrap;
}
.status.locked { color: var(--lock); background: var(--lock-bg); }
.status.open { color: var(--bus-green); background: var(--bus-green-soft); }

.card-body { padding: 6px 22px 18px; }

/* 锁定态（暂停服务） */
.locked-body {
  padding: 30px 20px; text-align: center; color: var(--lock);
}
.locked-body .big { font-size: 34px; line-height: 1; }
.locked-body p { margin: 10px 0 0; font-size: 13.5px; }
.locked-body .lock-sign {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 14px;
  font-size: 12px; font-weight: 700; letter-spacing: 2px; color: var(--muted);
  background: var(--lock-bg); border: 1px dashed var(--line); border-radius: 999px;
  padding: 6px 16px;
}

/* ============ 内容块 ============ */
.block { position: relative; padding: 13px 0; border-bottom: 1px dashed var(--line-soft); }
.block:last-child { border-bottom: none; }
.block-label {
  display: inline-block; font-size: 12px; font-weight: 800; color: var(--bus-blue);
  background: #eaf1fc; padding: 3px 9px; border-radius: 7px; margin-bottom: 6px;
}
.block.note .block-label { color: var(--night-3); background: #eef3fa; }
.block.quote .block-label { color: var(--bus-orange-deep); background: #fef0e2; }
.block-text { font-size: 14.5px; color: var(--ink-2); white-space: pre-wrap; padding-right: 60px; }
.block.quote .block-text {
  background: #f8fafc; border-left: 3px solid var(--bus-orange); padding: 10px 12px 10px 14px;
  border-radius: 0 8px 8px 0; font-size: 14px; color: #2b3744;
}
.copy-btn {
  position: absolute; top: 12px; right: 0; border: 1px solid var(--line);
  background: #fff; color: var(--muted); font-size: 12px; padding: 3px 11px;
  border-radius: 8px; cursor: pointer; transition: .15s;
}
.copy-btn:hover { color: var(--bus-orange); border-color: var(--bus-orange); background: #fff8f0; }

/* xlsx 横幅 */
.xlsxbanner {
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(90deg, #eaf1fc, #f4f8fe);
  border: 1px solid #cfe0fb; color: #1c4f96; border-radius: var(--radius-sm);
  padding: 12px 14px; font-size: 13.5px; margin: 10px 0 6px;
}

/* ============ 数据表格 ============ */
.table-block { margin: 16px 0 6px; }
.table-block .tname { font-weight: 800; font-size: 14.5px; margin-bottom: 3px; display: flex; align-items: center; gap: 8px; }
.table-block .tname::before { content: '▦'; color: var(--bus-orange); font-size: 13px; }
.table-block .tdesc { font-size: 12.5px; color: var(--muted); margin-bottom: 9px; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table.data {
  border-collapse: collapse; width: 100%; font-size: 13.5px; background: #fff;
}
table.data th, table.data td {
  border: 1px solid var(--line); padding: 8px 11px; text-align: center;
  white-space: nowrap;
}
table.data th {
  background: linear-gradient(180deg, var(--night-2), var(--night));
  font-weight: 700; color: #fff; font-size: 13px;
}
table.data tbody tr:nth-child(even) { background: #f7fafd; }
table.data tbody tr:hover { background: #eef5fd; }
.table-actions { margin-top: 9px; display: flex; gap: 10px; flex-wrap: wrap; }

/* ============ 按钮 ============ */
.btn {
  border: none; border-radius: var(--radius-sm); padding: 9px 16px; font-size: 13.5px; font-weight: 700;
  cursor: pointer; transition: .15s; display: inline-flex; align-items: center; gap: 7px;
  text-decoration: none;
}
.btn-primary { background: var(--bus-orange); color: #fff; }
.btn-primary:hover { background: var(--bus-orange-deep); box-shadow: 0 4px 14px rgba(245,130,31,.35); }
.btn-soft { background: #eaf1fc; color: var(--night-3); }
.btn-soft:hover { background: #dbe9fd; }
.btn-ghost { background: #fff; border: 1px solid var(--line); color: var(--muted); }
.btn-ghost:hover { color: var(--night-3); border-color: var(--night-3); }
.btn-success { background: var(--bus-green); color: #fff; }
.btn-success:hover { background: #128a3e; }

.loading { padding: 48px; text-align: center; color: var(--muted); }

/* ============ 页脚 ============ */
.footer { border-top: 1px solid var(--line); background: #fff; padding: 26px 0 34px; text-align: center; }
.footer-bus { margin-bottom: 10px; opacity: .85; }
.footer p { margin: 4px 0; }
.footer .small { font-size: 11.5px; }

/* ============ toast ============ */
.toast {
  position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%) translateY(20px);
  background: var(--night); color: #fff; padding: 11px 20px; border-radius: 12px; font-size: 13.5px;
  opacity: 0; pointer-events: none; transition: .22s; z-index: 60;
  box-shadow: 0 8px 24px rgba(11,37,69,.3);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============ 响应式 ============ */
@media (max-width: 640px) {
  .topbar h1 { font-size: 17px; }
  .brand-icon { width: 42px; height: 42px; }
  .brand-org { font-size: 10.5px; letter-spacing: 1px; }
  .card-head { flex-direction: column; align-items: flex-start; gap: 7px; }
  .block-text { padding-right: 0; }
  .route-in { flex-wrap: wrap; }
  .route-label { width: 100%; }
  .progress-track { order: 3; }
  .role-badge { display: none; }
}
