/* ==========================================================================
   信息发布系统样式 - Info System CSS
   基于悦享未来品牌，红色/深色主题
   ========================================================================== */

/* ── CSS Custom Properties ───────────────────────────────────────── */
:root {
  --primary: #e11d48;
  --primary-dark: #be123c;
  --primary-light: #fff1f2;
  --ink: #111827;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f6f7fb;
  --card: #ffffff;
  --success: #389e0d;
  --warning: #d46b08;
  --danger: #cf1322;
  --radius: 10px;
  --shadow: 0 2px 8px rgba(0, 0, 0, .06);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, .1);
  --max-width: 1240px;
}

/* ── Reset & Base ────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: "HarmonyOS Sans", "Noto Sans SC", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  letter-spacing: .01em;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

ul,
ol {
  list-style: none;
}

/* ── Top Bar ─────────────────────────────────────────────────────── */
.top-bar {
  background: #0f172a;
  color: #dbeafe;
  font-size: 13px;
  height: 38px;
}

.top-bar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 44px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-bar-right a {
  color: #dbeafe;
  font-size: 13px;
  transition: color .2s;
}

.top-bar-right a:hover {
  color: #fff;
}

/* ── Site Header / Main Nav ──────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.main-nav {
  background: #fff;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 44px;
  height: 78px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  font-size: 22px;
  color: var(--ink);
  flex-shrink: 0;
}

.nav-brand:hover {
  color: var(--primary);
}

.nav-logo {
  width: 42px;
  height: 42px;
}

.nav-brand-name {
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 24px;
  flex: 1;
  font-weight: 700;
  color: #334155;
}

.nav-link {
  font-size: 15px;
  transition: color .2s;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.nav-hint {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
}

.nav-actions {
  flex-shrink: 0;
}

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 8px;
  padding: 12px 20px;
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  transition: background .2s, transform .2s, box-shadow .2s, color .2s;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

.btn-ghost {
  background: #eef2ff;
  color: #1e293b;
}

.btn-ghost:hover {
  background: #e0e7ff;
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  background: #a61020;
}

.btn-success {
  background: var(--success);
  color: #fff;
}

.btn-success:hover {
  background: #2b7a0a;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 6px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 17px;
  border-radius: 10px;
}

.btn-block {
  width: 100%;
}

.btn:disabled,
.btn[disabled] {
  opacity: .5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Hero ────────────────────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: 1fr 42%;
  min-height: 520px;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #fff;
  overflow: hidden;
}

.hero-text {
  padding: 80px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-eyebrow {
  color: var(--primary);
  font-weight: 900;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.hero h1 {
  font-size: 48px;
  line-height: 1.15;
  margin: 0 0 20px 0;
  max-width: 640px;
  font-weight: 900;
}

.hero p {
  color: #dbeafe;
  font-size: 17px;
  line-height: 1.8;
  max-width: 580px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.hero-img {
  overflow: hidden;
}

.hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Sections ────────────────────────────────────────────────────── */
.section {
  padding: 60px 44px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section.bg-light {
  background: #fff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  max-width: none;
}

.section-head {
  margin-bottom: 40px;
  text-align: center;
}

.section-head h2 {
  font-size: 30px;
  margin-bottom: 8px;
  font-weight: 900;
}

.section-head p {
  color: var(--muted);
  font-size: 15px;
  max-width: 600px;
  margin: 0 auto;
}

.eyebrow {
  color: var(--primary);
  font-weight: 900;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 2px;
  display: inline-block;
  margin-bottom: 8px;
}

/* ── Stats Row ───────────────────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.stat-item {
  text-align: center;
  padding: 32px 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform .25s, box-shadow .25s;
}

.stat-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.stat-item strong {
  display: block;
  font-size: 32px;
  color: var(--primary);
  margin-bottom: 8px;
  font-weight: 900;
}

.stat-item span {
  color: var(--muted);
  font-size: 14px;
}

/* ── Category Grid ───────────────────────────────────────────────── */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.category-card {
  display: flex;
  flex-direction: column;
  min-height: 160px;
  padding: 28px 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  transition: transform .25s, box-shadow .25s;
  cursor: pointer;
}

.category-card::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), #06b6d4);
  border-radius: 0 0 var(--radius) var(--radius);
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.category-card span {
  font-size: 28px;
  font-weight: 900;
  color: var(--primary);
}

.category-card strong {
  font-size: 18px;
  margin: 16px 0 8px;
  font-weight: 800;
}

.category-card em {
  font-style: normal;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

/* ── Flow Steps ──────────────────────────────────────────────────── */
.flow-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.flow-step {
  padding: 36px 28px;
  border-right: 1px solid var(--line);
  text-align: center;
}

.flow-step:last-child {
  border-right: 0;
}

.flow-step span {
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  font-weight: 900;
  font-size: 20px;
  margin-bottom: 16px;
}

.flow-step h3 {
  font-size: 20px;
  margin-bottom: 8px;
  font-weight: 800;
}

.flow-step p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

/* ── Card Grid ───────────────────────────────────────────────────── */
.card-grid {
  display: grid;
  gap: 20px;
}

.card-grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.card-grid.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.card-grid.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .25s, box-shadow .25s;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-body h3 {
  font-size: 16px;
  line-height: 1.4;
  font-weight: 800;
}

.card-body p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.card-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
  align-items: center;
}

.tag {
  display: inline-flex;
  background: #eef2ff;
  color: #1e40af;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 800;
  width: fit-content;
}

.tag.tag-primary {
  background: var(--primary-light);
  color: var(--primary);
}

.tag.tag-success {
  background: #f6ffed;
  color: var(--success);
}

.price {
  color: var(--primary);
  font-size: 22px;
  font-weight: 900;
}

/* ── Trust Section ───────────────────────────────────────────────── */
.trust-section {
  text-align: center;
}

.trust-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 18px;
  font-weight: 700;
}

.trust-steps span {
  padding: 14px 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform .25s, box-shadow .25s;
}

.trust-steps span:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.trust-steps .trust-arrow {
  color: var(--primary);
  font-size: 20px;
  font-weight: 900;
  background: none;
  border: none;
  padding: 0;
}

/* ── Auth Pages ──────────────────────────────────────────────────── */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 200px);
  padding: 40px 20px;
}

.auth-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
}

.auth-card h2 {
  font-size: 28px;
  margin-bottom: 4px;
  font-weight: 900;
}

.auth-subtitle {
  color: var(--muted);
  margin-bottom: 28px;
  font-size: 14px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-form label {
  font-weight: 700;
  font-size: 14px;
  color: #374151;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-form input {
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  font-size: 15px;
  transition: border-color .2s, box-shadow .2s;
}

.auth-form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, .1);
}

.auth-form .btn {
  margin-top: 8px;
}

.checkbox-label {
  flex-direction: row !important;
  align-items: center;
  gap: 8px !important;
  cursor: pointer;
}

.checkbox-label input {
  width: auto;
  height: auto;
}

.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--muted);
}

.auth-footer a {
  color: var(--primary);
  font-weight: 700;
}

.auth-footer a:hover {
  text-decoration: underline;
}

.auth-hint {
  text-align: center;
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
}

/* ── Forms ───────────────────────────────────────────────────────── */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 6px;
  color: #374151;
}

.form-group .label-hint {
  font-weight: 400;
  color: var(--muted);
  font-size: 12px;
  margin-left: 4px;
}

.form-control {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  font-size: 15px;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
  color: var(--ink);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, .1);
}

.form-control::placeholder {
  color: #a0aec0;
}

textarea.form-control {
  height: auto;
  min-height: 100px;
  padding: 12px;
  resize: vertical;
  line-height: 1.6;
}

select.form-control {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #374151;
  cursor: pointer;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.field-error {
  display: block;
  color: var(--danger);
  font-size: 12px;
  margin-top: 4px;
  font-weight: 600;
}

.is-invalid {
  border-color: var(--danger) !important;
}

.is-invalid:focus {
  box-shadow: 0 0 0 3px rgba(207, 19, 34, .1) !important;
}

/* ── Tables ──────────────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 14px;
}

th,
td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

th {
  background: #f8fafc;
  font-weight: 800;
  color: #475569;
  white-space: nowrap;
}

tr:last-child td {
  border-bottom: 0;
}

tr:hover td {
  background: #fafafa;
}

/* ── Badges ──────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  line-height: 1.4;
}

.badge-pending {
  background: #fff7e6;
  color: var(--warning);
  border: 1px solid #ffd591;
}

.badge-approved {
  background: #f6ffed;
  color: var(--success);
  border: 1px solid #b7eb8f;
}

.badge-rejected {
  background: #fff2f0;
  color: var(--danger);
  border: 1px solid #ffccc7;
}

.badge-paid {
  background: #e6f4ff;
  color: #1677ff;
  border: 1px solid #91caff;
}

.badge-info {
  background: #eef2ff;
  color: #4338ca;
  border: 1px solid #c7d2fe;
}

.badge-active {
  background: #f6ffed;
  color: var(--success);
  border: 1px solid #b7eb8f;
}

.badge-inactive {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #cbd5e1;
}

/* ── Search Bar ──────────────────────────────────────────────────── */
.search-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.search-bar input {
  flex: 1;
  min-width: 200px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 16px;
  font-size: 15px;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}

.search-bar input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, .1);
}

.search-bar select {
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  font-size: 14px;
  background: #fff;
  color: var(--ink);
}

/* ── Sidebar Layout ──────────────────────────────────────────────── */
.sidebar-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: start;
}

.sidebar {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.sidebar h4 {
  font-size: 16px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-weight: 800;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-nav a {
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
  transition: all .15s;
  color: #334155;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.filter-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-list a {
  padding: 10px 12px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
  transition: all .15s;
  color: #334155;
}

.filter-list a:hover,
.filter-list a.active {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

/* ── Dashboard ───────────────────────────────────────────────────── */
.dashboard-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: start;
}

.dashboard-sidebar {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #fff;
  border-radius: var(--radius);
  padding: 24px;
  position: sticky;
  top: 100px;
}

.dashboard-sidebar h3 {
  font-size: 20px;
  margin-bottom: 20px;
  font-weight: 800;
}

.dashboard-sidebar a {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  color: #dbeafe;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
  text-align: left;
  background: transparent;
  border: 0;
  width: 100%;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.dashboard-sidebar a:hover,
.dashboard-sidebar a.active {
  background: rgba(255, 255, 255, .1);
  color: #fff;
}

.dashboard-sidebar .btn-ghost {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  color: #dbeafe;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
  text-align: left;
  background: transparent;
  border: 0;
  width: 100%;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.dashboard-sidebar .btn-ghost:hover {
  background: rgba(255, 255, 255, .1);
  color: #fff;
}

.dashboard-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.stats-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  transition: transform .2s, box-shadow .2s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.stat-card b {
  display: block;
  font-size: 28px;
  color: var(--primary);
  margin-bottom: 6px;
  font-weight: 900;
}

.stat-card span {
  font-size: 13px;
  color: var(--muted);
}

.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.panel h3 {
  font-size: 18px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-weight: 800;
}

/* ── Admin Layout ────────────────────────────────────────────────── */
.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  align-items: start;
}

.admin-sidebar {
  background: linear-gradient(180deg, #0f172a, #1e293b);
  color: #fff;
  border-radius: var(--radius);
  padding: 24px;
  position: sticky;
  top: 100px;
}

.admin-sidebar h3 {
  font-size: 18px;
  margin-bottom: 20px;
  font-weight: 800;
}

.admin-sidebar a {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  color: #dbeafe;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
  background: rgba(255, 255, 255, .1);
  color: #fff;
}

.admin-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.admin-kpi {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.admin-kpi div {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  transition: transform .2s, box-shadow .2s;
}

.admin-kpi div:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.admin-kpi b {
  display: block;
  font-size: 28px;
  font-weight: 900;
}

.admin-kpi span {
  font-size: 13px;
  color: var(--muted);
}

/* ── Detail Pages ────────────────────────────────────────────────── */
.detail-hero {
  display: grid;
  grid-template-columns: 42% 1fr;
  gap: 48px;
  background: #0f172a;
  color: #fff;
  padding: 48px;
  align-items: center;
}

.detail-hero img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  border-radius: var(--radius);
}

.detail-hero-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-hero-content .tag {
  width: fit-content;
}

.detail-hero-content h1 {
  font-size: 36px;
  line-height: 1.2;
  margin: 8px 0 12px;
  font-weight: 900;
}

.detail-hero-content p {
  color: #dbeafe;
  font-size: 16px;
  line-height: 1.8;
}

.detail-meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 12px;
  color: #cbd5e1;
  font-size: 14px;
}

.detail-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  padding: 40px 44px;
  max-width: var(--max-width);
  margin: 0 auto;
  align-items: start;
}

.detail-main {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
}

.detail-main h2 {
  font-size: 22px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-weight: 800;
}

.detail-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.detail-side .panel {
  position: sticky;
  top: 120px;
}

.content-text {
  white-space: pre-wrap;
  line-height: 1.9;
  font-size: 15px;
  color: #334155;
}

.content-text p {
  margin-bottom: 12px;
}

.content-text h3 {
  font-size: 18px;
  margin: 20px 0 8px;
  font-weight: 800;
}

/* ── Publish Page ────────────────────────────────────────────────── */
.publish-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
}

.publish-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 40px;
  box-shadow: var(--shadow-lg);
}

.publish-card h2 {
  font-size: 26px;
  margin-bottom: 8px;
  font-weight: 900;
}

.publish-card .subtitle {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 28px;
}

/* ── Error Page ──────────────────────────────────────────────────── */
.error-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: 40px 20px;
}

.error-card {
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 48px;
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}

.error-card h1 {
  font-size: 80px;
  color: var(--primary);
  margin-bottom: 8px;
  font-weight: 900;
  line-height: 1;
}

.error-card h2 {
  font-size: 24px;
  margin-bottom: 12px;
  font-weight: 800;
}

.error-card p {
  color: var(--muted);
  margin-bottom: 24px;
  font-size: 15px;
}

/* ── Empty State ─────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--muted);
}

.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: .3;
}

.empty-state h3 {
  font-size: 20px;
  margin-bottom: 8px;
  color: var(--ink);
  font-weight: 800;
}

.empty-state p {
  font-size: 14px;
  margin-bottom: 16px;
}

.empty-state .btn {
  margin-top: 8px;
}

/* ── Alerts ──────────────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.alert-error {
  background: #fff2f0;
  border: 1px solid #ffccc7;
  color: var(--danger);
}

.alert-success {
  background: #f6ffed;
  border: 1px solid #b7eb8f;
  color: var(--success);
}

.alert-info {
  background: #e6f4ff;
  border: 1px solid #91caff;
  color: #1677ff;
}

.alert-warning {
  background: #fff7e6;
  border: 1px solid #ffd591;
  color: var(--warning);
}

/* ── Pagination ──────────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  background: #fff;
  color: var(--ink);
  transition: all .15s;
}

.pagination a:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.pagination .active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.pagination .disabled {
  opacity: .4;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Footer ──────────────────────────────────────────────────────── */
.site-footer {
  background: #090d18;
  color: #e2e8f0;
  margin-top: auto;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 32px;
  padding: 56px 44px;
}

.footer-col h4 {
  font-size: 16px;
  margin-bottom: 16px;
  color: #fff;
  font-weight: 800;
}

.footer-col p,
.footer-col li,
.footer-col a {
  display: block;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 2.2;
}

.footer-col a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-col strong {
  display: block;
  font-size: 18px;
  color: #fff;
  margin-bottom: 8px;
  font-weight: 900;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
}

.footer-bottom {
  text-align: center;
  padding: 20px 44px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  font-size: 12px;
  color: #64748b;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-bottom a {
  color: #64748b;
  transition: color .2s;
}

.footer-bottom a:hover {
  color: #cbd5e1;
}

.footer-bottom span {
  margin-left: 12px;
}

/* ── Utilities ───────────────────────────────────────────────────── */
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.text-muted { color: var(--muted); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-small { font-size: 13px; }

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }

.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Responsive: 1024px ──────────────────────────────────────────── */
@media (max-width: 1024px) {

  .hero {
    grid-template-columns: 1fr;
  }

  .hero-img {
    display: none;
  }

  .hero h1 {
    font-size: 36px;
  }

  .hero-text {
    padding: 60px 32px;
  }

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

  .flow-steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .flow-step {
    border-right: 1px solid var(--line);
  }

  .flow-step:nth-child(even) {
    border-right: 0;
  }

  .flow-step:nth-child(n+3) {
    border-top: 1px solid var(--line);
  }

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

  .sidebar-layout,
  .dashboard-layout,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-sidebar,
  .admin-sidebar {
    position: static;
  }

  .detail-hero {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 32px;
  }

  .detail-hero img {
    height: 300px;
  }

  .detail-layout {
    grid-template-columns: 1fr;
    padding: 32px 24px;
  }

  .detail-side .panel {
    position: static;
  }

  .stats-row,
  .stats-cards,
  .admin-kpi {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .section {
    padding: 40px 24px;
  }

  .nav-inner {
    padding: 0 24px;
    gap: 20px;
  }

  .nav-brand-name {
    font-size: 18px;
  }

  .nav-links {
    gap: 16px;
    font-size: 14px;
  }

  .top-bar-inner {
    padding: 0 24px;
  }

  .publish-card {
    padding: 28px;
  }
}

/* ── Responsive: 640px ───────────────────────────────────────────── */
@media (max-width: 640px) {

  .top-bar {
    height: auto;
    min-height: 38px;
  }

  .top-bar-inner {
    padding: 8px 16px;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 11px;
  }

  .main-nav {
    height: auto;
    padding: 0;
  }

  .nav-inner {
    padding: 12px 16px;
    flex-wrap: wrap;
    height: auto;
    gap: 12px;
  }

  .nav-brand-name {
    font-size: 16px;
  }

  .nav-logo {
    width: 32px;
    height: 32px;
  }

  .nav-links {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  .nav-links a {
    text-align: center;
    padding: 8px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 13px;
  }

  .nav-actions {
    width: 100%;
  }

  .nav-actions .btn {
    width: 100%;
  }

  .hero {
    min-height: 360px;
  }

  .hero-text {
    padding: 32px 20px;
  }

  .hero h1 {
    font-size: 28px;
  }

  .hero p {
    font-size: 15px;
  }

  .hero-actions {
    flex-direction: column;
    gap: 10px;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .category-grid,
  .card-grid.cols-3,
  .card-grid.cols-4,
  .card-grid.cols-2 {
    grid-template-columns: 1fr;
  }

  .stats-row,
  .stats-cards,
  .admin-kpi {
    grid-template-columns: 1fr;
  }

  .flow-steps {
    grid-template-columns: 1fr;
  }

  .flow-step {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .flow-step:last-child {
    border-bottom: 0;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 32px 16px;
  }

  .section-head h2 {
    font-size: 24px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    padding: 32px 16px;
    gap: 20px;
  }

  .footer-bottom {
    padding: 16px;
  }

  .auth-card {
    padding: 28px 20px;
  }

  .auth-card h2 {
    font-size: 24px;
  }

  .detail-hero {
    padding: 24px 16px;
  }

  .detail-hero img {
    height: 220px;
  }

  .detail-hero-content h1 {
    font-size: 24px;
  }

  .detail-layout {
    padding: 24px 16px;
  }

  .detail-main {
    padding: 20px;
  }

  .publish-page {
    padding: 24px 16px;
  }

  .publish-card {
    padding: 24px 20px;
  }

  .error-card {
    padding: 32px 20px;
  }

  .error-card h1 {
    font-size: 56px;
  }

  .search-bar {
    flex-direction: column;
  }

  .search-bar input {
    width: 100%;
  }

  .table-wrap {
    margin: 0 -16px;
  }

  .category-card {
    min-height: 120px;
    padding: 20px;
  }

  .stat-item {
    padding: 24px 16px;
  }

  .stat-item strong {
    font-size: 24px;
  }
}

.brand{display:flex;align-items:center;gap:12px;font-weight:900;font-size:22px;color:var(--ink)}.brand img{width:42px;height:42px}.btn-text{border:1px solid rgba(255,255,255,.2);background:transparent;color:#fff;border-radius:4px;padding:4px 12px;font-size:12px}.btn-text:hover{background:rgba(255,255,255,.1)}.shop-entry{border:2px solid var(--primary);color:var(--primary);padding:8px 16px;border-radius:8px;font-weight:900;font-size:14px;transition:.2s}.shop-entry:hover{background:var(--primary);color:#fff}.top-actions{display:flex;gap:8px}