/* Local, self-contained iframe UI. Official Bitrix CSS is an enhancement, never a prerequisite. */
:root { --yb-accent: var(--ui-color-primary, #2fc6f6); --yb-text: var(--ui-color-text-primary, #333); --yb-muted: #687580; --yb-border: var(--ui-color-base-20, #dfe0e3); --yb-surface: #fff; --yb-bg: #eef2f4; --yb-focus: #087da8; --yb-radius: var(--ui-border-radius-sm, 8px); }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
.yb-app { margin: 0; min-width: 280px; background: var(--yb-bg); color: var(--yb-text); font: 14px/1.55 "Open Sans", "Segoe UI", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
.yb-app button, .yb-app input, .yb-app select { font: inherit; }
.yb-app button { cursor: pointer; }
.yb-app button:disabled { cursor: default; opacity: .55; }
.yb-app :focus-visible { outline: 3px solid var(--yb-focus); outline-offset: 3px; }
.yb-shell { max-width: 1160px; padding: 24px 28px 16px; margin: 0 auto; }
.yb-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.yb-portal .yb-header { padding: 18px 22px; margin-bottom: 0; background: var(--yb-surface); border-radius: var(--yb-radius) var(--yb-radius) 0 0; }
.yb-brand { display: flex; align-items: center; gap: 13px; }
.yb-brand-mark { display: grid; place-items: center; flex: 0 0 44px; height: 44px; border-radius: 50%; color: #705713; background: #ffdf76; font-size: 25px; font-weight: 700; }
.yb-eyebrow { display: block; margin-bottom: 5px; color: #74828c; font-size: 10px; line-height: 1.5; font-weight: 700; letter-spacing: 1.4px; }
.yb-app h1, .yb-app h2, .yb-app h3 { color: #26333d; font-weight: 600; }
.yb-app h1 { margin: 0; font-size: 24px; line-height: 1.3; font-weight: 400; }
.yb-app h2 { margin: 0 0 14px; font-size: 20px; line-height: 1.35; }
.yb-app h3 { margin: 0; font-size: 16px; }
.yb-app p { margin: 0 0 16px; overflow-wrap: anywhere; }
.yb-person { display: flex; gap: 9px; align-items: center; font-size: 12px; }
.yb-person strong, .yb-person span:not(.yb-person-dot) { display: block; }
.yb-person strong { max-width: 230px; overflow-wrap: anywhere; font-weight: 600; }
.yb-person span { color: var(--yb-muted); }
.yb-person-dot { position: relative; flex: 0 0 34px; height: 34px; border-radius: 50%; background: #e4f6fc; }
.yb-person-dot::before { content: ""; position: absolute; top: 7px; left: 13px; width: 8px; height: 8px; border-radius: 50%; background: #55b5d6; }
.yb-person-dot::after { content: ""; position: absolute; bottom: 7px; left: 9px; width: 16px; height: 9px; border-radius: 9px 9px 4px 4px; background: #55b5d6; }
.yb-pill { display: inline-block; padding: 5px 10px; border-radius: 20px; color: #627482; background: #edf1f4; font-size: 11px; font-weight: 600; white-space: nowrap; }
.yb-pill-blue { color: #1e7798; background: #e9f8fd; }
.yb-pill-success { color: #47721c; background: #eef7e1; }
.yb-pill-error { color: #ab3538; background: #fff0ef; }
.yb-tabs { display: flex; gap: 28px; padding: 0 22px; background: var(--yb-surface); border-top: 1px solid #f1f3f5; border-bottom: 1px solid #dfe5e9; border-radius: 0 0 var(--yb-radius) var(--yb-radius); margin-bottom: 20px; }
.yb-tab { border: 0; border-bottom: 3px solid transparent; background: transparent; color: #687784; padding: 14px 2px 12px; font-weight: 600 !important; }
.yb-tab:hover { color: #14799e; }
.yb-tab[aria-selected="true"] { color: #14799e; border-color: var(--yb-accent); }
.yb-grid { display: grid; grid-template-columns: minmax(0, 1fr) 285px; align-items: start; gap: 20px; }
.yb-card { min-width: 0; background: var(--yb-surface); padding: 24px; border: 1px solid #e5e9ec; border-radius: var(--yb-radius); box-shadow: 0 1px 3px #20384c03; }
.yb-card-small { padding: 22px; }
.yb-card-small h2 { font-size: 17px; }
.yb-card-small p, .yb-instructions { color: var(--yb-muted); font-size: 13px; }
.yb-side { display: grid; gap: 18px; }
.yb-section-heading { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; }
.yb-section-heading h2 { margin-bottom: 0; }
.yb-section-heading .yb-pill { margin-top: 2px; }
.yb-muted { color: var(--yb-muted); }
.yb-context { padding: 10px 12px; border-left: 3px solid var(--yb-accent); background: #f6f8fa; font-size: 13px; }
.yb-app fieldset { min-width: 0; padding: 0; margin: 0; border: 0; }
.yb-field { margin: 20px 0 0; }
.yb-field label, .yb-roles legend { display: block; margin-bottom: 7px; color: #596975; font-size: 13px; font-weight: 400; }
.yb-control.ui-ctl { display: block; position: relative; width: 100%; height: auto; min-width: 0; margin: 0; }
.yb-control .ui-ctl-element { display: block; width: 100%; min-width: 0; height: 40px; margin: 0; padding: 8px 12px; border: 1px solid #c6cdd3; border-radius: 3px; background: #fff; box-shadow: none; color: var(--yb-text); font: inherit; line-height: 22px; transition: border-color .15s; }
.yb-control select.ui-ctl-element { appearance: none; padding-right: 36px; cursor: pointer; }
.yb-control .ui-ctl-after { position: absolute; z-index: 1; top: 0; right: 0; width: 36px; height: 40px; pointer-events: none; background: none; }
.yb-control .ui-ctl-icon-angle::after { content: ""; position: absolute; top: 15px; left: 12px; width: 7px; height: 7px; border: solid #7d8a94; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.yb-control .ui-ctl-element:hover:not(:disabled) { border-color: #97a7b4; }
.yb-control input::placeholder { color: #81909c; opacity: 1; }
.yb-control .ui-ctl-element:focus { border-color: var(--yb-accent); }
.yb-control .ui-ctl-element:disabled { color: #77858f; background: #f7f9fa; }
.yb-app .yb-help { color: var(--yb-muted); font-size: 12px; line-height: 1.6; margin: 7px 0 0; }
.yb-app .yb-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.yb-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; padding-top: 20px; border-top: 1px solid #edf0f2; }
.yb-button.ui-btn { display: inline-flex; align-items: center; justify-content: center; height: auto; min-height: 40px; max-width: 100%; padding: 10px 18px; margin: 0; border: 1px solid transparent; border-radius: 3px; font: 700 12px/1.5 "Open Sans", "Segoe UI", Arial, sans-serif; letter-spacing: .3px; white-space: normal; text-align: center; text-transform: uppercase; box-shadow: none; transition: background .15s, border-color .15s; }
.yb-button-accent.ui-btn { color: #153d50; background: var(--yb-accent); border-color: var(--yb-accent); }
.yb-button-accent.ui-btn:hover:not(:disabled) { background: #62d6f8; border-color: #62d6f8; }
.yb-button-primary.ui-btn { color: #263a0f; background: #bbed21; border-color: #b0dd26; }
.yb-button-primary.ui-btn:hover:not(:disabled) { background: #c7f23a; }
.yb-button-secondary.ui-btn { background: #fff; color: #51616e; border-color: #bcc7d0; }
.yb-button-secondary.ui-btn:hover:not(:disabled) { background: #f2f8fa; border-color: #8aabbc; }
.yb-link { padding: 0; border: 0; background: transparent; color: #167b9e; font: inherit; text-align: left; text-decoration: none; }
.yb-link:hover { text-decoration: underline; }
.yb-link-danger { color: #b64448; margin-top: 22px; font-size: 12px !important; }
.yb-app #load-options { margin-top: 16px; }
.yb-app .yb-roles { margin-top: 23px; }
.yb-checkbox.ui-ctl { display: inline-flex; width: auto; max-width: 100%; min-height: 24px; height: auto; gap: 8px; align-items: center; margin: 4px 18px 5px 0; padding: 0; color: #465762; font-size: 13px; cursor: pointer; }
.yb-checkbox .ui-ctl-element { flex: 0 0 16px; width: 16px; height: 16px; margin: 0; accent-color: #168bb3; }
.yb-checkbox .ui-ctl-label-text { margin: 0; line-height: 1.5; }
.yb-divider { height: 1px; background: #e9edf0; margin-top: 24px; }
.yb-notice { padding: 13px 16px; margin-top: 20px !important; border-left: 3px solid #75cceb; border-radius: 3px; background: #edf8fd; color: #226582; font-size: 13px; line-height: 1.6; }
.yb-notice p:last-child { margin-bottom: 0; }
.yb-notice-warning { color: #806022; background: #fff6dc; border-color: #edc556; }
.yb-notice-error { color: #a23b40; background: #fff0ef; border-color: #ee9897; }
.yb-notice-success { color: #477322; background: #eff8e5; border-color: #a8cf69; }
.yb-note { display: flex; align-items: flex-start; gap: 9px; margin: 22px 0 18px; padding-top: 18px; border-top: 1px solid #e8edf0; }
.yb-note-dot { flex: 0 0 7px; height: 7px; margin-top: 7px; border-radius: 50%; background: #2fc6f6; }
.yb-note p { margin: 0; font-size: 12px; }
.yb-instructions { margin: 12px 0 0; padding-left: 18px; }
.yb-instructions li { padding: 0 0 12px 4px; }
.yb-footer { color: #82909b; text-align: center; margin: 23px 0 0 !important; font-size: 11px; }
.yb-job { margin-top: 23px; padding: 19px; border: 1px solid #cfebf5; border-radius: 8px; background: #f7fcfe; }
.yb-job .yb-button { margin-top: 14px; }
.yb-job #job-reference { font-family: Consolas, monospace; overflow-wrap: anywhere; }
.yb-history { list-style: none; padding: 0; margin: 14px 0 0; }
.yb-history li { padding: 12px 0; border-top: 1px solid #e8edf0; }
.yb-history strong { display: block; font-size: 12px; font-weight: 600; }
.yb-history small { display: block; color: var(--yb-muted); margin: 3px 0; overflow-wrap: anywhere; }
.yb-history .yb-link { font-size: 12px; }
.yb-welcome { position: relative; padding: 38px; max-width: 940px; margin: 0 auto; border-top: 3px solid var(--yb-accent); }
.yb-welcome h2 { font-size: 31px; line-height: 1.35; max-width: 570px; margin: 12px 0 16px; }
.yb-lead { max-width: 590px; color: #657580; font-size: 15px; }
.yb-open-in-portal { padding: 20px 23px; background: #eaf8fd; border-radius: 8px; margin: 28px 0; }
.yb-open-in-portal strong { color: #25677f; }
.yb-open-in-portal p { margin: 6px 0 0; color: #526d7d; font-size: 13px; }
.yb-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; list-style: none; padding: 0; margin: 0; }
.yb-steps li { display: flex; gap: 10px; }
.yb-steps li > span { display: grid; place-items: center; flex: 0 0 25px; height: 25px; border-radius: 50%; background: #e5f6fc; color: #14799e; font-size: 12px; font-weight: 600; }
.yb-steps strong { display: block; font-size: 13px; margin-bottom: 5px; }
.yb-steps p { font-size: 12px; color: var(--yb-muted); margin: 0; }
.yb-document-icon { float: right; width: 86px; height: 108px; margin: 10px 8px 20px 25px; padding: 35px 16px 0; border: 1px solid #c8e8f2; border-radius: 8px; background: #f1fbff; transform: rotate(7deg); box-shadow: -10px 9px 0 #f4f7f9; }
.yb-document-icon span { display: block; height: 4px; margin-bottom: 10px; border-radius: 3px; background: #a9dcec; }
.yb-document-icon span:last-child { width: 60%; background: #c4dd97; }
@media (max-width: 860px) { .yb-grid { grid-template-columns: minmax(0, 1fr); } .yb-side { grid-template-columns: repeat(2, minmax(0, 1fr)); } .yb-shell { padding: 20px; } }
@media (max-width: 580px) { .yb-shell { padding: 17px 12px; } .yb-header { align-items: flex-start; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; } .yb-portal .yb-header { padding: 16px; } .yb-app h1 { font-size: 21px; } .yb-person { margin-left: 57px; } .yb-person-dot { display: none; } .yb-card { padding: 20px; } .yb-side { grid-template-columns: 1fr; } .yb-section-heading { flex-wrap: wrap; } .yb-app .yb-field-row { grid-template-columns: 1fr; gap: 0; } .yb-actions { flex-direction: column; } .yb-actions .yb-button { width: 100%; } .yb-welcome h2 { font-size: 26px; } .yb-document-icon { display: none; } .yb-steps { grid-template-columns: 1fr; gap: 18px; } .yb-welcome { padding: 25px 22px; } .yb-tabs { gap: 18px; padding: 0 16px; } }
@media (prefers-reduced-motion: reduce) { .yb-button.ui-btn, .yb-control .ui-ctl-element { transition: none; } }
