/* =============================================================
 * ATELIER.26 · 样式基座（客户端 + 管理端共用）
 * ============================================================= */
@font-face {
  font-family: 'Outfit';
  src: url('../vendor/fonts/outfit-latin.woff2') format('woff2');
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-en: 'Outfit', 'Helvetica Neue', Arial, sans-serif;
  --font-cn: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-io: cubic-bezier(.65, .05, .36, 1);
}

* { -webkit-tap-highlight-color: transparent; }

body {
  font-family: var(--font-en), var(--font-cn);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a { text-decoration: none; }
button { font-family: inherit; }
img { display: block; max-width: 100%; }

::selection { background: #ff8fb1; color: #17181a; }

:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* 细滚动条 */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbc7bd; border-radius: 20px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #9c978c; background-clip: padding-box; }

/* ---------- 图片：加载前的柔和底 + 失败兜底 ---------- */
.media-ph {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #eae5db 0%, #dcd6ca 45%, #efebe2 100%);
}
.media-ph img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.04);
  transition: opacity .6s var(--ease), transform 1s var(--ease);
}
.media-ph img.is-loaded { opacity: 1; transform: scale(1); }
.media-ph img.is-loaded[loading="lazy"] { transform: scale(1); }

/* ---------- 滚动进场 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 26px, 0);
  transition: opacity .85s var(--ease), transform .85s var(--ease);
  will-change: opacity, transform;
}
[data-reveal].is-visible { opacity: 1; transform: none; }
[data-reveal='fade'] { transform: none; }
[data-reveal='left'] { transform: translate3d(-30px, 0, 0); }
[data-reveal='right'] { transform: translate3d(30px, 0, 0); }
[data-reveal='scale'] { transform: scale(.94); }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- 通知弹窗 / FlatNotify 风格 ---------- */
.app-toast-stack {
  position: fixed; z-index: 9999; right: 22px; top: 22px;
  width: min(340px, calc(100vw - 32px));
  display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}
.app-toast {
  pointer-events: auto;
  display: flex; align-items: flex-start; gap: 12px;
  width: 100%; min-height: 62px; padding: 16px 14px 16px 20px;
  border-radius: 9px; color: #fff; background: #202226;
  box-shadow: 0 14px 34px rgba(20, 22, 26, .16);
  font-size: 13px; line-height: 1.55; letter-spacing: .01em;
  opacity: 0; transform: translateX(118%) scale(.96);
  transition: opacity .34s var(--ease), transform .42s cubic-bezier(.18, .89, .32, 1.18);
}
.app-toast.show { opacity: 1; transform: none; }
.app-toast.is-leaving { opacity: 0; transform: translateX(60%) scale(.97); transition: all .34s var(--ease-io); }
.app-toast__body { flex: 1; padding-top: 1px; word-break: break-word; }
.app-toast__body span { color: #fff; }
.app-toast__close {
  flex: 0 0 auto; width: 25px; height: 25px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .2); color: #fff; font-size: 18px; line-height: 1;
  display: grid; place-items: center; cursor: pointer;
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.app-toast__close:hover { background: rgba(255, 255, 255, .34); transform: rotate(90deg); }
/* 品牌红粉体系：success 玫红 / alert 暖金 / error 正红 / dark 近黑 */
.app-toast--success { background: #ec3f72; }
.app-toast--alert   { background: #f0a91b; }
.app-toast--error   { background: #e5343f; }
.app-toast--dark    { background: #202226; }
.app-toast--lime    { background: #ec3f72; }

/* ---------- 通用小组件 ---------- */
.eyebrow {
  font-family: var(--font-en); font-size: 11px; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase;
}
.num { font-family: var(--font-en); font-variant-numeric: tabular-nums; }
.hairline { height: 1px; background: currentColor; opacity: .14; }

/* Bootstrap 细节修正 */
.btn:focus, .form-control:focus, .form-select:focus, .form-check-input:focus {
  box-shadow: none;
}
.dropdown-menu { border-radius: 6px; }

@media (max-width: 767px) {
  .app-toast-stack { right: 12px; left: 12px; top: 12px; width: auto; }
  .app-toast { width: 100%; }
}
