/* ===== 手机端主界面（功能导航）样式 v94 升级版 ===== */
@media (max-width: 768px) {
  .mobile-dashboard {
    min-height: 100vh;
    background: var(--bg);
    padding: 0 0 env(safe-area-inset-bottom, 0);
  }

  /* 顶部用户信息栏 */
  .mobile-dash-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px 12px;
    padding-top: max(16px, env(safe-area-inset-top));
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
  }

  .mobile-dash-user {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .mobile-dash-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  }

  .mobile-dash-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .mobile-dash-name {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.2px;
  }

  .mobile-dash-role-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .mobile-dash-role {
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--bg-hover);
    padding: 2px 8px;
    border-radius: 10px;
  }

  .mobile-dash-online {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 2px var(--bg-card);
  }

  .mobile-dash-notify {
    position: relative;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.1s, box-shadow 0.2s;
  }
  .mobile-dash-notify:active {
    transform: scale(0.92);
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  }

  .mobile-dash-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-card);
  }

  /* 数据概览 */
  .mobile-dash-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-card);
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border);
  }

  .mobile-stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 4px;
    background: var(--bg);
    border-radius: 12px;
    border: 1px solid var(--border);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.1s, box-shadow 0.2s;
  }
  .mobile-stat-card:active {
    transform: scale(0.95);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  }

  .mobile-stat-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
  }

  .mobile-stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
  }

  /* 骨架屏 */
  .mobile-stat-skeleton {
    grid-column: 1 / -1;
    display: flex;
    gap: 8px;
    padding: 8px 0;
  }
  .mobile-stat-skeleton .skeleton-line {
    flex: 1;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--border) 25%, var(--bg-hover) 50%, var(--border) 75%);
    background-size: 200% 100%;
    animation: skeletonShine 1.5s ease-in-out infinite;
  }
  @keyframes skeletonShine {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
  }

  /* 快捷操作栏 */
  .mobile-dash-quick {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-card);
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border);
  }

  .mobile-quick-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px 4px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 12px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.1s, box-shadow 0.2s, background 0.2s;
    min-height: 44px;
  }
  .mobile-quick-btn:active {
    transform: scale(0.95);
    background: var(--bg-hover);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  }
  .mobile-quick-btn svg {
    color: var(--primary);
  }

  /* 功能分组 */
  .mobile-dash-group {
    padding: 12px 16px 0;
  }

  .mobile-dash-group-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 10px;
    padding-left: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  /* 功能网格 */
  .mobile-dash-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .mobile-dash-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 6px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.12s cubic-bezier(.4,0,.2,1), box-shadow 0.2s, border-color 0.2s;
    text-align: center;
    position: relative;
    overflow: hidden;
  }
  .mobile-dash-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 50% 0%, rgba(99,102,241,0.04), transparent 60%);
    pointer-events: none;
  }
  .mobile-dash-item:active {
    transform: scale(0.95);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    border-color: var(--primary-light, rgba(99,102,241,0.3));
  }
  .mobile-dash-item--active {
    border-color: var(--primary);
    box-shadow: 0 0 0 1.5px var(--primary-light, rgba(99,102,241,0.2)), 0 4px 12px rgba(99,102,241,0.08);
  }
  .mobile-dash-item--active .mobile-dash-icon {
    box-shadow: 0 2px 8px rgba(99,102,241,0.15);
  }

  .mobile-dash-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s;
  }
  .mobile-dash-icon svg {
    width: 26px;
    height: 26px;
  }

  .mobile-dash-label {
    font-size: 13px;
    color: var(--text);
    font-weight: 500;
    line-height: 1.2;
  }
}

/* 小屏手机：2列网格 + 数据概览4列不变 */
@media (max-width: 380px) {
  .mobile-dash-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .mobile-dash-icon {
    width: 44px;
    height: 44px;
  }
  .mobile-dash-icon svg {
    width: 22px;
    height: 22px;
  }
  .mobile-dash-label {
    font-size: 12px;
  }
  .mobile-dash-quick {
    grid-template-columns: repeat(2, 1fr);
  }
  .mobile-dash-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 超窄屏：单列网格 */
@media (max-width: 320px) {
  .mobile-dash-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .mobile-dash-header {
    padding: 12px 12px 10px;
    padding-top: max(12px, env(safe-area-inset-top));
  }
  .mobile-dash-avatar {
    width: 40px;
    height: 40px;
    font-size: 14px;
  }
  .mobile-dash-name {
    font-size: 15px;
  }
}