/* Arvai7766 Cargo — гар утсыг эхэнд тавьсан загвар. Брэнд: шар #FCA900, хар, цагаан, саарал. */
:root {
    --brand: #FCA900;
    --brand-soft: #FFF4D6;
    --ink: #111111;
    --muted: #6B6B73;
    --bg: #F4F5F7;
    --card: #FFFFFF;
    --line: #E6E6EB;
    --ok: #2E7D32;
    --bad: #C62828;
    --radius: 14px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
    margin: 0; background: var(--bg); color: var(--ink);
    /* footer богино хуудсанд ч дэлгэцийн доод хэсэгт байна (хуучин theme-ийн grid-ийг орлоно) */
    display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh;
    font: 15px/1.55 "Manrope", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--ink); }
a:hover, a:focus { color: #000; }
h1, h2, h3, h4 { font-weight: 700; line-height: 1.25; color: var(--ink); }
h2 { font-size: 22px; margin: 4px 0 14px; }
h3 { font-size: 19px; }
h4 { font-size: 16px; }
p { float: none !important; }
img { max-width: 100%; }

/* ---------------------------------------------------------------- дээд мөр */
.topbar {
    position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92); border-bottom: 1px solid var(--line);
    backdrop-filter: saturate(180%) blur(10px); -webkit-backdrop-filter: saturate(180%) blur(10px);
    height: 64px; min-height: 0 !important; display: flex; align-items: center; gap: 12px; overflow: visible !important;
    padding: 0 max(16px, calc((100% - 1140px) / 2));
}
.topnav .nav-cta { background: var(--brand); margin-left: 6px; }
.topnav .nav-cta:hover { background: #E59A00; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none !important; color: var(--ink); font-weight: 800; font-size: 18px; white-space: nowrap; flex-shrink: 0; }
/* Цэс багтахгүй бол (JS шалгана) гулсдаг цэс рүү шилжинэ */
.topnav { min-width: 0; }
body.nav-collapsed .topnav .nav-link { display: none; }
body.nav-collapsed .menu-toggle { display: grid; }
.brand-badge { width: 38px; height: 38px; border-radius: 10px; background: var(--brand); display: grid; place-items: center; font-size: 20px; color: var(--ink); }
.topnav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.topnav a, .topnav button {
    padding: 8px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 600;
    background: none; border: 0; font-size: 14px; white-space: nowrap;
}
.topnav a:hover, .topnav button:hover, .topnav a.active { background: var(--brand-soft); }
.topnav form { margin: 0; }
.icon-btn { position: relative; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 19px; color: var(--ink); background: none; border: 0; text-decoration: none; }
.icon-btn:hover { background: var(--bg); }
.badge-dot { position: absolute; top: 4px; right: 2px; background: var(--bad); color: #fff; border-radius: 10px; font-size: 11px; padding: 0 5px; line-height: 17px; font-weight: 700; }
.menu-toggle { display: none; }

/* Утсан дээрх гулсдаг цэс */
.drawer-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 90; }
.drawer {
    position: fixed; top: 0; right: 0; bottom: 0; width: 82%; max-width: 320px; background: #fff; z-index: 100;
    transform: translateX(100%); transition: transform .2s ease, visibility .2s; padding: 18px 14px; overflow-y: auto;
    visibility: hidden; /* хаалттай үед хуудасны өргөнийг тэлэхгүй */
    box-shadow: -8px 0 24px rgba(0,0,0,.12);
}
.drawer a, .drawer button { display: flex; gap: 12px; align-items: center; width: 100%; padding: 13px 12px; border-radius: 12px; color: var(--ink); text-decoration: none; font-weight: 600; background: none; border: 0; text-align: left; font-size: 15px; }
.drawer a:hover, .drawer button:hover { background: var(--brand-soft); }
.drawer i { width: 22px; text-align: center; color: var(--muted); }
.drawer .who { padding: 6px 12px 14px; border-bottom: 1px solid var(--line); margin-bottom: 8px; color: var(--muted); }
body.drawer-open .drawer { transform: none; visibility: visible; }
body.drawer-open .drawer-backdrop { display: block; }

/* Утсан дээрх доод цэс (апп шиг) */
.bottomnav {
    display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: #fff;
    border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
}
.bottomnav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--muted); text-decoration: none; padding: 4px 0; }
.bottomnav a i { font-size: 19px; width: 54px; padding: 4px 0; border-radius: 16px; text-align: center; }
.bottomnav a.active { color: var(--ink); }
.bottomnav a.active i { background: var(--brand); color: var(--ink); }

/* ---------------------------------------------------------------- агуулга */
.page { max-width: 1140px; width: 100%; margin: 0 auto; padding: 16px; flex: 1 0 auto; }
.container { width: auto !important; max-width: 1140px; padding-left: 0; padding-right: 0; }
.page .container { padding: 0; }
.map_side_sec, .card-box {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 14px;
}
.map_content { overflow: visible; }
.map_content h2 { margin-top: 0; }
.truck_about_wrapper, .sales_men_img, .downlord_sec_wrapper { padding: 0; background: none; }
.footer, footer.footer { min-height: 0 !important; background: #111 !important; color: #a9a9b0; font-size: 14px; margin-top: 30px; padding: 34px 16px 30px; }
.footer-inner { max-width: 1140px; margin: 0 auto; display: grid; gap: 22px; grid-template-columns: 1fr; }
.footer .brand { color: #fff; margin-bottom: 10px; display: flex; }
.footer h5 { color: #fff; font-weight: 800; font-size: 14px; margin: 0 0 10px; }
.footer a { color: #e2e2e6; text-decoration: none; display: block; padding: 3px 0; }
.footer a:hover { color: var(--brand); }
.footer .brand:hover { color: #fff; }
.footer-bottom { max-width: 1140px; margin: 24px auto 0; padding-top: 16px; border-top: 1px solid #2a2a2e;
    display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between; font-size: 13px; }
.footer-bottom b { color: #fff; }
body.has-bottomnav .footer { padding-bottom: 96px; }
@media (min-width: 768px) { .footer-inner { grid-template-columns: 2fr 1fr 1fr; } }

/* Товчнууд */
button, .btn { font-family: inherit; }
.buttons_header { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.buttons_header a { text-decoration: none; }
.buttons_header button, .buttons_header form button {
    background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px;
    font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; margin: 0;
}
.buttons_header button:hover { border-color: var(--ink); }
.buttons_header button:disabled { opacity: .5; }
.btn { border-radius: 10px; font-weight: 600; }
.btn-primary, .btn-success { background: var(--brand); border-color: var(--brand); color: var(--ink); }
.btn-primary:hover, .btn-success:hover, .btn-primary:focus, .btn-success:focus { background: #E59A00; border-color: #E59A00; color: var(--ink); }
.btn-info { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-info:hover { background: #333; color: #fff; }
.btn-warning { background: #fff; border-color: var(--ink); color: var(--ink); }
.btn-danger { background: #fff; border-color: var(--bad); color: var(--bad); }

/* Талбарууд */
.additional-01, .additional-01b { position: relative; display: flex; gap: 8px; margin: 0 0 10px !important; }
.additional-01 input, .additional-01 .input, .additional-01 textarea, .additional-01b input {
    flex: 1; width: 100% !important; height: 50px; border: 1px solid #D6D6DC !important; border-radius: 12px !important;
    padding: 0 14px !important; font-size: 16px; background: #fff; margin: 0 !important; float: none !important;
}
.additional-01 textarea { height: auto; padding: 10px 14px !important; }
.additional-01 button { position: static !important; float: none !important; width: auto !important; height: 50px; min-width: 50px; border-radius: 12px !important; border: 0; background: var(--ink); color: var(--brand); margin: 0 !important; }
.additional-01 button[disabled] { background: var(--bg); color: var(--muted); }
.additional-01.register button, .additional-01.check button, .authentication-btn {
    width: 100% !important; background: var(--brand) !important; color: var(--ink) !important; font-weight: 700; font-size: 16px; height: 52px;
}
.additional-01 input, .additional-01b input { min-width: 0; }
.additional-01.check { align-items: center; flex-wrap: wrap; }
.additional-01.check { padding-top: 0; }
.additional-01.check .llabel { white-space: nowrap; order: 2; padding: 0; }
.additional-01.check input { width: 22px !important; height: 22px; flex: 0 0 22px; order: 1; }
.additional-01.check button { flex: 1 0 100%; order: 3; margin-top: 4px !important; }
.contact-branch { padding: 10px 0; border-top: 1px solid var(--line); color: var(--muted); line-height: 1.6; }
.contact-branch:first-of-type { border-top: 0; padding-top: 0; }
.contact-branch b { color: var(--ink); }
.contact-branch .fa { width: 16px; color: var(--brand); }
.contact-branch a { color: var(--ink); font-weight: 600; }
.auth-col .map_side_sec { padding: 28px 22px; border-radius: 22px; box-shadow: 0 18px 40px rgba(17,17,17,.06); margin-top: 18px; }
.auth-col .map_content h2 { font-size: 24px; font-weight: 800; }
.auth-col .map_content h2 .fa { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 16px;
    background: var(--brand); color: var(--ink); font-size: 24px; }
.auth-col .map_content p { color: var(--muted); }
.auth-col .additional-01 button[disabled] { display: none; }
/* Нэвтрэх, бүртгүүлэх г.м: дэлгэцийн өргөнөөс үл хамааран нэг багана */
.auth-col { width: 100%; max-width: 440px; margin: 0 auto; padding: 0 15px; float: none; }
.staff_add { margin-left: -5px; margin-right: -5px; }
.staff_add > div { padding: 0 5px; margin-bottom: 10px; }
.staff_add input, .staff_add select, .staff_add textarea, .form-control, .searchInput, .add_ereen textarea {
    width: 100%; min-height: 48px; height: 48px; margin: 0; border: 1px solid #D6D6DC; border-radius: 12px; padding: 10px 14px; font-size: 16px; background: #fff; box-shadow: none;
}
.staff_add button, .add_ereen button {
    width: 100%; min-height: 48px; border: 0; border-radius: 12px; background: var(--brand); color: var(--ink); font-weight: 700; font-size: 15px; margin: 0;
}
.staff_add button[type=button] { background: var(--ink); color: var(--brand); }
.staff_add textarea, .add_ereen textarea, textarea.form-control { height: auto; }
.staff_add input[type=checkbox], .staff_add input[type=radio], .staff_add input[type=file] { width: auto; min-height: 0; height: auto; }
.staff_add button:hover { border: 0; background: #E59A00; color: var(--ink); }
.staff_add button[type=button]:hover { background: #333; color: var(--brand); }
.form-control:focus, .staff_add input:focus, .staff_add select:focus, .additional-01 input:focus { outline: none; border-color: var(--ink) !important; }
label { font-weight: 600; }

/* Шүүлтүүрийн чипүүд */
.status-desc { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; max-width: 100%; }
.status-desc a { text-decoration: none; flex: 0 0 auto; }
.status-desc div { background: #fff !important; border: 1px solid var(--line); border-radius: 20px; padding: 6px 12px; font-weight: 600; font-size: 13px; color: var(--ink) !important; white-space: nowrap; margin: 0 !important; }
.status-desc div[style*="bold"], .status-desc a:focus div { background: var(--brand) !important; border-color: var(--brand); }
.status-desc .status-0 { background: var(--st-registered) !important; color: var(--st-registered-fg) !important; }
.status-desc .status-1 { background: var(--st-ereen) !important; color: var(--st-ereen-fg) !important; }
.status-desc .status-2 { background: var(--st-arrived) !important; color: var(--st-arrived-fg) !important; }
.status-desc .status-3 { background: var(--st-paid) !important; color: var(--st-paid-fg) !important; }
.status-desc .status-4 { background: #fff !important; }
.status-desc .status-notpp { background: var(--st-notpp) !important; color: var(--st-notpp-fg) !important; }
.status-desc [class*="status-"][style*="bold"] { border: 2px solid var(--ink); }

/* Хүснэгт: компьютер дээр хүснэгт, утсан дээр карт */
.product-table, .product_list { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.product-table th, .product_list th { background: #FAFAFB; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .02em; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.product-table td, .product_list td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.product-table tr:last-child td { border-bottom: 0; }
.product-table tr.status-0 td { background: var(--st-registered); }
.product-table tr.status-1 td { background: var(--st-ereen); }
.product-table tr.status-2 td { background: var(--st-arrived); }
.product-table tr.status-3 td { background: var(--st-paid); }
.product-table tr.status-4 td { background: var(--st-done); }
.product-table tr.status-0 td:first-child { box-shadow: inset 4px 0 0 var(--st-registered-dot); }
.product-table tr.status-1 td:first-child { box-shadow: inset 4px 0 0 var(--st-ereen-dot); }
.product-table tr.status-2 td:first-child { box-shadow: inset 4px 0 0 var(--st-arrived-dot); }
.product-table tr.status-3 td:first-child { box-shadow: inset 4px 0 0 var(--st-paid-dot); }
.product-table tr.status-4 td:first-child { box-shadow: inset 4px 0 0 var(--st-done-dot); }
.product-table tr[class*="status-"] td { --muted: var(--st-muted); border-bottom-color: rgba(17, 17, 17, .07); }
.product-table tr[class*="status-"] .pay-chip { background: #fff; }  /* ижил өнгийн мөрөн дээр уусахгүй */
.group-row td { font-weight: 700; border-top: 2px solid rgba(17, 17, 17, .12);
    background-image: linear-gradient(rgba(17, 17, 17, .05), rgba(17, 17, 17, .05)); }  /* ижил өнгийн арай гүн: ачааны мөрөөс ялгарна */
.group-row:not([class*="status-"]) td { background: #FAFAFB; }
.grp-who { margin-right: 8px; white-space: nowrap; }
.grp-who a { color: inherit; text-decoration: underline; text-decoration-color: var(--brand); text-underline-offset: 3px; }
.grp-name { font-weight: 500; opacity: .75; margin-left: 4px; }
.grp-count { display: inline-block; background: var(--brand); color: var(--ink); border-radius: 999px; padding: 1px 9px; font-size: 12px; margin-right: 6px; }
.grp-pp { display: inline-block; border: 1px solid currentColor; border-radius: 999px; padding: 0 8px; font-size: 11.5px; margin: 2px 4px 2px 0;
    text-decoration: none !important; color: inherit; opacity: .8; }
.mobile-show { display: none; }

/* Мэдэгдэл, label */
.alert { border-radius: 12px; border: 0; }
.alert-success { background: #E8F5E9; color: #1B5E20; }
.alert-warning { background: #FFF4D6; color: #6B4E00; }
.alert-danger { background: #FDECEA; color: #8E1B1B; }
.alert-info { background: #E8F1FB; color: #0D3C7A; }
.label { border-radius: 8px; padding: 3px 8px; font-weight: 600; }
.label-default { background: var(--ink); }
.label-success { background: var(--ok); }
.label-warning { background: var(--brand); color: var(--ink); }

/* Хуудаслалт */
.pagination { display: flex; justify-content: center; margin: 16px 0; }
.pagination .step-links { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: center; }
.pagination .step-links a, .pagination .step-links span { padding: 8px 14px; border-radius: 10px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.pagination .step-links .current { background: var(--brand); border-color: var(--brand); font-weight: 700; }

/* Нүүр хуудас, тусламж */
/* ---------------------------------------------------------------- нүүр хуудас */
.hero {
    position: relative; overflow: hidden; color: #fff; border-radius: 22px; padding: 30px 22px; margin-bottom: 16px;
    background: radial-gradient(circle at 85% 15%, rgba(252,169,0,.28), transparent 45%),
                radial-gradient(circle at 0% 100%, rgba(252,169,0,.12), transparent 40%), #111;
    display: grid; grid-template-columns: 1fr; gap: 10px;
}
.hero::after { /* нарийн тор: гүн мэдрэмж */
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .07;
    background-image: linear-gradient(#fff 1px, transparent 1px), linear-gradient(90deg, #fff 1px, transparent 1px);
    background-size: 32px 32px;
}
.hero > * { position: relative; z-index: 1; }
.hero-kicker { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 700; color: var(--brand);
    background: rgba(252,169,0,.12); border: 1px solid rgba(252,169,0,.35); padding: 5px 12px; border-radius: 999px; margin-bottom: 14px; }
.hero h1 { color: #fff; font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 12px; }
.hero .hl { color: var(--brand); }
.hero p { color: #c9c9cf; margin: 0 0 18px; font-size: 16px; max-width: 520px; }
.track-form { display: flex; align-items: center; background: #fff; border-radius: 16px; padding: 6px 6px 6px 16px; gap: 10px; max-width: 560px;
    box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.track-form > i { color: var(--muted); }
.track-form input { flex: 1; min-width: 0; border: 0; outline: none; font-size: 16px; height: 46px; background: none; color: var(--ink); }
.track-form button { border: 0; background: var(--brand); color: var(--ink); font-weight: 800; border-radius: 12px; padding: 0 20px; height: 46px; }
.track-form button:hover { background: #E59A00; }
.search-bar { box-shadow: none; border: 1px solid #D6D6DC; margin-bottom: 16px; }
/* Нэвтэрсэн хэрэглэгчийн утсан дээр footer товч: доод цэс аль хэдийн байгаа */
@media (max-width: 767px) {
    body.has-bottomnav .footer-inner { display: none; }
    body.has-bottomnav .footer-bottom { margin-top: 0; border-top: 0; padding-top: 0; }
    body.has-bottomnav .footer { padding-top: 18px; margin-top: 16px; }
}
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.btn-lg { padding: 13px 22px; font-size: 16px; border-radius: 14px; font-weight: 800; }
.btn-ghost { background: transparent; border: 1px solid rgba(255,255,255,.5); color: #fff; }
.btn-ghost:hover, .btn-ghost:focus { background: rgba(255,255,255,.1); color: #fff; }
.hero-visual { display: none; }
.hero-visual svg { width: 100%; height: auto; font-family: inherit; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 26px; }
.stats > div { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px 10px; text-align: center; }
.stats b { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.stats span { color: var(--muted); font-size: 12px; line-height: 1.3; display: block; }

.section { margin-bottom: 26px; }
.section-title { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 14px; }
.steps, .features { display: grid; grid-template-columns: 1fr; gap: 12px; }
.step, .feature { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px; position: relative;
    transition: transform .15s ease, box-shadow .15s ease; }
.step:hover, .feature:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(17,17,17,.07); }
.step h4, .feature h4 { margin: 12px 0 6px; font-weight: 800; }
.step p, .feature p { color: var(--muted); margin: 0; }
.step > i, .feature > i { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 20px;
    background: var(--brand-soft); color: #B87800; }
.feature > i { background: var(--ink); color: var(--brand); }
.step-no { position: absolute; top: 14px; right: 16px; font-size: 34px; font-weight: 800; color: #EFEFF2; line-height: 1; }

.contact-branch .cb-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.cb-call { width: 38px; height: 38px; border-radius: 12px; background: var(--brand); display: grid; place-items: center; text-decoration: none; flex: 0 0 38px; }
.contact-branch .cb-call .fa { color: var(--ink); width: auto; }

.app-banner { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; border-radius: 22px; padding: 24px 22px; margin-bottom: 26px;
    background: linear-gradient(120deg, #FCA900, #FFC94D); }
.app-banner h2 { margin: 0 0 4px; font-weight: 800; }
.app-banner p { margin: 0; color: #3a2d00; }
.app-banner .btn-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.app-banner .btn-primary:hover { background: #333; color: #fff; }

.help-links { display: grid; grid-template-columns: 1fr; gap: 12px; }
.help-link { display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 16px; text-decoration: none !important; color: var(--muted); }
.help-link:hover { border-color: var(--ink); color: var(--muted); }
.help-link b { color: var(--ink); }
.help-link > i { font-size: 30px; color: var(--brand); }

@media (max-width: 767px) { /* утсанд картууд нам: дүрс зүүн талд */
    .step, .feature { display: grid; grid-template-columns: 46px 1fr; column-gap: 14px; padding: 14px; }
    .step > i, .feature > i { grid-row: span 2; }
    .step h4, .feature h4 { margin: 2px 0 2px; }
    .step-no { font-size: 24px; top: 10px; right: 12px; }
}
@media (min-width: 768px) {
    .hero { grid-template-columns: 1.25fr 1fr; align-items: center; padding: 48px 44px; }
    .hero h1 { font-size: 42px; }
    .hero-visual { display: block; }
    .stats b { font-size: 30px; }
    .stats span { font-size: 14px; }
    .steps, .features { grid-template-columns: repeat(2, 1fr); }
    .app-banner { flex-direction: row; justify-content: space-between; align-items: center; padding: 30px 36px; }
    .help-links { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1100px) {
    .steps, .features { grid-template-columns: repeat(4, 1fr); }
    .hero h1 { font-size: 48px; }
}
.panel { border-radius: 12px; border-color: var(--line); box-shadow: none; overflow: hidden; }
.panel-heading { background: #fff !important; }
.panel-title a { display: block; font-weight: 600; text-decoration: none; }
.helpQuestions h4 { margin-top: 18px; }
.video_list p { padding: 10px 0; border-bottom: 1px solid var(--line); margin: 0; }
.add_ereen textarea { min-height: 260px; font-family: ui-monospace, Consolas, monospace; }
.add_ereen_info { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }

/* ---------------------------------------------------------------- салбар сонгох */
.branch-picker { display: flex; align-items: center; gap: 6px; margin: 0; padding: 0 8px; border-radius: 10px; background: var(--bg); height: 38px; }
.branch-picker label { margin: 0; font-weight: 700; font-size: 13px; color: var(--muted); white-space: nowrap; }
.branch-picker select { border: 0; background: transparent; font: inherit; font-weight: 700; font-size: 14px; max-width: 170px; color: var(--ink); }
.branch-picker.unconfirmed { background: var(--brand); }
.branch-picker.unconfirmed label { color: var(--ink); }
.topnav .branch-picker .bp-text { display: none; }
.drawer .branch-picker { margin: 0 4px 10px; height: 46px; }
.drawer .branch-picker select { max-width: none; flex: 1; }
@media (max-width: 767px) { .topnav .branch-picker { display: none; } }
.branch-gate { background: var(--brand-soft); border: 2px solid var(--brand); border-radius: 14px; padding: 16px; margin-bottom: 14px; }
.branch-gate h3 { margin: 0 0 6px; font-weight: 800; }
.branch-gate .branch-picker { background: #fff; display: inline-flex; margin-top: 8px; }

/* ---------------------------------------------------------------- ачаа олгох */
.ho-search { max-width: 520px; }
.ho-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.ho-main, .ho-side { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-content: start; }
.ho-main > .card-box, .ho-side > .card-box { margin: 0; }
.ho-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.ho-head h3, .ho-list h3 { margin: 0; font-size: 17px; font-weight: 800; }
.ho-head h3 .fa, .ho-list h3 .fa, .rep-table-head h3 .fa { color: var(--brand); }
.ho-chips { display: flex; gap: 6px; }
.pay-chip { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.pay-chip.paid { background: #E6F2EA; color: var(--ok); }
.pay-chip.unpaid { background: #FDE8EC; color: var(--bad); }
.state-chip { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--bg); }
.state-chip.s0 { color: var(--muted); }
.state-chip.s1 { background: #E8EEF8; color: #2D5BA8; }
.shelf-tag { display: inline-block; min-width: 44px; text-align: center; border: 2px solid var(--ink); border-radius: 8px; padding: 1px 6px; font-weight: 800; }
.ho-table input[type=checkbox], #pick-all { width: 20px; height: 20px; accent-color: var(--ink); }
.ho-pay { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.ho-due { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.ho-due span { color: var(--muted); font-weight: 600; }
.ho-due b { font-size: 28px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ho-due small { color: var(--muted); }
.ho-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ho-actions select { flex: 1 1 240px; min-width: 0; height: 52px; border: 1px solid #D6D6DC; border-radius: 12px; padding: 0 12px; font: inherit; background: #fff; }
.ho-actions .btn { flex: 0 0 auto; }
.ho-actions.split-mode select { display: none; }
.ho-actions.split-mode .btn { flex: 1 1 auto; }
.ho-actions.split-mode { order: 1; }
.ho-pay > p.muted { order: 2; }
.ho-split-toggle { justify-self: start; }
.ho-split-toggle.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.ho-split { display: grid; gap: 8px; padding: 12px; border: 1px dashed #D6D6DC; border-radius: 14px; background: var(--bg); }
.ho-split[hidden] { display: none; }
.ho-split-title { margin: 0; font-weight: 700; }
.ho-split-title small { color: var(--muted); font-weight: 400; margin-left: 6px; }
#split-rows { display: grid; gap: 8px; }
.ho-split-row { display: grid; grid-template-columns: minmax(0, 1fr) 140px 40px; gap: 8px; }
.ho-split-row select, .ho-split-row input { height: 46px; min-width: 0; border: 1px solid #D6D6DC; border-radius: 12px; padding: 0 12px; font: inherit; background: #fff; }
.ho-split-row input { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.ho-split-del { border: 0; background: none; color: var(--muted); font-size: 16px; cursor: pointer; border-radius: 10px; }
.ho-split-del:hover { background: #fff; color: var(--bad); }
.ho-split-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
#split-status { font-weight: 700; font-variant-numeric: tabular-nums; }
#split-status.ok { color: #1F8A4C; }
#split-status.bad { color: var(--bad); }
@media (max-width: 480px) {
  .ho-split-row { grid-template-columns: minmax(0, 1fr) 40px; }
  .ho-split-row input { grid-column: 1; grid-row: 2; }
  .ho-split-row .ho-split-del { grid-column: 2; grid-row: 1; }
}
.ho-qpay { margin-top: 14px; padding: 14px; border: 1px dashed var(--line); border-radius: 12px; }
.ho-customer { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; }
.ho-customer b { font-size: 18px; }
.ho-avatar { width: 64px; height: 64px; flex-basis: 64px; cursor: default; }
.ho-avatar span { font-size: 26px; }
.ho-stats { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ho-stats div { background: var(--bg); border-radius: 12px; padding: 8px 12px; }
.ho-stats span { display: block; color: var(--muted); font-size: 12px; }
.ho-stats b { font-size: 18px; }
.ho-list { display: grid; gap: 8px; }
.ho-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line);
    text-decoration: none !important; color: var(--ink); }
.ho-item:first-of-type { border-top: 0; }
a.ho-item:hover { color: var(--ink); background: var(--bg); }
.ho-empty { text-align: center; color: var(--muted); padding: 30px 20px; }
.ho-empty .fa { font-size: 40px; color: var(--brand); }
@media (min-width: 1000px) { .ho-layout { grid-template-columns: minmax(0, 1fr) 340px; } }
.claim-tag { display: inline-block; margin-top: 3px; border-radius: 6px; padding: 1px 8px; font-size: 12px; font-weight: 700;
    background: #FFF4D6; color: #8A5A00; }
.ho-hint { margin: 0 0 8px; color: var(--muted); font-size: 13px; }
.ho-all { display: flex; align-items: center; gap: 8px; font-weight: 700; margin: 0 0 8px; cursor: pointer; }
.pp-group { border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; overflow: hidden; }
.pp-group.off { opacity: .5; }
.pp-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0; padding: 10px 12px; background: var(--bg); cursor: pointer; font-weight: 400; }
.pp-title { flex: 1 1 160px; min-width: 0; display: grid; }
.pp-title small { color: var(--muted); }
.pp-sum { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.pp-sum b { font-size: 16px; font-variant-numeric: tabular-nums; }
.ho-all input, .pick-pp { width: 20px; height: 20px; accent-color: var(--ink); flex: none; }
.pp-group .ho-table { margin: 0; }
.pp-group .ho-table td { vertical-align: middle; }
.ho-shelf { width: 64px; vertical-align: middle; }
.ho-shelf .shelf-tag { min-width: 0; display: block; }
@media (max-width: 600px) {
  .pp-group .ho-table td { padding: 8px 5px; white-space: normal; }
  .pp-group .ho-table .ho-shelf { width: 46px; }
  .pp-group .ho-table .shelf-tag { padding: 1px 3px; font-size: 13px; }
  .pp-group .ho-table .pay-chip { padding: 2px 6px; font-size: 11px; }
  .pp-group .ho-table .row-acts { flex-direction: column; gap: 4px; }
  .pp-group .ho-table .row-act { width: 30px; height: 30px; font-size: 14px; }
  .pp-group .ho-table b { font-size: 13px; word-break: break-all; }
}
.pp-line { color: var(--muted); font-size: 12px; }
.pay-all-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 14px; margin: 6px 0 10px; color: var(--muted); font-size: 13px; }
.pay-all-row label { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 700; color: var(--ink); cursor: pointer; }
.pay-all-row input, .group-row .pay-pick { width: 20px; height: 20px; accent-color: var(--ink); }
/* мөр бүрийн ард харах, засах товч */
.row-acts-cell { width: 1%; white-space: nowrap; text-align: right; vertical-align: middle; }
.row-acts { display: inline-flex; gap: 6px; align-items: center; }
.row-acts form { display: inline; margin: 0; }
.row-act { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line);
    background: #fff; color: var(--ink) !important; text-decoration: none !important; font-size: 15px; padding: 0; cursor: pointer;
    transition: background .12s, border-color .12s; }
.row-act:hover { background: var(--bg); border-color: #C9C9D1; }
.row-act.edit { color: #8A5A00 !important; }
.row-act.del { color: var(--bad) !important; }
.row-act:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
/* ачаа олгох: эзний нэрийн эхний үсэг */
.ho-shelf .name-letter + input + .shelf-tag, .ho-shelf .name-letter ~ .shelf-tag { margin-top: 4px; }
.ho-shelf { text-align: center; }
.name-letter { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--ink); color: #fff;
    font-size: 19px; font-weight: 800; line-height: 1; }
/* тун удахгүй: идэвхгүй холбоос */
.nav-soon, .footer-soon { opacity: .75; cursor: not-allowed; pointer-events: none; }
.nav-soon small, .footer-soon small, .bn-soon small, .soon-red { color: #D3122F; font-size: 11px; font-weight: 700; }
.nav-test { color: #8A5A00; font-size: 11px; font-weight: 700; }
.bn-soon { display: flex; flex-direction: column; align-items: center; gap: 2px; opacity: .6; cursor: not-allowed; font-size: 11px; }
.bn-soon small { font-size: 9px; line-height: 1; }
.btn.is-disabled, .btn[disabled] { opacity: .7; cursor: not-allowed; pointer-events: none; }
.settings-flags { display: grid; gap: 4px; max-width: 640px; }
.flag-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); margin: 0; cursor: pointer; font-weight: 400; }
.flag-row small { display: block; color: var(--muted); }
.switch { appearance: none; -webkit-appearance: none; width: 46px; height: 26px; border-radius: 999px; background: #CFCFD6; position: relative; flex: none; cursor: pointer; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch:checked { background: var(--ok); }
.switch:checked::after { left: 23px; }
.switch:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.need-branch { border: 2px solid #D3122F; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; }
.inline-form select { flex: 1 1 220px; min-width: 0; }
.delivery-closed { margin: 0 0 6px; font-size: 12px; line-height: 1.35; color: #D3122F; font-weight: 600; text-align: left; }
/* Ачааны төлөвийн өнгө — хуучин системийнх (саарал #EDEDED, шар #FFF2CC, цэнхэр #D9E1F2, ногоон #E2EFDA, цагаан),
   сайтын хүйтэн саарал дэвсгэр, шар брэндтэй зохицуулж үл ялиг тохируулсан. Шар нь цэсний hover (--brand-soft)-оос ялгарна. */
:root { --st-registered: #ECEDF0; --st-registered-fg: #4F4F57; --st-registered-dot: #9A9AA3;
        --st-ereen: #FFF0C2; --st-ereen-fg: #765000; --st-ereen-dot: #F0B000;
        --st-transit: #FFE5C7; --st-transit-fg: #8F3F06; --st-transit-dot: #F57C00;
        --st-arrived: #DCE5F5; --st-arrived-fg: #22437A; --st-arrived-dot: #3D6BC4;
        --st-paid: #E2F0DA; --st-paid-fg: #2A642A; --st-paid-dot: #43A047;
        --st-done: #FFFFFF; --st-done-fg: #6B6B76; --st-done-dot: #C4C4CC;
        --st-notpp: #D3EFF8; --st-notpp-fg: #0B5566;
        --st-muted: #55555D; /* өнгөт мөрөн дээрх бүдэг бичиг (AA contrast) */ }
.cust-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.cust-head h2 { margin: 0; font-size: 24px; font-weight: 800; }
.cust-search { position: relative; margin-bottom: 12px; }
.cust-search .fa-search { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.cust-search input { width: 100%; height: 48px; margin: 0; padding: 0 40px; border: 1px solid #D6D6DC; border-radius: 14px; font: inherit; background: #fff; }
.cust-clear { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.st-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; margin-bottom: 8px; scrollbar-width: thin; }
.st-tab { flex: 0 0 auto; display: flex; flex-direction: column; gap: 2px; min-width: 104px; padding: 10px 12px; border-radius: 14px;
    border: 2px solid transparent; text-decoration: none !important; color: var(--ink) !important; background: #fff; box-shadow: 0 1px 0 var(--line); }
.st-tab span { font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.st-tab b { font-size: 22px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.st-tab.zero { opacity: .55; }
.st-tab.on { border-color: var(--ink); }
.st-tab.st-all { background: var(--ink); color: #fff !important; }
.st-tab.st-all.on { border-color: var(--brand); }
.st-tab.st-registered { background: var(--st-registered); color: var(--st-registered-fg) !important; }
.st-tab.st-ereen { background: var(--st-ereen); color: var(--st-ereen-fg) !important; }
.st-tab.st-transit { background: var(--st-transit); color: var(--st-transit-fg) !important; }
.st-tab.st-arrived { background: var(--st-arrived); color: var(--st-arrived-fg) !important; }
.st-tab.st-paid { background: var(--st-paid); color: var(--st-paid-fg) !important; }
.st-tab.st-done { background: var(--st-done); color: var(--st-done-fg) !important; }
.st-section { margin: 14px 0 18px; }
.st-section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 8px; }
.st-section-head h3 { margin: 0; font-size: 18px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.st-section-head h3 small { font-size: 14px; color: var(--muted); font-weight: 700; }
.st-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.st-registered .st-dot { background: var(--st-registered-dot); }
.st-ereen .st-dot { background: var(--st-ereen-dot); }
.st-transit .st-dot { background: var(--st-transit-dot); }
.st-arrived .st-dot { background: var(--st-arrived-dot); }
.st-paid .st-dot { background: var(--st-paid-dot); }
.st-done .st-dot { background: var(--st-done-dot); }
.st-list, .pp-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.pp-card { margin-bottom: 10px; }
.pp-card-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--st-arrived); color: var(--st-arrived-fg);
    background-image: linear-gradient(rgba(34, 67, 122, .08), rgba(34, 67, 122, .08)); }
.pp-card-head > div { flex: 1 1 auto; min-width: 0; display: grid; }
.pp-card-head small { opacity: .85; }
.pp-card-head .pay-pick { width: 20px; height: 20px; accent-color: var(--ink); }
.pp-due { font-size: 17px; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pp-card-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); }
.pp-card-foot small { flex-basis: 100%; }
.pp-card-foot .btn { flex: 1 1 200px; }
.pp-card-foot .delivery-closed { flex-basis: 100%; }
.cust-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 6px 10px; align-items: center; padding: 10px 14px;
    border-top: 1px solid var(--line); border-left: 4px solid transparent; }
.st-list .cust-row:first-child { border-top: 0; }
.cust-row.st-registered { border-left-color: var(--st-registered-dot); }
.cust-row.st-ereen { border-left-color: var(--st-ereen-dot); }
.cust-row.st-transit { border-left-color: var(--st-transit-dot); }
.cust-row.st-arrived { border-left-color: var(--st-arrived-dot); }
.cust-row.st-paid { border-left-color: var(--st-paid-dot); }
.cust-row.st-done { border-left-color: var(--st-done-dot); }
.cust-row.st-registered { background: var(--st-registered); }
.cust-row.st-ereen { background: var(--st-ereen); }
.cust-row.st-transit { background: var(--st-transit); }
.cust-row.st-arrived { background: var(--st-arrived); }
.cust-row.st-paid { background: var(--st-paid); }
.cust-row.st-done { background: var(--st-done); }
.cust-row[class*="st-"] { --muted: var(--st-muted); border-top-color: rgba(17, 17, 17, .07); }
.cust-row[class*="st-"] .st-chip { background: #fff; }
.st-chip { display: inline-block; border-radius: 999px; padding: 3px 9px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.st-chip.st-registered { background: var(--st-registered); color: var(--st-registered-fg); }
.st-chip.st-ereen { background: var(--st-ereen); color: var(--st-ereen-fg); }
.st-chip.st-transit { background: var(--st-transit); color: var(--st-transit-fg); }
.st-chip.st-arrived { background: var(--st-arrived); color: var(--st-arrived-fg); }
.st-chip.st-paid { background: var(--st-paid); color: var(--st-paid-fg); }
.st-chip.st-done { background: var(--st-done); color: var(--st-done-fg); }
.cust-main { display: grid; min-width: 0; }
.cust-main b { overflow-wrap: anywhere; }
.cust-main small { color: var(--muted); font-size: 12.5px; }
.cust-main small.diff-bad { color: var(--bad); }
.cust-name { color: var(--muted); font-weight: 600; }
.warn-text { color: #B26A00 !important; }
.cust-pay { font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.st-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-weight: 700; }
.cust-empty { text-align: center; color: var(--muted); }
@media (max-width: 600px) {
  .cust-row { grid-template-columns: minmax(0, 1fr) auto; padding: 10px 12px; }
  .cust-row .st-chip { grid-column: 1 / -1; justify-self: start; }
  .cust-row .row-acts { grid-column: 2; grid-row: 2 / span 2; }
  .cust-row .cust-pay { grid-column: 2; grid-row: 2; align-self: start; }
  .cust-row .cust-main { grid-row: 2 / span 2; }
}
@media (max-width: 600px) { .cust-row .row-acts { grid-row: 3; } }
.pp-card .cust-row .st-chip { display: none; }  /* картын толгой аль хэдийн "Салбарт ирсэн" өнгөтэй */
@media (min-width: 601px) { .pp-card .cust-row { grid-template-columns: minmax(0, 1fr) auto auto; } }
@media (max-width: 600px) {
  .st-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; }
  .st-tab { min-width: 0; padding: 8px 10px; }
  .st-tab span { font-size: 11.5px; white-space: normal; line-height: 1.2; }
  .st-tab b { font-size: 19px; }
  .pp-card .cust-row .cust-main { grid-row: 1 / span 2; }
  .pp-card .cust-row .cust-pay { grid-row: 1; }
  .pp-card .cust-row .row-acts { grid-row: 2; }
}
.nav-soon { white-space: nowrap; }
.nav-soon small { display: inline; }
/* ачаа ирлээ мэдэгдэл, SMS дараалал */
.nt-preview h3 { margin-top: 0; font-size: 17px; font-weight: 800; }
.nt-msg { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.nt-msg.off { opacity: .7; }
.nt-ch { font-weight: 700; color: var(--muted); }
.sms-len { display: block; color: var(--muted); }
.sms-long { color: #D3122F !important; font-weight: 700; }
.sms-long-row td { background: #FDECEE; }
.nt-select { display: flex; flex-wrap: wrap; gap: 6px; }
.nt-old td { background: #FFF8E6; }
.nt-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.sms-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.sms-tabs a { padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; }
.sms-tabs a.on { background: var(--ink); color: #fff; }
.sms-kind { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--bg); white-space: nowrap; }
.sms-kind.k-arrival { background: #D9E1F2; color: #24467F; }
.sms-kind.k-code { background: #FFF2CC; color: #7A5200; }
.sms-kind.k-staff { background: #FDE8EC; color: #A3122A; }
.sms-kind.k-delivery { background: #E2EFDA; color: #2E6B2E; }
.sms-text { min-width: 220px; white-space: normal; }
.last-search { display: block; margin-top: 4px; color: var(--muted); }
/* ачаа олгох: өмнө авсан ачаа PP-ээр, трак кодоор шалгах */
.hist-filter { position: relative; display: block; margin: 0 0 10px; }
.hist-filter .fa { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.hist-filter input { width: 100%; height: 42px; padding: 0 12px 0 34px; border: 1px solid #D6D6DC; border-radius: 12px; font: inherit; margin: 0; }
.hist-pp { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-bottom: 10px; }
.hist-pp[hidden], .hist-row[hidden] { display: none; }
.hist-pp-head { display: flex; flex-wrap: wrap; gap: 2px 12px; align-items: baseline; padding: 8px 12px; background: var(--st-done, #F2F2F4); background: #F2F2F4; }
.hist-pp-head span { color: var(--muted); font-size: 13px; }
.hist-pp-sum { margin-left: auto; font-weight: 700; color: var(--ink) !important; }
.hist-pp .rtable { margin: 0; }
@media (max-width: 600px) {
  .hist-pp .rtable tbody { display: block; }
  .hist-pp tr.hist-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; border-top: 1px solid var(--line); }
  .hist-pp tr.hist-row[hidden] { display: none; }
  .hist-pp tr.hist-row td { border: 0; padding: 4px 10px; white-space: normal; }
  .hist-pp tr.hist-row td:nth-child(1) { grid-column: 1; grid-row: 1; }
  .hist-pp tr.hist-row td:nth-child(4) { grid-column: 2; grid-row: 1; text-align: right; }
  .hist-pp tr.hist-row td:nth-child(2) { grid-column: 1; grid-row: 2; font-size: 12px; color: var(--muted); }
  .hist-pp tr.hist-row td:nth-child(3) { grid-column: 2; grid-row: 2; font-size: 12px; color: var(--muted); text-align: right; }
}
.track-check { display: grid; gap: 8px; }
.track-check-row { display: flex; gap: 8px; }
.track-check-row input { flex: 1 1 auto; min-width: 0; height: 44px; border: 1px solid #D6D6DC; border-radius: 12px; padding: 0 12px; font: inherit; margin: 0; }
.track-result { border-radius: 12px; padding: 10px 14px; background: #F2F6FD; }
.track-result.nf { background: #FDECEE; }
.track-result ul { margin: 6px 0; padding-left: 18px; display: grid; gap: 2px; }
.track-result .st-chip { display: inline-block; border-radius: 999px; padding: 2px 9px; font-size: 12px; font-weight: 700; }
.track-result .st-registered { background: #EDEDED; color: #555; } .track-result .st-ereen { background: #FFF2CC; color: #7A5200; }
.track-result .st-arrived { background: #D9E1F2; color: #24467F; } .track-result .st-paid { background: #E2EFDA; color: #2E6B2E; }
.track-result .st-done { background: #F2F2F4; color: #6B6B76; }
.product-table tr.pp-sub td { background: #F2F4F8; font-size: 13px; padding: 6px 10px; border-top: 1px solid var(--line); }
.product-table tr.pp-sub td:first-child { box-shadow: none; }
.pp-sub-link { margin-left: 6px; color: var(--muted); }
/* Түнш хүргэлтэд бэлдэх */
.prep-order { border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 10px; display: grid; gap: 8px; }
.prep-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.prep-head small { display: block; color: var(--muted); }
.prep-count { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.prep-scan { height: 48px; border: 2px solid var(--brand); border-radius: 12px; padding: 0 12px; font: inherit; font-size: 16px; }
.prep-msg { margin: 0; min-height: 1.4em; font-weight: 700; }
.prep-msg.bad { color: var(--bad); }
.prep-msg.warn { color: #B26A00; }
.prep-msg.ok { color: #1F8A4C; }
.prep-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.prep-items li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; background: var(--bg); }
.prep-items li .fa-check { margin-left: auto; color: #1F8A4C; visibility: hidden; }
.prep-items li.ok { background: #E6F6EC; }
.prep-items li.ok .fa-check { visibility: visible; }
.prep-order .btn[disabled] { opacity: .5; }
.terms-box { border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin: 12px 0; background: #fff; display: grid; gap: 8px; }
.terms-text { max-height: 220px; overflow-y: auto; font-size: 13px; line-height: 1.5; padding: 8px 10px; background: var(--bg); border-radius: 10px; }
.terms-text p { margin: 0 0 8px; }
.terms-accept { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
.terms-accept input { margin-top: 3px; }
.quote-box { border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin: 12px 0; background: #fff; display: grid; gap: 6px; }
.quote-total { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.quote-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); }
.partner-box { border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin: 10px 0; max-width: 520px; display: grid; gap: 4px; background: #fff; }
.return-choice { margin-top: 8px; padding: 10px; border-radius: 12px; background: #FFF4D6; display: grid; gap: 6px; }
.return-choice p { margin: 0; }
.partner-pay { margin-top: 8px; padding: 10px; border-radius: 12px; background: var(--bg); display: grid; gap: 8px; justify-items: start; }
.partner-pay p { margin: 0; }
.qpay-banks { display: flex; flex-wrap: wrap; gap: 8px; }
.qpay-banks a { display: grid; justify-items: center; gap: 2px; width: 64px; font-size: 10px; text-align: center; color: inherit; }
.qpay-banks img { border-radius: 10px; }
/* AI туслах */
.ai-widget { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 1200; font-family: inherit; }
.ai-fab { display: inline-flex; align-items: center; gap: 8px; height: 52px; padding: 0 18px; border: 0; border-radius: 999px;
    background: var(--ink); color: #fff; font-weight: 700; box-shadow: 0 10px 28px rgba(0,0,0,.25); cursor: pointer; }
.ai-fab .fa { color: var(--brand); font-size: 20px; }
.ai-fab:focus-visible, .ai-panel button:focus-visible, .ai-panel textarea:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.ai-widget.open .ai-fab { display: none; }
.ai-panel { position: fixed; right: max(12px, env(safe-area-inset-right, 0px)); bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    width: min(380px, calc(100vw - 24px)); height: min(580px, calc(100vh - 100px)); display: flex; flex-direction: column;
    background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 18px 50px rgba(0,0,0,.28); overflow: hidden; }
.ai-panel[hidden] { display: none; }
.ai-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; min-height: 0; background: var(--ink); color: #fff; }
.ai-head div { flex: 1 1 auto; display: grid; line-height: 1.2; }
.ai-head small { opacity: .7; font-size: 11px; }
.ai-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: var(--ink); display: inline-grid; place-items: center; }
.ai-close { background: none; border: 0; color: #fff; font-size: 18px; cursor: pointer; padding: 4px 8px; }
.ai-log { flex: 1 1 auto; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: var(--bg); }
.ai-msg { max-width: 85%; padding: 9px 12px; border-radius: 14px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.45; }
.ai-msg.bot { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.ai-msg.me { align-self: flex-end; background: #FFF4D6; border: 1px solid #F5D98A; border-bottom-right-radius: 4px; }
.ai-msg.typing { color: var(--muted); animation: ai-pulse 1s infinite alternate; }
@keyframes ai-pulse { from { opacity: .4; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ai-msg.typing { animation: none; } }
.ai-suggest { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px; background: var(--bg); }
.ai-suggest:not(:empty) { padding-bottom: 8px; }
.ai-suggest button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 11px; font: inherit; font-size: 13px; cursor: pointer; }
.ai-feedback { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 12px; border-top: 1px solid var(--line); font-size: 13px; }
.ai-feedback[hidden] { display: none; }
.ai-feedback span { flex: 1 1 auto; color: var(--muted); }
.ai-feedback button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 13px; cursor: pointer; }
.ai-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); background: #fff; }
.ai-form textarea { flex: 1 1 auto; min-width: 0; resize: none; border: 1px solid #D6D6DC; border-radius: 12px; padding: 9px 12px; font: inherit; max-height: 120px; margin: 0; }
.ai-form button { flex: none; width: 44px; border: 0; border-radius: 12px; background: var(--brand); color: var(--ink); font-size: 16px; cursor: pointer; }
@media (max-width: 767px) {
  .ai-widget.has-bottomnav { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
  .ai-fab { height: 48px; padding: 0 14px; }
  .ai-fab-label { display: none; }
  .ai-panel { right: 0; left: 0; bottom: 0; width: 100%; height: min(88vh, 640px); border-radius: 18px 18px 0 0;
      padding-bottom: env(safe-area-inset-bottom, 0px); }
}
/* AI туслахын түүх */
.ai-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 12px; }
.ai-stats .card-box { margin: 0; display: grid; gap: 2px; }
.ai-stats span { color: var(--muted); font-size: 12px; font-weight: 600; }
.ai-stats b { font-size: 24px; font-weight: 800; }
.ai-stats small { color: var(--muted); font-size: 12px; }
.ai-bar { height: 6px; border-radius: 999px; background: var(--bg); overflow: hidden; margin-top: 4px; }
.ai-bar i { display: block; height: 100%; background: var(--brand); }
.ai-warn { border: 2px solid #F5B800; }
.ai-q { max-width: 420px; white-space: normal; }
.ai-tool { max-width: 760px; font-size: 12px; color: var(--muted); }
.ai-tool pre { white-space: pre-wrap; font-size: 11px; background: var(--bg); padding: 8px; border-radius: 8px; max-height: 200px; overflow: auto; }
.ai-error { color: var(--bad); font-size: 13px; }
/* засварын түүх */
.ch-filters { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; }
.ch-filters label { display: grid; gap: 2px; margin: 0; font-size: 12px; color: var(--muted); font-weight: 600; }
.ch-filters select, .ch-filters input { height: 40px; border: 1px solid #D6D6DC; border-radius: 10px; padding: 0 8px; font: inherit; color: var(--ink); margin: 0; }
.ch-down-row td { background: #FDECEE; }
.ch-old { color: var(--muted); text-decoration: line-through; }
.diff-ok { color: var(--ok); }
.ch-list { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.ch-quick { display: flex; flex-wrap: wrap; gap: 6px; flex-basis: 100%; }
.ch-quick a { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 13px; }
.ch-quick a.on { background: var(--ink); color: #fff; }
.ch-cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 10px 0 14px; }
.ch-cat { display: grid; gap: 2px; padding: 10px 12px; border-radius: 14px; border: 2px solid transparent; background: #fff; box-shadow: 0 1px 0 var(--line);
    color: var(--ink) !important; text-decoration: none !important; }
.ch-cat span { font-size: 12.5px; font-weight: 700; }
.ch-cat b { font-size: 22px; font-weight: 800; line-height: 1.1; }
.ch-cat small { color: var(--muted); font-size: 11.5px; }
.ch-cat.on { border-color: var(--ink); }
.ch-cat.zero { opacity: .55; }
.ch-cat.k-all { background: var(--ink); color: #fff !important; }
.ch-cat.k-all.on { border-color: var(--brand); }
.ch-cat.k-owner { background: #E8EEF8; }
.ch-cat.k-payment { background: #FFF2CC; }
.ch-cat.k-down { background: #FDE8EC; color: #A3122A !important; }
.ch-cat.k-weight { background: #E2EFDA; }
.ch-day td { background: var(--bg); font-weight: 800; }
/* салбар шилжүүлэх */
.tr-howto ol { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 4px; }
.tr-item { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.tr-item:first-of-type { border-top: 0; }
.tr-info { display: grid; min-width: 0; }
.tr-info small { color: var(--muted); }
.tr-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tr-form select, .tr-form input[type=text] { height: 40px; border: 1px solid #D6D6DC; border-radius: 10px; padding: 0 8px; font: inherit; max-width: 100%; margin: 0; }
.tr-reason { max-width: 280px; white-space: normal; }
/* ажилтны заавар */
.guide .card-box { max-width: 820px; }
.guide .card-box h3 { margin-top: 0; font-size: 18px; font-weight: 800; }
.guide .card-box h3 .fa { color: var(--brand); width: 22px; }
.guide ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; line-height: 1.55; }
.guide-key { border: 2px solid var(--brand); }
.guide-soon p { margin: 0; color: var(--muted); }
/* тусламжийн чат */
.help-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.help-status { border-radius: 999px; padding: 3px 12px; font-size: 13px; font-weight: 700; background: var(--bg); }
.help-status.s-received { background: #FDE8EC; color: var(--bad); }
.help-status.s-read { background: #FFF4D6; color: #8A5A00; }
.help-status.s-replied { background: #E8EEF8; color: #2D5BA8; }
.help-status.s-resolved { background: #E6F2EA; color: var(--ok); }
.help-meta { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.help-images { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 8px; }
.help-images img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; }
.chat { display: grid; gap: 10px; margin: 14px 0; max-width: 760px; }
.chat-msg { max-width: 85%; justify-self: start; background: var(--surface, #fff); border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; padding: 10px 14px; }
.chat-msg.mine { justify-self: end; background: #FFF4D6; border-color: #F5D98A; border-radius: 16px 16px 4px 16px; }
.chat-who { font-size: 12px; font-weight: 700; color: var(--muted); }
.chat-text { white-space: normal; overflow-wrap: anywhere; }
.chat-time { font-size: 11px; color: var(--muted); text-align: right; margin-top: 2px; }
.chat-form { max-width: 760px; display: grid; gap: 8px; }
.chat-actions { display: flex; flex-wrap: wrap; gap: 8px; }
/* Утсан дээр хэрэглэгчийн карт хамгийн дээр гарна */
@media (max-width: 999px) { .ho-main, .ho-side { display: contents; } .ho-customer { order: -1; } }

/* ---------------------------------------------------------------- мэдээллийн самбар */
body.news-open { overflow: hidden; }
.news-modal { position: fixed; inset: 0; z-index: 300; background: rgba(17,17,17,.62); display: grid; place-items: center; padding: 16px; }
.news-card { position: relative; width: min(720px, 100%); max-height: calc(100dvh - 32px); background: #fff; border-radius: 20px;
    overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.news-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; flex: 1; }
.news-track::-webkit-scrollbar { display: none; }
.news-slide { flex: 0 0 100%; scroll-snap-align: center; overflow-y: auto; max-height: calc(100dvh - 90px);
    display: flex; flex-direction: column; justify-content: center; background: var(--bg); }
.news-slide > a { display: block; }
.news-slide img { display: block; width: 100%; height: auto; max-height: calc(100dvh - 110px); object-fit: contain; margin: 0 auto; }
.news-text, .news-actions { background: #fff; }
.news-video { position: relative; aspect-ratio: 16 / 9; background: #000; }
.news-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.news-text { padding: 16px 18px 6px; }
.news-text h3 { margin: 0 0 6px; font-weight: 800; }
.news-text p { color: var(--muted); }
.news-actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 6px 18px 16px; }
.news-close { position: absolute; top: 10px; right: 10px; z-index: 2; width: 38px; height: 38px; border-radius: 50%; border: 0;
    background: rgba(17,17,17,.75); color: #fff; font-size: 18px; display: grid; place-items: center; cursor: pointer; }
.news-close:hover, .news-close:focus-visible { background: var(--ink); outline: 2px solid var(--brand); }
.news-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 38px; height: 38px; border-radius: 50%; border: 0;
    background: rgba(255,255,255,.92); color: var(--ink); box-shadow: 0 4px 12px rgba(0,0,0,.2); display: none; place-items: center; cursor: pointer; }
.news-nav.prev { left: 10px; }
.news-nav.next { right: 10px; }
@media (hover: hover) and (min-width: 600px) { .news-nav { display: grid; } }
.news-dots { display: flex; justify-content: center; gap: 6px; padding: 10px; background: #fff; }
.news-dots button { width: 8px; height: 8px; border-radius: 999px; border: 0; background: #D6D6DC; padding: 0; transition: width .2s; cursor: pointer; }
.news-dots button.on { width: 22px; background: var(--brand); }
.news-admin-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.news-admin-item { display: grid; grid-template-columns: 70px minmax(0, 1fr);  gap: 12px; align-items: center; margin: 0; }
.news-admin-item img { width: 70px; height: 50px; object-fit: cover; border-radius: 8px; }
.news-admin-item .rep-export { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
@media (min-width: 600px) { .news-admin-item { grid-template-columns: 90px minmax(0, 1fr) auto; } .news-admin-item img { width: 90px; height: 60px; } .news-admin-item .rep-export { grid-column: auto; } }
.news-admin-item.inactive { opacity: .55; }
.news-admin-item form { margin: 0; }
.news-form textarea { width: 100%; border: 1px solid #D6D6DC; border-radius: 10px; padding: 10px; font: inherit; }
.news-form input[type=text], .news-form input[type=url], .news-form input[type=number], .news-form input[type=datetime-local] {
    height: 40px; border: 1px solid #D6D6DC; border-radius: 10px; padding: 0 10px; width: 100%; }
@media (min-width: 900px) { .news-admin-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

/* ---------------------------------------------------------------- бонус */
.bonus-hero { display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; align-items: flex-end; color: #fff; border-radius: 22px;
    padding: 26px 22px; margin-bottom: 14px; background: radial-gradient(circle at 90% 0%, rgba(252,169,0,.35), transparent 55%), #111; }
.bonus-hero p { color: #c9c9cf; margin: 6px 0 0; max-width: 520px; }
.bonus-hero p b { color: #fff; }
.bonus-balance { font-size: 46px; font-weight: 800; letter-spacing: -.03em; color: var(--brand); line-height: 1.1; font-variant-numeric: tabular-nums; }
.bonus-balance small { font-size: 24px; margin-left: 2px; }
.bonus-split { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; max-width: 480px; }
.bonus-split div { background: rgba(255,255,255,.08); border-radius: 14px; padding: 10px 12px; min-width: 0; }
.bonus-split span { display: block; color: #b9b9c0; font-size: 12px; }
.bonus-split b { font-size: 17px; }
.invite { display: grid; gap: 12px; }
.invite h3 { margin: 0 0 4px; font-weight: 800; }
.invite h3 .fa { color: var(--brand); }
.invite-link { display: flex; gap: 8px; }
.invite-link input { flex: 1; min-width: 0; height: 46px; border: 1px solid #D6D6DC; border-radius: 12px; padding: 0 12px; font: inherit; font-weight: 700; background: var(--bg); }
.share-row { display: flex; flex-wrap: wrap; gap: 8px; }
.share-btn { display: inline-flex; gap: 8px; align-items: center; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 9px 14px;
    font-weight: 700; color: var(--ink); text-decoration: none !important; font-size: 14px; }
.share-btn:hover { border-color: var(--ink); color: var(--ink); }
.share-btn.fb { background: #1877F2; border-color: #1877F2; color: #fff; }
.bonus-kind { display: inline-block; border-radius: 999px; padding: 1px 8px; font-size: 11.5px; font-weight: 700; margin-right: 4px; background: var(--bg); }
.bk-earn { background: #E6F2EA; color: var(--ok); }
.bk-referral { background: var(--brand-soft); color: #8A5C00; }
.bk-spend { background: #FDE8EC; color: var(--bad); }
.invite-note { background: var(--brand-soft); border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; }
.pay-bar { position: sticky; bottom: 76px; z-index: 40; display: flex; gap: 12px; align-items: center; justify-content: space-between;
    background: var(--ink); color: #fff; border-radius: 16px; padding: 10px 12px 10px 16px; margin-top: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.pay-bar .btn { white-space: nowrap; }
.pay-bar[hidden] { display: none; }
.pay-pick { width: 18px; height: 18px; vertical-align: middle; accent-color: var(--ink); }
@media (min-width: 768px) { .pay-bar { bottom: 16px; } }
.bonus-use { display: flex; gap: 10px; align-items: center; background: var(--brand-soft); border-radius: 12px; padding: 10px 14px; margin: 8px 0; font-weight: 600; cursor: pointer; }
.bonus-use input { width: 20px; height: 20px; accent-color: var(--ink); }

/* ---------------------------------------------------------------- касс */
.kind-chip { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 700; background: var(--bg); white-space: nowrap; }
.kind-cash { background: #E6F2EA; color: var(--ok); }
.kind-pos { background: #E8EEF8; color: #2D5BA8; }
.kind-bank { background: var(--brand-soft); color: #8A5C00; }
.kind-qpay { background: #FDE8EC; color: #B4234B; }
.close-form { display: flex; gap: 6px; align-items: center; margin: 0; }
.close-form input { width: 140px; height: 34px; border: 1px solid #D6D6DC; border-radius: 8px; padding: 0 8px; font: inherit; }
.diff-ok { color: var(--ok); font-weight: 700; }
.diff-bad { color: var(--bad); }
.diff-warn { color: #B87800; }
.wallet-form .rf-check { flex: 0 0 auto; min-width: 0; }
.wallet-form .rf-check input { width: 20px; height: 20px; }
.wallet-form select, .wallet-form input[type=text] { height: 40px; border: 1px solid #D6D6DC; border-radius: 10px; padding: 0 10px; width: 100%; }

/* ---------------------------------------------------------------- ажилчид */
.role-chip { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 12.5px; font-weight: 700; background: var(--bg); }
.role-director { background: var(--ink); color: var(--brand); }
.role-manager { background: var(--brand); }
.role-cashier { background: #E6F2EA; color: var(--ok); }
.role-courier { background: #E8EEF8; color: #2D5BA8; }
.staff-form { display: grid; gap: 16px; }
.staff-form fieldset { border: 0; padding: 0; margin: 0; }
.staff-form legend { font-size: 16px; font-weight: 800; border: 0; margin-bottom: 8px; }
.role-options { display: grid; gap: 8px; }
.role-option { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 0; cursor: pointer; font-weight: 400; }
.role-option:has(input:checked) { border-color: var(--ink); background: var(--brand-soft); }
.role-option input { margin-top: 4px; accent-color: var(--ink); }
.role-option b { display: block; }
.role-option small { color: var(--muted); }
.branch-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.branch-options label { display: flex; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 0; font-weight: 600; }
.branch-options input { accent-color: var(--ink); }

/* ---------------------------------------------------------------- профайл */
.avatar-sm { width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: var(--ink); display: inline-grid; place-items: center;
    font-weight: 800; font-size: 14px; overflow: hidden; flex: 0 0 32px; }
.avatar-sm img, .avatar-big img { width: 100%; height: 100%; object-fit: cover; }
.topnav .avatar-btn { padding: 0; }
.drawer .who { display: flex !important; gap: 12px; align-items: center; text-decoration: none; }
.drawer .who .avatar-sm { width: 44px; height: 44px; flex-basis: 44px; font-size: 18px; }
.drawer .who b { display: block; color: var(--ink); }
.drawer .who small { display: block; color: var(--muted); font-weight: 500; }
.profile { max-width: 640px; margin: 0 auto; }
.profile .card-box h3 { margin: 0 0 12px; font-size: 17px; font-weight: 800; }
.profile .card-box h3 .fa { color: var(--brand); width: 20px; }
.profile-head { display: flex; gap: 18px; align-items: center; }
.avatar-big { position: relative; width: 92px; height: 92px; flex: 0 0 92px; border-radius: 50%; background: var(--brand); display: grid; place-items: center;
    cursor: pointer; margin: 0; overflow: visible; }
.avatar-big img { border-radius: 50%; }
.avatar-big span { font-size: 38px; font-weight: 800; }
.avatar-big input[type="file"] { display: none !important; }
.avatar-big span .fa { font-size: 38px; }
.avatar-cam { position: absolute; right: -2px; bottom: -2px; width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #fff;
    display: grid; place-items: center; font-size: 14px; border: 3px solid #fff; }
.avatar-form { margin: 0; }
.profile-who h1 { font-size: 22px; font-weight: 800; margin: 0 0 4px; }
.profile-who p { margin: 0 0 4px; color: var(--muted); }
.verified { color: var(--ok); font-size: 12.5px; font-weight: 700; margin-left: 6px; white-space: nowrap; }
.unverified { color: #B87800; font-size: 12.5px; font-weight: 700; margin-left: 6px; }
.email-pref { margin-top: 12px; }
.email-pref label { display: flex; gap: 10px; align-items: center; font-weight: 600; cursor: pointer; margin: 0; }
.email-pref input { width: 20px; height: 20px; accent-color: var(--ink); }
.pform { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; font: inherit; font-size: 13px; cursor: pointer; }
.link-btn.danger { color: var(--bad); }
.pdetails summary { cursor: pointer; font-weight: 700; margin-bottom: 10px; color: var(--ink); }
.plinks { padding: 6px !important; }
.plinks a, .plinks button { display: flex; gap: 12px; align-items: center; width: 100%; padding: 13px 12px; border-radius: 12px; text-decoration: none;
    color: var(--ink); font-weight: 600; background: none; border: 0; font: inherit; text-align: left; }
.plinks a:hover, .plinks button:hover { background: var(--bg); }
.plinks .fa:first-child { width: 22px; text-align: center; color: var(--muted); }
.plinks .fa-angle-right { margin-left: auto; color: var(--muted); }
.plinks form { margin: 0; }
.danger-zone { margin: 26px 0 10px; color: var(--muted); font-size: 13px; text-align: center; }
.danger-zone summary { cursor: pointer; list-style: none; text-decoration: underline; }
.danger-zone summary::-webkit-details-marker { display: none; }
.danger-zone[open] { text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.danger-zone[open] summary { margin-bottom: 8px; text-decoration: none; font-weight: 700; color: var(--ink); }

/* ---------------------------------------------------------------- заавар, өгүүлбэр */
#toast { position: fixed; left: 50%; bottom: 90px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 10px 18px;
    border-radius: 999px; font-weight: 700; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 200; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.help-hero { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; justify-content: space-between; background: #111; color: #fff;
    border-radius: 22px; padding: 26px 22px; margin-bottom: 20px;
    background: radial-gradient(circle at 90% 0%, rgba(252,169,0,.3), transparent 50%), #111; }
.help-hero h1 { color: #fff; font-size: 30px; font-weight: 800; margin: 0 0 6px; letter-spacing: -.02em; }
.help-hero p { color: #c9c9cf; margin: 0; max-width: 560px; }
.help-search { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 14px; padding: 0 14px; flex: 1 1 260px; max-width: 380px; margin: 0; }
.help-search .fa { color: var(--muted); }
.help-search input { border: 0; outline: none; height: 46px; flex: 1; min-width: 0; font: inherit; color: var(--ink); background: none; }
.help-layout { display: grid; grid-template-columns: 1fr; gap: 20px; }
.help-group { font-size: 18px; font-weight: 800; margin: 6px 0 12px; }
.help-group .fa { color: var(--brand); margin-right: 4px; }
.vgroup { margin-bottom: 22px; }
.vgrid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.vcard { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px;
    text-decoration: none !important; color: var(--ink); transition: border-color .15s, transform .15s; }
.vcard:hover { border-color: var(--ink); transform: translateY(-1px); color: var(--ink); }
.vplay { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 50%; background: var(--brand); display: grid; place-items: center; font-size: 16px; padding-left: 3px; }
.vtext { flex: 1; min-width: 0; }
.vtext small { display: block; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.vtext b { display: block; line-height: 1.35; }
.vgo { color: var(--muted); font-size: 13px; white-space: nowrap; }
.help-side .card-box h3 { margin-top: 0; font-size: 16px; font-weight: 800; }
.help-side .card-box h3 .fa { color: var(--brand); }
.help-none { color: var(--muted); text-align: center; padding: 30px; }
.sgrid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.scard { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px 18px 16px; display: flex; flex-direction: column; }
.snum { position: absolute; top: 14px; right: 16px; color: #D6D6DC; font-weight: 800; font-size: 20px; }
.smn { font-weight: 700; margin: 0 28px 10px 0; }
.szh { font-size: 17px; line-height: 1.6; background: var(--brand-soft); border-radius: 12px; padding: 10px 12px; margin: 0 0 12px;
    font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif; }
.scard .scopy { margin-top: auto; }
.scopy { align-self: flex-start; }
.scopy.copied { background: var(--ok) !important; border-color: var(--ok) !important; color: #fff !important; }
.scopy.copied .fa::before { content: "\f00c"; }
@media (min-width: 768px) {
    .vgrid, .sgrid { grid-template-columns: repeat(2, 1fr); }
    .help-hero { padding: 34px 36px; }
}
@media (min-width: 1100px) {
    .help-layout { grid-template-columns: 1fr 320px; }
    .sgrid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------------------------------------------------------------- тайлан */
.page-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; justify-content: space-between; margin: 4px 0 16px; }
.page-head h1 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 4px; }
.page-head h1 .fa { color: var(--brand); }
.page-head p { color: var(--muted); margin: 0; }
.rep-group { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 22px 0 10px; font-weight: 800; }
.rep-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.rep-card { display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 16px;
    padding: 16px; text-decoration: none !important; color: var(--ink); transition: border-color .15s, transform .15s, box-shadow .15s; }
.rep-card:hover { border-color: var(--ink); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(17,17,17,.06); color: var(--ink); }
.rep-card > .fa:first-child { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 14px; display: grid; place-items: center;
    background: var(--brand-soft); color: #B87800; font-size: 20px; }
.rep-card b { display: block; font-size: 16px; }
.rep-card span { color: var(--muted); font-size: 13px; line-height: 1.4; display: block; }
.rep-card .rep-go { margin-left: auto; color: var(--muted); font-size: 20px; }

.rep-layout { display: grid; grid-template-columns: 1fr; gap: 18px; }
.rep-side { display: none; }
.rep-main { min-width: 0; }
.rep-export { display: flex; gap: 8px; }
.rep-export .btn { padding: 9px 14px; }
.btn-success { background: #1D6F42; border-color: #1D6F42; color: #fff; }
.btn-success:hover, .btn-success:focus { background: #155232; border-color: #155232; color: #fff; }

.rep-filters, .expense-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; background: #fff; border: 1px solid var(--line);
    border-radius: 16px; padding: 12px; margin-bottom: 14px; }
.rf-field { display: flex; flex-direction: column; gap: 4px; min-width: 150px; flex: 1 1 150px; }
.rf-field.rf-wide { flex: 3 1 260px; }
.rf-field[hidden] { display: none; }
.rf-field label { font-size: 12px; font-weight: 700; color: var(--muted); margin: 0; }
.rf-field select, .rf-field input { height: 40px; border: 1px solid #D6D6DC; border-radius: 10px; padding: 0 10px; background: #fff; font: inherit; width: 100%; min-width: 0; }
.rf-dates > div { display: flex; gap: 6px; align-items: center; }
.rf-actions { display: flex; gap: 6px; }
.rf-actions .btn { height: 40px; }
.rep-note { background: var(--brand-soft); border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; color: #5c4300; }

.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px; min-width: 0; }
.kpi span { display: block; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.kpi b { display: block; font-size: clamp(15px, 1.3vw, 20px); font-weight: 800; letter-spacing: -.02em; margin: 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi small { color: var(--muted); font-size: 12px; }
.kpi-brand { background: var(--ink); border-color: var(--ink); }
.kpi-brand span, .kpi-brand small { color: #b9b9c0; }
.kpi-brand b { color: var(--brand); }
.kpi-good b { color: var(--ok); }
.kpi-bad b { color: var(--bad); }

.charts { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 14px; }
.chart-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px; min-width: 0; }
.chart-card h4 { margin: 0 0 10px; font-weight: 800; }
.vbars { display: flex; align-items: flex-end; gap: 3px; height: 170px; padding-bottom: 18px; overflow-x: auto; }
.vbar { flex: 1 0 8px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.vbar i { display: block; width: 100%; background: var(--brand); border-radius: 4px 4px 0 0; min-height: 0; }
.vbar i.neg { background: var(--bad); }
.vbar:hover i { background: var(--ink); }
.vbar span { position: absolute; bottom: -17px; font-size: 9.5px; color: var(--muted); white-space: nowrap; }
.vbars .vbar:not(:first-child):not(:last-child) span { visibility: hidden; }
.vbars .vbar:hover span { visibility: visible; color: var(--ink); font-weight: 700; z-index: 1; background: #fff; }
.hbars { display: flex; flex-direction: column; gap: 7px; }
.hbar { display: grid; grid-template-columns: minmax(80px, 34%) 1fr auto; gap: 8px; align-items: center; font-size: 13px; }
.hbar-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-t { background: var(--bg); border-radius: 6px; height: 12px; overflow: hidden; }
.hbar-t i { display: block; height: 100%; background: var(--brand); border-radius: 6px; }
.hbar-t i.neg { background: var(--bad); }
.hbar-v { font-weight: 700; white-space: nowrap; }

.rep-table { padding: 0 !important; overflow: hidden; }
.rep-table-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 10px; gap: 10px; }
.rep-table-head h3 { margin: 0; font-size: 17px; font-weight: 800; }
.rep-table-head span { color: var(--muted); font-size: 13px; }
.rtable { margin: 0 !important; font-size: 13.5px; }
.rtable thead th { background: #FAFAFB; color: var(--muted); font-size: 12px; font-weight: 700; border-bottom: 1px solid var(--line) !important;
    border-top: 0 !important; white-space: nowrap; position: sticky; top: 0; }
.rtable td { border-top: 1px solid #F0F0F3 !important; vertical-align: middle !important; }
.rtable tbody tr:hover td { background: #FFFBEF; }
.rtable tfoot td { font-weight: 800; background: var(--brand-soft); border-top: 2px solid var(--brand) !important; }
.rtable .k-money, .rtable .k-int, .rtable .k-pct { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rtable .k-date, .rtable .k-datetime { white-space: nowrap; }
.rep-more, .rep-empty { color: var(--muted); padding: 10px 16px 14px; margin: 0; font-size: 13px; }

@media (min-width: 768px) {
    .rep-grid { grid-template-columns: repeat(2, 1fr); }
    .kpis { grid-template-columns: repeat(3, 1fr); }
    .charts { grid-template-columns: repeat(2, 1fr); }
    .chart-card.chart-h:only-child, .charts .chart-card:only-child { grid-column: 1 / -1; }
}
@media (min-width: 1100px) {
    .rep-grid { grid-template-columns: repeat(3, 1fr); }
    .kpis { grid-template-columns: repeat(5, 1fr); }
    .rep-layout { grid-template-columns: 210px 1fr; }
    .rep-side { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 80px; align-self: start; }
    .rep-side a { padding: 9px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 14px; }
    .rep-side a .fa { width: 20px; color: var(--muted); }
    .rep-side a:hover { background: #fff; }
    .rep-side a.active { background: var(--ink); color: #fff; }
    .rep-side a.active .fa { color: var(--brand); }
    .rep-side .rep-side-head { color: var(--muted); font-size: 13px; margin-bottom: 6px; }
}
@media print {
    .rep-side, .rep-filters, .rep-export, .topbar, .footer, .bottomnav { display: none !important; }
    .rep-layout { display: block; }
    .kpis { grid-template-columns: repeat(4, 1fr); }
    .rep-table { break-inside: auto; }
    .rtable thead th { position: static; }
}

/* ---------------------------------------------------------------- утас */
@media (max-width: 767px) {
    .page { padding: 12px 12px 90px; }
    .page .row { margin-left: -6px; margin-right: -6px; }
    .page .row > [class*="col-"] { padding-left: 6px; padding-right: 6px; }
    .page .table-responsive { width: 100%; overflow-x: auto; border: 0; }
    .page .table-responsive td, .page .table-responsive th { white-space: nowrap; }
    .topnav .nav-link { display: none; }
    .menu-toggle { display: grid; }
    .has-bottomnav .bottomnav { display: flex; }
    .map_side_sec, .card-box { padding: 14px; border-radius: 12px; }
    h2 { font-size: 19px; }
    .column-hide-xs { display: none !important; }
    .mobile-show { display: block; color: var(--muted); font-size: 13px; }

    /* Хүснэгтийг карт болгоно: мөр бүр нэг карт */
    .product-table, .product_list, .product-table > tbody, .product_list > tbody { display: block; width: 100% !important; }
    .product-table, .product_list { border: 0; background: none; border-radius: 0; overflow: visible; }
    .product-table tr:first-child:has(th), .product_list tr:first-child:has(th) { display: none; }
    .product-table tr, .product_list tr {
        display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; background: #fff; border: 1px solid var(--line);
        border-radius: 12px; padding: 10px 12px; margin-bottom: 8px;
    }
    .product-table td, .product_list td { display: block; border: 0; padding: 2px 0; text-align: left !important; width: auto !important; }
    .product-table td:empty, .product_list td:empty { display: none; }
    /* Карт бүхэлдээ төлөвийн өнгөөр (компьютерийн хүснэгттэй ижил), нүднүүд тунгалаг */
    .product-table tr[class*="status-"] { border-left: 4px solid var(--line); }
    .product-table tr.status-0 { background: var(--st-registered); border-left-color: var(--st-registered-dot); }
    .product-table tr.status-1 { background: var(--st-ereen); border-left-color: var(--st-ereen-dot); }
    .product-table tr.status-2 { background: var(--st-arrived); border-left-color: var(--st-arrived-dot); }
    .product-table tr.status-3 { background: var(--st-paid); border-left-color: var(--st-paid-dot); }
    .product-table tr.status-4 { background: var(--st-done); border-left-color: var(--st-done-dot); }
    .product-table tr[class*="status-"] td { background: transparent; }
    .product-table tr[class*="status-"] td:first-child { box-shadow: none; }
    /* PP-ийн дэд толгой: карт биш, бүтэн өргөнтэй шугам */
    .product-table tr.pp-sub { display: block; margin: 12px 0 6px; padding: 8px 12px; border: 0; border-radius: 10px;
        background: #E9EDF4 !important; box-shadow: none; }
    .product-table tr.pp-sub td { display: block; padding: 0; background: transparent; border: 0; font-size: 13px; text-align: left !important; }
    .product-table tr.group-row, .product-table tr.group-row[class*="status-"] { background: var(--ink) !important; border-color: var(--ink); margin-top: 14px; }
    .product-table tr.group-row td { background: none !important; color: #fff; }
    .product-table tr.group-row td a { color: var(--brand); }
    .product-table td { min-width: 0; overflow-wrap: anywhere; }
    .product-table tr.group-row a button { width: auto !important; }
    .product-table td:last-child:has(a, form, button) { margin-left: auto; }
    .table-responsive { border: 0; }
}
@media (min-width: 768px) {
    /* Өргөн дэлгэцэнд цэс дээд мөрөнд багтвал гулсдаг цэс хэрэггүй; багтахгүй үед (nav-collapsed) ☰-оор нээгдэнэ */
    body:not(.nav-collapsed) .drawer, body:not(.nav-collapsed) .drawer-backdrop { display: none !important; }
}

/* Хэвлэх үед цэсгүй */
@media print {
    .topbar, .bottomnav, .drawer, .footer, .hidden-print { display: none !important; }
    body { background: #fff; }
}
