/* 队站手机端：少滚动、大按钮、吸底提交、紧凑流程 */
:root {
  --m-tap: 48px;
  --m-gap: 10px;
  --m-radius: 14px;
  --m-safe-b: env(safe-area-inset-bottom, 0px);
}

@media (max-width: 768px) {
  body.role-station .main-content {
    padding-bottom: calc(72px + var(--m-safe-b));
  }

  /* 队站底部快捷入口 */
  .m-station-dock {
    display: none;
  }
  body.role-station .m-station-dock {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    gap: 0;
    background: #fff;
    border-top: 1px solid #e8eaf0;
    box-shadow: 0 -6px 20px rgba(26, 35, 126, 0.08);
    padding: 6px 4px calc(6px + var(--m-safe-b));
  }
  body.role-station .m-station-dock a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 52px;
    text-decoration: none;
    color: #546e7a;
    font-size: 11px;
    font-weight: 600;
    border-radius: 12px;
    -webkit-tap-highlight-color: transparent;
  }
  body.role-station .m-station-dock a[data-miss="1"] .ico {
    position: relative;
  }
  body.role-station .m-station-dock a[data-miss="1"] .ico::after {
    content: "";
    position: absolute;
    top: -3px;
    right: -8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e53935;
    box-shadow: 0 0 0 2px #fff;
  }
  body.role-station .m-station-dock a .ico {
    font-size: 20px;
    line-height: 1;
  }
  body.role-station .m-station-dock a.is-on,
  body.role-station .m-station-dock a:active {
    color: #1a237e;
    background: #e8eaf6;
  }

  /* 桌面导出/分享工具条：队站手机隐藏，减少首屏干扰 */
  body.role-station .btn-toolbar,
  body.role-station .card-header .btn-toolbar {
    display: none !important;
  }

  /* 通用：表单纵向堆叠、大控件 */
  .m-station-flow .form-row,
  .m-station-flow .filter-bar {
    display: flex !important;
    flex-direction: column !important;
    gap: var(--m-gap) !important;
    align-items: stretch !important;
  }
  .m-station-flow .form-group {
    width: 100% !important;
    flex: none !important;
    margin: 0 !important;
  }
  .m-station-flow label {
    font-size: 13px;
    font-weight: 700;
    color: #37474f;
    margin-bottom: 6px;
  }
  .m-station-flow input[type="text"],
  .m-station-flow input[type="number"],
  .m-station-flow input[type="date"],
  .m-station-flow input[type="datetime-local"],
  .m-station-flow input[type="search"],
  .m-station-flow input[type="file"],
  .m-station-flow select,
  .m-station-flow textarea {
    width: 100% !important;
    min-height: var(--m-tap) !important;
    font-size: 16px !important; /* 防 iOS 缩放 */
    padding: 12px 14px !important;
    border-radius: 12px !important;
    border: 1px solid #cfd8dc !important;
    box-sizing: border-box;
  }
  .m-station-flow .btn,
  .m-station-flow button[type="submit"] {
    width: 100% !important;
    min-height: 52px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    border-radius: var(--m-radius) !important;
    padding: 14px 16px !important;
  }
  .m-station-flow .btn-sm {
    min-height: 44px !important;
    font-size: 14px !important;
  }

  /* 吸底主操作条 */
  .m-sticky-actions {
    position: sticky;
    bottom: calc(58px + var(--m-safe-b));
    z-index: 40;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 12px -4px 0;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #e3e8ef;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(8px);
  }
  body:not(.role-station) .m-sticky-actions {
    bottom: calc(12px + var(--m-safe-b));
  }
  .m-sticky-actions .m-draft-hint {
    font-size: 12px;
    color: #607d8b;
    text-align: center;
    margin: 0;
  }
  .m-sticky-actions .m-draft-row {
    display: flex;
    gap: 8px;
  }
  .m-sticky-actions .m-draft-row .btn {
    flex: 1;
    width: auto !important;
    min-height: 44px !important;
    font-size: 14px !important;
  }

  /* 通信异常页签横向滑，不占竖向空间 */
  .ds-tabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
    padding-bottom: 4px;
    margin-bottom: 10px !important;
  }
  .ds-tabs a {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 10px 16px !important;
    font-size: 14px !important;
  }
  .ds-overview {
    gap: 8px !important;
    padding: 8px !important;
  }
  .ds-ov-total .num {
    font-size: 26px !important;
  }

  /* 执勤填报：人员选择区更高、勾选更大 */
  .dr-picker-list {
    max-height: 220px !important;
  }
  .dr-picker-list label {
    min-height: 44px;
    padding: 10px 12px !important;
    font-size: 15px !important;
    gap: 10px !important;
  }
  .dr-picker-list input[type="checkbox"] {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
  }
  .dr-submit {
    width: 100% !important;
    min-height: 52px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    border-radius: var(--m-radius) !important;
    margin-top: 8px;
  }
  .dr-station-body {
    padding: 12px !important;
  }
  .dr-metrics {
    grid-template-columns: 1fr 1fr 1fr !important;
  }

  /* 车辆今日填报：状态表横向滑，操作列固定感 */
  .data-table {
    font-size: 13px;
  }
  .table-responsive {
    margin: 0 -8px;
    padding: 0 8px;
  }

  /* 卡片首屏紧凑 */
  .m-station-flow > .card,
  .card.m-station-card {
    margin-bottom: 12px !important;
    border-radius: 14px !important;
  }
  .m-station-flow .card-header h3 {
    font-size: 16px !important;
  }

  /* 说明文字默认折叠感：缩小行高 */
  .m-station-flow .cd-tip,
  .m-collapsible-tip {
    font-size: 13px;
    line-height: 1.5;
    padding: 10px 12px !important;
  }
}

@media (min-width: 769px) {
  .m-station-dock {
    display: none !important;
  }
  .m-sticky-actions .m-draft-row {
    flex-direction: row;
  }
}
