/* Ажилд орох анкет — нээлттэй хуудас (n5). --brand нь тохиргооноос (/admin/system), хар цагаан нь суурь. */
:root { --brand: #2F6B2F; --ink: #1C2B1C; --muted: #4E5E4B; --line: #C9D6C2; --line2: #DDE7D7; --bg: #F4F8F1; --soft: color-mix(in srgb, var(--brand) 12%, #fff); --bad: #A12A1C; --bad-bg: #F6E3DF; }
* { box-sizing: border-box; }
body { margin: 0; font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.45; -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }
a { color: var(--brand); }
.ap-head { background: #fff; border-bottom: 1px solid var(--line2); }
.ap-head-in { max-width: 1080px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; gap: 14px; }
.ap-logo { width: 52px; height: 52px; object-fit: contain; flex: none; }
.ap-title { font-size: 20px; font-weight: 800; color: var(--brand); }
.ap-hint { font-size: 13px; color: var(--muted); }
.ap-pre { white-space: pre-wrap; }
.ap-wrap { max-width: 1080px; margin: 0 auto; padding: 16px; display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.ap-one { max-width: 640px; }
.ap-one .ap-sec { width: 100%; }
.ap-side { flex: 1 1 230px; max-width: 270px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.ap-side-note { margin: 0; padding: 0 6px; }
.ap-steps { background: #fff; border: 1px solid var(--line2); border-radius: 16px; padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.ap-stp { font: inherit; display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; border: 0; background: transparent; padding: 7px 8px; border-radius: 10px; color: inherit; cursor: pointer; font-size: 14px; font-weight: 600; min-height: 40px; }
.ap-stp .n { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; flex: none; background: var(--line2); }
.ap-stp.on { background: var(--soft); font-weight: 800; }
.ap-stp.on .n { background: var(--ink); color: #fff; }
.ap-stp.ok .n { background: var(--brand); color: #fff; }
.ap-main { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 14px; margin: 0; }
.ap-sec { background: #fff; border: 1px solid var(--line2); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 16px; }
.ap-h1 { margin: 0; font-size: 22px; font-weight: 800; outline: none; }
.ap-f { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ap-lab { font-size: 14px; font-weight: 700; }
.ap-inp { font: inherit; font-size: 16px; font-weight: 400; min-height: 48px; border: 1.5px solid var(--line); border-radius: 12px; padding: 0 14px; background: #fff; color: var(--ink); width: 100%; min-width: 0; }
.ap-inp:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--soft); }
.ap-inp[readonly] { background: var(--bg); }
textarea.ap-inp { padding: 12px 14px; min-height: 84px; resize: vertical; }
.ap-file { padding: 10px 14px; }
.ap-up { text-transform: uppercase; }
.ap-bad { font-size: 13px; color: var(--bad); font-weight: 700; }
.ap-g2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.ap-g3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.ap-photo { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.ap-photo-box { width: 96px; height: 120px; border-radius: 12px; background: var(--soft); border: 1.5px dashed var(--brand); color: var(--brand); display: flex; align-items: center; justify-content: center; overflow: hidden; flex: none; }
.ap-photo-box img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ap-grow { flex: 1 1 220px; }
.ap-opt { position: relative; display: flex; flex-direction: column; gap: 4px; font-size: 15px; min-height: 48px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; padding: 12px 14px; cursor: pointer; color: inherit; text-decoration: none; }
.ap-opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.ap-opt:has(input:checked) { border-color: var(--brand); background: var(--soft); box-shadow: inset 0 0 0 1px var(--brand); }
.ap-opt:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--soft); }
.ap-opt-t { font-size: 17px; font-weight: 800; }
.ap-opt-s .ap-opt-t { font-size: 15px; font-weight: 700; }
.ap-pay { font-size: 13px; font-weight: 700; color: var(--brand); }
.ap-check { display: flex; gap: 12px; align-items: center; min-height: 44px; font-size: 15px; font-weight: 700; cursor: pointer; }
.ap-check.ap-top { align-items: flex-start; font-size: 14px; font-weight: 600; min-height: 0; }
.ap-check input { width: 22px; height: 22px; flex: none; accent-color: var(--brand); margin: 0; }
.ap-rep { border: 1.5px dashed var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 14px; background: #FAFCF8; margin-bottom: 12px; }
.ap-rep-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ap-add { font: inherit; font-size: 15px; font-weight: 800; min-height: 48px; border: 1.5px dashed var(--brand); border-radius: 12px; background: #fff; color: var(--brand); cursor: pointer; width: 100%; }
.ap-rm { font: inherit; font-size: 13px; font-weight: 700; min-height: 36px; padding: 0 12px; border: 0; border-radius: 8px; background: var(--bad-bg); color: var(--bad); cursor: pointer; }
.ap-rowline { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
.ap-rowname { flex: 1 1 170px; font-weight: 700; font-size: 15px; }
.ap-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ap-chip { position: relative; }
.ap-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; width: 100%; height: 100%; cursor: pointer; }
.ap-chip span { display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; }
.ap-chip-n span { width: 44px; padding: 0; }
.ap-chip input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.ap-chip input:focus-visible + span { box-shadow: 0 0 0 3px var(--soft); }
.ap-levels { flex: 1 1 280px; display: flex; border-radius: 10px; overflow: hidden; }
.ap-lv { font: inherit; font-size: 13px; font-weight: 700; min-height: 40px; padding: 0 6px; border: 1.5px solid var(--line); background: #fff; color: inherit; cursor: pointer; flex: 1; min-width: 0; margin-left: -1.5px; }
.ap-lv:first-child { margin-left: 0; }
.ap-lv.on { background: var(--brand); border-color: var(--brand); color: #fff; }
#prog-rows { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.ap-consent { background: #FAFCF8; border: 1.5px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.ap-policy summary { font-size: 13px; font-weight: 700; color: var(--brand); cursor: pointer; min-height: 28px; }
.ap-nav { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.ap-next { font: inherit; font-size: 17px; font-weight: 800; min-height: 54px; padding: 0 26px; border: 0; border-radius: 14px; background: var(--brand); color: #fff; cursor: pointer; flex: 1 1 200px; }
.ap-next:disabled { background: color-mix(in srgb, var(--brand) 40%, #fff); cursor: not-allowed; }
.ap-back { font: inherit; font-size: 15px; font-weight: 700; min-height: 54px; padding: 0 20px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; color: inherit; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.ap-err { background: var(--bad-bg); color: var(--bad); font-weight: 700; font-size: 14px; border-radius: 12px; padding: 12px 14px; }
.ap-note { background: var(--soft); font-size: 14px; border-radius: 12px; padding: 10px 14px; }
.ap-link { font: inherit; background: none; border: 0; padding: 0; color: var(--brand); font-weight: 700; text-decoration: underline; cursor: pointer; }
.ap-done { align-items: center; text-align: center; padding: 36px 18px; }
.ap-tick { width: 84px; height: 84px; border-radius: 50%; background: var(--soft); color: var(--brand); display: flex; align-items: center; justify-content: center; }
.ap-no { font-size: 24px; font-weight: 800; letter-spacing: .04em; color: var(--brand); }
.ap-w { max-width: 440px; }
.ap-hp { position: absolute; left: -9999px; height: 1px; overflow: hidden; }
@media (max-width: 720px) {
    .ap-wrap { padding: 12px; gap: 12px; }
    .ap-side { max-width: 100%; flex-basis: 100%; }
    .ap-steps { flex-direction: row; overflow-x: auto; padding: 8px; gap: 4px; scrollbar-width: none; }
    .ap-stp { width: auto; flex: none; padding: 4px; min-height: 36px; }
    .ap-stp .t { display: none; }
    .ap-stp.on { padding-right: 10px; }
    .ap-stp.on .t { display: inline; white-space: nowrap; }
    .ap-side-note { display: none; }
    .ap-sec { padding: 14px; }
    .ap-logo { width: 44px; height: 44px; }
    .ap-title { font-size: 18px; }
    .ap-h1 { font-size: 20px; }
}

/* Desktop #970: уугуул файл талбарын оронд товч (static/js/fileinput.js) */
.fi-wrap { position: relative; display: flex; align-items: center; gap: 10px; min-width: 0; max-width: 100%; }
.fi-native { position: absolute; left: 0; bottom: 0; width: 1px !important; height: 1px !important; min-width: 0 !important; min-height: 0 !important; opacity: 0; overflow: hidden; padding: 0 !important; border: 0 !important; }
.fi-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; flex: none; cursor: pointer; white-space: nowrap;
    border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font-size: 15px; font-weight: 600; }
.fi-wrap:focus-within .fi-btn { outline: 2px solid var(--brand); outline-offset: 1px; }
.fi-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; color: var(--muted); }
.fi-name:empty { display: none; }
.fi-wrap.has .fi-name { color: var(--brand); font-weight: 600; }
