/**
 * Responsive Styles - 移动端适配
 * 
 * 断点：
 * - ≤576px:  手机竖屏
 * - ≤768px:  手机横屏 / 小平板
 * - ≤992px:  平板
 */

/* === 通用移动端优化 === */
@media (max-width: 768px) {
  /* 登录页面 */
  .login-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 16px;
    padding: 24px 16px;
    border-radius: 8px;
  }

  .login-title {
    font-size: 20px;
  }

  /* 隐藏桌面端侧边栏 */
  .desktop-sider {
    display: none !important;
  }

  /* 显示移动端底部导航 */
  .mobile-bottom-nav {
    display: flex !important;
  }

  /* Dashboard Header 紧凑化 */
  .dashboard-header {
    padding: 0 12px !important;
  }

  /* 内容区域减少内边距 */
  .mobile-content-layout {
    padding: 12px !important;
  }

  /* 页脚紧凑化 */
  .dashboard-footer {
    margin-top: 24px !important;
    padding: 16px 0 !important;
    font-size: 12px !important;
  }

  /* 底部导航占位空间 */
  .mobile-nav-spacer {
    height: 60px;
  }
}

/* === 手机竖屏特殊处理 === */
@media (max-width: 576px) {
  .login-container {
    margin: 8px;
    padding: 20px 12px;
  }
}

/* === 平板适配 === */
@media (min-width: 769px) and (max-width: 992px) {
  /* 平板上侧边栏变窄 */
  .desktop-sider {
    width: 120px !important;
    min-width: 120px !important;
    max-width: 120px !important;
  }

  .mobile-bottom-nav {
    display: none !important;
  }

  .mobile-content-layout {
    padding: 16px !important;
  }
}

/* === 桌面端保持默认 === */
@media (min-width: 993px) {
  .mobile-bottom-nav {
    display: none !important;
  }

  .mobile-nav-spacer {
    display: none;
  }
}

/* === 底部导航栏样式 === */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1e293b;
  border-top: 1px solid #334155;
  z-index: 1000;
  height: 56px;
  align-items: center;
  justify-content: space-around;
  padding: 0 4px;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 6px 2px;
  cursor: pointer;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 10px;
  line-height: 1.2;
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.mobile-nav-item.active {
  color: #6366f1;
}

.mobile-nav-item .nav-icon {
  font-size: 20px;
  margin-bottom: 2px;
}

.mobile-nav-item .nav-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60px;
}

/* === 指标监控图表移动端适配 === */
@media (max-width: 768px) {
  /* 图表区域改为单列 */
  .metrics-chart-grid {
    grid-template-columns: 1fr !important;
  }

  .metrics-chart-item {
    height: 220px !important;
  }

  /* 带宽监控的策略说明文字 */
  .bandwidth-strategy-info {
    font-size: 12px !important;
  }
}
