/* ============================================================
   PC 端版面美化覆盖层 v1（只动样式，不动功能/结构/交互）
   生效范围：仅桌面端（min-width:900px）；手机端完全不受影响
   覆盖点：顶栏 / 左侧导航 / 底图卡 / 底部统计卡 / 右侧圆形钮 / 缩放控件 / 字体
   回滚：删除本文件与 index.html 中对应 <link> 即可
   ============================================================ */
@media (min-width: 900px) {
  /* ---------- 全局字体：统一现代字体栈，抗锯齿 ---------- */
  body, button, input, select, textarea {
    font-family: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }

  /* ---------- 顶栏：渐变深海蓝 + 轻阴影，按钮统一 ---------- */
  #topbar {
    height: 52px;
    background: linear-gradient(180deg, #1667c7 0%, #1257b0 100%);
    box-shadow: 0 2px 10px rgba(2, 12, 27, .25);
    padding: 0 16px;
  }
  #topbar .title {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #fff;
    text-shadow: 0 1px 2px rgba(2, 12, 27, .35);
  }
  #topbar .top-icons { gap: 8px; }
  #topbar .topicon {
    width: 32px; height: 32px;
    border-radius: 9px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .18);
    color: #fff;
    font-size: 15px;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: background .15s, transform .12s, box-shadow .15s;
    box-shadow: none;
  }
  #topbar .topicon:hover { background: rgba(255, 255, 255, .26); transform: translateY(-1px); }
  #topbar .topicon:active { transform: scale(.94); }
  #topbar .clock {
    font-size: 12.5px;
    color: rgba(255, 255, 255, .92);
    letter-spacing: .5px;
    padding: 0 10px;
    font-variant-numeric: tabular-nums;
  }

  /* ---------- 顶部态势/台账按钮（动态生成，统一样式） ---------- */
  #sit-fab,
  button[id*="il-"][class*="sit"],
  .sit-btn {
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, .22);
    background: rgba(255, 255, 255, .16);
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    padding: 7px 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18);
    transition: background .15s;
  }
  #sit-fab:hover { background: rgba(255, 255, 255, .28); }
  .sit-badge {
    background: #f87171;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    border-radius: 999px;
    padding: 1px 7px;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(248, 113, 113, .55);
  }

  /* ---------- 左侧导航：清爽浅色指挥台（覆盖 v503 深蓝科技风） ---------- */
  #sidebar {
    background:
      linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-right: 1px solid #e2e8f0;
    box-shadow: 3px 0 14px rgba(15, 23, 42, .05);
  }
  #sidebar::before { display: none; }
  #sidebar .nav-group {
    color: #1565c0;
    font-weight: 800;
    font-size: 11px;
    letter-spacing: 2px;
    padding: 16px 18px 6px;
    text-shadow: none;
  }
  #sidebar .nav-group::after {
    background: linear-gradient(90deg, #bfdbfe, transparent);
    opacity: .8;
  }
  #sidebar .navbtn {
    color: #334155;
    margin: 2px 10px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    padding: 9px 12px;
    border: 1px solid transparent;
    transition: background .15s, color .15s, box-shadow .15s;
  }
  #sidebar .navbtn:hover {
    background: #eef4ff;
    color: #1565c0;
    box-shadow: inset 2px 0 0 #93c5fd;
  }
  #sidebar .navbtn.active {
    background: linear-gradient(135deg, #1565c0, #1d7fe0);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(21, 101, 192, .30);
    text-shadow: none;
  }
  #sidebar .navbtn.active::before { display: none; }
  #sidebar .navbtn.active:hover { background: linear-gradient(135deg, #1565c0, #1d7fe0); color: #fff; }
  #sidebar .navbtn .badge {
    background: #e8f1fe;
    color: #1565c0;
    border: 1px solid #bcd6fb;
    font-weight: 700;
    border-radius: 999px;
    padding: 1px 8px;
    font-size: 11.5px;
  }
  #sidebar .navbtn.active .badge { background: rgba(255, 255, 255, .22); color: #fff; border-color: rgba(255, 255, 255, .35); }
  #sidebar .guard-badge {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 1px 8px;
    font-size: 11px;
    font-weight: 600;
  }
  #sidebar .guard-badge.off { color: #dc2626; background: #fef2f2; border-color: #fecaca; }

  /* ---------- 底图卡（海图/自动离线在线 + 下载离线海图）：白卡 ---------- */
  .basemap-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, .06);
  }
  .bm-t { color: #0f172a; font-size: 13.5px; font-weight: 800; }
  .bm-seg { background: #eef2f7; border: 1px solid transparent; border-radius: 9px; }
  .bm-seg button { color: #64748b; font-size: 12px; font-weight: 600; }
  .bm-seg button.on {
    background: linear-gradient(135deg, #1565c0, #1d7fe0);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(21, 101, 192, .30);
  }
  .bm-bot { gap: 7px; margin-top: 11px; }
  .bm-dl {
    background: #e8f1fe;
    border: 1px solid #bcd6fb;
    color: #1565c0;
    font-weight: 700;
    border-radius: 10px;
  }
  .bm-dl:hover { background: #d6e6fd; border-color: #9cc4f7; }
  .bm-st { color: #94a3b8; font-size: 11.5px; }

  /* ---------- 底部渔船分类统计条（PC 专用，替换分区统计卡；同 905 分类口径） ---------- */
  #zonecards { display: none !important; }
  #pc-statdock {
    position: absolute;
    left: 12px; right: 12px; bottom: 12px;
    z-index: 500;
    display: flex;
    gap: 8px;
  }
  #pc-statdock .pst {
    flex: 1 1 0;
    min-width: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .90);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(148, 163, 184, .32);
    border-radius: 12px;
    padding: 9px 10px 7px;
    box-shadow: 0 4px 16px rgba(2, 12, 27, .14);
    cursor: pointer;
    transition: transform .15s, box-shadow .15s, background .15s;
    color: #0f172a;
  }
  #pc-statdock .pst:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(2, 12, 27, .20); }
  #pc-statdock .pst-n {
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
  }
  #pc-statdock .pst-l {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    margin-top: 4px;
    white-space: nowrap;
  }
  /* 分类色（与船标定稿配色一致：A绿 / C小蓝 / 外市橙 / 外镇紫 / 养殖黄 / 重点关注红 / 白名单绿） */
  #pc-statdock .pst-a .pst-n { color: #16a34a; }
  #pc-statdock .pst-c .pst-n { color: #0ea5e9; }
  #pc-statdock .pst-o .pst-n { color: #f59e0b; }
  #pc-statdock .pst-t .pst-n { color: #7c3aed; }
  #pc-statdock .pst-aq .pst-n { color: #d97706; }
  #pc-statdock .pst-f .pst-n { color: #dc2626; }
  #pc-statdock .pst-w .pst-n { color: #15803d; }
  /* 二级子卡（A社员/非社员、C大/中/小）：悬浮展开 */
  #pc-statdock .pst-sub {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    border-radius: 12px;
    padding: 5px;
    gap: 6px;
    z-index: 40;
    white-space: nowrap;
    box-shadow: 0 12px 30px rgba(2, 12, 27, .35);
    border: 1px solid rgba(255, 255, 255, .35);
  }
  #pc-statdock .pst.open .pst-sub { display: flex; }
  #pc-statdock .pst-sub.pst-a { background: linear-gradient(180deg, #86efac, #22c55e); }
  #pc-statdock .pst-sub.pst-c { background: linear-gradient(180deg, #7dd3fc, #38bdf8); }
  #pc-statdock .pst-cell {
    border-radius: 9px;
    padding: 6px 12px;
    text-align: center;
    min-width: 66px;
    background: rgba(255, 255, 255, .30);
    border: 1px solid transparent;
    cursor: pointer;
  }
  #pc-statdock .pst-cell:hover { background: rgba(255, 255, 255, .55); }
  #pc-statdock .pst-cell b { display: block; font-size: 17px; font-weight: 800; color: #0b1d3a; line-height: 1; font-variant-numeric: tabular-nums; }
  #pc-statdock .pst-cell span { display: block; margin-top: 3px; font-size: 10px; font-weight: 700; color: #15203a; white-space: nowrap; }

  /* ---------- 右侧圆形功能钮：统一尺寸/渐变/阴影 ---------- */
  #lg-fab, #dt-fab, #guard-fab, #ev-fab {
    border: 0;
    background: linear-gradient(145deg, #1d8ff0, #1565c0);
    box-shadow: 0 8px 20px rgba(21, 101, 192, .40), inset 0 1px 0 rgba(255, 255, 255, .25);
    transition: transform .15s, box-shadow .15s, filter .15s;
    color: #fff;
  }
  #lg-fab:hover, #dt-fab:hover, #guard-fab:hover, #ev-fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(21, 101, 192, .48), inset 0 1px 0 rgba(255, 255, 255, .25);
    filter: brightness(1.06);
  }
  #lg-fab:active, #dt-fab:active, #guard-fab:active, #ev-fab:active { transform: scale(.93); }
  #lg-fab.active {
    background: linear-gradient(145deg, #0ea5e9, #0369a1);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, .30), 0 8px 20px rgba(14, 165, 233, .45);
  }
  #guard-fab.on { background: linear-gradient(145deg, #22c55e, #15803d); }
  #guard-fab.rec { background: linear-gradient(145deg, #ef4444, #991b1b); }

  /* ---------- 缩放控件：统一白底圆角 ---------- */
  .leaflet-control-zoom {
    border: none !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 16px rgba(2, 12, 27, .22) !important;
    overflow: hidden;
  }
  .leaflet-control-zoom a {
    width: 38px !important;
    height: 38px !important;
    line-height: 38px !important;
    font-size: 20px !important;
    color: #334155 !important;
    border: none !important;
    background: rgba(255, 255, 255, .94) !important;
  }
  .leaflet-control-zoom a:hover { background: #eef4ff !important; color: #1565c0 !important; }
  .leaflet-control-zoom a.leaflet-disabled { color: #cbd5e1 !important; }

  /* ---------- 左上角工具胶囊（若有）：统一 ---------- */
  .mt-fab {
    border-radius: 999px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, .12);
    border: 1px solid #e2e8f0;
  }
}
