/* ai.tushop.top 主CSS */
/* 注：核心样式在layouts/main.php的<style>中内联，此文件补充扩展样式 */

/* 工具函数 */
.text-center { text-align: center; }
.text-muted   { color: var(--muted); }
.fw-bold      { font-weight: 700; }
.mt-1  { margin-top: 4px; }
.mt-2  { margin-top: 8px; }
.mt-3  { margin-top: 12px; }
.mb-2  { margin-bottom: 8px; }
.mb-3  { margin-bottom: 12px; }

/* 输入框统一 */
input[type="text"],
input[type="password"],
input[type="tel"],
input[type="email"],
textarea,
select {
  background: var(--surface2, #334155);
  border: 1px solid var(--border, #334155);
  border-radius: 8px;
  color: var(--text, #f1f5f9);
  font-size: 14px;
  outline: none;
  transition: border-color .2s;
}
input[type="text"]:focus,
input[type="password"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
  border-color: var(--primary, #6366f1);
}

/* 响应式表格 */
@media (max-width: 768px) {
  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
  .pc-nav {
    display: none !important;
  }
}

/* 骨架屏动画 */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--surface2) 25%, var(--surface) 50%, var(--surface2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
}

/* 渐入动画 */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn .3s ease; }

/* 图片懒加载占位 */
img[loading="lazy"] {
  background: var(--surface2);
}

/* 滚动条美化 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--surface2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #475569; }

/* Toast */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  z-index: 9999;
  box-shadow: 0 4px 15px rgba(0,0,0,.4);
  animation: fadeIn .2s ease;
}

/* 加载状态按钮 */
button:disabled {
  opacity: .6;
  cursor: not-allowed;
}

/* 移动端优化 */
@media (max-width: 640px) {
  body { font-size: 14px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}
