/* ============================================================
   Lucton 校车安全与校园管理平台 · 设计系统
   风格：国际学校 · 简洁大气 · 圆角柔和 · 平滑过渡
   配色：深蓝(navy) + 暖金(gold) + 柔和浅底
   ============================================================ */

:root {
  --navy: #14264B;
  --navy-2: #1E3A6B;
  --navy-soft: #2C4A82;
  --gold: #C9A24B;
  --gold-soft: #E7D6A8;
  --bg: #F6F8FC;
  --bg-2: #EEF3FB;
  --card: #FFFFFF;
  --text: #1F2937;
  --muted: #6B7280;
  --line: #E6ECF5;
  --ok: #16A34A;
  --warn: #E2592E;

  --r-lg: 24px;
  --r-md: 18px;
  --r-sm: 12px;
  --pill: 999px;

  --shadow-sm: 0 4px 14px rgba(20, 38, 75, .06);
  --shadow-md: 0 14px 40px rgba(20, 38, 75, .10);
  --shadow-lg: 0 30px 70px rgba(20, 38, 75, .16);

  --maxw: 1180px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 26px; border-radius: var(--pill);
  font-weight: 600; font-size: 15px; cursor: pointer;
  border: 1px solid transparent; transition: all .25s var(--ease);
  text-align: center;
}
.btn-primary { background: var(--navy); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--navy-2); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-gold { background: var(--gold); color: #2a210a; }
.btn-gold:hover { background: #d8b25c; transform: translateY(-2px); }
.btn-ghost { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.4); }
.btn-ghost:hover { background: rgba(255,255,255,.24); }
.btn-outline { background: #fff; color: var(--navy); border-color: var(--line); }
.btn-outline:hover { border-color: var(--navy); transform: translateY(-2px); }

/* ---------- 顶栏 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(140%) blur(10px);
  background: rgba(246,248,252,.82);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 20px; letter-spacing: .3px; color: var(--navy); }
.brand .logo {
  width: 42px; height: 42px; border-radius: 14px;
  background: linear-gradient(135deg, var(--navy), var(--navy-soft));
  color: var(--gold); display: grid; place-items: center; font-weight: 900; font-size: 20px;
  box-shadow: var(--shadow-sm);
}
.nav-links { display: flex; gap: 30px; font-weight: 500; color: var(--muted); }
.nav-links a:hover { color: var(--navy); }
.nav-cta { display: flex; gap: 12px; align-items: center; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1100px 500px at 80% -10%, rgba(201,162,75,.18), transparent 60%),
    linear-gradient(180deg, #0F1E3D 0%, #14264B 55%, #16294c 100%);
  color: #fff; padding: 90px 0 110px;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 26px 26px; opacity: .5; pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 50px; align-items: center; position: relative; z-index: 1; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: var(--pill);
  background: rgba(201,162,75,.16); color: var(--gold-soft);
  font-size: 13px; font-weight: 600; letter-spacing: .4px;
}
.hero h1 { font-size: clamp(34px, 4.6vw, 56px); line-height: 1.12; margin: 22px 0 18px; font-weight: 800; }
.hero h1 .accent { color: var(--gold); }
.hero p.lead { font-size: 18px; color: rgba(255,255,255,.82); max-width: 520px; }
.hero-actions { display: flex; gap: 16px; margin-top: 32px; flex-wrap: wrap; }

/* 卡片样机 */
.hero-card {
  background: var(--card); border-radius: var(--r-lg); padding: 26px; color: var(--text);
  box-shadow: var(--shadow-lg); border: 1px solid var(--line);
}
.hero-card .hc-top { display: flex; justify-content: space-between; align-items: center; }
.chip { font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: var(--pill); }
.chip.ok { background: rgba(22,163,74,.12); color: var(--ok); }
.chip.warn { background: rgba(226,89,46,.12); color: var(--warn); }
.hc-vehicle { font-weight: 800; font-size: 18px; color: var(--navy); }
.hc-row { display: flex; justify-content: space-between; padding: 13px 0; border-bottom: 1px dashed var(--line); }
.hc-row:last-child { border-bottom: 0; }
.hc-row .t { color: var(--muted); }
.hc-row .v { font-weight: 700; }

/* ---------- 数据带 ---------- */
.stats { background: var(--card); border-bottom: 1px solid var(--line); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 40px 0; }
.stat { text-align: center; }
.stat .num { font-size: 40px; font-weight: 800; color: var(--navy); line-height: 1; }
.stat .num .u { font-size: 18px; color: var(--gold); margin-left: 4px; }
.stat .label { color: var(--muted); margin-top: 10px; font-size: 14px; }

/* ---------- 通用区块 ---------- */
.section { padding: 90px 0; }
.section.alt { background: var(--bg-2); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 50px; }
.section-head .eyebrow { color: var(--navy); background: rgba(20,38,75,.08); }
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); margin: 16px 0 12px; color: var(--navy); font-weight: 800; }
.section-head p { color: var(--muted); font-size: 17px; }

/* 功能网格 */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 30px; box-shadow: var(--shadow-sm); transition: all .3s var(--ease);
}
.feature:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: transparent; }
.feature .ic {
  width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(20,38,75,.08), rgba(201,162,75,.16));
  font-size: 26px; margin-bottom: 18px;
}
.feature h3 { margin: 0 0 8px; color: var(--navy); font-size: 20px; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }

/* 双栏说明 */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 54px; align-items: center; }
.split .media {
  border-radius: var(--r-lg); padding: 28px; background: linear-gradient(160deg, #fff, #eef3fb);
  box-shadow: var(--shadow-md); border: 1px solid var(--line);
}
.checklist { list-style: none; padding: 0; margin: 18px 0 0; }
.checklist li { display: flex; gap: 12px; padding: 10px 0; align-items: flex-start; }
.checklist .dot { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; background: rgba(22,163,74,.12); color: var(--ok); display: grid; place-items: center; font-weight: 800; }

/* 页脚 */
.site-footer { background: var(--navy); color: rgba(255,255,255,.78); padding: 64px 0 36px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; }
.footer-grid h4 { color: #fff; margin: 0 0 16px; font-size: 16px; }
.footer-grid a { display: block; padding: 6px 0; color: rgba(255,255,255,.7); }
.footer-grid a:hover { color: var(--gold-soft); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 40px; padding-top: 22px; font-size: 13px; color: rgba(255,255,255,.55); }

/* 滚动渐显 */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- 登录 / 门户 ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.auth-aside {
  background: linear-gradient(160deg, #0F1E3D, #14264B 60%, #16294c);
  color: #fff; padding: 70px 56px; display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.auth-aside::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px); background-size: 24px 24px; opacity: .5;
}
.auth-aside > * { position: relative; z-index: 1; }
.auth-aside h2 { font-size: 30px; line-height: 1.3; font-weight: 800; }
.auth-aside .accent { color: var(--gold); }
.auth-aside p { color: rgba(255,255,255,.8); margin-top: 16px; }
.auth-card { background: var(--card); display: flex; align-items: center; justify-content: center; padding: 40px; }
.auth-box { width: 100%; max-width: 380px; }
.auth-box h1 { color: var(--navy); font-size: 26px; margin: 0 0 6px; }
.auth-box .sub { color: var(--muted); margin: 0 0 28px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--navy); margin-bottom: 8px; }
.field input, .field select {
  width: 100%; padding: 14px 16px; border-radius: var(--r-sm); border: 1px solid var(--line);
  font-size: 15px; background: #FBFCFE; transition: border-color .2s, box-shadow .2s; outline: none;
}
.field input:focus, .field select:focus { border-color: var(--navy); box-shadow: 0 0 0 4px rgba(20,38,75,.08); }
.auth-box .btn { width: 100%; justify-content: center; margin-top: 6px; }
.auth-hint { margin-top: 16px; font-size: 13px; color: var(--muted); text-align: center; }

/* 门户看板 */
.app { min-height: 100vh; display: grid; grid-template-columns: 256px 1fr; background: var(--bg); }
.sidebar { background: var(--navy); color: #fff; padding: 22px 16px; display: flex; flex-direction: column; }
.sidebar .brand { color: #fff; margin-bottom: 26px; }
.sidebar .brand .logo { background: linear-gradient(135deg, #20396b, #2C4A82); }
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.side-nav a {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-sm);
  color: rgba(255,255,255,.78); font-weight: 500; cursor: pointer; transition: background .2s;
}
.side-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.side-nav a.active { background: var(--gold); color: #2a210a; font-weight: 700; }
.side-nav .ic { font-size: 18px; }
.sidebar .spacer { flex: 1; }
.sidebar .user { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r-sm); background: rgba(255,255,255,.06); }
.sidebar .avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--gold); color: #2a210a; display: grid; place-items: center; font-weight: 800; }
.main { display: flex; flex-direction: column; }
.topbar { height: 68px; background: var(--card); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 28px; }
.topbar .title { font-weight: 700; color: var(--navy); font-size: 18px; }
.topbar .right { display: flex; gap: 12px; align-items: center; color: var(--muted); }
.content { padding: 28px; }
.page { display: none; }
.page.active { display: block; animation: fade .35s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.cards-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 26px; }
.mini { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px; box-shadow: var(--shadow-sm); }
.mini .k { color: var(--muted); font-size: 13px; }
.mini .v { font-size: 30px; font-weight: 800; color: var(--navy); margin-top: 6px; }
.mini .v .u { font-size: 15px; color: var(--gold); }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-sm); overflow: hidden; }
.panel .ph { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.panel .ph h3 { margin: 0; color: var(--navy); font-size: 17px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 14px 22px; font-size: 14px; }
th { color: var(--muted); font-weight: 600; background: #FBFCFE; border-bottom: 1px solid var(--line); }
td { border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
.badge { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: var(--pill); }
.badge.board { background: rgba(22,163,74,.12); color: var(--ok); }
.badge.late { background: rgba(226,89,46,.12); color: var(--warn); }

.map-mock { height: 360px; border-radius: var(--r-md); background:
  radial-gradient(600px 300px at 30% 30%, rgba(20,38,75,.06), transparent),
  linear-gradient(180deg, #eaf1fb, #dde9f8);
  position: relative; overflow: hidden; border: 1px solid var(--line); }
.map-mock .road { position: absolute; height: 10px; background: #fff; border-radius: 6px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.map-mock .bus { position: absolute; width: 16px; height: 16px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 6px rgba(201,162,75,.25); }
.map-legend { display: flex; gap: 18px; margin-top: 16px; color: var(--muted); font-size: 13px; }
.map-legend .lg { display: flex; align-items: center; gap: 7px; }
.map-legend .d { width: 12px; height: 12px; border-radius: 50%; }

/* ---------- 真实地图（AMap）/ 示意底图 ---------- */
.bus-pin { display: flex; flex-direction: column; align-items: center; transform: translateY(-6px); }
.bus-pin .emo { font-size: 22px; line-height: 1; filter: drop-shadow(0 2px 3px rgba(0,0,0,.3)); }
.bus-pin b { margin-top: 2px; background: var(--navy); color: #fff; font-size: 11px; padding: 2px 7px; border-radius: 8px; white-space: nowrap; }
.bus-pin.off .emo { opacity: .5; }
.bus-pin.off b { background: #9aa6b8; }
.map-fallback { background: #eef2f8; position: relative; }
.map-empty { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--muted); }
.map-key-hint { font-size: 12px; color: var(--navy); background: var(--gold-soft); border: 1px solid #d8c083; padding: 8px 14px; border-radius: var(--r-sm); margin-top: 10px; }

.setting-row { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.setting-row:last-child { border-bottom: 0; }
.setting-row .meta .t { font-weight: 600; color: var(--navy); }
.setting-row .meta .d { color: var(--muted); font-size: 13px; }
.setting-row input, .setting-row select { padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--line); }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .hero-grid, .split, .auth-wrap, .app, .stats-grid, .feature-grid, .cards-row, .footer-grid { grid-template-columns: 1fr !important; }
  .nav-links { display: none; }
  .hero { padding: 64px 0 80px; }
  .auth-aside { display: none; }
  .sidebar { display: none; }
  .app { grid-template-columns: 1fr; }
}
