/* ============================================================
   Өгүүллэг — мэдээний портал загвар
   Цагаан дэвсгэр · харанхуй нь зөвхөн ticker, цэс, картын зураг
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-soft: #f4f5f7;
  --dark: #14171c;
  --dark-2: #1d2129;
  --text: #1b1e24;
  --text-soft: #4b5058;
  --muted: #878d97;
  --line: #e6e8ec;
  --green: #6cc24a;
  --blue: #2f80ed;
  --orange: #f7a325;
  --red: #e5342e;
  --overlay: linear-gradient(to top, rgba(10, 12, 16, 0.92) 0%, rgba(10, 12, 16, 0.45) 55%, rgba(10, 12, 16, 0.15) 100%);

  --font-head: "Montserrat", "Arial", sans-serif;
  --font-ui: "Inter", system-ui, sans-serif;
  --font-body: "Montserrat", "Arial", sans-serif;

  --radius: 14px;
  --shell: 74rem;
}

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

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--blue); }

button { font-family: var(--font-ui); cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Лого + хайлт ---------- */

.site-head {
  max-width: var(--shell);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem 1.25rem;
}

.logo {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.7rem;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}

.logo::after { content: "."; color: var(--green); }

.search-box input {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  width: min(240px, 50vw);
  transition: border-color 0.2s ease;
}

.search-box input:focus {
  outline: none;
  border-color: var(--blue);
}

.back-link {
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-soft);
}

.back-link:hover { color: var(--red); }

/* ---------- Цэс ---------- */

.main-nav {
  background: var(--dark);
  padding: 0 max(1.25rem, calc((100% - var(--shell)) / 2 + 1.25rem));
  display: flex;
}

.nav-link {
  color: #cfd3da;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 1rem 1.4rem;
  transition: color 0.2s ease;
}

.nav-link:hover { color: #fff; }

.nav-link.is-active {
  background: var(--green);
  color: #10240a;
}

/* ---------- Хуудасны их бие ---------- */

.page {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.section-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding-bottom: 0.6rem;
  border-bottom: 3px solid var(--dark);
  display: inline-block;
  margin: 2.75rem 0 1.5rem;
}

/* ---------- Онцлох grid ---------- */

.hero-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 1.1rem;
}

.hero-card {
  position: relative;
  display: flex;
  align-items: flex-end;
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  min-height: 220px;
  background: var(--dark);
}

.hero-card--main {
  grid-row: span 2;
  min-height: 480px;
}

.hero-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.hero-card:hover img { transform: scale(1.04); }

.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--overlay);
}

.hero-card-body {
  position: relative;
  z-index: 1;
  padding: 1.4rem;
  width: 100%;
}

.hero-card-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1.35;
  text-transform: uppercase;
  margin-top: 0.7rem;
}

.hero-card--main .hero-card-title {
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
}

.hero-card-meta {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.78rem;
  color: #c9cdd4;
  margin-top: 0.7rem;
}

.hero-card-meta .dot::before { content: "·"; }

.hero-chips {
  position: absolute;
  top: 1.1rem;
  left: 1.1rem;
  right: 1.1rem;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

/* ---------- Chips ---------- */

.chip {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 5px;
  padding: 0.28rem 0.65rem;
  white-space: nowrap;
}

.chip-cat { background: var(--blue); color: #fff; }
.chip-paid { background: var(--orange); color: #241500; }
.chip-owned { background: var(--green); color: #10240a; }

/* ---------- Тренд жагсаалт ---------- */

.trend-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem 1.5rem;
}

.trend-item {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.trend-item:hover {
  box-shadow: 0 10px 28px rgba(20, 23, 28, 0.1);
  transform: translateY(-2px);
}

.trend-link {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  text-decoration: none;
  color: inherit;
  padding: 0.9rem 1.1rem;
}

.trend-num {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.6rem;
  color: #d4d7dc;
  min-width: 2.4rem;
  text-align: center;
}

.trend-thumb {
  width: 74px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.trend-body { min-width: 0; }

.trend-cat {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
}

.trend-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.4;
  text-transform: uppercase;
  margin-top: 0.2rem;
}

.trend-link:hover .trend-title { color: var(--red); }

.trend-meta {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.trend-meta .price { color: var(--orange); font-weight: 700; }
.trend-meta .owned { color: var(--green); font-weight: 700; }

.empty-note {
  color: var(--muted);
  padding: 1.5rem 0;
}

/* ---------- Footer ---------- */

.footer {
  background: var(--dark);
  color: #9aa0a9;
  text-align: center;
  font-size: 0.8rem;
  padding: 2rem 1.25rem;
  margin-top: 2rem;
}

/* ---------- Уншлагын хуудас ---------- */

.site-head--story {
  border-bottom: 1px solid var(--line);
}

.reader {
  max-width: 46rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 5rem;
}

.story-head { text-align: left; }

.story-chips {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.story-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(1.6rem, 5vw, 2.5rem);
  line-height: 1.25;
  text-transform: uppercase;
  margin-top: 1rem;
}

.story-byline {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  margin-top: 0.8rem;
  padding-bottom: 1.6rem;
}

.story-cover {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 2.2rem;
}

.story-body {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1.02rem;
  line-height: 1.9;
  color: var(--text-soft);
}

.story-body p { margin-bottom: 1.5rem; }

/* ---------- Paywall ---------- */

.paywall { position: relative; }

.paywall-fade {
  position: absolute;
  top: -8rem;
  left: 0;
  right: 0;
  height: 8rem;
  background: linear-gradient(to bottom, transparent, var(--bg) 88%);
  pointer-events: none;
}

.paywall-card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
  padding: 2.5rem 1.75rem;
}

.paywall-lead {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.35rem;
  text-transform: uppercase;
  margin-top: 1rem;
}

.paywall-price {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 2rem;
  color: var(--orange);
  margin-top: 0.4rem;
}

.btn-buy {
  margin-top: 1.4rem;
  background: var(--orange);
  color: #241500;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.9rem 2.4rem;
  transition: filter 0.2s ease, transform 0.2s ease;
}

.btn-buy:hover { filter: brightness(1.07); transform: translateY(-1px); }
.btn-buy:disabled { opacity: 0.6; cursor: wait; transform: none; }

.paywall-hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 1rem;
}

/* ---------- Төлбөрийн цонх ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 23, 28, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  z-index: 50;
}

.modal {
  position: relative;
  background: var(--bg);
  border-radius: var(--radius);
  max-width: 24rem;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2.25rem 1.75rem 2rem;
  text-align: center;
  animation: modal-in 0.28s cubic-bezier(0.2, 1.2, 0.4, 1);
  box-shadow: 0 24px 60px rgba(10, 12, 16, 0.35);
}

@keyframes modal-in {
  from { transform: translateY(20px) scale(0.97); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 0.8rem;
  right: 0.9rem;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  width: 32px;
  height: 32px;
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1;
}

.modal-close:hover { color: var(--text); }

.modal-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.2rem;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.pay-amount {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.7rem;
  margin-bottom: 0.5rem;
}

.pay-caption {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.qr-img {
  width: 210px;
  height: 210px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px;
  margin: 0 auto 1.25rem;
  display: block;
}

.btn-check-dark {
  width: 100%;
  background: var(--dark);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.95rem 1rem;
  transition: opacity 0.2s ease;
}

.btn-check-dark:hover { opacity: 0.85; }

.modal-note {
  font-size: 0.88rem;
  color: var(--text-soft);
  margin-bottom: 1.25rem;
}

.pay-status {
  font-size: 0.85rem;
  color: var(--muted);
  min-height: 1.4em;
  margin-top: 0.9rem;
}

.pay-status.is-error { color: var(--red); }

.btn-check {
  background: none;
  border: 1.5px solid var(--orange);
  color: #b06f00;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.6rem 1.6rem;
  transition: background 0.2s ease;
}

.btn-check:hover { background: #f7a3251a; }

.bank-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  margin-top: 1.4rem;
  margin-bottom: 0.8rem;
}

.bank-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}

.bank-item {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.85rem 0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.bank-item:hover {
  border-color: var(--muted);
  box-shadow: 0 4px 14px rgba(20, 23, 28, 0.08);
}

.bank-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 9px;
}

.demo-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #b06f00;
  background: #f7a32519;
  border: 1px solid #f7a3255e;
  border-radius: 5px;
  padding: 0.25rem 0.7rem;
  margin-bottom: 1.1rem;
}

/* ---------- Responsive / хөдөлгөөн ---------- */

@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }
  .hero-card--main { min-height: 340px; }
  .trend-list { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .site-head { padding: 1.1rem 1.25rem; }
  /* iOS дээр input дарахад автоматаар томрохоос сэргийлнэ */
  .search-box input,
  .admin-page .admin-input { font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .modal { animation: none; }
  .hero-card img, .trend-item, .btn-buy { transition: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   Админ хэсэг — харанхуй CMS загвар
   ============================================================ */

.admin-page {
  --abg: #131417;
  --apanel: #1b1d22;
  --apanel-2: #222530;
  --aline: #2a2d36;
  --atext: #e7e8ec;
  --amuted: #8d93a0;
  --agreen: #2ecc71;
  --agreen-dim: #2ecc7120;
  --ared: #e5484d;
  --ablue: #5b8def;
  --aamber: #f5a623;

  background: var(--abg);
  color: var(--atext);
  min-height: 100vh;
}

.admin-page .site-head--story { border-bottom: 1px solid var(--aline); }
.admin-page .logo { color: var(--atext); }

.admin-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amuted);
  border: 1px solid var(--aline);
  border-radius: 6px;
  padding: 0.3rem 0.7rem;
}

/* Нэвтрэлт */

.admin-login {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
}

.login-card {
  width: min(22rem, 100%);
  background: var(--apanel);
  border: 1px solid var(--aline);
  border-radius: 14px;
  padding: 2.25rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.login-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.15rem;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 0.4rem;
}

.login-error { color: var(--ared); font-size: 0.85rem; text-align: center; }

/* Ерөнхий байрлал */

.admin {
  max-width: 86rem;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 4rem;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
}

.admin-tabs { display: flex; gap: 0.4rem; }

.admin-tab {
  background: none;
  border: 1px solid var(--aline);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--amuted);
  padding: 0.5rem 1.3rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.admin-tab:hover { color: var(--atext); }

.admin-tab.is-active {
  background: var(--atext);
  border-color: var(--atext);
  color: var(--abg);
}

.admin-warn {
  background: #f5a62314;
  border: 1px solid #f5a6234d;
  border-radius: 8px;
  color: #e8b45c;
  font-size: 0.85rem;
  padding: 0.7rem 1rem;
  margin-bottom: 1rem;
}

/* Панел + toolbar */

.panel {
  background: var(--apanel);
  border: 1px solid var(--aline);
  border-radius: 14px;
  overflow: hidden;
}

.panel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--aline);
}

.toolbar-left { display: flex; align-items: center; gap: 0.6rem; }

.search-box--dark input {
  color: var(--atext);
  background: var(--apanel-2);
  border-color: var(--aline);
}

.search-box--dark input::placeholder { color: var(--amuted); }
.search-box--dark input:focus { border-color: var(--ablue); }

.admin-page .btn-primary {
  background: var(--apanel-2);
  color: var(--atext);
  border: 1px solid var(--aline);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.6rem 1.3rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.admin-page .btn-primary:hover { border-color: var(--amuted); filter: none; }
.admin-page .btn-primary:disabled { opacity: 0.6; cursor: wait; }

.btn-danger {
  background: #e5484d1f;
  color: var(--ared);
  border: 1px solid #e5484d66;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.6rem 1.2rem;
}

.admin-page .btn-ghost {
  background: none;
  border: 1px solid var(--aline);
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--amuted);
  padding: 0.55rem 1.3rem;
}

.admin-page .btn-ghost:hover { color: var(--atext); border-color: var(--amuted); }

/* Хүснэгт */

.admin-page .table-wrap { overflow-x: auto; }

.a-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  min-width: 62rem;
}

.a-table th {
  text-align: left;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--atext);
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--aline);
  white-space: nowrap;
}

.a-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--aline);
  vertical-align: middle;
}

.a-table tbody tr { transition: background 0.15s ease; }
.a-table tbody tr:hover { background: #ffffff06; }

.col-check { width: 2.2rem; }
.col-num { text-align: right; }
.a-table th.col-num .th-sort { justify-content: flex-end; }
.col-center { text-align: center; }
.col-actions { text-align: right; white-space: nowrap; }

.th-sort {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: none;
  border: none;
  font: inherit;
  color: inherit;
  padding: 0;
}

.th-sort:hover { color: var(--ablue); }
.sort-ic { font-size: 0.75rem; color: var(--ablue); min-width: 0.7em; }

.a-table .cell-title { font-weight: 600; max-width: 34rem; }
.cell-teaser { color: var(--amuted); font-weight: 400; }
.cell-revenue { font-weight: 700; }
.row-draft .cell-title { color: var(--amuted); }

.a-table input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--ablue);
}

.badge-status {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--agreen);
  background: var(--agreen-dim);
  border: 1px solid #2ecc7159;
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  white-space: nowrap;
}

.badge-status--draft {
  color: var(--amuted);
  background: #8d93a01a;
  border-color: #8d93a04d;
}

/* Toggle дүрсүүд */

.tog {
  background: none;
  border: none;
  padding: 0.2rem;
  line-height: 0;
  border-radius: 999px;
  transition: transform 0.15s ease;
}

.tog:hover { transform: scale(1.15); }
.tog--on { color: var(--agreen); }
.tog--off { color: var(--ared); }

/* Мөрийн үйлдлүүд */

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: none;
  border: none;
  border-radius: 7px;
  color: var(--amuted);
  margin-left: 0.15rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.icon-btn:hover { background: #ffffff0d; color: var(--atext); }
.icon-btn--green { color: #57c785; }
.icon-btn--green:hover { color: var(--agreen); }
.icon-btn--red:hover { color: var(--ared); }

/* Нийлбэр мөрүүд */

.sum-row td {
  background: #ffffff05;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--amuted);
}

.sum-row .col-num { color: var(--atext); }

/* Хуудаслалт */

.pager-bar {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.9rem 1.25rem;
  flex-wrap: wrap;
}

.pager-info { font-size: 0.85rem; color: var(--amuted); margin-right: auto; }

.per-page {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--amuted);
}

.per-page-select { width: auto; padding: 0.35rem 0.5rem; }

.pager { display: flex; align-items: center; gap: 0.3rem; }

.pager-btn {
  min-width: 32px;
  height: 32px;
  background: none;
  border: 1px solid var(--aline);
  border-radius: 7px;
  color: var(--amuted);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0 0.5rem;
}

.pager-btn:hover:not(:disabled) { color: var(--atext); border-color: var(--amuted); }
.pager-btn:disabled { opacity: 0.4; cursor: default; }

.pager-btn.is-active {
  background: var(--ablue);
  border-color: var(--ablue);
  color: #fff;
}

.pager-dots { color: var(--amuted); padding: 0 0.2rem; }

/* Форм */

.admin-page .editor {
  background: var(--apanel);
  border: 1px solid var(--aline);
  border-radius: 14px;
  padding: 1.75rem;
  margin-top: 1.25rem;
}

.admin-page .editor-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1rem;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.editor-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--amuted);
}

.field-wide { grid-column: 1 / -1; }

.field-checks {
  flex-direction: row;
  gap: 1.75rem;
  align-items: center;
  padding: 0.4rem 0;
}

.check-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--atext);
  cursor: pointer;
}

.check-label input { width: 15px; height: 15px; accent-color: var(--agreen); }

.admin-page .admin-input {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  color: var(--atext);
  background: var(--apanel-2);
  border: 1px solid var(--aline);
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  width: 100%;
  transition: border-color 0.2s ease;
}

.admin-page .admin-input:focus { outline: none; border-color: var(--ablue); }

textarea.admin-input { resize: vertical; line-height: 1.7; }

.editor-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.4rem;
}

.editor-status { font-size: 0.85rem; color: var(--amuted); }

/* Статистик картууд */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.stat-card {
  background: var(--apanel);
  border: 1px solid var(--aline);
  border-radius: 14px;
  padding: 1.4rem 1.5rem;
}

.stat-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amuted);
}

.stat-value {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.7rem;
  margin-top: 0.4rem;
}

.row-demo td { color: var(--amuted); }

.admin-page .empty-note { color: var(--amuted); padding: 1.25rem; }

/* Орлогын дэлгэрэнгүй modal */

.admin-page .modal-backdrop {
  background: #0a0b0ecc;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.modal--rev {
  background: var(--apanel);
  border: 1px solid var(--aline);
  color: var(--atext);
  max-width: 34rem;
  text-align: left;
  box-shadow: 0 30px 80px #000000a6;
}

.admin-page .modal-close {
  background: var(--apanel-2);
  border: 1px solid var(--aline);
  color: var(--amuted);
}

.admin-page .modal-close:hover { color: var(--atext); }

.rev-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
  padding-right: 2rem;
  margin-bottom: 1.25rem;
}

.rev-price, .rev-last {
  background: var(--apanel-2);
  border: 1px solid var(--aline);
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
}

.rev-price-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--amuted);
}

.rev-price-value, .rev-last-value {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.3rem;
  margin-top: 0.15rem;
}

.rev-last-value { font-size: 1.05rem; }

.rev-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  margin: 0.9rem 0;
}

.rev-card { border-radius: 10px; padding: 0.9rem 1.1rem; border: 1px solid; }

.rev-card-label { font-size: 0.75rem; font-weight: 600; }

.rev-card-value {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.25rem;
  margin-top: 0.15rem;
}

.rev-card--green { background: #2ecc7112; border-color: #2ecc7147; }
.rev-card--green .rev-card-label { color: var(--agreen); }
.rev-card--blue { background: #5b8def14; border-color: #5b8def4d; }
.rev-card--blue .rev-card-label { color: var(--ablue); }
.rev-card--amber { background: #f5a62312; border-color: #f5a6234d; }
.rev-card--amber .rev-card-label { color: var(--aamber); }

.modal--rev .btn-ghost { margin-top: 0.4rem; }

/* Зураг байршуулах */

.upload-zone {
  border: 1.5px dashed var(--aline);
  border-radius: 12px;
  padding: 1.5rem 1rem;
  text-align: center;
  color: var(--amuted);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.upload-zone:hover { border-color: var(--amuted); color: var(--atext); }

.upload-label {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--atext);
  margin-top: 0.5rem;
}

.upload-hint { font-size: 0.78rem; margin-top: 0.2rem; }

.cover-preview {
  display: block;
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  border-radius: 8px;
}

.upload-status {
  font-size: 0.8rem;
  color: var(--agreen);
  margin-top: 0.6rem;
}

/* Тохиргоо */

.settings-form { max-width: 34rem; }

.settings-note {
  font-size: 0.85rem;
  color: var(--amuted);
  line-height: 1.7;
  margin: -0.5rem 0 1.25rem;
}

/* Засварын хуудас */

.editor-shell { max-width: 56rem; }

.editor-topbar { padding-bottom: 1rem; }

.back-link--dark { color: var(--amuted); }
.back-link--dark:hover { color: var(--atext); }

.admin-page .editor { margin-top: 0; }

.btn-save-green {
  background: var(--agreen);
  color: #0b2415;
  border: none;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 0.65rem 1.8rem;
  transition: filter 0.2s ease;
}

.btn-save-green:hover { filter: brightness(1.08); }
.btn-save-green:disabled { opacity: 0.6; cursor: wait; }

a.btn-ghost {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

@media (max-width: 720px) {
  .editor-grid { grid-template-columns: 1fr 1fr; }
  .rev-cards { grid-template-columns: 1fr; }
  .field-checks { flex-wrap: wrap; gap: 1rem; }
}
