/* ── 软文发稿平台 · 全站样式 ── */
:root {
  --primary: #1a6fc4;
  --primary-dark: #155aa0;
  --secondary: #6c757d;
  --success: #28a745;
  --danger: #dc3545;
  --warning: #ffc107;
  --bg-light: #f5f7fa;
  --border: #dee2e6;
  --text-muted: #6c757d;
  --card-shadow: 0 2px 8px rgba(0,0,0,.08);
}

body { background: var(--bg-light); font-size: 14px; color: #333; }
a { color: var(--primary); }

/* Navbar */
.navbar-brand { font-weight: 700; font-size: 1.1rem; letter-spacing: .02em; }
.navbar { box-shadow: 0 2px 6px rgba(0,0,0,.12); }

/* Cards */
.card { border: none; border-radius: 8px; box-shadow: var(--card-shadow); }
.card-header { background: #fff; border-bottom: 1px solid var(--border); font-weight: 600; border-radius: 8px 8px 0 0 !important; }

/* Hero */
.hero-banner { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); padding: 48px 0; }
.hero-banner .text-white-75 { color: rgba(255,255,255,.8); }

/* Stat cards */
.stat-card { border-radius: 10px; overflow: hidden; }
.stat-card .icon-box { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; }

/* Step circles */
.step-circle { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; margin: 0 auto; }

/* Tables */
.table thead th { font-weight: 600; font-size: 13px; border-top: none; white-space: nowrap; }
.table-hover tbody tr:hover { background: rgba(26,111,196,.04); }

/* Admin sidebar */
.admin-sidebar { width: 220px; min-height: 100vh; background: #1e293b; position: fixed; top: 0; left: 0; z-index: 100; overflow-y: auto; }
.admin-sidebar .sidebar-brand { padding: 18px 20px; color: #fff; font-weight: 700; font-size: 1rem; border-bottom: 1px solid rgba(255,255,255,.1); display: block; text-decoration: none; }
.admin-sidebar .nav-section { padding: 8px 20px 4px; font-size: 11px; text-transform: uppercase; color: rgba(255,255,255,.4); letter-spacing: .08em; }
.admin-sidebar .nav-link { padding: 9px 20px; color: rgba(255,255,255,.75); display: flex; align-items: center; gap: 10px; font-size: 13.5px; border-radius: 0; transition: all .15s; }
.admin-sidebar .nav-link:hover, .admin-sidebar .nav-link.active { color: #fff; background: rgba(255,255,255,.1); }
.admin-sidebar .nav-link i { width: 18px; text-align: center; opacity: .8; }
.admin-content { margin-left: 220px; padding: 24px; min-height: 100vh; }
.admin-topbar { background: #fff; padding: 12px 24px; margin: -24px -24px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.admin-topbar h5 { margin: 0; font-weight: 600; font-size: 1rem; }

/* Member sidebar */
.member-sidebar .list-group-item { border-left: 3px solid transparent; font-size: 13.5px; }
.member-sidebar .list-group-item.active { border-left-color: var(--primary); background: rgba(26,111,196,.07); color: var(--primary); }

/* Media cards */
.media-card { transition: transform .15s, box-shadow .15s; cursor: pointer; }
.media-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.12); }
.media-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.price-tag { color: #e63c3c; font-weight: 700; font-size: 1.05rem; }

/* Badges */
.badge-sm { font-size: 10px; padding: 2px 6px; }

/* Buttons */
.btn-xs { padding: .15rem .45rem; font-size: .75rem; border-radius: .2rem; }

/* Editor */
#editor { min-height: 280px; outline: none; padding: 12px; line-height: 1.8; }
#editor p { margin-bottom: 10px; }
#editor h4 { font-weight: 700; margin: 16px 0 8px; }
.editor-toolbar { background: #f8f9fa; border: 1px solid var(--border); border-bottom: none; border-radius: 6px 6px 0 0; padding: 6px 10px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.editor-area { border: 1px solid var(--border); border-radius: 0 0 6px 6px; }

/* Price badge */
.level-normal  { background: #6c757d; color: #fff; }
.level-mid     { background: #007bff; color: #fff; }
.level-high    { background: #fd7e14; color: #fff; }
.level-sub     { background: #17a2b8; color: #fff; }

/* Mobile responsive */
@media (max-width: 768px) {
  .admin-sidebar { transform: translateX(-100%); transition: transform .25s; }
  .admin-sidebar.show { transform: translateX(0); }
  .admin-content { margin-left: 0; padding: 14px; }
  .admin-topbar { margin: -14px -14px 14px; padding: 10px 14px; }
  .hero-banner { padding: 28px 0; }
  .hero-banner h1 { font-size: 1.4rem; }
  .stat-card .h2 { font-size: 1.4rem; }
  .table-responsive { font-size: 12px; }
  .media-card .card-body { padding: 10px; }
}

@media (max-width: 576px) {
  .hide-xs { display: none !important; }
  .btn { font-size: 13px; }
}

/* Overlay for mobile sidebar */
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 99; }
.sidebar-overlay.show { display: block; }

/* Filter bar */
.filter-bar { background: #fff; border-radius: 8px; padding: 14px 16px; margin-bottom: 16px; box-shadow: var(--card-shadow); }

/* Copy button success state */
.btn-copied { background: #28a745 !important; border-color: #28a745 !important; color: #fff !important; }

/* Mobile bottom nav */
@media (max-width: 768px) {
  body { padding-bottom: 58px; }
  .container.py-4 { padding-bottom: 0 !important; }
}

/* Better mobile table */
@media (max-width: 576px) {
  .table { font-size: 11px; }
  .table td, .table th { padding: .25rem .35rem; }
  code { font-size: 10px; }
}

/* Better cards on mobile */
@media (max-width: 400px) {
  .card-body { padding: .75rem; }
  .hero-banner h1 { font-size: 1.2rem; }
}

/* Loading spinner */
.spinner-overlay { position:fixed; inset:0; background:rgba(255,255,255,.7); display:flex; align-items:center; justify-content:center; z-index:9999; }
