/* ==========================================================================
   НЕБ-1 · neb1-v4.css — шинэ загварын давхарга (React хуудсуудад)
   index-neb1-v3.css-ийн ДАРАА ачаалагдана. Зөвхөн CSS — React код хөндөхгүй.

   1) html.embed  — нэгдсэн портал доторх хүрээнд (iframe) харагдах горим
   2) Нийтлэг шинэчлэл — typography, карт, товч, талбар, хүснэгт, цонх
   ========================================================================== */

:root{
  --n-ink:#17142e; --n-ink2:#3d3a5c; --n-mute:#6f6b8a;
  --n-violet:#6d5bd0; --n-blue:#4f7fd4; --n-teal:#2fa8a0;
  --n-line:rgba(109,91,208,.14); --n-line2:rgba(109,91,208,.08);
  --n-grad:linear-gradient(112deg,#6d5bd0 0%,#4f7fd4 55%,#2fa8a0 100%);
}

/* ───────── Typography ───────── */
body{ font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,sans-serif !important; color:var(--n-ink); }
.display-heading{ font-family:Onest,Inter,system-ui,sans-serif !important; letter-spacing:-.03em !important; }
h1.display-heading{ font-size:clamp(26px,3.2vw,36px) !important; line-height:1.1 !important; }
h2.display-heading{ font-size:clamp(19px,2vw,23px) !important; line-height:1.2 !important; }
.text-navy-900{ color:var(--n-ink); }
[class*="tracking-[0.2em]"]{ color:var(--n-violet) !important; opacity:.85; font-weight:800 !important; }

/* ───────── Карт ───────── */
.card{ border-radius:24px !important; }
.card.p-6{ padding:1.6rem !important; }

/* ───────── Товч ───────── */
.btn-primary,.btn-brand,.btn-ghost,.btn-outline{ min-height:42px; font-weight:700 !important; letter-spacing:.005em; }
.btn-primary:disabled,.btn-brand:disabled{ opacity:.5 !important; transform:none !important; filter:none !important; }
.flex-1 div.bg-navy-900,.flex-1 pre.bg-navy-900{ background:linear-gradient(135deg,#2a2350 0%,#1d1b35 58%,#16304a 100%) !important; }
.flex-1 button.bg-navy-900{
  background:var(--n-grad) !important; color:#fff !important;
  box-shadow:0 8px 20px -10px rgba(79,100,212,.85) !important;
}

/* ───────── Талбар ───────── */
.input,select.input,input.input,textarea.input,
.flex-1 input[type=text],.flex-1 input[type=date],.flex-1 input[type=number],.flex-1 input[type=search],
.flex-1 select,.flex-1 textarea{
  min-height:44px; border-radius:14px !important; font-weight:600; font-size:14.5px;
}
textarea.input{ min-height:90px; }
select.input,.flex-1 select{
  appearance:none; -webkit-appearance:none; padding-right:38px !important;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236f6b8a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat:no-repeat !important; background-position:right 13px center !important;
}
input[type=checkbox]{ accent-color:var(--n-violet); }
input[type=checkbox]:not([class*="sr-only"]){ width:17px; height:17px; }
input::placeholder,textarea::placeholder{ color:#b3b0c8; font-weight:500; }
.label{ color:rgba(23,20,46,.6) !important; font-weight:800 !important; }

/* ───────── Хүснэгт ───────── */
.card table{ border-collapse:separate; border-spacing:0; }
table thead th{
  font-size:11px !important; text-transform:uppercase; font-weight:800 !important; color:var(--n-mute) !important;
  padding-top:13px !important; padding-bottom:13px !important; border-bottom:1px solid var(--n-line) !important; white-space:nowrap;
}
table tbody td{ border-bottom:1px solid var(--n-line2) !important; vertical-align:middle; }
table tbody tr:last-child td{ border-bottom:0 !important; }
table tbody tr:hover{ background:rgba(109,91,208,.045) !important; }
.badge{ font-weight:700 !important; }

/* ───────── Цонх (modal) ───────── */
.fixed.inset-0[class*="bg-black"],.fixed.inset-0[class*="bg-navy"]{
  background-color:rgba(21,16,48,.55) !important;
  backdrop-filter:blur(5px); -webkit-backdrop-filter:blur(5px);
}
.fixed.inset-0 > .bg-white.rounded-2xl,.fixed.inset-0 > .bg-white.rounded-3xl,.fixed.inset-0 > .card,
.fixed.inset-0 .bg-white.shadow-2xl{
  border-radius:26px !important; box-shadow:0 40px 80px -24px rgba(21,16,48,.6) !important;
}

/* ==========================================================================
   EMBED — нэгдсэн портал доторх хүрээ
   ========================================================================== */
html.embed,html.embed body,html.embed #root{
  background:transparent !important; background-image:none !important; min-height:0 !important;
}
/* Хуучин хажуугийн цэс, гар утасны толгой, зар — портал өөрийн цэстэй */
html.embed aside,
html.embed header.lg\:hidden,
html.embed #neb1-ad-slot{ display:none !important; }

html.embed .min-h-screen{ min-height:0 !important; }
html.embed .min-h-screen.flex > .flex-1{ width:100%; }
html.embed .min-h-screen.flex > .flex-1 > div:last-child{
  padding:8px 12px 32px !important; max-width:none !important; margin:0 !important;
}
/* Хуудасны гарчиг — порталын толгойд байгаа тул давхардуулахгүй (тайлбар, товчнууд үлдэнэ) */
html.embed .min-h-screen.flex > .flex-1 > div:last-child h1,
html.embed .min-h-screen.flex > .flex-1 > div:last-child [class*="tracking-[0.2em]"]{ display:none !important; }
html.embed .min-h-screen.flex > .flex-1 > div:last-child .mb-7:has(> p:only-child),
html.embed .min-h-screen.flex > .flex-1 > div:last-child .mb-6:has(> p:only-child){ margin-bottom:14px !important; }
html.embed .min-h-screen.flex > .flex-1 > div:last-child > div > div:first-child:has(> p){ justify-content:flex-end; }
html.embed .min-h-screen.flex > .flex-1 > div:last-child p.text-sm{ color:var(--n-mute) !important; font-weight:500; }
html.embed ::-webkit-scrollbar{ width:10px; height:10px; }

@media (prefers-reduced-motion:reduce){ *{ animation-duration:.01ms !important; transition-duration:.01ms !important; } }
