/* ===== 万成假期 手机端适配 ===== */
@media (max-width: 768px) {
  /* 隐藏PC侧边栏 */
  .sidebar { display:none !important; }
  .main { margin-left:0 !important; padding:8px 8px 80px 8px !important; }
  .main-content { margin-left:0 !important; padding:8px 8px 80px 8px !important; }

  /* ---- 底部导航 ---- */
  .mobile-nav {
    display:flex !important;
    position:fixed; bottom:0; left:0; right:0; z-index:999;
    background:rgba(255,255,255,.97); backdrop-filter:blur(10px);
    border-top:1px solid var(--border); box-shadow:0 -2px 12px rgba(0,0,0,.06);
    padding:6px 0 8px; padding-bottom:max(8px,env(safe-area-inset-bottom));
  }
  .mobile-nav-item {
    flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center;
    gap:2px; font-size:10px; color:var(--text3); cursor:pointer; padding:2px;
    transition:color .2s; -webkit-tap-highlight-color:transparent;
  }
  .mobile-nav-item.active { color:var(--primary); font-weight:600; }
  .mobile-nav-item .nav-icon { font-size:20px; line-height:1; }

  /* ---- 页面标题 ---- */
  .topbar { margin-bottom:12px; padding:12px 14px; border-radius:10px; }
  .topbar h2 { font-size:16px; }

  /* ---- 统计卡片 ---- */
  .stats-grid { grid-template-columns:repeat(2,1fr) !important; gap:8px !important; }
  .stat-card { padding:12px 10px; border-radius:10px; }
  .stat-card .stat-icon { width:34px; height:34px; font-size:16px; margin-bottom:6px; }
  .stat-card .stat-value { font-size:18px; }
  .stat-card .stat-label { font-size:11px; }

  /* ---- 卡片 ---- */
  .card { border-radius:10px; margin-bottom:10px; }
  .card-header { padding:12px 14px; }
  .card-header h3 { font-size:13px; }
  .card-body { padding:8px 10px; overflow-x:auto; }

  /* ---- 表格 → 卡片列表 ---- */
  table { display:block; }
  thead { display:none; }
  tbody { display:flex; flex-direction:column; gap:8px; }
  tr {
    display:block; background:var(--bg-card); border:1px solid var(--border);
    border-radius:10px; padding:10px 12px; box-shadow:0 1px 3px rgba(0,0,0,.03);
  }
  td { display:inline-block; padding:3px 6px; font-size:12px; border:none !important; }
  td:empty { display:none; }
  td:first-child { font-weight:600; }

  /* ---- Tab 横滚 ---- */
  .tabs { overflow-x:auto; flex-wrap:nowrap; scrollbar-width:none; }
  .tabs::-webkit-scrollbar { display:none; }
  .tab { flex-shrink:0; padding:8px 14px; font-size:13px; }

  /* ---- 筛选栏 ---- */
  .filter-bar { flex-wrap:wrap; gap:6px; }
  .filter-bar input, .filter-bar select { font-size:14px; padding:8px 10px; flex:1; min-width:100px; }
  .filter-bar .btn-sm { white-space:nowrap; }

  /* ---- 弹窗 ---- */
  .modal-mask { align-items:flex-end !important; }
  .modal { width:100% !important; max-width:100vw !important; margin:0 !important; border-radius:16px 16px 0 0 !important; max-height:90vh; }
  .modal-header { padding:14px 16px; }
  .modal-body { padding:14px 16px 60px; }
  .modal-footer { padding:12px 16px; position:sticky; bottom:0; background:var(--bg-card); border-top:1px solid var(--border); }
  .modal-footer .btn { flex:1; padding:10px; }

  /* ---- 表单 ---- */
  .form-grid { grid-template-columns:1fr !important; gap:10px; }
  .form-group input, .form-group select { font-size:16px !important; padding:10px 12px !important; border-radius:8px !important; }
  .form-group label { font-size:12px; }

  /* ---- 按钮触控 ---- */
  .btn { min-height:40px; padding:8px 14px; font-size:13px; border-radius:8px; }
  .btn-sm { min-height:30px; padding:4px 10px; font-size:11px; }

  /* ---- 登录页 ---- */
  .login-box { width:90%; padding:30px 20px; }
  .login-logo .icon { font-size:40px; }
  .login-logo h1 { font-size:20px; }
  .login-form input { font-size:16px; padding:12px 14px; }
  .btn-login { padding:14px; font-size:16px; }
}

/* ---- 桌面隐藏底部导航 ---- */
.mobile-nav { display:none; }

/* ---- 触控防抖 ---- */
@media (hover:none) {
  .btn:active, .tab:active, .mobile-nav-item:active { opacity:.7; transform:scale(.97); }
}

/* ---- 沉浸模式 ---- */
@media (display-mode:standalone) {
  body { padding-top:env(safe-area-inset-top); }
}

/* Final mobile polish: Huashu Design */
@media (max-width: 768px) {
  body {
    background: #f5f8f9 !important;
    color: var(--text) !important;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "微软雅黑", sans-serif !important;
  }

  .main,
  .main-content {
    padding: 12px 12px 84px !important;
  }

  .topbar {
    margin-bottom: 14px;
    padding: 0 0 12px;
    border-bottom: 1px solid #e3ecee;
    border-radius: 0;
    background: transparent;
  }

  .topbar h2 {
    color: #102326;
    font-size: 18px;
    font-weight: 700;
  }

  .mobile-nav {
    background: rgba(255,255,255,0.98);
    border-top: 1px solid #dce6e8;
    box-shadow: 0 -8px 24px rgba(15,23,42,0.06);
  }

  .mobile-nav-item {
    gap: 4px;
    color: #7c8f96;
    font-size: 11px;
    font-weight: 600;
  }

  .mobile-nav-item .nav-icon {
    font-size: 20px;
    line-height: 1.2;
  }

  .mobile-nav-item.active {
    color: #1f4e79;
  }

  .mobile-nav-item.active .nav-icon {
    background: #1f4e79;
  }

  .card {
    border: 1px solid #dce6e8;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(15,23,42,0.04);
  }

  .card-header {
    background: #fff;
    border-bottom: 1px solid #e7eef0;
  }

  .tour-toolbar {
    padding: 12px;
    border: 1px solid #dbe6e8;
    border-radius: 8px;
    background: #fff;
  }

  .tour-filter-row {
    gap: 8px;
  }

  .tour-toolbar input,
  .tour-toolbar select,
  .tour-search-input {
    flex: 1 1 132px;
    width: auto !important;
    min-width: 0;
  }

  .segmented-control {
    flex: 0 0 auto;
  }

  .tour-table-wrap {
    overflow-x: auto;
  }

  .tour-table {
    min-width: 920px;
  }

  .login-panel {
    width: min(100%, 520px);
    border-radius: 16px;
  }

  .login-brand,
  .login-form-area {
    padding: 28px 22px;
  }

  .login-brand {
    gap: 22px;
  }

  .login-brand img.login-logo-whale {
    width: 72px;
    height: 72px;
  }

  .login-brand h1 {
    font-size: 28px;
  }

  .login-form-title {
    font-size: 24px;
  }

  .captcha-img {
    width: 112px;
    flex-basis: 112px;
  }
}

/* ---- 订单列表：小屏隐藏次要列（避免横向滚动）---- */
@media (max-width: 900px) {
  .order-list-table th:nth-child(2),
  .order-list-table th:nth-child(3),
  .order-list-table th:nth-child(5),
  .order-list-table th:nth-child(7),
  .order-list-table th:nth-child(8),
  .order-list-table td:nth-child(2),
  .order-list-table td:nth-child(3),
  .order-list-table td:nth-child(5),
  .order-list-table td:nth-child(7),
  .order-list-table td:nth-child(8) {
    display: none;
  }
}
