/* ==========================================================================
   附近门店导航系统 - PC管理后台全局样式
   作者：Admin Team
   说明：基于 Bootstrap 5 扩展，包含卡片、表格、弹窗、表单美化等
   ========================================================================== */

/* ---------- CSS 变量定义 ---------- */
:root {
  --primary-color: #4f46e5;          /* 主色：靛蓝 */
  --primary-hover: #4338ca;          /* 主色悬停 */
  --primary-light: #eef2ff;          /* 主色浅 */
  --success-color: #10b981;          /* 启用绿 */
  --danger-color: #ef4444;          /* 危险红 */
  --warning-color: #f59e0b;          /* 警告橙 */
  --text-main: #1f2937;              /* 主文本 */
  --text-muted: #6b7280;             /* 次文本 */
  --border-color: #e5e7eb;           /* 边框 */
  --bg-page: #f5f7fa;                /* 页面背景 */
  --bg-card: #ffffff;                /* 卡片背景 */
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --navbar-height: 60px;
}

/* ---------- 全局重置 ---------- */
* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }

/* ---------- 顶部导航栏 ---------- */
.app-navbar {
  height: var(--navbar-height);
  background: linear-gradient(90deg, #4f46e5 0%, #6366f1 100%);
  box-shadow: 0 2px 10px rgba(79, 70, 229, .25);
  padding: 0 24px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.app-navbar .navbar-brand {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 32px;
}

.app-navbar .navbar-brand .logo-icon {
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,.2);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.app-navbar .nav-menu {
  display: flex;
  gap: 4px;
  flex: 1;
}

.app-navbar .nav-menu a {
  color: rgba(255,255,255,.8);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  transition: all .2s;
}

.app-navbar .nav-menu a:hover {
  color: #fff;
  background: rgba(255,255,255,.12);
}

.app-navbar .nav-menu a.active {
  color: #fff;
  background: rgba(255,255,255,.22);
}

.app-navbar .navbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  color: #fff;
}

.app-navbar .user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.app-navbar .user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.app-navbar .btn-logout {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  transition: all .2s;
}

.app-navbar .btn-logout:hover {
  background: rgba(255,255,255,.25);
}

/* ---------- 页面容器 ---------- */
.page-container {
  padding: 20px 24px;
  max-width: 1600px;
  margin: 0 auto;
}

.page-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 16px;
  color: var(--text-main);
}

/* ---------- 卡片 ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  overflow: hidden;
}

.card-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
  background: #fafbfc;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-body {
  padding: 20px;
}

/* ---------- 搜索筛选区 ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  padding: 16px 20px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.filter-bar .filter-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-bar .filter-item label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.filter-bar .filter-item input,
.filter-bar .filter-item select {
  min-width: 160px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: #fff;
}

.filter-bar .filter-item input:focus,
.filter-bar .filter-item select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(79,70,229,.1);
}

.filter-bar .btn-group-action {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
  line-height: 1.4;
}

.btn:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.btn-outline-primary {
  background: #fff;
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-outline-primary:hover {
  background: var(--primary-light);
}

.btn-danger {
  background: var(--danger-color);
  color: #fff;
  border-color: var(--danger-color);
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-outline-danger {
  background: #fff;
  color: var(--danger-color);
  border-color: var(--danger-color);
}

.btn-outline-danger:hover {
  background: var(--danger-color);
  color: #fff;
}

.btn-secondary {
  background: #f3f4f6;
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background: #e5e7eb;
}

.btn-sm {
  padding: 4px 10px;
  font-size: 12px;
}

.btn-link {
  background: transparent;
  border: none;
  color: var(--primary-color);
  padding: 4px 8px;
  cursor: pointer;
  font-size: 13px;
}

.btn-link:hover {
  text-decoration: underline;
}

.btn-link.text-danger {
  color: var(--danger-color);
}

/* ---------- 表格 ---------- */
.table-wrap {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

table.data-table thead {
  background: #f9fafb;
}

table.data-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

table.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f3f4f6;
  color: var(--text-main);
  vertical-align: middle;
}

table.data-table tbody tr:hover {
  background: #f9fafb;
}

table.data-table tbody tr:last-child td {
  border-bottom: none;
}

.table-id { width: 60px; color: var(--text-muted); }
.table-actions { width: 200px; white-space: nowrap; }
.table-actions .btn-link { padding: 2px 6px; }

/* ---------- 状态标签 ---------- */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-badge.status-on {
  background: #d1fae5;
  color: #065f46;
}

.status-badge.status-off {
  background: #f3f4f6;
  color: #6b7280;
}

/* ---------- 分页 ---------- */
.pagination-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #fff;
  border-top: 1px solid var(--border-color);
}

.pagination-info {
  font-size: 13px;
  color: var(--text-muted);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pagination-controls .page-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--border-color);
  background: #fff;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  color: var(--text-main);
  transition: all .2s;
}

.pagination-controls .page-btn:hover:not(:disabled) {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.pagination-controls .page-btn.active {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

.pagination-controls .page-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.pagination-controls .page-jumper {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.pagination-controls .page-jumper input {
  width: 50px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 13px;
}

/* ---------- 表单 ---------- */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
}

.form-group label .required {
  color: var(--danger-color);
  margin-left: 2px;
}

.form-control, .form-select {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: #fff;
  transition: all .2s;
}

.form-control:focus, .form-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(79,70,229,.1);
}

textarea.form-control {
  height: auto;
  padding: 8px 12px;
  resize: vertical;
  min-height: 80px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

/* ---------- 开关 ---------- */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch .slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #cbd5e1;
  border-radius: 24px;
  transition: .3s;
}

.switch .slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: .3s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}

.switch input:checked + .slider {
  background: var(--success-color);
}

.switch input:checked + .slider::before {
  transform: translateX(20px);
}

/* ---------- 弹窗 Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 40px 20px;
  overflow-y: auto;
}

.modal-overlay.show {
  display: flex;
}

.modal-dialog {
  background: #fff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 720px;
  box-shadow: var(--shadow-lg);
  animation: modalIn .25s ease;
}

.modal-dialog.modal-lg { max-width: 960px; }
.modal-dialog.modal-sm { max-width: 420px; }

@keyframes modalIn {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.modal-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
}

.modal-header .modal-close {
  background: transparent;
  border: none;
  font-size: 22px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

.modal-header .modal-close:hover {
  background: #f3f4f6;
  color: var(--text-main);
}

.modal-body {
  padding: 24px;
  max-height: calc(100vh - 240px);
  overflow-y: auto;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ---------- 地图区域 ---------- */
.map-container {
  width: 100%;
  height: 320px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
}

.map-container #mapContainer,
.map-container .map-inner {
  width: 100%;
  height: 100%;
}

.map-search-box {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 10;
  background: #fff;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  padding: 8px;
  display: flex;
  gap: 6px;
  width: 320px;
}

.map-search-box input {
  flex: 1;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.map-search-box button {
  height: 32px;
  padding: 0 12px;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
}

.map-poi-list {
  position: absolute;
  top: 50px;
  left: 10px;
  z-index: 10;
  width: 320px;
  max-height: 220px;
  overflow-y: auto;
  background: #fff;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  display: none;
}

.map-poi-list.show { display: block; }

.map-poi-list .poi-item {
  padding: 8px 12px;
  border-bottom: 1px solid #f3f4f6;
  cursor: pointer;
  font-size: 13px;
}

.map-poi-list .poi-item:hover {
  background: var(--primary-light);
}

.map-poi-list .poi-item:last-child { border-bottom: none; }
.map-poi-list .poi-item .poi-name { font-weight: 500; color: var(--text-main); }
.map-poi-list .poi-item .poi-addr { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ---------- 图片上传组件 ---------- */
.image-uploader {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  background: #fafbfc;
  transition: all .2s;
}

.image-uploader.dragover {
  border-color: var(--primary-color);
  background: var(--primary-light);
}

.image-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.image-list:empty { margin-bottom: 0; }

.image-item {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: #fff;
  cursor: move;
  transition: transform .15s;
}

.image-item.dragging {
  opacity: .4;
}

.image-item.drag-over {
  transform: scale(1.05);
  border-color: var(--primary-color);
}

.image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-item .image-actions {
  position: absolute;
  top: 4px;
  right: 4px;
  display: flex;
  gap: 4px;
}

.image-item .image-actions button {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,.55);
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.image-item .image-actions button:hover {
  background: rgba(0,0,0,.8);
}

.image-item .image-order {
  position: absolute;
  bottom: 4px;
  left: 4px;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 8px;
}

.image-add-btn {
  width: 120px;
  height: 120px;
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text-muted);
  transition: all .2s;
}

.image-add-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: var(--primary-light);
}

.image-add-btn .plus {
  font-size: 28px;
  line-height: 1;
}

.image-add-btn .text {
  font-size: 12px;
}

.upload-tip {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ---------- 加载动画 ---------- */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}

.loading-overlay.show { display: flex; }

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e5e7eb;
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.table-loading {
  position: relative;
  min-height: 200px;
}

.table-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  width: 36px;
  height: 36px;
  border: 3px solid #e5e7eb;
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

/* ---------- 空状态 ---------- */
.empty-state {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: .5;
}

.empty-state .empty-text {
  font-size: 14px;
}

/* ---------- 提示消息 Toast ---------- */
.toast-container {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 4000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast-msg {
  background: #fff;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
  border-left: 4px solid var(--primary-color);
  animation: toastIn .25s ease;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

.toast-msg.toast-success { border-left-color: var(--success-color); }
.toast-msg.toast-error   { border-left-color: var(--danger-color); }
.toast-msg.toast-warning { border-left-color: var(--warning-color); }

.toast-msg .toast-icon {
  font-size: 18px;
}

.toast-msg.toast-success .toast-icon { color: var(--success-color); }
.toast-msg.toast-error   .toast-icon { color: var(--danger-color); }
.toast-msg.toast-warning .toast-icon { color: var(--warning-color); }

.toast-msg .toast-content {
  flex: 1;
  font-size: 13px;
}

/* ---------- 登录页 ---------- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #4f46e5 100%);
  position: relative;
  overflow: hidden;
}

.login-page::before,
.login-page::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
}

.login-page::before {
  width: 500px;
  height: 500px;
  top: -150px;
  right: -150px;
}

.login-page::after {
  width: 400px;
  height: 400px;
  bottom: -100px;
  left: -100px;
}

.login-card {
  background: rgba(255,255,255,.98);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  padding: 40px;
  width: 100%;
  max-width: 400px;
  position: relative;
  z-index: 1;
  backdrop-filter: blur(10px);
}

.login-card .login-header {
  text-align: center;
  margin-bottom: 28px;
}

.login-card .login-logo {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #fff;
  box-shadow: 0 8px 20px rgba(79,70,229,.4);
}

.login-card .login-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 6px;
}

.login-card .login-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

.login-card .form-group { margin-bottom: 18px; }

.login-card .input-group {
  position: relative;
}

.login-card .input-group .input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 16px;
}

.login-card .input-group input {
  width: 100%;
  height: 44px;
  padding: 0 12px 0 40px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.login-card .input-group input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(79,70,229,.1);
}

.login-card .btn-login {
  width: 100%;
  height: 44px;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  margin-top: 6px;
}

.login-card .btn-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(79,70,229,.4);
}

.login-card .btn-login:disabled {
  opacity: .7;
  cursor: not-allowed;
  transform: none;
}

.login-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}

.login-error.show { display: block; }

.login-tip {
  margin-top: 20px;
  padding: 12px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: #0369a1;
  text-align: center;
}

.login-tip .token-info {
  margin-top: 4px;
  font-weight: 500;
}

/* ---------- 图标预览 ---------- */
.icon-preview {
  width: 48px;
  height: 48px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f9fafb;
  overflow: hidden;
}

.icon-preview img {
  max-width: 100%;
  max-height: 100%;
}

.icon-preview .placeholder {
  color: var(--text-muted);
  font-size: 12px;
}

/* ---------- 响应式适配 ---------- */
@media (max-width: 1366px) {
  .page-container { padding: 16px; }
  table.data-table th,
  table.data-table td { padding: 10px 12px; }
}

@media (max-width: 1024px) {
  .form-row, .form-row-3 {
    grid-template-columns: 1fr;
  }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-bar .filter-item input,
  .filter-bar .filter-item select { min-width: 0; width: 100%; }
  .filter-bar .btn-group-action { margin-left: 0; }
}

@media (max-width: 768px) {
  .app-navbar { padding: 0 12px; }
  .app-navbar .navbar-brand { font-size: 16px; margin-right: 16px; }
  .app-navbar .nav-menu a { padding: 6px 10px; font-size: 13px; }
  .app-navbar .user-info span:not(.user-avatar) { display: none; }
  .pagination-wrap { flex-direction: column; gap: 10px; }
  .modal-dialog { max-width: 100%; }
}

/* ---------- 工具类 ---------- */
.text-muted-2 { color: var(--text-muted); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-0 { margin-bottom: 0; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.flex { display: flex; }
.flex-1 { flex: 1; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.nowrap { white-space: nowrap; }
.truncate {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
