/* ============================================
   美业Home 全局基础重置 - 时尚炫彩主题
   ============================================ */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: var(--font-base);
  line-height: var(--line-height-normal);
  color: var(--color-text-primary);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ===== 标题 ===== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: var(--line-height-tight);
  color: var(--color-text-primary);
}

h1 { font-size: var(--font-3xl); }
h2 { font-size: var(--font-2xl); }
h3 { font-size: var(--font-xl); }
h4 { font-size: var(--font-lg); }
h5 { font-size: var(--font-md); }
h6 { font-size: var(--font-base); }

/* ===== 文本 ===== */
p { margin-bottom: var(--space-md); }

a {
  color: var(--color-text-link);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--color-primary-dark); }

/* ===== 列表 ===== */
ul, ol { list-style: none; }

/* ===== 图片/媒体 ===== */
img, video, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===== 表单 ===== */
input, button, textarea, select {
  font-family: inherit;
  font-size: inherit;
  outline: none;
  border: none;
  background: none;
}

button { cursor: pointer; }

input::placeholder, textarea::placeholder {
  color: var(--color-text-hint);
}

/* ===== 表格 ===== */
table {
  width: 100%;
  border-collapse: collapse;
}

/* ===== 滚动条 ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--color-bg-alt); }
::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--color-text-hint); }

/* ===== 布局容器 ===== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* ===== 通用工具类 ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-gradient {
  background: var(--color-primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-muted { color: var(--color-text-secondary); }
.text-hint { color: var(--color-text-hint); }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { display: flex; flex-direction: column; }
.flex-1 { flex: 1; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.hidden { display: none !important; }
.visible { display: block !important; }

/* ===== 页面主内容区 ===== */
.main-content {
  padding-top: var(--navbar-height);
  min-height: calc(100vh - var(--navbar-height));
}

/* ===== 炫彩背景装饰 ===== */
.bg-aurora {
  position: relative;
  overflow: hidden;
}
.bg-aurora::before {
  content: '';
  position: absolute;
  top: -20%;
  left: -10%;
  width: 60%;
  height: 60%;
  background: radial-gradient(circle, rgba(108,92,231,0.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.bg-aurora::after {
  content: '';
  position: absolute;
  bottom: -20%;
  right: -10%;
  width: 50%;
  height: 50%;
  background: radial-gradient(circle, rgba(253,121,168,0.10) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* ===== 移动端触摸优化 ===== */
@media (max-width: 768px) {
  html { font-size: 14px; }
  body { -webkit-tap-highlight-color: transparent; }
  .main-content { padding: 10px; }
  .container { padding: 0 12px; }
  .navbar-menu { display: none; }
  .btn { min-height: 44px; min-width: 44px; }
  input, select, textarea { font-size: 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px !important; }
  .quick-grid { grid-template-columns: repeat(4, 1fr) !important; gap: 8px !important; }
  .seller-stats { grid-template-columns: repeat(2, 1fr) !important; }
  .seller-card { margin-bottom: 12px; }
  .seller-card-body { padding: 12px !important; }
  .toast-container { left: 10px; right: 10px; }
  .modal-content { margin: 10px; max-height: 90vh; overflow-y: auto; }
  img { max-width: 100%; height: auto; }
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

@media (max-width: 480px) {
  html { font-size: 13px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .quick-grid { grid-template-columns: repeat(3, 1fr) !important; }
  .profile-card { flex-direction: column; text-align: center; padding: 20px !important; }
  .lifecycle { justify-content: center; }
}

/* ===== 统一图片占位（placeholder-img）=====
   用于商品/门店/机构等本应显示图片但暂无图的场景：
   CSS渐变背景 + 居中文字标签，替代emoji占位，避免破图。
   用法：<div class="placeholder-img">门店图</div>
   可选尺寸修饰：placeholder-img-sm / -md / -lg
*/
.placeholder-img{
  display:flex;align-items:center;justify-content:center;
  width:100%;height:100%;min-height:64px;box-sizing:border-box;
  background:linear-gradient(135deg,#EEF1F6,#DDE3EE);
  color:#8A94A6;font-size:13px;text-align:center;
  border-radius:8px;overflow:hidden;user-select:none;
}
.placeholder-img-sm{min-height:40px;font-size:12px;border-radius:6px;}
.placeholder-img-md{min-height:80px;font-size:14px;}
.placeholder-img-lg{min-height:140px;font-size:16px;border-radius:10px;}