/* ============================================================
   货运门岗司机端主页 home.css v2
   风格：厂区智能导视 / 工业控制面板
   深蓝 + 工业灰（暗底） + 橙色强调 · 蓝图网格 · 角标取景框
   ============================================================ */
:root {
  --bg: #0b1726;
  --bg-soft: #0e1f33;
  --panel: rgba(20, 40, 65, .92);
  --panel-solid: #14283f;
  --line: #1f3a58;
  --line-soft: #1a2f49;
  --text: #eef4fa;
  --text-dim: #93a9bf;
  --text-faint: #6d849c;
  --accent: #ff8a1e;
  --accent-hi: #ffb347;
  --accent-deep: #e06f12;
  --steel: #4da3df;
  --ok: #34c98b;
  --font-cn: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  --font-num: "Bahnschrift", "Avenir Next Condensed", "DIN Alternate", "Arial Narrow", sans-serif;
  --radius: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html { height: 100%; }

body {
  font-family: var(--font-cn);
  background:
    radial-gradient(1200px 520px at 50% -12%, rgba(49, 118, 190, .22), transparent 62%),
    radial-gradient(820px 420px at 108% 16%, rgba(255, 138, 30, .10), transparent 58%),
    linear-gradient(180deg, #0d1c30 0%, #0a1522 100%);
  color: var(--text);
  min-height: 100%;
  padding-bottom: env(safe-area-inset-bottom);
  -webkit-font-smoothing: antialiased;
}
/* 蓝图网格层 */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(122, 168, 220, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122, 168, 220, .055) 1px, transparent 1px);
  background-size: 28px 28px;
}
body.panel-open { overflow: hidden; }

button { font-family: inherit; border: none; background: none; cursor: pointer; touch-action: manipulation; }
svg { display: block; }

/* ---------- 顶部固定标题栏 ---------- */
.app-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  background: linear-gradient(180deg, rgba(10, 22, 38, .96), rgba(10, 22, 38, .88));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.app-header__inner {
  max-width: 560px; margin: 0 auto;
  padding: calc(12px + env(safe-area-inset-top)) 16px 12px;
}
.app-header__row { display: flex; align-items: center; justify-content: space-between; }
.app-header__title {
  font-size: 19px; font-weight: 800; letter-spacing: 1px;
  display: flex; align-items: center; gap: 9px;
}
.app-header__title::before {
  content: ""; width: 5px; height: 20px; border-radius: 2px;
  background: linear-gradient(180deg, var(--accent-hi), var(--accent-deep));
  box-shadow: 0 0 10px rgba(255, 138, 30, .6);
}
.app-header__status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--text-dim);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px;
  background: rgba(255, 255, 255, .04);
}
.app-header__status i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--ok);
  box-shadow: 0 0 8px rgba(52, 201, 139, .9);
  animation: blink 2.4s ease-in-out infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
/* 服务状态胶囊（P2）：open=有坐席(默认绿) busy=坐席忙(橙) offline=无人值守(灰) */
.app-header__status.busy i { background: #f5a623; box-shadow: 0 0 8px rgba(245,166,35,.9); animation: blink 1.6s ease-in-out infinite; }
.app-header__status.offline i { background: #6d849c; box-shadow: none; animation: none; }
.app-header__sub { font-size: 12px; color: var(--text-faint); margin-top: 3px; letter-spacing: .5px; }
.app-header__stripe {
  display: block; height: 3px;
  background: repeating-linear-gradient(-45deg, var(--accent) 0 12px, #c95f00 12px 24px);
  opacity: .9;
}

/* ---------- 主体布局 ---------- */
.page-body {
  position: relative; z-index: 1;
  max-width: 560px; margin: 0 auto;
  padding: calc(96px + env(safe-area-inset-top)) 14px calc(130px + env(safe-area-inset-bottom));
}

/* ---------- 关键提示条 ---------- */
.notice-bar {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 14px; border-radius: 12px; margin-bottom: 16px;
  background: rgba(255, 138, 30, .10);
  border: 1px solid rgba(255, 138, 30, .35);
  color: #ffd9ad;
  animation: rise .5s .02s cubic-bezier(.2, .7, .3, 1) both;
}
.notice-bar__dot {
  flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 10px rgba(255, 138, 30, .8);
}
.notice-bar__text { font-size: 13px; line-height: 1.5; letter-spacing: .3px; }

/* ---------- 功能卡片 ---------- */
.card {
  position: relative;
  background: linear-gradient(180deg, rgba(24, 46, 74, .92), rgba(14, 29, 48, .94));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .05);
  overflow: hidden; margin-bottom: 16px; cursor: pointer;
  transition: transform .12s ease, border-color .2s ease, box-shadow .2s ease;
  animation: rise .55s cubic-bezier(.2, .7, .3, 1) both;
}
#cardSignin { animation-delay: .10s; }
#cardSafety { animation-delay: .18s; }
#cardNav    { animation-delay: .26s; }
#cardVisit  { animation-delay: .22s; }
.card:active { transform: scale(.982); }
.card--primary {
  border-color: rgba(255, 138, 30, .6);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .35), 0 0 0 1px rgba(255, 138, 30, .12), 0 0 34px rgba(255, 138, 30, .12);
}
.card--primary:active { box-shadow: 0 8px 22px rgba(0, 0, 0, .35), 0 0 0 1px rgba(255, 138, 30, .25), 0 0 40px rgba(255, 138, 30, .22); }

@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.card__cover {
  position: relative; height: 128px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255, 255, 255, .92); overflow: hidden;
  background-image:
    linear-gradient(rgba(140, 190, 240, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140, 190, 240, .07) 1px, transparent 1px);
  background-size: 26px 26px, 26px 26px;
}
.cover--signin {
  background-image:
    linear-gradient(rgba(140, 190, 240, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140, 190, 240, .07) 1px, transparent 1px),
    radial-gradient(120% 170% at 88% -20%, rgba(77, 163, 223, .38), transparent 55%),
    radial-gradient(110% 150% at -10% 120%, rgba(255, 138, 30, .25), transparent 52%),
    linear-gradient(135deg, #123a63 0%, #0e2a4a 62%, #0a1f38 100%);
  background-size: 26px 26px, 26px 26px, auto, auto, auto;
}
.cover--safety {
  background-image:
    linear-gradient(rgba(140, 190, 240, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140, 190, 240, .07) 1px, transparent 1px),
    radial-gradient(120% 170% at 88% -20%, rgba(120, 145, 170, .30), transparent 55%),
    linear-gradient(135deg, #33475b 0%, #24384d 62%, #16222f 100%);
  background-size: 26px 26px, 26px 26px, auto, auto;
}
.cover--visit {
  background-image:
    linear-gradient(rgba(140, 190, 240, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140, 190, 240, .07) 1px, transparent 1px),
    radial-gradient(120% 170% at 88% -20%, rgba(52, 201, 139, .28), transparent 55%),
    linear-gradient(135deg, #1c4a47 0%, #14352f 62%, #0d211d 100%);
  background-size: 26px 26px, 26px 26px, auto, auto;
}
.cover--nav {
  background-image:
    linear-gradient(rgba(140, 190, 240, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140, 190, 240, .07) 1px, transparent 1px),
    radial-gradient(120% 170% at 88% -20%, rgba(77, 163, 223, .28), transparent 55%),
    linear-gradient(135deg, #2c3e52 0%, #1c2e42 62%, #121e2c 100%);
  background-size: 26px 26px, 26px 26px, auto, auto;
}
/* 取景框角标 */
.card__cover::before {
  content: ""; position: absolute; top: 10px; left: 10px; z-index: 2;
  width: 20px; height: 20px;
  border-top: 2px solid rgba(255, 255, 255, .55);
  border-left: 2px solid rgba(255, 255, 255, .55);
}
.card__cover::after {
  content: ""; position: absolute; bottom: 10px; right: 10px; z-index: 2;
  width: 20px; height: 20px;
  border-bottom: 2px solid rgba(255, 255, 255, .55);
  border-right: 2px solid rgba(255, 255, 255, .55);
}

.card__index {
  position: absolute; top: 8px; left: 14px; z-index: 2;
  font-family: var(--font-num);
  font-size: 30px; font-weight: 700; letter-spacing: 1px;
  color: rgba(255, 255, 255, .16); line-height: 1;
}

.card__cover-icon { width: 62px; height: 62px; z-index: 1; filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .35)); }

.card__badge {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  background: linear-gradient(135deg, var(--accent-hi), var(--accent-deep));
  color: #fff; font-size: 12px; font-weight: 800; letter-spacing: 1px;
  padding: 6px 13px; border-radius: 999px;
  box-shadow: 0 4px 14px rgba(224, 111, 18, .5);
}

.card__sheen {
  position: absolute; top: -45%; bottom: -45%; left: -90px; width: 72px;
  transform: skewX(-20deg); z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .10), transparent);
  animation: sheen 5.6s ease-in-out infinite;
}
@keyframes sheen { 0%, 52% { left: -90px; } 86%, 100% { left: 120%; } }

.card__playbtn {
  position: absolute; right: 16px; bottom: 16px; z-index: 3;
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-hi), var(--accent-deep));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(224, 111, 18, .55), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.card__playbtn::before {
  content: ""; position: absolute; inset: -7px; border-radius: 50%;
  border: 1.5px solid rgba(255, 138, 30, .55);
  animation: pulse-ring 2.2s ease-out infinite;
}
@keyframes pulse-ring {
  0% { transform: scale(.88); opacity: .9; }
  70% { transform: scale(1.3); opacity: 0; }
  100% { transform: scale(1.3); opacity: 0; }
}

.card__enterbtn {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  height: 42px; padding: 0 18px; border-radius: 21px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .08));
  border: 1px solid rgba(255, 255, 255, .28);
  color: #fff; font-size: 14px; font-weight: 700; letter-spacing: 1px;
  display: flex; align-items: center; gap: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}

.card__body { padding: 15px 16px 17px; }
.card__title { font-size: 18px; font-weight: 800; letter-spacing: 1px; margin-bottom: 5px; }
.card__desc { font-size: 14px; color: var(--text-dim); line-height: 1.55; }

/* ---------- 常见 FAQ ---------- */
.faq { animation: rise .55s .34s cubic-bezier(.2, .7, .3, 1) both; }
.faq__title {
  font-size: 18px; font-weight: 800; letter-spacing: 1px;
  margin: 28px 2px 14px;
  display: flex; align-items: center; gap: 10px;
}
.faq__title-index {
  font-family: var(--font-num); font-size: 13px; font-weight: 700;
  color: #0b1726; background: linear-gradient(135deg, var(--accent-hi), var(--accent-deep));
  border-radius: 7px; padding: 3px 8px; line-height: 1.3;
}
.faq__item {
  background: linear-gradient(180deg, rgba(24, 46, 74, .9), rgba(14, 29, 48, .92));
  border: 1px solid var(--line);
  border-radius: 13px; margin-bottom: 11px;
  overflow: hidden;
  animation: rise .45s cubic-bezier(.2, .7, .3, 1) both;
  transition: border-color .2s ease;
}
.faq__item:nth-child(1) { animation-delay: .40s; }
.faq__item:nth-child(2) { animation-delay: .44s; }
.faq__item:nth-child(3) { animation-delay: .48s; }
.faq__item:nth-child(4) { animation-delay: .52s; }
.faq__item:nth-child(5) { animation-delay: .56s; }
.faq__item:nth-child(6) { animation-delay: .60s; }
.faq__item:nth-child(7) { animation-delay: .64s; }
.faq__item:nth-child(8) { animation-delay: .68s; }
.faq__item:nth-child(9) { animation-delay: .72s; }
.faq__item:nth-child(10){ animation-delay: .76s; }
.faq__item.open { border-color: rgba(255, 138, 30, .45); }
.faq__q {
  width: 100%; min-height: 54px; padding: 0 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  text-align: left; font-size: 16px; font-weight: 700; color: var(--text);
}
.faq__q:active { background: rgba(255, 255, 255, .04); }
.faq__q-icon {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(77, 163, 223, .14); border: 1px solid rgba(77, 163, 223, .35);
  color: var(--steel);
  transition: transform .22s ease, background .22s ease, color .22s ease, border-color .22s ease;
}
.faq__q-icon svg { transition: transform .22s ease; }
.faq__item.open .faq__q-icon { transform: rotate(180deg); background: rgba(255, 138, 30, .14); border-color: rgba(255, 138, 30, .45); color: var(--accent-hi); }
.faq__a { display: none; padding: 0 16px 15px; font-size: 14px; line-height: 1.75; color: var(--text-dim); }
.faq__a-in {
  border-left: 3px solid var(--accent);
  padding-left: 13px;
  background: rgba(255, 255, 255, .02);
  border-radius: 0 8px 8px 0;
}
.faq__item.open .faq__a { display: block; animation: fade-in .22s ease; }
@keyframes fade-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.faq__foot { text-align: center; font-size: 13px; color: var(--text-faint); padding: 14px 0 4px; letter-spacing: .5px; }

/* ---------- 悬浮帮助按钮 ---------- */
.help-btn {
  position: fixed; right: 16px; bottom: calc(30px + env(safe-area-inset-bottom)); z-index: 60;
  min-width: 96px; height: 56px; border-radius: 28px; padding: 0 24px;
  background: radial-gradient(120% 130% at 30% 20%, var(--accent-hi), var(--accent-deep) 70%);
  color: #fff; font-size: 16px; font-weight: 800; letter-spacing: 2px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 26px rgba(224, 111, 18, .5), 0 0 0 7px rgba(255, 138, 30, .12), inset 0 2px 0 rgba(255, 255, 255, .35);
  animation: pop .55s .55s cubic-bezier(.2, .9, .3, 1.25) both;
}
.help-btn::after {
  content: ""; position: absolute; inset: -8px; border-radius: 34px;
  border: 1.5px solid rgba(255, 138, 30, .4);
  animation: pulse-ring 2.6s ease-out infinite;
}
@keyframes pop { from { opacity: 0; transform: scale(.4) translateY(24px); } to { opacity: 1; transform: none; } }
.help-btn:active { transform: scale(.93); }

/* ---------- 聊天面板（右侧滑出） ---------- */
.help-panel {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(92vw, 420px); z-index: 70;
  background: #f2f3f5;
  box-shadow: -8px 0 30px rgba(0, 0, 0, .4);
  animation: slide-in .28s cubic-bezier(.2, .8, .3, 1);
}
@keyframes slide-in { from { transform: translateX(100%); } to { transform: translateX(0); } }
.help-panel__body { position: absolute; inset: 0; }
.help-panel__frame { width: 100%; height: 100%; border: none; background: #f2f3f5; }
.help-panel__close {
  position: absolute; top: calc(6px + env(safe-area-inset-top)); right: 10px; z-index: 30;
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(10, 22, 38, .72); color: #fff;
  font-size: 22px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .3);
}
.help-panel__close:active { opacity: .8; }

/* ---------- 导航二级菜单（底部弹层） ---------- */
.sheet-mask { position: fixed; inset: 0; z-index: 50; background: rgba(4, 10, 18, .62); animation: fade-in .2s ease; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
  max-width: 560px; margin: 0 auto;
  background: linear-gradient(180deg, #14283f, #0e1f33);
  border: 1px solid var(--line); border-bottom: none;
  border-radius: 20px 20px 0 0;
  padding: 10px 16px calc(20px + env(safe-area-inset-bottom));
  animation: slide-up .26s cubic-bezier(.2, .8, .3, 1);
  box-shadow: 0 -16px 50px rgba(0, 0, 0, .5);
}
@keyframes slide-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
.sheet__handle { width: 42px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .18); margin: 0 auto 14px; }
.sheet__title {
  font-size: 15px; font-weight: 800; letter-spacing: 1px; text-align: center;
  color: var(--text); margin-bottom: 14px;
}
.sheet__list {
  display: flex; flex-direction: column; gap: 10px;
  max-height: 58vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 2px 2px 4px;
}
.nav-group {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 4px 4px; font-size: 13px; font-weight: 800;
  letter-spacing: 2px; color: var(--text-faint);
}
.nav-group::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.nav-item {
  display: flex; align-items: center; gap: 14px; width: 100%;
  min-height: 60px; padding: 9px 14px;
  border-radius: 13px;
  background: rgba(255, 255, 255, .045);
  border: 1px solid var(--line);
  text-align: left;
  transition: border-color .18s ease, background .18s ease, transform .12s ease;
}
.nav-item:active { background: rgba(255, 138, 30, .10); border-color: rgba(255, 138, 30, .5); transform: scale(.985); }
.nav-item__icon {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 11px;
  background: linear-gradient(135deg, rgba(77, 163, 223, .25), rgba(77, 163, 223, .08));
  border: 1px solid rgba(77, 163, 223, .4);
  color: var(--steel);
  display: flex; align-items: center; justify-content: center;
}
.nav-item__label { display: block; font-size: 16px; font-weight: 700; color: var(--text); letter-spacing: .5px; }
.nav-item__desc { display: block; font-size: 13px; color: var(--text-faint); margin-top: 2px; }
.sheet__cancel {
  width: 100%; height: 52px; margin-top: 14px; border-radius: 13px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04);
  color: var(--text-dim); font-size: 16px; font-weight: 700; letter-spacing: 2px;
}
.sheet__cancel:active { background: rgba(255, 255, 255, .08); }

/* ---------- 全屏视频播放层 ---------- */
.player {
  position: fixed; inset: 0; z-index: 80;
  background: radial-gradient(120% 100% at 50% 0%, #0e2238, #050b12 70%);
  color: #fff;
  display: flex; flex-direction: column;
}
.player__bar {
  flex: 0 0 auto; height: 54px;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(env(safe-area-inset-top)) 14px 0 20px;
  background: rgba(5, 12, 20, .55);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.player__title { font-size: 16px; font-weight: 800; letter-spacing: 2px; }
.player__close {
  height: 42px; padding: 0 20px; border-radius: 21px;
  background: linear-gradient(135deg, var(--accent-hi), var(--accent-deep));
  color: #fff; font-size: 14px; font-weight: 800; letter-spacing: 1px;
  box-shadow: 0 4px 14px rgba(224, 111, 18, .45);
}
.player__stage { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; }
.player__stage video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.player__loading {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  color: #fff; font-size: 14px;
  background: rgba(5, 12, 20, .7); border: 1px solid rgba(255, 138, 30, .4);
  padding: 10px 18px; border-radius: 10px; letter-spacing: 1px;
}
.player__hint {
  flex: 0 0 auto; text-align: center; font-size: 12px; color: rgba(255, 255, 255, .45); letter-spacing: 1px;
  padding: 10px 0 calc(12px + env(safe-area-inset-bottom));
}

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(116px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 100;
  max-width: 80%;
  background: rgba(6, 14, 24, .92); color: #fff;
  border: 1px solid rgba(255, 138, 30, .55);
  font-size: 14px; line-height: 1.6; text-align: center; letter-spacing: .5px;
  padding: 13px 20px; border-radius: 12px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .5);
  animation: fade-in .2s ease;
}