/**
 * 店长管理端移动端优化样式
 * 针对手机竖屏优化（375px - 414px）
 */

/* ========== 全局基础优化 ========== */
@media (max-width: 767.98px) {
  body {
    font-size: 14px;
    line-height: 1.5;
  }

  /* 容器内边距优化 */
  .container-fluid {
    padding-left: 12px;
    padding-right: 12px;
  }

  /* ========== 卡片组件优化 ========== */
  .card {
    margin-bottom: 12px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  }

  .card-body {
    padding: 12px;
  }

  .card-header {
    padding: 10px 12px;
    font-size: 15px;
  }

  /* ========== 按钮优化 ========== */
  .btn {
    padding: 8px 12px;
    font-size: 14px;
    border-radius: 6px;
  }

  .btn-sm {
    padding: 6px 10px;
    font-size: 13px;
  }

  .btn-lg {
    padding: 10px 16px;
    font-size: 15px;
  }

  /* 按钮全宽优化 */
  .btn-block-mobile {
    width: 100%;
  }

  /* ========== 表单优化 ========== */
  .form-control,
  .form-select {
    padding: 8px 12px;
    font-size: 14px;
    border-radius: 6px;
  }

  .form-control-sm,
  .form-select-sm {
    padding: 6px 10px;
    font-size: 13px;
  }

  /* 搜索表单移动端堆叠布局 */
  .mobile-search-form .form-control,
  .mobile-search-form .form-select {
    margin-bottom: 8px;
  }

  .mobile-search-form .btn {
    margin-bottom: 4px;
  }

  /* ========== 导航栏优化 ========== */
  .navbar {
    padding: 8px 12px;
  }

  .navbar-brand {
    font-size: 16px;
  }

  .nav-link {
    padding: 8px 12px;
    font-size: 14px;
  }

  /* ========== 徽章优化 ========== */
  .badge {
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 500;
  }

  /* ========== 分页优化 ========== */
  .pagination {
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
  }

  .pagination .page-link {
    padding: 6px 10px;
    font-size: 13px;
    border-radius: 4px;
  }

  /* ========== 列表组优化 ========== */
  .list-group-item {
    padding: 10px 12px;
    font-size: 14px;
  }

  /* ========== 模态框优化 ========== */
  .modal-dialog {
    margin: 16px;
  }

  .modal-header {
    padding: 12px 16px;
  }

  .modal-body {
    padding: 16px;
  }

  .modal-footer {
    padding: 12px 16px;
  }

  /* ========== 表格优化 ========== */
  .table {
    font-size: 13px;
  }

  .table th,
  .table td {
    padding: 8px;
  }

  /* ========== 间距优化 ========== */
  .row.g-3 {
    --bs-gutter-x: 10px;
    --bs-gutter-y: 10px;
  }

  .row.g-4 {
    --bs-gutter-x: 12px;
    --bs-gutter-y: 12px;
  }

  /* ========== 字体大小优化 ========== */
  h1, .h1 {
    font-size: 22px;
  }

  h2, .h2 {
    font-size: 20px;
  }

  h3, .h3 {
    font-size: 18px;
  }

  h4, .h4 {
    font-size: 16px;
  }

  h5, .h5 {
    font-size: 15px;
  }

  h6, .h6 {
    font-size: 14px;
  }

  .small, small {
    font-size: 12px;
  }
}

/* ========== 统计卡片样式 ========== */
.stat-card {
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

.stat-card .card-body {
  padding: 12px;
}

.stat-icon {
  font-size: 1.5rem;
  opacity: 0.8;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 4px 0;
}

.stat-label {
  color: #6c757d;
  font-size: 0.75rem;
}

/* 手机端统计卡片进一步优化 */
@media (max-width: 767.98px) {
  .stat-card .card-body {
    padding: 10px 8px;
  }

  .stat-icon {
    font-size: 1.25rem;
  }

  .stat-value {
    font-size: 1.1rem;
  }

  .stat-label {
    font-size: 0.7rem;
  }
}

/* ========== 快捷功能宫格 ========== */
.quick-action-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.quick-action-item {
  text-align: center;
  padding: 12px 8px;
  border-radius: 8px;
  background-color: #f8f9fa;
  transition: background-color 0.2s;
  text-decoration: none;
  color: inherit;
}

.quick-action-item:hover {
  background-color: #e9ecef;
  color: inherit;
}

.quick-action-icon {
  font-size: 1.5rem;
  margin-bottom: 4px;
  display: block;
}

.quick-action-label {
  font-size: 0.75rem;
  color: #495057;
}

/* ========== 待办事项列表 ========== */
.todo-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-left: 3px solid transparent;
  transition: border-color 0.2s;
}

.todo-item:hover {
  border-left-color: #0d6efd;
}

.todo-count {
  background-color: #dc3545;
  color: white;
  border-radius: 10px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 600;
}

/* ========== 摘要卡片 ========== */
.summary-card {
  border-left: 3px solid #0d6efd;
}

.summary-card.summary-card-warning {
  border-left-color: #ffc107;
}

.summary-card.summary-card-success {
  border-left-color: #198754;
}

.summary-card.summary-card-danger {
  border-left-color: #dc3545;
}

/* ========== 订单卡片（重新设计） ========== */
.order-card {
  border: none;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s;
  border-left: 4px solid #dee2e6;
}

.order-card:active {
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.order-card.order-card-pending {
  border-left-color: #6c757d;
}

.order-card.order-card-pickup {
  border-left-color: #ffc107;
  background-color: #fffdf5;
}

.order-card.order-card-completed {
  border-left-color: #198754;
  opacity: 0.85;
}

.order-card.order-card-default {
  border-left-color: #dee2e6;
}

/* 提货码醒目框 */
.order-pickup-code-box {
  background: linear-gradient(135deg, #fff3cd 0%, #ffeeba 100%);
  border: 1px dashed #ffc107;
}

/* 状态Tab切换 */
.order-status-tabs {
  gap: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
}

.order-status-tabs .nav-item {
  flex-shrink: 0;
}

.order-status-tabs .nav-link {
  padding: 6px 16px;
  font-size: 14px;
  border-radius: 20px;
  white-space: nowrap;
}

.order-status-tabs .nav-link.active {
  background-color: #0d6efd;
  color: #fff;
}

/* ========== 头像样式 ========== */
.avatar-sm {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-placeholder {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: white;
}

/* ========== 工具类 ========== */
.text-truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.clickable {
  cursor: pointer;
}

.min-w-0 {
  min-width: 0;
}

/* ========== Bootstrap Icons增强 ========== */
.bi {
  vertical-align: -0.125em;
}

.nav-link .bi,
.dropdown-item .bi {
  margin-right: 4px;
}
