:root {
  --blue: #0b3a82;
  --blue-dark: #072a5e;
  --red: #c4122f;
  --red-dark: #9e0e26;
  --gold: #f2b705;
  --bg: #f6f7fb;
  --surface: #ffffff;
  --text: #1b2333;
  --muted: #5d6779;
  --border: #e2e6ef;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(11, 58, 130, 0.08);
  --font-head: 'Montserrat', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.25; margin: 0 0 .5em; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.section { padding: 64px 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--red); margin-bottom: 6px; }

/* Товч */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: 999px; border: 2px solid transparent;
  font: 600 .95rem var(--font-body); cursor: pointer; text-decoration: none !important;
  transition: background .2s, color .2s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); }
.btn-outline { border-color: currentColor; color: var(--blue); background: transparent; }
.btn-outline:hover { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn-light { background: #fff; color: var(--blue); }
.btn-ghost-light { border-color: rgba(255,255,255,.6); color: #fff; }
.btn-ghost-light:hover { background: rgba(255,255,255,.12); }
.btn[disabled] { opacity: .6; cursor: wait; }

/* Толгой */
#site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--blue); text-decoration: none !important; min-width: 0; }
.brand-name { font: 700 1.4rem/1 var(--font-head); letter-spacing: .02em; white-space: nowrap; }
.brand-light { color: #fff; }
.logo-mark { width: 64px; height: 32px; object-fit: cover; border-radius: 4px; flex-shrink: 0; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
@media (max-width: 480px) {
  .brand-name { font-size: 1.05rem; }
  .logo-mark { width: 48px; height: 24px; }
}
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a:not(.btn) { padding: 8px 14px; border-radius: 8px; color: var(--text); font-weight: 500; font-size: .95rem; text-decoration: none; }
.main-nav a:not(.btn):hover { background: var(--bg); }
.main-nav a.active:not(.btn) { color: var(--blue); background: #e9effa; }
.nav-cta { margin-left: 10px; }
.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; padding: 10px; }
.nav-toggle span { display: block; height: 2px; background: var(--text); margin: 5px 0; transition: transform .2s, opacity .2s; }

@media (max-width: 1100px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute; top: 72px; left: 0; right: 0; background: #fff;
    flex-direction: column; align-items: stretch; padding: 12px 20px 20px;
    border-bottom: 1px solid var(--border); box-shadow: var(--shadow); display: none;
  }
  .nav-open .main-nav { display: flex; }
  .nav-cta { margin: 8px 0 0; }
  .nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* Нүүр баннер */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue) 55%, #1b56b3 100%);
  padding: 96px 0 110px;
}
.hero::after {
  content: ''; position: absolute; right: -120px; top: -120px; width: 480px; height: 480px;
  border-radius: 50%; border: 60px solid rgba(242,183,5,.12);
}
.hero::before {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 8px;
  background: linear-gradient(90deg, var(--red) 0 33.3%, var(--blue) 33.3% 66.6%, var(--red) 66.6%);
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); max-width: 720px; }
.hero p { font-size: 1.15rem; max-width: 600px; opacity: .9; margin: 0 0 32px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.page-hero { background: linear-gradient(135deg, var(--blue-dark), var(--blue)); color: #fff; padding: 56px 0; }
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 8px; }
.page-hero p { margin: 0; opacity: .85; max-width: 640px; }

/* Статистик */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: -56px; position: relative; z-index: 2; }
.stat { background: var(--surface); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); text-align: center; }
.stat b { display: block; font: 700 2.2rem var(--font-head); color: var(--blue); }
.stat span { color: var(--muted); font-size: .9rem; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* Карт */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; display: flex; flex-direction: column; gap: 10px;
  transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card h3 { font-size: 1.1rem; margin: 0; }
.card p { margin: 0; color: var(--muted); }
.card .card-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-top: 6px; }
.tag { display: inline-block; font-size: .75rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: #e9effa; color: var(--blue); }
.tag-red { background: #fde8eb; color: var(--red); }
.meta { font-size: .85rem; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.link-btn { background: none; border: 0; padding: 0; color: var(--blue); font: 600 .9rem var(--font-body); cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.icon-big { font-size: 2rem; }

/* Арга хэмжээ */
.event { flex-direction: row; gap: 18px; }
.event-date { flex-shrink: 0; width: 72px; height: 76px; border-radius: 12px; background: var(--blue); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.event-date b { font: 700 1.7rem var(--font-head); line-height: 1; }
.event-date small { font-size: .72rem; opacity: .85; }
.event.past .event-date { background: #9aa3b5; }
.event-body { display: flex; flex-direction: column; gap: 6px; flex: 1; }

/* Шүүлтүүр */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; align-items: center; }
.chip { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border); background: #fff; cursor: pointer; font: 500 .9rem var(--font-body); color: var(--text); }
.chip.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.filters select, .filters input { padding: 9px 14px; border-radius: 999px; border: 1px solid var(--border); font: inherit; font-size: .9rem; background: #fff; }
.empty { text-align: center; color: var(--muted); padding: 40px; background: #fff; border-radius: var(--radius); border: 1px dashed var(--border); }

/* Салбар */
.branch-national {
  display: flex; align-items: center; gap: 20px; padding: 24px; margin-bottom: 28px;
  background: linear-gradient(135deg, #fff, #eef3fc); border: 1px solid var(--border); border-left: 6px solid var(--red);
  border-radius: var(--radius);
}
.branch-group h3 { font-size: 1.1rem; display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.branch-group h3 .count { font-size: .8rem; background: var(--blue); color: #fff; border-radius: 999px; padding: 2px 10px; }
.branch-group + .branch-group { margin-top: 32px; }
.branch-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.branch-item { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.branch-item::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); flex-shrink: 0; }

/* CTA хэсэг */
.cta-band { background: var(--red); color: #fff; border-radius: 20px; padding: 44px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { margin: 0 0 6px; }
.cta-band p { margin: 0; opacity: .9; }

/* Маягт */
.form-wrap { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; }
@media (max-width: 900px) { .form-wrap { grid-template-columns: 1fr; } }
.form-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; }
.form-card h2 { font-size: 1.3rem; }
fieldset { border: 0; padding: 0; margin: 0 0 24px; }
legend { font: 600 1rem var(--font-head); color: var(--blue); margin-bottom: 14px; padding: 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } .form-card { padding: 22px; } }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 500; font-size: .9rem; }
.field label .req { color: var(--red); }
.field input, .field select, .field textarea {
  padding: 11px 14px; border: 1px solid var(--border); border-radius: 10px; font: inherit; background: #fbfcfe; color: var(--text);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(11,58,130,.12); background: #fff; }
.field .invalid, .invalid { border-color: var(--red) !important; }
.field-error { color: var(--red); font-size: .8rem; min-height: 0; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.check { display: flex; align-items: flex-start; gap: 8px; font-size: .92rem; cursor: pointer; }
.check input { margin-top: 4px; accent-color: var(--blue); }
.radio-row { display: flex; gap: 20px; padding: 8px 0; }
.form-msg { padding: 14px 16px; border-radius: 10px; margin-top: 14px; display: none; }
.form-msg.error { display: block; background: #fde8eb; color: var(--red-dark); }
.side-card { background: var(--blue); color: #fff; border-radius: var(--radius); padding: 28px; position: sticky; top: 96px; }
.side-card h3 { font-size: 1.1rem; }
.side-card ul { padding-left: 18px; margin: 0; }
.side-card li { margin-bottom: 8px; opacity: .92; }
.success { text-align: center; padding: 40px 20px; }
.success .icon { width: 72px; height: 72px; border-radius: 50%; background: #e3f6ea; color: #1b8a4a; font-size: 2.2rem; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }

/* Модал */
.modal { position: fixed; inset: 0; background: rgba(10,20,40,.55); display: none; align-items: center; justify-content: center; padding: 20px; z-index: 100; }
.modal.open { display: flex; }
.modal-box { background: #fff; border-radius: var(--radius); max-width: 640px; width: 100%; max-height: 90vh; overflow: auto; padding: 32px; position: relative; }
.modal-close { position: absolute; top: 12px; right: 14px; border: 0; background: var(--bg); width: 36px; height: 36px; border-radius: 50%; font-size: 1.4rem; cursor: pointer; line-height: 1; }

/* Хүснэгт (admin) */
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { padding: 10px 14px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
th { background: var(--bg); font-weight: 600; }

/* Хөл */
#site-footer { background: #0a1b38; color: #c9d2e3; margin-top: 64px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; padding-top: 48px; padding-bottom: 32px; }
.footer-grid h4 { color: #fff; font-size: 1rem; margin-bottom: 12px; }
.footer-grid a:not(.brand) { display: block; color: #c9d2e3; padding: 3px 0; }
.footer-grid p { margin: 4px 0; }
.footer-grid .muted { color: #8f9bb3; margin-top: 14px; max-width: 320px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding-top: 18px; padding-bottom: 18px; font-size: .85rem; color: #8f9bb3; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* ================= Админ ================= */
.btn-sm { padding: 7px 14px; font-size: .85rem; }
.small { font-size: .82rem; }
body.admin { background: #f1f3f8; }
.login-view { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { width: 100%; max-width: 400px; }
.login-card .brand { margin-bottom: 22px; }
.login-card .brand-name { font-size: 1.15rem; }
.login-card h1 { font-size: 1.3rem; }

.admin-top { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 40; }
.admin-top-inner { display: flex; align-items: center; gap: 14px; padding: 12px 20px; }
.admin-top .brand-name { font-size: 1.15rem; }
.admin-badge { background: var(--red); color: #fff; font-size: .72rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.admin-top-actions { margin-left: auto; display: flex; gap: 8px; }

.admin-layout { display: grid; grid-template-columns: 230px 1fr; min-height: calc(100vh - 61px); }
.admin-nav { background: #fff; border-right: 1px solid var(--border); padding: 16px 10px; display: flex; flex-direction: column; gap: 4px; }
.admin-nav button {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 10px 14px;
  border: 0; border-radius: 10px; background: none; font: 500 .93rem var(--font-body); color: var(--text); cursor: pointer;
}
.admin-nav button:hover { background: var(--bg); }
.admin-nav button.active { background: #e9effa; color: var(--blue); font-weight: 600; }
.badge { margin-left: auto; background: var(--red); color: #fff; font-size: .72rem; border-radius: 999px; padding: 1px 8px; }
.badge:empty { display: none; }
.admin-main { padding: 28px; min-width: 0; }
.admin-main h1 { font-size: 1.5rem; margin-bottom: 20px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.panel-head h1 { margin: 0; }

.admin-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; margin-bottom: 24px; }
.admin-stat { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; text-align: left; cursor: pointer; font: inherit; color: inherit; transition: box-shadow .2s; }
.admin-stat:hover { box-shadow: var(--shadow); }
.admin-stat b { display: block; font: 700 1.9rem var(--font-head); color: var(--blue); }
.admin-stat span { color: var(--muted); font-size: .85rem; }
.admin-cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: start; }
.panel { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.panel h2 { font-size: 1.05rem; margin-bottom: 16px; }

.bars { display: flex; flex-direction: column; gap: 4px; max-height: 560px; overflow: auto; }
.bar-row { display: grid; grid-template-columns: 170px 1fr 36px; align-items: center; gap: 10px; border: 0; background: none; padding: 4px 6px; border-radius: 6px; cursor: pointer; font: inherit; color: inherit; text-align: left; }
.bar-row:hover { background: var(--bg); }
.bar-label { font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 10px; background: #edf0f6; border-radius: 999px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--blue); border-radius: 999px; min-width: 2px; }
.bar-val { font-weight: 600; font-size: .85rem; text-align: right; }
.recent-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.recent-row:last-child { border-bottom: 0; }

.admin td.actions { text-align: right; }
.admin td.actions .link-btn + .link-btn { margin-left: 12px; }
.admin td.wrap { white-space: normal; min-width: 260px; }
.link-btn.danger { color: var(--red); }
.row-past td { color: var(--muted); }
.status-select { padding: 5px 10px; border-radius: 999px; border: 1px solid var(--border); font: 500 .82rem var(--font-body); cursor: pointer; }
.st-new { background: #fff6dc; color: #8a6100; border-color: #f3dc94; }
.st-ok { background: #e3f6ea; color: #1b7a42; border-color: #b7e3c6; }
.st-no { background: #f0f1f4; color: #6b7385; }
.detail-table { width: 100%; font-size: .92rem; }
.detail-table th { width: 140px; background: none; color: var(--muted); font-weight: 500; vertical-align: top; }
.detail-table td { white-space: normal; }
.quote { background: var(--bg); border-left: 4px solid var(--blue); padding: 4px 16px; border-radius: 8px; }
.note-form { border-top: 1px solid var(--border); margin-top: 18px; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); background: #1b2333; color: #fff; padding: 12px 20px; border-radius: 10px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 200; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--red); }

@media (max-width: 1000px) { .admin-cols { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-nav { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--border); padding: 8px; }
  .admin-nav button { width: auto; white-space: nowrap; }
  .admin-main { padding: 18px 16px; }
  .admin-top .brand-name, .admin-top-actions .btn-outline { display: none; }
  .bar-row { grid-template-columns: 120px 1fr 30px; }
}

/* Сошиал холбоос */
.social { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.footer-grid .social a { display: inline-flex; align-items: center; gap: 8px; color: #fff; padding: 0; }
.footer-grid .social a:hover { color: var(--gold); }

/* Эхлэлийн баннерын текст */
.hero-text { max-width: 780px; margin-bottom: 32px; }
.hero .hero-text p { max-width: none; font-size: 1.05rem; margin: 0 0 14px; }
.hero .hero-text p.hero-greeting { font-size: 1.2rem; font-weight: 600; color: var(--gold); opacity: 1; }

/* Аймгууд бүсээр */
.region-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; align-items: start; }
.region { background: #fff; border: 1px solid var(--border); border-top: 4px solid var(--blue); border-radius: var(--radius); padding: 16px; }
.region h4 { display: flex; justify-content: space-between; align-items: center; font-size: 1rem; color: var(--blue); margin: 0 0 12px; }
.region h4 span { font-size: .78rem; background: #e9effa; color: var(--blue); border-radius: 999px; padding: 2px 10px; }
.region-list { display: flex; flex-direction: column; gap: 8px; }
.region .branch-item { padding: 9px 12px; background: #fbfcfe; }
@media (max-width: 1100px) { .region-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 800px) { .region-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .region-grid { grid-template-columns: 1fr; } }
/* Улаанбаатар бүс 1-р баганад, бусад 6 бүс 2–4-р баганад */
@media (min-width: 1101px) {
  .region-grid .region:first-child { grid-row: span 2; align-self: stretch; }
}
.footer-grid .footer-about { max-width: 460px; font-size: .9rem; line-height: 1.65; }

/* Зураг оруулах */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.photo-upload { display: flex; align-items: center; gap: 18px; }
.photo-preview { width: 96px; height: 96px; border-radius: 50%; background: #edf0f6; color: #a7b0c2; display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; border: 2px solid var(--border); }
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-btn { cursor: pointer; }
#photo:focus-visible + .photo-btn, .photo-btn:focus-within { outline: 2px solid var(--blue); }
#photo-remove { margin-left: 12px; }

/* Админ — гишүүний зураг */
.member-cell { display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.avatar-empty { display: inline-flex; align-items: center; justify-content: center; background: #e9effa; color: var(--blue); font-weight: 600; font-size: .9rem; }
.member-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.member-head .avatar { width: 64px; height: 64px; font-size: 1.4rem; }
.member-photo { width: 120px; height: 120px; border-radius: 12px; object-fit: cover; border: 1px solid var(--border); }

/* Гишүүн болсноор — icon-той жагсаалт */
.side-card ul.benefits { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.side-card ul.benefits li { display: flex; align-items: center; gap: 14px; margin: 0; opacity: 1; line-height: 1.45; }
.benefit-icon { flex-shrink: 0; width: 40px; height: 40px; border-radius: 10px; background: rgba(255,255,255,.12); display: flex; align-items: center; justify-content: center; }
.benefit-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--gold); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ===== Бизнес хамтын ажиллагаа ===== */
.subnav { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 72px; z-index: 30; }
.subnav-inner { display: flex; gap: 6px; overflow-x: auto; padding-top: 10px; padding-bottom: 10px; scrollbar-width: none; }
.subnav-inner a { white-space: nowrap; padding: 8px 16px; border-radius: 999px; font-weight: 500; font-size: .92rem; color: var(--text); background: var(--bg); text-decoration: none; }
.subnav-inner a:hover { background: #e9effa; color: var(--blue); }
.anchor-section { scroll-margin-top: 140px; }
.section-lead { max-width: 680px; margin: 8px 0 0; }

.biz-head { display: flex; align-items: center; gap: 14px; }
.biz-head h3 { margin: 0 0 6px; }
.biz-logo { width: 56px; height: 56px; border-radius: 12px; object-fit: contain; background: #fff; border: 1px solid var(--border); flex-shrink: 0; }
.biz-logo-lg { width: 80px; height: 80px; }
.logo-empty { display: inline-flex; align-items: center; justify-content: center; background: #e9effa; color: var(--blue); font: 700 1.4rem var(--font-head); border-color: transparent; }
.biz-desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.partner-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.partner-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 24px 18px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); color: inherit; text-decoration: none !important; transition: box-shadow .2s, transform .2s; }
a.partner-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.partner-card h3 { font-size: 1rem; margin: 0; }
.partner-card p { margin: 0; color: var(--muted); font-size: .88rem; }
.partner-logo { width: 120px; height: 72px; object-fit: contain; border-radius: 8px; }
.partner-logo.logo-empty { width: 72px; border-radius: 50%; }

.region-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.region-chips span { font-size: .82rem; background: #fbfcfe; border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; }
@media (max-width: 1100px) { .subnav { top: 72px; } }
/* Админ — лого */
.avatar-logo { border-radius: 8px; object-fit: contain; background: #fff; border: 1px solid var(--border); }
.logo-preview { width: 120px; height: 80px; border-radius: 10px; border: 1px dashed var(--border); background: #fbfcfe; display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.logo-preview img { width: 100%; height: 100%; object-fit: contain; }

/* Мэдээ, арга хэмжээний зураг */
.card-img { display: block; width: calc(100% + 44px); max-width: none; margin: -22px -22px 6px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; background: #edf0f6; }
.event-card { gap: 14px; }
.event-card .event { display: flex; flex-direction: row; gap: 18px; }
.event-card.past .event-date { background: #9aa3b5; }
.event-card.past .card-img { filter: grayscale(.6); }
.modal-img { display: block; width: calc(100% + 64px); max-width: none; margin: -32px -32px 20px; max-height: 380px; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; }
.countdown { font-size: .78rem; font-weight: 600; color: var(--blue); background: #e9effa; padding: 2px 10px; border-radius: 999px; }
.countdown.soon { color: var(--red); background: #fde8eb; }
/* Админ */
.thumb { width: 56px; height: 36px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.logo-preview.cover-preview { width: 192px; height: 108px; }
.logo-preview.cover-preview img { object-fit: cover; }
.modal-close { z-index: 2; }

/* ===== Олон зураг ===== */
.card-img-wrap { position: relative; margin: -22px -22px 6px; }
.card-img-wrap .card-img { margin: 0; width: 100%; }
.img-count { position: absolute; right: 10px; bottom: 10px; background: rgba(10,20,40,.7); color: #fff; font-size: .78rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; }

.gallery { position: relative; margin: -32px -32px 20px; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; background: #0f1a2e; }
.gallery-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }
.gallery-track img { flex: 0 0 100%; width: 100%; height: min(420px, 56vh); object-fit: contain; scroll-snap-align: center; }
.gallery-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); color: var(--text); font-size: 1.6rem; line-height: 1; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,.25); z-index: 1; }
.gallery-nav.prev { left: 12px; }
.gallery-nav.next { right: 12px; }
.gallery-nav:disabled { opacity: 0; pointer-events: none; }
.gallery-counter { position: absolute; left: 12px; top: 12px; background: rgba(10,20,40,.7); color: #fff; font-size: .8rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.gallery-dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 6px; }
.gallery-dots button { width: 8px; height: 8px; padding: 0; border-radius: 50%; border: 0; background: rgba(255,255,255,.5); cursor: pointer; }
.gallery-dots button.active { background: #fff; width: 20px; border-radius: 999px; }
@media (hover: none) { .gallery-nav { display: none; } }

/* Админ — олон зураг засах */
.gallery-edit { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.gal-item { position: relative; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); background: #edf0f6; }
.gal-item img { width: 100%; height: 100%; object-fit: cover; }
.gal-cover { position: absolute; left: 6px; top: 6px; background: var(--red); color: #fff; font-size: .7rem; font-weight: 600; padding: 1px 8px; border-radius: 999px; }
.gal-actions { position: absolute; right: 6px; top: 6px; display: flex; gap: 4px; }
.gal-actions button { width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); cursor: pointer; font-size: 1rem; line-height: 1; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.gal-actions button[data-gal-del] { color: var(--red); }
.gal-empty { grid-column: 1 / -1; padding: 18px; text-align: center; border: 1px dashed var(--border); border-radius: 8px; }

/* ===== Салбарын холбоос ===== */
a.branch-item { color: var(--text); text-decoration: none; transition: border-color .15s, background .15s, color .15s; }
a.branch-item:hover { border-color: var(--blue); color: var(--blue); background: #f3f6fc; }
.region h4 a { color: inherit; text-decoration: none; }
.region h4 a:hover { text-decoration: underline; }
a.stat { color: inherit; text-decoration: none; transition: box-shadow .2s, transform .2s; }
a.stat:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(11,58,130,.14); }
.branch-link { color: inherit; text-decoration: underline; text-decoration-color: rgba(93,103,121,.4); text-underline-offset: 2px; }
.branch-link:hover { color: var(--blue); text-decoration-color: currentColor; }

/* ===== Салбарын хуудас ===== */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .88rem; margin-bottom: 14px; opacity: .85; }
.crumbs a { color: #fff; }
.unit-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.unit-chips a { color: #fff; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); padding: 5px 14px; border-radius: 999px; font-size: .88rem; text-decoration: none; }
.unit-chips a:hover { background: rgba(255,255,255,.22); }
.count-pill { display: inline-block; min-width: 20px; margin-left: 4px; padding: 0 7px; border-radius: 999px; background: var(--blue); color: #fff; font-size: .75rem; line-height: 20px; text-align: center; }
.count-pill:empty { display: none; }

/* ===== Бүтэц бүрэлдэхүүн ===== */
.leaders-head { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; }
.leaders-sub { text-align: center; font-size: 1.1rem; margin: 40px 0 18px; color: var(--blue); }
.leaders-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 18px; }
.leader-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 20px 14px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; font: inherit; color: inherit; transition: box-shadow .2s, transform .2s; }
.leader-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.leader-photo { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 3px solid #e9effa; margin-bottom: 6px; }
.leader-lead { width: 260px; padding: 28px 18px; border-top: 4px solid var(--red); }
.leader-lead .leader-photo { width: 160px; height: 160px; }
.leader-empty { display: inline-flex; align-items: center; justify-content: center; background: #edf0f6; color: #a7b0c2; }
.leader-empty svg { width: 50%; height: 50%; }
.leader-role { font-size: .75rem; font-weight: 600; color: var(--red); text-transform: uppercase; letter-spacing: .04em; }
.leader-name { font-family: var(--font-head); font-size: 1.02rem; }
.leader-pos { font-size: .85rem; color: var(--muted); }
.leader-modal { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.leader-modal .leader-photo { width: 140px; height: 140px; margin: 0; }
@media (max-width: 600px) { .leader-lead { width: 100%; } }
.logo-preview.portrait-preview { width: 110px; height: 110px; border-radius: 50%; }
.logo-preview.portrait-preview img { object-fit: cover; }

/* Нэр дэвшилт */
.nomination-box { background: #f6f8fd; border: 1px solid #dbe3f3 !important; border-left: 4px solid var(--red) !important; border-radius: 12px; padding: 18px 20px !important; }
.nomination-box legend { background: #fff; padding: 2px 10px; border-radius: 999px; border: 1px solid #dbe3f3; }
.nom-toggle { font-weight: 600; }
.nom-success { background: #fff6dc; border-radius: 10px; padding: 12px 16px; color: #6b4d00; }

/* Арга хэмжээнд бүртгүүлэх */
.event-reg { border-top: 1px solid var(--border); margin-top: 20px; padding-top: 18px; }
.event-reg-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.event-reg-form { margin-top: 18px; background: var(--bg); border-radius: 12px; padding: 18px; }
.event-reg-done { background: #e3f6ea; color: #1b6b3d; border-radius: 10px; padding: 14px 16px; }
.modal-box.modal-wide { max-width: 980px; }
.tag-guest { background: #f0f1f4; color: #5d6779; }

/* ===== Хуваалцах ===== */
.share-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--border); }
.share-label { font-size: .85rem; font-weight: 600; color: var(--muted); margin-right: 4px; }
.share-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border); background: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text); transition: transform .15s, background .15s, color .15s, border-color .15s; padding: 0; }
.share-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.share-btn svg.fill, .share-btn svg .fill { fill: currentColor; stroke: none; }
.share-btn:hover { transform: translateY(-2px); color: #fff; }
.share-link:hover { background: var(--blue); border-color: var(--blue); }
.share-facebook:hover { background: #1877f2; border-color: #1877f2; }
.share-x:hover { background: #000; border-color: #000; }
.share-threads:hover { background: #000; border-color: #000; }
.share-instagram:hover { background: linear-gradient(45deg, #f09433, #dc2743 50%, #bc1888); border-color: #dc2743; }
.share-bar.share-light { border-top-color: rgba(255,255,255,.2); }
.share-light .share-label { color: rgba(255,255,255,.85); }
.share-light .share-btn { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.3); color: #fff; }
button.partner-card { cursor: pointer; font: inherit; }
button.partner-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

/* Админ — албан тушаалын төрлүүд */
.roles-list { display: flex; flex-direction: column; gap: 8px; }
.role-row { display: grid; grid-template-columns: auto 1fr auto auto auto; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: #fbfcfe; }
.role-move { display: flex; flex-direction: column; gap: 2px; }
.role-move button { width: 26px; height: 20px; border: 1px solid var(--border); background: #fff; border-radius: 5px; cursor: pointer; font-size: .75rem; line-height: 1; padding: 0; }
.role-move button:disabled { opacity: .3; cursor: default; }
.role-name { padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; font: inherit; min-width: 0; }
.role-name:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(11,58,130,.12); }
.role-feat { white-space: nowrap; font-size: .88rem; }
.role-used { white-space: nowrap; }
.link-btn:disabled { opacity: .35; cursor: not-allowed; text-decoration: none; }
@media (max-width: 600px) { .role-row { grid-template-columns: auto 1fr; } }

/* ===== Суудал захиалга, төлбөр ===== */
.booking-box { margin-top: 20px; padding: 18px; border: 2px solid var(--blue); border-radius: 14px; background: #f6f8fd; }
.booking-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.seats-left { text-align: right; }
.seats-left b { display: block; font: 700 1.6rem var(--font-head); color: var(--blue); line-height: 1; }
.seats-left span { font-size: .8rem; color: var(--muted); }
.seats-left.low b { color: var(--red); }
.booking-closed { margin: 0; padding: 10px 14px; background: #f0f1f4; border-radius: 10px; color: var(--muted); }
#booking-form { margin-top: 14px; }
.total-box { padding: 10px 14px; background: #fff; border: 1px solid var(--border); border-radius: 10px; font-weight: 600; color: var(--blue); }
.test-banner { background: #fff6dc; color: #6b4d00; border: 1px dashed #e0b84a; padding: 6px 12px; border-radius: 8px; font-size: .85rem; font-weight: 600; margin-bottom: 12px; text-align: center; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .04em; }

/* Тасалбарын хуудас */
.ticket-wrap { max-width: 720px; }
.countdown-box { background: #fde8eb; color: var(--red-dark); padding: 10px 14px; border-radius: 10px; margin: 6px 0 18px; text-align: center; }
.pay-layout { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: start; margin-bottom: 18px; }
.pay-qr { text-align: center; }
.pay-qr img, .pay-qr #pay-qr img, .pay-qr canvas { width: 200px; height: 200px; margin: 0 auto; }
.pay-amount { font: 700 1.3rem var(--font-head); color: var(--blue); margin-top: 8px; }
.pay-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.pay-link { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: #fff; color: var(--text); text-decoration: none !important; font-weight: 500; font-size: .9rem; }
.pay-link:hover { border-color: var(--blue); }
.pay-link img { width: 28px; height: 28px; border-radius: 6px; }
.ticket-ok { display: inline-block; background: #e3f6ea; color: #1b6b3d; font-weight: 600; padding: 6px 14px; border-radius: 999px; margin-bottom: 12px; }
.ticket-qr { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 18px 0 8px; }
.ticket-qr .mono { font-size: 1.3rem; font-weight: 700; }
.ticket-paid { border-top: 6px solid #1b8a4a; }
@media (max-width: 600px) { .pay-layout { grid-template-columns: 1fr; } }
@media print { #site-header, #site-footer, .no-print { display: none !important; } .ticket-card { border: 1px solid #999; } }

/* Нөхцөлийн хуудас */
.prose { max-width: 760px; }
.prose h2 { font-size: 1.15rem; margin-top: 28px; color: var(--blue); }

/* Админ — захиалга */
.ticketing-box { background: #f6f8fd; border: 1px solid #dbe3f3 !important; border-radius: 12px; padding: 14px 16px !important; margin-top: 10px; }
.ticketing-box legend { background: #fff; padding: 2px 10px; border-radius: 999px; border: 1px solid #dbe3f3; }
.status-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; border: 1px solid transparent; white-space: nowrap; }
.table-no { width: 64px; padding: 5px 8px; border: 1px solid var(--border); border-radius: 6px; font: inherit; }
.pay-history { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; font-size: .9rem; }
.danger-btn { color: var(--red) !important; }
