/* =========================================================
   بريفي — flat UI: sky blue, dark grey, white, a touch of mustard.
   Layout: a white top bar, then either a centred reading column
   (client form, auth), a two-column hero (landing), or a side-nav
   dashboard that folds into top tabs on phones.
   ========================================================= */
:root {
	--sky: #29ABE2;
	--sky-strong: #147EB3;   /* buttons & links: passes contrast with white */
	--sky-50: #EAF7FD;
	--sky-100: #D3EEFA;
	--ink: #2B2F33;          /* dark grey */
	--ink-2: #464C52;
	--muted: #6B7178;
	--line: #E2E6EA;
	--bg: #F5F7F9;
	--white: #FFFFFF;
	--mustard: #E1AD01;
	--mustard-50: #FBF4DC;
	--mustard-ink: #6B5300;
	--danger: #C93A3A;
	--danger-50: #FCECEC;
	--ok: #1F8A5B;
	--ok-50: #E6F5EE;

	--font: "Tajawal", Tahoma, "Segoe UI", Arial, sans-serif;
	--r: 10px;
	--r-sm: 7px;
	--gutter: 16px;
	color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.brf {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.7;
	text-align: start;
	padding-top: env(safe-area-inset-top, 0px);
	padding-bottom: env(safe-area-inset-bottom, 0px);
}
.brf h1, .brf h2, .brf h3 { margin: 0; line-height: 1.3; font-weight: 800; text-wrap: balance; }
.brf h1 { font-size: clamp(26px, 4.2vw, 34px); }
.brf h2 { font-size: 21px; }
.brf h3 { font-size: 18px; font-weight: 700; }
.brf p { margin: 0; }
.brf a { color: var(--sky-strong); }
.brf img { max-width: 100%; }
.brf [hidden] { display: none !important; }
.brf :focus-visible { outline: 3px solid var(--mustard); outline-offset: 2px; border-radius: 4px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.brf-muted { color: var(--muted); }
.brf-small { font-size: 13.5px; }
.brf-eyebrow { color: var(--sky-strong); font-weight: 700; font-size: 14px; }
.brf-lede { color: var(--ink-2); font-size: 17px; max-width: 62ch; }
.brf-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.brf-hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.brf-hidden-text { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- logo ---------- */
.brf-logo-link { text-decoration: none; color: inherit; }
.brf-logo { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.brf-logo__mark { width: 30px; height: 30px; color: var(--sky); flex: none; }
.brf-logo__word { font-weight: 800; font-size: 23px; letter-spacing: 0; }

/* ---------- buttons ---------- */
.brf-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	font: inherit; font-weight: 700; font-size: 15.5px; line-height: 1.2;
	padding: 11px 20px; border-radius: var(--r-sm);
	background: var(--sky-strong); color: var(--white) !important; border: 2px solid var(--sky-strong);
	text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s;
	white-space: nowrap;
}
.brf-btn:hover { background: #0F6E9E; border-color: #0F6E9E; }
.brf-btn--ghost { background: transparent; color: var(--sky-strong) !important; border-color: var(--sky-100); }
.brf-btn--ghost:hover { background: var(--sky-50); border-color: var(--sky-100); }
.brf-btn--danger { background: transparent; color: var(--danger) !important; border-color: transparent; }
.brf-btn--danger:hover { background: var(--danger-50); border-color: var(--danger-50); }
.brf-btn--light { background: var(--sky); border-color: var(--sky); color: var(--ink) !important; }
.brf-btn--light:hover { background: #4CBCEB; border-color: #4CBCEB; }
.brf-btn--sm { padding: 7px 13px; font-size: 14px; }
.brf-btn--lg { padding: 14px 26px; font-size: 17px; }
.brf-btn--block { width: 100%; }
.brf-btn:disabled { opacity: .6; cursor: default; }
.brf-inline { display: inline; margin: 0; }
.brf-icon {
	width: 32px; height: 32px; display: inline-grid; place-items: center;
	border: 0; background: transparent; color: var(--muted); border-radius: 6px; cursor: pointer; font: inherit; font-size: 15px;
}
.brf-icon:hover:not(:disabled) { background: var(--bg); color: var(--ink); }
.brf-icon:disabled { opacity: .3; cursor: default; }
.brf-icon--danger:hover:not(:disabled) { background: var(--danger-50); color: var(--danger); }

/* ---------- top bar ---------- */
.brf-topbar { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; }
.brf-topbar__in { max-width: 1160px; margin: 0 auto; padding-inline: var(--gutter); padding-block: 12px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brf-topbar__nav { display: flex; align-items: center; gap: 16px; }
.brf-topbar__nav > a:not(.brf-btn) { color: var(--ink); text-decoration: none; font-weight: 500; }
.brf-topbar__nav > a:not(.brf-btn):hover { color: var(--sky-strong); }

/* ---------- forms ---------- */
.brf-field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.brf-field > span { font-weight: 700; font-size: 15px; }
.brf-field small { color: var(--muted); font-size: 13px; line-height: 1.5; }
.brf input[type=text], .brf input[type=email], .brf input[type=password], .brf input[type=tel],
.brf input[type=url], .brf input[type=date], .brf input[type=number], .brf input[type=search], .brf textarea, .brf select {
	width: 100%; font: inherit; font-size: 16px; color: var(--ink);
	background: var(--white); border: 1.5px solid var(--line); border-radius: var(--r-sm);
	padding: 10px 12px; transition: border-color .15s;
}
.brf textarea { resize: vertical; min-height: 92px; line-height: 1.7; }
.brf select { padding-inline-end: 12px; }
.brf input:focus, .brf textarea:focus, .brf select:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 3px var(--sky-50); }
.brf input[readonly] { background: var(--bg); color: var(--ink-2); }
.brf-check { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; }
.brf-switch { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; cursor: pointer; }
.brf-switch input { appearance: none; -webkit-appearance: none; width: 42px; height: 24px; border-radius: 12px; background: var(--line); position: relative; cursor: pointer; transition: background .15s; flex: none; margin: 0; }
.brf-switch input::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--white); transition: inset-inline-start .15s; }
.brf-switch input:checked { background: var(--sky-strong); }
.brf-switch input:checked::after { inset-inline-start: 21px; }

.brf-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; }

/* ---------- notices & badges ---------- */
.brf-notice { padding: 12px 16px; border-radius: var(--r-sm); font-weight: 500; margin-bottom: 18px; }
.brf-notice--ok { background: var(--ok-50); color: var(--ok); }
.brf-notice--error { background: var(--danger-50); color: var(--danger); }
.brf-badge { display: inline-block; font-size: 12.5px; font-weight: 700; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.brf-badge--new { background: var(--mustard); color: var(--ink); }
.brf-badge--on { background: var(--sky-50); color: var(--sky-strong); }
.brf-badge--off { background: var(--bg); color: var(--muted); }
.brf-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--mustard); color: var(--ink); font-size: 12.5px; font-weight: 800; margin-inline-start: auto; font-variant-numeric: tabular-nums; }
.brf-new-text { color: var(--mustard-ink); font-weight: 700; }
.brf-toast { color: var(--ok); font-weight: 700; font-size: 14px; }

/* ---------- chips (read-only) ---------- */
.brf-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.brf-chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 13px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--white); font-size: 14.5px; line-height: 1.5; }
.brf-chip.is-on { background: var(--sky-50); border-color: var(--sky); color: var(--ink); font-weight: 500; }
.brf-chip b, .brf-opt--color b { width: 15px; height: 15px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .15); flex: none; display: inline-block; }
.brf-chip--btn { cursor: pointer; font: inherit; font-size: 14px; color: var(--ink-2); }
.brf-chip--btn:hover { border-color: var(--sky); color: var(--sky-strong); }

/* =========================================================
   Landing
   ========================================================= */
.brf-landing { overflow: hidden; }
.brf-hero { max-width: 1160px; margin: 0 auto; padding-inline: var(--gutter); padding-block: 64px 72px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.brf-hero__text { display: grid; gap: 18px; min-width: 0; }
.brf-hero h1 { font-size: clamp(36px, 6vw, 60px); line-height: 1.15; }
.brf-hero h1 br { display: block; }
.brf-hero__demo { min-width: 0; position: relative; }
.brf-hero__demo::before { content: ""; position: absolute; inset: 28px -18px -18px 28px; background: var(--sky); border-radius: 16px; }
.brf-demo { position: relative; background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 22px; display: grid; gap: 10px; }
.brf-demo__bar { display: flex; justify-content: space-between; align-items: center; }
.brf-demo__time { color: var(--muted); font-size: 13px; }
.brf-demo__title { font-weight: 800; font-size: 20px; }
.brf-demo__client { color: var(--muted); font-size: 14px; margin-top: -8px; }
.brf-demo__q { font-size: 13.5px; color: var(--muted); margin-top: 6px; }
.brf-demo-scale, .brf-scale-read { display: flex; align-items: center; gap: 6px; font-size: 13.5px; flex-wrap: wrap; }
.brf-demo-scale i, .brf-scale-read i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); background: var(--white); }
.brf-demo-scale i.is-on, .brf-scale-read i.is-on { background: var(--mustard); border-color: var(--mustard); }
.brf-scale-read em { font-style: normal; color: var(--muted); margin-inline-start: 6px; }

.brf-how { background: var(--white); border-block: 1px solid var(--line); }
.brf-how > h2 { max-width: 1160px; margin: 0 auto; padding-inline: var(--gutter); padding-block: 48px 0; font-size: 28px; }
.brf-steps { list-style: none; max-width: 1160px; margin: 0 auto; padding-inline: var(--gutter); padding-block: 24px 56px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.brf-steps li { display: grid; gap: 8px; align-content: start; }
.brf-steps__n { width: 40px; height: 40px; border-radius: 50%; background: var(--sky-50); color: var(--sky-strong); display: grid; place-items: center; font-weight: 800; font-size: 18px; }
.brf-steps p { color: var(--ink-2); }

.brf-cta-band { background: var(--ink); color: var(--white); text-align: center; padding-inline: var(--gutter); padding-block: 56px; display: grid; justify-items: center; gap: 20px; }
.brf-cta-band h2 { font-size: clamp(24px, 3.4vw, 32px); }

.brf-footer { max-width: 1160px; margin: 0 auto; padding-inline: var(--gutter); padding-block: 24px; display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; }
.brf-footer .brf-logo__mark { width: 22px; height: 22px; }
.brf-footer .brf-logo__word { font-size: 17px; color: var(--ink-2); }
.brf-footer--min { justify-content: center; padding-block: 32px; }

/* =========================================================
   Auth & message pages
   ========================================================= */
.brf-auth { padding-inline: var(--gutter); padding-block: 56px; display: grid; justify-items: center; }
.brf-auth__card { width: 100%; max-width: 440px; display: grid; gap: 16px; }
.brf-auth__card .brf-notice { margin: 0; }
.brf-auth__alt { text-align: center; color: var(--muted); font-size: 14.5px; }
.brf-msg { width: 100%; max-width: 520px; text-align: center; display: grid; gap: 12px; justify-items: center; padding-block: 40px; }
.brf-msg p { color: var(--ink-2); }
.brf-msg__icon { width: 56px; height: 56px; border-radius: 50%; background: var(--sky); color: var(--white); display: grid; place-items: center; font-size: 28px; font-weight: 800; }

/* =========================================================
   Dashboard
   ========================================================= */
.brf-dash { max-width: 1160px; margin: 0 auto; padding-inline: var(--gutter); padding-block: 28px 80px; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; align-items: start; }
.brf-dash__side { position: sticky; top: 84px; display: grid; gap: 16px; }
.brf-dash__who { display: flex; align-items: center; gap: 10px; font-weight: 700; min-width: 0; }
.brf-dash__who > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brf-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--ink); color: var(--white); display: grid; place-items: center; font-weight: 800; flex: none; }
.brf-avatar--sm { width: 36px; height: 36px; background: var(--sky-50); color: var(--sky-strong); }
.brf-tabs { display: grid; gap: 4px; }
.brf-tab { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: var(--r-sm); color: var(--ink-2) !important; text-decoration: none; font-weight: 500; }
.brf-tab:hover { background: var(--white); }
.brf-tab.is-active { background: var(--white); color: var(--ink) !important; font-weight: 800; box-shadow: inset -3px 0 0 var(--sky); }
.brf-dash__main { min-width: 0; display: grid; gap: 20px; align-content: start; }
.brf-dash__main > .brf-notice { margin: 0; }

.brf-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 14px; }
.brf-head > div:first-child { display: grid; gap: 4px; min-width: 0; }
.brf-head--sub h2 { font-size: 20px; }
.brf-filter select { min-width: 200px; }
.brf-back { color: var(--muted) !important; text-decoration: none; font-size: 14.5px; justify-self: start; }
.brf-back:hover { color: var(--sky-strong) !important; }

.brf-empty { background: var(--white); border: 1.5px dashed var(--line); border-radius: var(--r); padding: 36px 24px; display: grid; gap: 12px; justify-items: center; text-align: center; }
.brf-empty p { color: var(--muted); max-width: 46ch; }
.brf-empty .brf-linkbox { width: 100%; max-width: 520px; text-align: start; }
.brf-empty--sm { padding: 20px; }

/* brief list */
.brf-list { list-style: none; margin: 0; padding: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.brf-list li + li { border-top: 1px solid var(--line); }
.brf-list__item { display: flex; align-items: center; gap: 14px; padding: 14px 18px; text-decoration: none; color: var(--ink) !important; }
.brf-list__item:hover { background: var(--bg); }
.brf-list__main { display: grid; min-width: 0; flex: 1; }
.brf-list__title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brf-list__item.is-unread .brf-list__title { font-weight: 800; }
.brf-list__sub { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brf-list__meta { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13.5px; flex: none; }

/* brief detail */
.brf-brief { display: grid; gap: 20px; }
.brf-brief__head { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; display: grid; gap: 10px; }
.brf-meta { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 4px 0 0; }
.brf-meta div { display: grid; }
.brf-meta dt { color: var(--muted); font-size: 13px; }
.brf-meta dd { margin: 0; font-weight: 500; }
.brf-brief__actions { padding-top: 8px; }
.brf-answers { display: grid; gap: 16px; }
.brf-answers__sec { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 6px 24px 10px; }
.brf-answers__sec h2 { font-size: 17px; color: var(--sky-strong); padding-block: 14px 6px; }
.brf-answer { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 16px; padding-block: 12px; border-top: 1px solid var(--line); }
.brf-answers__sec h2 + .brf-answer { border-top: 0; }
.brf-answer__q { color: var(--ink-2); font-size: 14.5px; }
.brf-answer__a { font-weight: 500; overflow-wrap: anywhere; }
.brf-answer.is-empty .brf-answer__a { font-weight: 400; font-size: 14px; }
.brf-answers.hide-empty .brf-answer.is-empty { display: none; }
.brf-answers.hide-empty .brf-answers__sec:not(:has(.brf-answer:not(.is-empty))) { display: none; }

/* forms list */
.brf-forms { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.brf-formcard { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: grid; gap: 12px; align-content: start; min-width: 0; }
.brf-formcard header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.brf-formcard h2 { font-size: 18px; }
.brf-formcard__stats a { color: var(--ink-2) !important; text-decoration: none; }
.brf-formcard__stats strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.brf-linkbox { display: grid; gap: 6px; min-width: 0; }
.brf-linkbox label { font-size: 13px; color: var(--muted); font-weight: 500; }
.brf-linkbox__row { display: flex; gap: 8px; }
.brf-linkbox__row input { min-width: 0; flex: 1; font-size: 14px !important; padding: 8px 10px !important; }

/* settings / editor */
.brf-settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.brf-span { grid-column: 1 / -1; }
.brf-settings-foot { font-size: 14px; }
.brf-editor { display: grid; gap: 20px; }
.brf-builder-wrap { display: grid; gap: 14px; }
.brf-builder { display: grid; gap: 14px; }
.brf-builder__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 14px; }
.brf-qlist { display: grid; gap: 8px; }
.brf-q { background: var(--white); border: 1.5px solid var(--line); border-radius: var(--r); transition: border-color .15s; }
.brf-q.is-open { border-color: var(--sky); }
.brf-q.has-error { border-color: var(--danger); }
.brf-q.is-dragging { opacity: .45; }
.brf-q.is-over { border-color: var(--mustard); border-style: dashed; }
.brf-q--section { background: var(--sky-50); border-color: var(--sky-100); }
.brf-q--section .brf-q__label { font-weight: 800; }
.brf-q__head { display: flex; align-items: center; gap: 6px; padding: 6px 8px; }
.brf-q__handle { cursor: grab; color: var(--muted); padding: 4px 6px; letter-spacing: -3px; user-select: none; font-weight: 800; }
.brf-q__toggle { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; text-align: start; border: 0; background: transparent; font: inherit; color: var(--ink); cursor: pointer; padding: 6px 4px; }
.brf-q__type { font-size: 12px; font-weight: 700; color: var(--sky-strong); background: var(--sky-50); border-radius: 5px; padding: 2px 8px; white-space: nowrap; }
.brf-q--section .brf-q__type { background: var(--white); }
.brf-q__label { min-width: 0; overflow-wrap: anywhere; }
.brf-q__req { font-size: 12px; font-weight: 700; color: var(--mustard-ink); background: var(--mustard-50); border-radius: 5px; padding: 2px 8px; }
.brf-q__req--soft { color: var(--ink-2); background: var(--bg); }
.brf-q__tools { display: flex; gap: 2px; flex: none; }
.brf-q__body { border-top: 1px solid var(--line); padding: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.brf-q__body > .brf-field:first-child, .brf-q__body > .brf-field:nth-child(2) { grid-column: 1 / -1; }
.brf-q__body > .brf-switch { align-self: end; padding-bottom: 10px; }
.brf-chips--preview { margin-top: 8px; }
.brf-chips--preview .brf-chip { font-size: 13px; padding: 3px 10px; }
.brf-addbar { background: var(--white); border: 1.5px dashed var(--line); border-radius: var(--r); padding: 16px; display: grid; gap: 10px; }
.brf-addbar__title { font-weight: 700; }
.brf-bank { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 18px; }
.brf-bank summary { cursor: pointer; font-weight: 700; }
.brf-bank[open] { display: grid; gap: 12px; }
.brf-bank__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.brf-bank__list li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.brf-bank__label { flex: 1; min-width: 0; }
.brf-savebar { position: sticky; bottom: env(safe-area-inset-bottom, 0px); background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px; display: flex; justify-content: flex-end; align-items: center; gap: 14px; }
.brf-savebar__state { color: var(--mustard-ink); font-weight: 700; font-size: 14px; margin-inline-end: auto; }

/* =========================================================
   Client form
   ========================================================= */
.brf-page-client { background: var(--bg); }
.brf-client { max-width: 720px; margin: 0 auto; padding-inline: var(--gutter); padding-block: 40px 24px; display: grid; gap: 20px; }
.brf-client__head { display: grid; gap: 10px; padding-bottom: 8px; border-bottom: 4px solid var(--sky); }
.brf-client__head h1 { font-size: clamp(28px, 5vw, 38px); }
.brf-client__form { display: grid; gap: 20px; }
.brf-client .brf-notice { margin: 0; }
.brf-req { color: var(--danger); }
.brf-sec { border: 1px solid var(--line); background: var(--white); border-radius: var(--r); padding: 6px 22px 22px; margin: 0; display: grid; gap: 22px; min-width: 0; }
.brf-sec legend { float: right; width: 100%; padding: 20px 0 0; font-size: 20px; font-weight: 800; display: flex; align-items: baseline; gap: 10px; }
.brf-sec legend + * { clear: both; }
.brf-sec__n { color: var(--sky-strong); font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.brf-sec__hint { color: var(--muted); margin-top: -14px !important; }
.brf-q-field { display: grid; gap: 8px; min-width: 0; }
.brf-q-field__label { font-weight: 700; font-size: 16px; }
.brf-q-field__hint { color: var(--muted); font-size: 14px; margin-top: -4px; }
.brf-q-field__err { color: var(--danger); font-size: 14px; font-weight: 500; }
.brf-q-field.has-error input:not([type=checkbox]):not([type=radio]), .brf-q-field.has-error textarea { border-color: var(--danger); }
.brf-q-field.has-error .brf-opt > span, .brf-q-field.has-error .brf-scale__step > span { border-color: #EBB4B4; }

.brf-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.brf-opt { position: relative; cursor: pointer; }
.brf-opt input, .brf-scale__step input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.brf-opt > span { display: inline-flex; align-items: center; gap: 7px; padding: 8px 15px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--white); font-size: 15px; line-height: 1.4; transition: background .12s, border-color .12s; user-select: none; }
.brf-opt:hover > span { border-color: var(--sky); }
.brf-opt input:checked + span { background: var(--sky-50); border-color: var(--sky); font-weight: 700; }
.brf-opt input[type=checkbox]:checked + span::before { content: "✓"; color: var(--sky-strong); font-weight: 800; }
.brf-opt--color input:checked + span::before { display: none; }
.brf-opt--color input:checked + span b { box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--sky); }
.brf-opt input:focus-visible + span { outline: 3px solid var(--mustard); outline-offset: 2px; }
.brf-opt.is-disabled { cursor: not-allowed; }
.brf-opt.is-disabled > span { opacity: .45; }

.brf-scale { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; }
.brf-scale__end { font-weight: 700; font-size: 14.5px; max-width: 9em; }
.brf-scale__steps { display: flex; justify-content: space-between; position: relative; }
.brf-scale__steps::before { content: ""; position: absolute; inset-inline: 14px; top: 50%; height: 2px; background: var(--line); transform: translateY(-50%); }
.brf-scale__step { position: relative; cursor: pointer; padding: 4px; }
.brf-scale__step > span { display: block; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); background: var(--white); transition: background .12s, border-color .12s, transform .12s; }
.brf-scale__step:hover > span { border-color: var(--sky); }
.brf-scale__step input:checked + span { background: var(--mustard); border-color: var(--mustard); transform: scale(1.12); }
.brf-scale__step input:focus-visible + span { outline: 3px solid var(--sky); outline-offset: 2px; }

.brf-client__submit { display: grid; gap: 10px; text-align: center; padding-top: 6px; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 900px) {
	.brf-hero { grid-template-columns: 1fr; padding-block: 40px 56px; gap: 40px; }
	.brf-hero__demo { margin-inline-end: 18px; }
	.brf-steps { grid-template-columns: 1fr; gap: 24px; }
	.brf-dash { grid-template-columns: 1fr; gap: 16px; padding-block: 16px 72px; }
	.brf-dash__side { position: static; }
	.brf-dash__who { display: none; }
	.brf-tabs { display: flex; overflow-x: auto; gap: 6px; padding-bottom: 2px; }
	.brf-tab { white-space: nowrap; background: var(--white); border: 1px solid var(--line); }
	.brf-tab.is-active { box-shadow: none; border-color: var(--sky); }
	.brf-count { margin-inline-start: 4px; }
}
@media (max-width: 640px) {
	.brf-topbar__nav { gap: 10px; }
	.brf-topbar__nav > a:not(.brf-btn) { font-size: 15px; }
	.brf-settings-grid, .brf-q__body { grid-template-columns: 1fr; }
	.brf-answer { grid-template-columns: 1fr; gap: 4px; }
	.brf-answers__sec, .brf-brief__head, .brf-card { padding-inline: 16px; }
	.brf-sec { padding-inline: 16px; }
	.brf-forms { grid-template-columns: 1fr; }
	.brf-filter, .brf-filter select { width: 100%; }
	.brf-list__item { padding: 12px 14px; gap: 10px; }
	.brf-list__meta time { display: none; }
	.brf-scale { grid-template-columns: 1fr 1fr; }
	.brf-scale__steps { grid-column: 1 / -1; grid-row: 1; }
	.brf-scale__end:last-child { text-align: end; justify-self: end; }
	.brf-q__head { flex-wrap: wrap; }
	.brf-q__toggle { flex-basis: calc(100% - 40px); order: 1; }
	.brf-q__handle { order: 0; }
	.brf-q__tools { order: 2; margin-inline-start: auto; }
	.brf-footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
	.brf *, .brf *::before, .brf *::after { transition: none !important; scroll-behavior: auto !important; }
}

@media print {
	.brf-topbar, .brf-dash__side, .brf-back, .brf-brief__actions, .brf-notice { display: none !important; }
	body.brf { background: #fff; }
	.brf-dash { display: block; padding: 0; }
	.brf-answers__sec, .brf-brief__head { border: 0; padding-inline: 0; break-inside: avoid-page; }
}

/* Hidden-unanswered mode: only draw dividers between visible answers. */
.brf-answers.hide-empty .brf-answer { border-top: 0; }
.brf-answers.hide-empty .brf-answer:not(.is-empty) ~ .brf-answer:not(.is-empty) { border-top: 1px solid var(--line); }

/* Check-your-email / account pages */
.brf-checkmail { text-align: center; justify-items: center; }
.brf-checkmail > * { width: 100%; }
.brf-checkmail__icon { width: 64px !important; height: 64px; border-radius: 50%; background: var(--sky-50); color: var(--sky-strong); display: grid; place-items: center; }
.brf-checkmail__icon svg { width: 34px; height: 34px; }
.brf-checkmail p { color: var(--ink-2); }
.brf-checkmail__resend { display: grid; gap: 12px; text-align: start; }
.brf-auth__card .brf-notice { margin: 0; }

/* Footer contact icons */
.brf-social { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; }
.brf-social__link { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--white); border: 1.5px solid var(--line); color: var(--ink-2) !important; transition: background .15s, border-color .15s, color .15s; }
.brf-social__link svg { width: 19px; height: 19px; }
.brf-social__link:hover { background: var(--sky); border-color: var(--sky); color: var(--white) !important; }
.brf-page-auth .brf-footer, .brf-page-landing .brf-footer { border-top: 1px solid var(--line); }

/* =========================================================
   Members (site owner)
   ========================================================= */
.brf-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.brf-stat { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: grid; gap: 2px; }
.brf-stat__n { font-size: 26px; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
.brf-stat__l { color: var(--muted); font-size: 14px; }
.brf-mfilter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.brf-mfilter input[type=search] { flex: 1 1 240px; width: auto; }
.brf-mfilter select { width: auto; flex: 0 1 170px; }
.brf-table-wrap { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); overflow-x: auto; }
.brf-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.brf-table th { text-align: start; font-size: 13px; font-weight: 700; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--bg); white-space: nowrap; }
.brf-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.brf-table tbody tr:last-child td { border-bottom: 0; }
.brf-table tbody tr:hover td { background: #FAFCFD; }
.brf-table .num { text-align: center; font-variant-numeric: tabular-nums; }
.brf-table__actions { white-space: nowrap; text-align: end; }
.brf-table__actions .brf-inline + .brf-inline { margin-inline-start: 4px; }
.brf-member { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; }
.brf-email { color: var(--ink-2); font-size: 14px; overflow-wrap: anywhere; }
.brf-role { display: inline-block; font-size: 12.5px; font-weight: 700; padding: 2px 10px; border-radius: 6px; white-space: nowrap; }
.brf-role--designer { background: var(--sky-50); color: var(--sky-strong); }
.brf-role--admin { background: var(--ink); color: var(--white); }
.brf-role--other { background: var(--bg); color: var(--ink-2); }
.brf-badge--pending { background: var(--mustard-50); color: var(--mustard-ink); }
.brf-count--soft { background: var(--mustard-50); color: var(--mustard-ink); }
.brf-pager { display: flex; align-items: center; justify-content: center; gap: 12px; }

@media (max-width: 900px) {
	.brf-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
	.brf-table-wrap { background: transparent; border: 0; overflow: visible; }
	.brf-table, .brf-table tbody, .brf-table tr, .brf-table td { display: block; width: 100%; }
	.brf-table thead { display: none; }
	.brf-table tr { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 6px 14px; margin-bottom: 10px; }
	.brf-table td { border: 0; padding: 7px 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
	.brf-table td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 13px; flex: none; }
	.brf-table td:first-child { border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 4px; }
	.brf-table td:first-child::before { display: none; }
	.brf-table .num { text-align: end; }
	.brf-table__actions { justify-content: flex-end !important; padding-top: 10px !important; }
	.brf-table__actions:empty { display: none !important; }
	.brf-mfilter select { flex: 1 1 45%; }
}
@media (min-width: 721px) {
	.brf-table .brf-email { white-space: nowrap; overflow-wrap: normal; }
	.brf-table th, .brf-table td { padding-inline: 9px; }
	.brf-table th { white-space: normal; }
	.brf-table td:first-child { min-width: 9em; }
}

/* =========================================================
   Pro account
   ========================================================= */
.brf-pro-badge { display: inline-block; vertical-align: middle; font-size: 12px; font-weight: 800; line-height: 1; padding: 5px 9px; border-radius: 999px; background: var(--mustard); color: var(--ink); letter-spacing: 0; }
.brf-pro-badge--sm { font-size: 10.5px; padding: 3px 7px; margin-inline-start: auto; }
.brf-tab.is-active .brf-pro-badge--sm { background: var(--mustard-50); color: var(--mustard-ink); }
.brf-plan { display: grid; gap: 8px; padding: 12px; border: 1px dashed var(--line); border-radius: var(--r-sm); background: var(--white); }
.brf-plan--pro { border-style: solid; border-color: var(--mustard-50); background: var(--mustard-50); justify-items: start; }
.brf-pro-hero { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 32px; display: grid; gap: 16px; justify-items: start; }
.brf-pro-list { margin: 0; padding-inline-start: 20px; display: grid; gap: 6px; color: var(--ink-2); }
.brf-pro-list li::marker { color: var(--sky-strong); }

/* =========================================================
   Task tracker
   ========================================================= */
.brf-pcard { text-decoration: none; color: var(--ink) !important; transition: border-color .15s; }
.brf-pcard:hover { border-color: var(--sky); }
.brf-pcard__thumb { aspect-ratio: 16 / 9; border-radius: var(--r-sm); background: var(--sky-50); overflow: hidden; display: grid; place-items: center; color: var(--sky-strong); font-size: 34px; font-weight: 800; }
.brf-pcard__thumb img { width: 100%; height: 100%; object-fit: cover; }

.brf-progress { display: grid; gap: 8px; }
.brf-progress__bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.brf-progress__bar span { display: block; height: 100%; background: #2E9E6B; border-radius: 4px; transition: width .3s; }
.brf-progress__legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--muted); }
.brf-progress__legend b { color: var(--ink); font-variant-numeric: tabular-nums; }
.brf-progress__pct { margin-inline-start: auto; }

.brf-psettings summary { cursor: pointer; font-weight: 700; }
.brf-psettings[open] { display: grid; gap: 18px; }
.brf-psettings__danger { border-top: 1px solid var(--line); padding-top: 12px; }
.brf-logos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.brf-up { display: grid; gap: 6px; align-content: start; min-width: 0; }
.brf-up__label { font-weight: 700; font-size: 14px; }
.brf-up__label:empty { display: none; }
.brf-up__preview { min-height: 72px; border: 1.5px dashed var(--line); border-radius: var(--r-sm); display: grid; place-items: center; padding: 6px; background: var(--bg); }
.brf-up__preview img { max-height: 90px; max-width: 100%; object-fit: contain; }
.brf-up__pick { cursor: pointer; }
.brf-up__state { color: var(--muted); }
.brf-up__state:empty { display: none; }

/* Board */
.brf-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.brf-col { background: #EEF2F5; border-radius: var(--r); padding: 10px; display: grid; gap: 10px; min-width: 0; }
.brf-col__head { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px; }
.brf-col__head h2 { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.brf-col__head h2::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.brf-col--progress .brf-col__head h2::before { background: var(--sky); }
.brf-col--done .brf-col__head h2::before { background: #2E9E6B; }
.brf-col__count { font-size: 13px; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.brf-col__list { display: grid; gap: 10px; }
.brf-col__empty { color: var(--muted); font-size: 13px; text-align: center; padding: 14px 0; }
.brf-tcard { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; display: grid; transition: box-shadow .2s, border-color .2s; }
.brf-tcard.is-moved { border-color: var(--mustard); box-shadow: 0 0 0 3px var(--mustard-50); }
.brf-tcard__thumb { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; background: var(--bg); overflow: hidden; }
.brf-tcard__thumb img { width: 100%; height: 100%; object-fit: contain; background: #1F2A30; }
.brf-tcard__noimg { color: var(--muted); font-size: 13px; }
.brf-tcard__no { position: absolute; top: 6px; inset-inline-start: 6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--white); color: var(--ink); font-size: 12px; font-weight: 800; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.brf-tcard__body { padding: 10px; display: grid; gap: 8px; }
.brf-tcard__title { font: inherit; font-weight: 800; font-size: 15px; color: var(--ink); border: 1.5px solid transparent !important; background: transparent !important; padding: 4px 6px !important; margin: -4px -6px; border-radius: 6px; width: calc(100% + 12px) !important; }
input.brf-tcard__title:hover { border-color: var(--line) !important; }
input.brf-tcard__title:focus { border-color: var(--sky) !important; background: var(--white) !important; }
input.brf-tcard__title.is-saving { opacity: .6; }
input.brf-tcard__title.is-saved { border-color: #2E9E6B !important; }
.brf-tcard__meta { font-size: 12.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.brf-tcard__open { font-size: 13px; font-weight: 700; text-decoration: none; justify-self: end; }
.brf-appr { font-size: 11.5px; font-weight: 800; padding: 1px 8px; border-radius: 999px; }
.brf-appr--yes { background: #E3F4EC; color: #1F7A50; }
.brf-appr--no { background: var(--danger-50); color: var(--danger); }

.brf-status { display: flex; flex-wrap: wrap; gap: 4px; }
.brf-status__btn, .brf-status__pill { font: inherit; font-size: 12.5px; font-weight: 700; padding: 5px 10px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--white); color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.brf-status__pill { cursor: default; }
.brf-status__btn:hover { border-color: var(--muted); }
.brf-status__btn[aria-pressed="true"].brf-status__btn--pending, .brf-status__pill.brf-status__btn--pending { background: #E9EDF0; border-color: #C5CDD3; color: var(--ink); }
.brf-status__btn[aria-pressed="true"].brf-status__btn--progress, .brf-status__pill.brf-status__btn--progress { background: var(--sky-50); border-color: var(--sky); color: var(--sky-strong); }
.brf-status__btn[aria-pressed="true"].brf-status__btn--done, .brf-status__pill.brf-status__btn--done { background: #E3F4EC; border-color: #2E9E6B; color: #1F7A50; }

/* Task page */
.brf-taskform { display: grid; gap: 14px; }
.brf-taskbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 14px; }
.brf-taskbar__status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.brf-taskdanger { display: flex; justify-content: flex-end; }
.brf-sheet-wrap { overflow-x: auto; }

/* =========================================================
   The sheet (matches a printed production sheet)
   ========================================================= */
.brf-sheet { --sh-ink: #1E2B30; --sh-line: #3A4A50; --sh-tag: #8E7BB8; --sh-dim: #E0322B;
	background: #fff; color: var(--sh-ink); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 22px 12px; display: flex; flex-direction: column; gap: 10px; min-width: 760px; font-size: 13px; }
.brf-sheet__top { display: flex; justify-content: space-between; align-items: center; min-height: 34px; gap: 16px; }
.brf-sheet__logos { display: flex; align-items: center; gap: 18px; }
.brf-sheet__logo img { max-height: 34px; max-width: 170px; object-fit: contain; display: block; }
.brf-sheet__frame { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); border: 1px solid var(--sh-line); flex: 1; min-height: 0; }
.brf-sheet__main { display: flex; flex-direction: column; min-width: 0; border-inline-end: 1px solid var(--sh-line); }
.brf-sheet__side { display: flex; flex-direction: column; min-width: 0; }
.brf-sheet__bar { background: var(--sh-ink); color: #fff; display: flex; align-items: stretch; min-height: 30px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: 12.5px; }
.brf-sheet__bar--side { justify-content: center; align-items: center; }
.brf-sheet__title { flex: 1; display: flex; align-items: center; justify-content: center; padding: 4px 10px; }
.brf-sheet__tag { background: var(--sh-tag); color: var(--sh-ink); display: flex; align-items: center; justify-content: center; padding: 4px 18px; font-size: 11.5px; }
input.brf-sheet__title, input.brf-sheet__tag { font: inherit; color: inherit; text-align: center; border: 0 !important; border-radius: 0 !important; letter-spacing: inherit; text-transform: none; }
input.brf-sheet__title { background: transparent !important; color: #fff !important; }
input.brf-sheet__title:focus, input.brf-sheet__tag:focus { box-shadow: inset 0 0 0 2px var(--mustard) !important; }
input.brf-sheet__tag { background: var(--sh-tag) !important; color: var(--sh-ink) !important; width: 9em !important; flex: none; }
.brf-sheet__images { flex: 1; padding: 18px 16px; display: grid; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); gap: 16px 14px; align-content: center; justify-items: center; }
.brf-sheet--edit .brf-sheet__images { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); align-content: start; min-height: 160px; }
.brf-sheet__none { color: var(--muted); grid-column: 1 / -1; }
.brf-sheet__addimg { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 0 16px 14px; }
.brf-sheet__unit { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.brf-sheet__unit select { width: auto !important; padding: 4px 8px !important; font-size: 13px !important; }
.brf-sheet__box { padding: 10px; display: grid; gap: 8px; place-items: center; min-height: 120px; border-bottom: 1px solid var(--sh-line); }
.brf-sheet__box:last-child { border-bottom: 0; flex: 1; align-content: start; }
.brf-sheet__box img { max-width: 100%; max-height: 190px; object-fit: contain; }
.brf-sheet__box p { margin: 0; text-align: center; font-size: 12.5px; }
.brf-sheet__box .brf-up { width: 100%; }
.brf-sheet__box textarea { min-height: 60px; font-size: 13px; }
.brf-sheet__box--loc { place-items: stretch; }

/* Dimension marks */
.brf-dim { margin: 0; display: grid; gap: 8px; justify-items: center; min-width: 0; width: 100%; }
.brf-dim__inputs { display: flex; gap: 6px; align-items: end; width: 100%; }
.brf-dim__inputs label { flex: 1; display: grid; gap: 2px; font-size: 11.5px; color: var(--muted); }
.brf-dim__inputs input { padding: 5px 7px !important; font-size: 13px !important; text-align: center; }
.brf-dim__stage { position: relative; display: inline-grid; padding-top: 22px; padding-inline-start: 24px; max-width: 100%; }
.brf-dim__stage img { display: block; max-width: 100%; max-height: calc(230px / var(--rows, 1)); object-fit: contain; }
.brf-sheet--edit .brf-dim__stage img { max-height: 170px; }
.brf-dim__w, .brf-dim__h { position: absolute; color: var(--sh-dim); font-weight: 800; font-size: 11.5px; white-space: nowrap; line-height: 1; }
.brf-dim__w { top: 0; inset-inline-start: 24px; inset-inline-end: 0; text-align: center; padding-bottom: 8px; }
.brf-dim__w::after { content: ""; position: absolute; left: 0; right: 0; bottom: 3px; border-top: 1px solid currentColor; }
.brf-dim__w::before { content: "◂ ▸"; position: absolute; left: -3px; right: -3px; bottom: -3px; display: flex; justify-content: space-between; font-size: 9px; word-spacing: 9999px; overflow: hidden; height: 12px; }
.brf-dim__h { top: 22px; bottom: 0; inset-inline-start: 0; width: 18px; display: flex; align-items: center; justify-content: center; writing-mode: vertical-rl; transform: rotate(180deg); }
.brf-dim__h::after { content: ""; position: absolute; top: 0; bottom: 0; right: 0; border-right: 1px solid currentColor; }
[dir="rtl"] .brf-dim__h::after { right: auto; left: 0; border-right: 0; border-left: 1px solid currentColor; }

/* Bottom fields */
.brf-sheet__fields { display: grid; gap: 6px; }
.brf-sheet__row { display: grid; grid-template-columns: 1.1fr 1fr 1.4fr 1fr; gap: 10px; }
.brf-sheet__row:last-child { grid-template-columns: 1.1fr 2.4fr 1fr; }
.brf-sf { display: grid; grid-template-columns: auto minmax(0, 1fr); border: 1px solid var(--sh-ink); min-height: 30px; min-width: 0; }
.brf-sf__k { background: var(--sh-ink); color: #fff; font-weight: 800; font-size: 11.5px; letter-spacing: .03em; padding: 0 12px; display: flex; align-items: center; white-space: nowrap; }
.brf-sf__v { display: flex; align-items: center; gap: 8px; padding: 0 10px; min-width: 0; font-size: 12.5px; overflow-wrap: anywhere; }
.brf-sf__v input[type=text], .brf-sf__v input[type=date] { border: 0 !important; padding: 4px 0 !important; background: transparent !important; font-size: 13px !important; box-shadow: none !important; }
.brf-sf__v input:focus { box-shadow: inset 0 -2px 0 var(--sky) !important; }
.brf-sf__appr { flex-wrap: wrap; }
.brf-sf__appr label { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; }
.brf-sf__c { font-weight: 700; margin-inline-start: 8px; font-size: 11.5px; }
.brf-sf__appr input[type=text] { flex: 1; min-width: 120px; }
.brf-box { display: inline-block; width: 13px; height: 13px; border: 1.5px solid var(--sh-ink); vertical-align: middle; position: relative; }
.brf-box.is-on::after { content: "✓"; position: absolute; inset: -4px 0 0 1px; font-size: 13px; font-weight: 800; line-height: 1; }
.brf-sheet__foot { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; font-size: 11px; color: var(--sh-ink); padding-top: 2px; }
.brf-sheet__foot > span:nth-child(2) { text-align: center; }
.brf-sheet__brand { font-weight: 800; letter-spacing: .25em; text-transform: uppercase; }
.brf-sheet__brand img { max-height: 16px; max-width: 120px; object-fit: contain; display: block; }
.brf-sheet__pg { text-align: end; font-variant-numeric: tabular-nums; }

/* Client share + approval */
.brf-share { max-width: 1160px; }
.brf-share__actions { justify-content: flex-start; }
.brf-approve { display: grid; gap: 14px; max-width: 640px; }
.brf-approve h2 { font-size: 19px; }

/* Print page (screen preview + PDF) */
.brf-page-print { background: #DDE3E7; }
.brf-printbar { position: sticky; top: 0; z-index: 5; background: var(--white); border-bottom: 1px solid var(--line); padding: 10px 16px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; }
.brf-printbar__hint { flex-basis: 100%; margin: 0; color: var(--muted); font-size: 13px; }
.brf-pages { padding: 24px 16px 48px; display: grid; gap: 24px; justify-items: center; }
.brf-page { width: min(100%, 1120px); aspect-ratio: 297 / 210; display: flex; }
.brf-page .brf-sheet { flex: 1; min-width: 0; border-radius: 0; border: 0; box-shadow: 0 2px 14px rgba(0, 0, 0, .12); overflow: hidden; }
.brf-page .brf-sheet__frame { min-height: 0; }
.brf-page .brf-sheet__images { min-height: 0; overflow: hidden; }
.brf-page .brf-dim__stage img { max-height: calc((min(100vw, 1120px) * 0.36) / var(--rows, 1)); }

@media (max-width: 900px) {
	.brf-board { grid-template-columns: 1fr; }
	.brf-logos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.brf-plan { display: none; }
}

@media print {
	html, body.brf-page-print { background: #fff !important; padding: 0 !important; }
	.brf-page-print * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
	.brf-printbar { display: none !important; }
	.brf-pages { display: block; padding: 0; }
	.brf-page { width: 285mm; height: 196mm; aspect-ratio: auto; break-after: page; page-break-after: always; margin: 0; }
	.brf-page:last-child { break-after: auto; page-break-after: auto; }
	.brf-page .brf-sheet { box-shadow: none; padding: 0; font-size: 8.5pt; min-width: 0; }
	.brf-page .brf-sheet__logo img { max-height: 10mm; }
	.brf-page .brf-dim__stage img { max-height: calc(108mm / var(--rows, 1)); }
	.brf-page .brf-sheet__box img { max-height: 52mm; }
}

/* Sheet fixes: proportional rows, fields never overflow */
.brf-sheet:not(.brf-sheet--edit) .brf-sheet__images { display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.brf-sheet__irow { display: flex; gap: 14px; align-items: flex-start; justify-content: center; }
.brf-sheet__irow > .brf-dim { flex: 1 1 0; min-width: 0; }
.brf-sheet__row { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1fr); }
.brf-sheet__row:last-child { grid-template-columns: minmax(0, 1.1fr) minmax(0, 2.4fr) minmax(0, 1fr); }
.brf-sf__v > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brf-sf__appr input[type=text] { border-bottom: 1px solid var(--line) !important; }
.brf-sheet__fields, .brf-sheet__frame { min-width: 0; }
@media print {
	.brf-page { width: 283mm; margin: 0 auto; }
}

/* =========================================================
   2.1 — zoom, print-file link, task groups, divider pages
   ========================================================= */
/* Zoom: scales every main image on the sheet */
.brf-sheet__images .brf-dim__stage img { max-height: calc(230px / var(--rows, 1) * var(--zoom, 100) / 100); max-width: 100%; }
/* Zoom shrinks the whole stage (image + its dimension marks), so the arrows always match the image. */
.brf-sheet__images .brf-dim__stage { max-width: min(100%, calc(100% * var(--zoom, 100) / 100)); }
.brf-sheet--edit .brf-sheet__images .brf-dim__stage img { max-height: calc(170px * var(--zoom, 100) / 100); }
.brf-page .brf-sheet__images .brf-dim__stage img { max-height: calc((min(100vw, 1120px) * 0.36) / var(--rows, 1) * var(--zoom, 100) / 100); }
.brf-sheet__zoom { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.brf-sheet__zoom input[type=range], .brf-range input[type=range] { width: 140px; accent-color: var(--sky); padding: 0 !important; border: 0 !important; box-shadow: none !important; background: transparent !important; }
.brf-sheet__zoom output, .brf-range output { min-width: 3.2em; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.brf-range { display: flex; align-items: center; gap: 10px; }
.brf-range input[type=range] { flex: 1; width: auto; }

/* Print-file button */
a.brf-sheet__tag.is-link { color: var(--sh-ink); text-decoration: none; gap: 6px; cursor: pointer; font-weight: 800; transition: filter .15s; }
a.brf-sheet__tag.is-link:hover { filter: brightness(1.1); text-decoration: underline; }
.brf-sheet__drive { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 16px 0; font-size: 12.5px; color: var(--muted); }
.brf-sheet__drive input { flex: 1; min-width: 240px; padding: 6px 10px !important; font-size: 13px !important; }
.brf-sheet__drive input:invalid:not(:placeholder-shown) { border-color: var(--danger) !important; }
.brf-tcard__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.brf-tcard__foot .brf-tcard__open { margin-inline-start: auto; }
.brf-tcard__drive { font-size: 12px; font-weight: 800; text-decoration: none; padding: 3px 10px; border-radius: 999px; background: #EEE9F7; color: #5B4891; }
.brf-tcard__drive:hover { background: #E0D8F0; }

/* Group tabs + chips */
.brf-gtabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 8px; margin-bottom: 4px; scrollbar-width: thin; }
.brf-gtab { font: inherit; font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--white); color: var(--ink-2); cursor: pointer; }
.brf-gtab b { font-size: 12px; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--bg); color: var(--muted); font-variant-numeric: tabular-nums; }
.brf-gtab i { width: 10px; height: 10px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .15); }
.brf-gtab:hover { border-color: var(--muted); }
.brf-gtab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.brf-gtab[aria-selected="true"] b { background: rgba(255, 255, 255, .18); color: #fff; }
.brf-gtab:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
.brf-gchip { justify-self: start; display: inline-block; font-size: 11.5px; font-weight: 800; padding: 1px 8px; border-radius: 999px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 1px solid rgba(0, 0, 0, .08); }
.brf-tcard[hidden] { display: none !important; }
.brf-taskbar__group { display: inline-flex; align-items: center; gap: 8px; }
.brf-taskbar__group select { width: auto !important; padding: 5px 10px !important; font-size: 14px !important; }

/* Groups editor */
.brf-groups { display: grid; gap: 12px; border-top: 1px solid var(--line); padding-top: 16px; }
.brf-groups__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.brf-groups__head h3 { margin: 0 0 4px; font-size: 16px; }
.brf-groups__head p { margin: 0; max-width: 60ch; }
.brf-groups__list { display: grid; gap: 12px; }
.brf-groups__list:empty { display: none; }
.brf-grow { display: grid; grid-template-columns: minmax(220px, 340px) minmax(0, 1fr); gap: 16px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg); }
.brf-grow__preview { container-type: inline-size; aspect-ratio: 16 / 9; border-radius: 6px; display: grid; place-items: center; text-align: center; padding: 4%; overflow: hidden; background-size: cover; background-position: center; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); align-self: start; }
.brf-grow__preview span { font-weight: 800; line-height: 1.2; font-size: calc(var(--fs, 96) * 100cqw / 1920); overflow-wrap: anywhere; }
.brf-grow__fields { display: grid; gap: 10px; min-width: 0; }
.brf-grow__colors { display: flex; gap: 12px; flex-wrap: wrap; }
.brf-grow__colors .brf-field { flex: 1; min-width: 110px; }
.brf-grow__colors input[type=color] { width: 100% !important; height: 38px; padding: 3px !important; cursor: pointer; }
.brf-grow__actions { justify-content: flex-end; gap: 6px; }
.brf-grow .brf-up__preview { max-width: 220px; }
@media (max-width: 700px) { .brf-grow { grid-template-columns: 1fr; } }

/* Divider pages (screen preview) */
.brf-page--divider { container-type: inline-size; }
.brf-divider { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2cqw; text-align: center; padding: 6cqw; background-size: cover; background-position: center; background-repeat: no-repeat; box-shadow: 0 2px 14px rgba(0, 0, 0, .12); overflow: hidden; }
.brf .brf-divider__name { margin: 0; font-weight: 800; line-height: 1.15; font-size: calc(var(--fs, 96) * 100cqw / 1920); color: inherit; overflow-wrap: anywhere; }
.brf .brf-divider__sub { margin: 0; font-size: 1.6cqw; opacity: .8; color: inherit; }
@media print {
	.brf-page--divider .brf-divider { box-shadow: none; }
}

/* Language switch */
.brf-lang { font-size: 14px; font-weight: 700; color: var(--ink-2); text-decoration: none; padding: 4px 10px; border-radius: 999px; border: 1.5px solid var(--line); line-height: 1.4; }
.brf-lang:hover { border-color: var(--sky); color: var(--sky-strong); }
.brf-lang--foot { font-size: 13px; }

/* Project cover */
.brf-cover .brf-up { max-width: 420px; }
.brf-cover .brf-up__preview img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }

/* Dimension marks: arrowheads that stop on a perpendicular end tick */
.brf-sheet { --sh-dim: #EE1D4F; }
.brf-dim__stage { padding-top: 28px; padding-inline-start: 30px; }
.brf-dim__w { top: 0; inset-inline-start: 30px; inset-inline-end: 0; height: 28px; padding: 0 0 13px; display: flex; align-items: flex-end; justify-content: center; }
.brf-dim__w::after { content: none; }
.brf-dim__w::before { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 10px; word-spacing: normal; font-size: 0; overflow: visible;
	background:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M0 5 10 0v10z' fill='%23EE1D4F'/%3E%3C/svg%3E") left 1.5px center / 8px 9px no-repeat,
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M10 5 0 0v10z' fill='%23EE1D4F'/%3E%3C/svg%3E") right 1.5px center / 8px 9px no-repeat,
		linear-gradient(var(--sh-dim), var(--sh-dim)) center / calc(100% - 8px) 1.5px no-repeat,
		linear-gradient(var(--sh-dim), var(--sh-dim)) left center / 1.5px 100% no-repeat,
		linear-gradient(var(--sh-dim), var(--sh-dim)) right center / 1.5px 100% no-repeat; }
.brf-dim__h { top: 28px; width: 28px; padding: 0 0 0 13px; }
.brf-dim__h::after { content: none; }
[dir="rtl"] .brf-dim__h::after { content: none; }
.brf-dim__h::before { content: ""; position: absolute; top: 0; bottom: 0; left: 2px; width: 10px;
	background:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M5 0 10 10H0z' fill='%23EE1D4F'/%3E%3C/svg%3E") center top 1.5px / 9px 8px no-repeat,
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M5 10 10 0H0z' fill='%23EE1D4F'/%3E%3C/svg%3E") center bottom 1.5px / 9px 8px no-repeat,
		linear-gradient(var(--sh-dim), var(--sh-dim)) center / 1.5px calc(100% - 8px) no-repeat,
		linear-gradient(var(--sh-dim), var(--sh-dim)) center top / 100% 1.5px no-repeat,
		linear-gradient(var(--sh-dim), var(--sh-dim)) center bottom / 100% 1.5px no-repeat; }
[dir="rtl"] .brf-dim__h { padding: 0 13px 0 0; }
[dir="rtl"] .brf-dim__h::before { left: auto; right: 2px; }
.brf-dim__w, .brf-dim__h { unicode-bidi: plaintext; }
.brf-dim { align-content: start; } .brf-dim__stage { align-self: start; }

/* =========================================================
   2.3 — notifications bell, project teams, invitations
   ========================================================= */
.brf-btn--ok { background: #2E9E6B; border-color: #2E9E6B; color: #fff !important; }
.brf-btn--ok:hover { background: #24835A; border-color: #24835A; }
.brf-btn--danger-solid { background: var(--danger); border-color: var(--danger); color: #fff !important; }
.brf-btn--danger-solid:hover { filter: brightness(.92); }

/* Bell */
.brf-bell { position: relative; }
.brf-bell > summary { list-style: none; }
.brf-bell > summary::-webkit-details-marker { display: none; }
.brf-bell__btn { position: relative; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: var(--ink); cursor: pointer; border: 1.5px solid var(--line); background: var(--white); }
.brf-bell__btn:hover, .brf-bell[open] .brf-bell__btn { border-color: var(--sky); color: var(--sky-strong); }
.brf-bell__btn:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
.brf-bell__count { position: absolute; top: -5px; inset-inline-end: -6px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; line-height: 19px; text-align: center; border: 2px solid var(--white); font-variant-numeric: tabular-nums; }
.brf-bell__panel { position: absolute; top: calc(100% + 10px); inset-inline-end: -8px; width: min(380px, calc(100vw - 24px)); max-height: min(70vh, 560px); overflow: auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 12px 32px rgba(20, 30, 40, .16); z-index: 50; display: flex; flex-direction: column; }
.brf-bell__head { padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 15px; position: sticky; top: 0; background: var(--white); }
.brf-bell__empty { margin: 0; padding: 28px 16px; text-align: center; color: var(--muted); font-size: 14px; }
.brf-bell__all { display: block; padding: 11px 16px; text-align: center; font-weight: 700; font-size: 14px; border-top: 1px solid var(--line); text-decoration: none; position: sticky; bottom: 0; background: var(--white); }
@media (max-width: 640px) { .brf-bell__panel { position: fixed; top: 64px; inset-inline: 12px; width: auto; } }

.brf-notes { list-style: none; margin: 0; padding: 0; }
.brf-notes > li { border-bottom: 1px solid var(--line); }
.brf-notes > li:last-child { border-bottom: 0; }
.brf-note { display: flex; gap: 12px; padding: 12px 16px; color: var(--ink) !important; text-decoration: none; position: relative; }
a.brf-note:hover { background: var(--bg); }
.brf-note.is-unread { background: var(--sky-50); }
.brf-note.is-unread::after { content: ""; position: absolute; top: 18px; inset-inline-end: 12px; width: 8px; height: 8px; border-radius: 50%; background: var(--sky); }
.brf-note__icon { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--white); border: 1px solid var(--line); display: grid; place-items: center; font-size: 16px; }
.brf-note--ann .brf-note__icon { background: var(--mustard-50, #FBF3D9); border-color: transparent; }
.brf-note__body { display: grid; gap: 2px; min-width: 0; padding-inline-end: 12px; }
.brf-note__label { justify-self: start; font-size: 11px; font-weight: 800; padding: 0 8px; border-radius: 999px; background: var(--mustard); color: var(--ink); }
.brf-note__title { font-size: 14px; line-height: 1.5; }
.brf-note__text { font-size: 13.5px; color: var(--ink-2); line-height: 1.6; overflow-wrap: anywhere; }
.brf-note__time { font-size: 12px; color: var(--muted); }
.brf-notes--page { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.brf-notes--page > li { display: flex; align-items: center; gap: 8px; }
.brf-notes--page > li > .brf-note { flex: 1; padding: 16px 20px; }
.brf-note__del { padding-inline-end: 12px; }
.brf-announce-form { margin-bottom: 16px; }
.brf-announce-form summary { cursor: pointer; font-weight: 700; }
.brf-announce-form form { margin-top: 14px; }

/* Invitation banner */
.brf-invite { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; padding: 14px 18px; margin-bottom: 16px; background: var(--white); border: 1.5px solid var(--sky); border-radius: var(--r); box-shadow: 0 2px 10px rgba(41, 171, 226, .12); }
.brf-invite__icon { font-size: 22px; }
.brf-invite__text { flex: 1; min-width: 220px; margin: 0; font-size: 15px; }
.brf-invite__actions { display: flex; gap: 8px; }

/* Team panel */
.brf-team { border-top: 1px solid var(--line); padding-top: 16px; display: grid; gap: 12px; }
.brf-team h3 { margin: 0; font-size: 16px; }
.brf-team__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.brf-team__row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg); }
.brf-team__who { flex: 1; display: grid; min-width: 0; line-height: 1.4; }
.brf-team__who > * { overflow: hidden; text-overflow: ellipsis; justify-self: start; max-width: 100%; }
.brf-team__badge { font-size: 12px; font-weight: 800; padding: 2px 10px; border-radius: 999px; background: var(--sky-50); color: var(--sky-strong); white-space: nowrap; }
.brf-team__badge--owner { background: var(--ink); color: #fff; }
.brf-team__badge--wait { background: #FBF3D9; color: #7A5D00; }
.brf-team__act:empty { display: none; }
.brf-team__line { display: flex; gap: 8px; }
.brf-team__line input { flex: 1; min-width: 0; }
.brf-shared { display: inline-block; margin-top: 4px; font-size: 12px; font-weight: 700; padding: 1px 10px; border-radius: 999px; background: var(--sky-50); color: var(--sky-strong); }

/* Print: briefs and other pages are A4 portrait with 120px margins on every side;
   production sheets use their own named page (A4 landscape). */
@page { size: A4 portrait; margin: 120px; }
@page sheet { size: A4 landscape; margin: 6mm; }
@media print {
	.brf-page-print .brf-pages { page: sheet; }
	html, body.brf { padding: 0 !important; margin: 0 !important; }
	body.brf-page-dash .brf-dash { max-width: none; width: 100%; margin: 0; padding: 0; display: block; }
	body.brf-page-dash .brf-dash__main { display: block; width: 100%; max-width: none; margin: 0 auto; }
	body.brf-page-dash .brf-brief, body.brf-page-dash .brf-brief__head, body.brf-page-dash .brf-answers { width: 100%; max-width: none; margin-inline: auto; }
	.brf-bell, .brf-invite, .brf-footer { display: none !important; }
}
@media print {
	/* Chrome shifts right-to-left documents off the page when printing; keep the root LTR and the content RTL. */
	html[dir="rtl"] { direction: ltr; }
	html[dir="rtl"] body { direction: rtl; }
}

/* =========================================================
   2.4 — hidden tasks, profile photo, sidebar icons, "coming soon"
   ========================================================= */
.brf-tab__icon { flex: none; opacity: .75; }
.brf-tab.is-active .brf-tab__icon { opacity: 1; color: var(--sky-strong); }
.brf-tab__label { flex: 1; min-width: 0; }

.brf-avatar { overflow: hidden; }
.brf-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brf-avatar--lg { width: 72px; height: 72px; font-size: 28px; }
.brf-avatar-field { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.brf-avatar-field .brf-field { flex: 1; min-width: 220px; }
.brf-avatar-field input[type=file] { font-size: 14px; }

.brf-tcard__hiddenflag { display: none; position: absolute; top: 6px; inset-inline-end: 6px; font-size: 11.5px; font-weight: 800; padding: 1px 9px; border-radius: 999px; background: #5F6B73; color: #fff; }
.brf-tcard.is-hidden { background: #EEF0F2; border-style: dashed; border-color: #C3CAD0; }
.brf-tcard.is-hidden .brf-tcard__thumb img { filter: grayscale(1); opacity: .45; }
.brf-tcard.is-hidden .brf-tcard__hiddenflag { display: inline-block; }
.brf-tcard.is-hidden .brf-tcard__title, .brf-tcard.is-hidden .brf-tcard__meta, .brf-tcard.is-hidden .brf-gchip { opacity: .55; }
.brf-tcard.is-hidden .brf-status { opacity: .5; }
.brf-tcard__hide { font: inherit; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--white); color: var(--ink-2); cursor: pointer; }
.brf-tcard__hide:hover { border-color: var(--muted); color: var(--ink); }
.brf-tcard.is-hidden .brf-tcard__hide { background: var(--ink); border-color: var(--ink); color: #fff; }
.brf-hiddenbar { display: none; align-items: center; gap: 8px; padding: 10px 14px; border-radius: var(--r-sm); background: #EEF0F2; color: #46525A; border: 1.5px dashed #C3CAD0; font-size: 14px; font-weight: 500; }
.brf-hiddenbar.is-hidden { display: flex; }

.brf-soon { background: var(--white); border: 1px dashed var(--line); border-radius: var(--r); padding: 56px 24px; text-align: center; display: grid; justify-items: center; gap: 8px; }
.brf-soon__icon { width: 72px; height: 72px; border-radius: 50%; background: var(--sky-50); color: var(--sky-strong); display: grid; place-items: center; margin-bottom: 6px; }
.brf-soon__icon svg { width: 34px; height: 34px; opacity: 1; }
.brf-soon h2 { font-size: 26px; }
.brf-soon p { margin: 0; max-width: 46ch; color: var(--ink-2); }

/* =========================================================
   2.5 — Quotes: 1920×1080 slides + editor
   ========================================================= */
.brf-page-quote { background: #DDE3E7; }
.brf-qdeck { padding: 24px 16px 40px; display: grid; gap: 24px; justify-items: center; }
.brf-qframe { position: relative; width: min(100%, 1280px); aspect-ratio: 16 / 9; overflow: hidden; box-shadow: 0 4px 18px rgba(0, 0, 0, .14); background: #fff; }
.brf-qscale { position: absolute; top: 0; left: 0; width: 1920px; height: 1080px; transform-origin: 0 0; transform: scale(var(--s, .5)); }
.brf-qafter { max-width: 760px; margin: 0 auto; padding: 0 16px 40px; display: grid; gap: 16px; }
.brf-qreply { display: grid; gap: 14px; }
.brf-qreply h2 { font-size: 20px; margin: 0; }
.brf-qbar strong { flex: 1; text-align: center; }

.brf-qs { position: relative; width: 1920px; height: 1080px; overflow: hidden; background: #fff; color: var(--qink, #2B2F33); font-family: var(--qfont, Tajawal), Tajawal, sans-serif; line-height: 1.5; background-size: cover; background-position: center; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.brf-qs * { box-sizing: border-box; }
.brf-qs__side { position: absolute; top: 0; bottom: 0; right: 0; width: 620px; background-size: cover; background-position: center; }
.brf-qs__body { position: absolute; top: 0; bottom: 170px; left: 0; right: 0; padding: 110px 130px 0; display: flex; flex-direction: column; gap: 40px; }
.brf-qs.has-side .brf-qs__body { right: 620px; padding-inline: 90px; }
[dir="rtl"] .brf-qs.has-side .brf-qs__body { padding-right: 70px; padding-left: 130px; }
[dir="ltr"] .brf-qs.has-side .brf-qs__body { padding-left: 130px; padding-right: 70px; }
.brf .brf-qs__title { margin: 0; padding-bottom: 36px; border-bottom: 2px solid #D5D9DC; font-size: 66px; font-weight: 800; line-height: 1.2; color: var(--qink); }
.brf-qs__foot { position: absolute; left: 120px; right: 120px; bottom: 0; height: 150px; border-top: 3px solid var(--qink); direction: ltr; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; color: var(--qink); z-index: 2; }
.brf-qs__foot.is-light { border-color: rgba(255, 255, 255, .85); color: #fff; }
.brf-qs__me { justify-self: start; display: flex; align-items: center; }
.brf-qs__me img { max-height: 76px; max-width: 360px; object-fit: contain; display: block; }
.brf-qs__me b { font-size: 32px; font-weight: 800; }
.brf-qs__made { font-size: 20px; opacity: .55; white-space: nowrap; }
.brf-qs__extra { justify-self: end; font-size: 28px; font-variant-numeric: tabular-nums; }
.brf-qs__pg { opacity: .7; }

.brf-qs--cover .brf-qs__shade { position: absolute; inset: 0; background: #000; }
.brf-qs__center { position: absolute; top: 0; left: 0; right: 0; bottom: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px; text-align: center; padding: 0 160px; color: var(--qtext, #2B2F33); z-index: 1; }
.brf-qs__intro { margin: 0; font-size: 58px; font-weight: 500; }
.brf .brf-qs__client { margin: 0; font-weight: 800; line-height: 1.12; color: inherit; overflow-wrap: anywhere; }
.brf-qs__clogo { max-width: 1100px; max-height: 440px; object-fit: contain; display: block; }
.brf-qs__no { font-size: 26px; letter-spacing: .12em; opacity: .75; direction: ltr; }
.brf-qs__date { font-size: 30px; }
.brf .brf-qs__thanks { margin: 0; font-weight: 800; line-height: 1.2; color: inherit; }

.brf-qs__timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 34px; }
.brf-qs__timeline li { position: relative; display: grid; grid-template-columns: auto minmax(60px, 1fr) auto; align-items: center; gap: 30px; padding-inline-start: 60px; font-size: 36px; }
.brf-qs__timeline li::before { content: ""; position: absolute; inset-inline-start: 0; top: 50%; width: 24px; height: 24px; margin-top: -12px; border-radius: 50%; background: var(--qaccent); }
.brf-qs__timeline li:not(:last-child)::after { content: ""; position: absolute; inset-inline-start: 11px; top: 50%; height: calc(100% + 34px); width: 2px; background: var(--qaccent); opacity: .7; }
.brf-qs__timeline i { height: 2px; background: #D5D9DC; }
.brf-qs__dur b { font-weight: 800; margin-inline-end: 6px; }
.brf-qs__ttotal { margin: 10px 0 0; font-size: 32px; color: var(--qaccent); }

.brf-qs__costs { width: 100%; border-collapse: collapse; font-size: 36px; }
.brf-qs__costs th { text-align: start; font-size: 40px; font-weight: 800; padding: 0 32px 16px; }
.brf-qs__costs td { padding: 12px 32px; }
.brf-qs__costs tbody tr:nth-child(odd) td { background: #F1F2F3; }
.brf-qs__costs .num { text-align: end; white-space: nowrap; font-variant-numeric: tabular-nums; }
.brf-qs__costs--total { margin-top: auto; }
.brf-qs__costs--total tbody tr td { background: transparent !important; }
.brf-qs__costs--total .is-sub td { font-size: 30px; opacity: .75; padding-block: 8px; }
.brf-qs__costs--total .is-total td { font-size: 44px; font-weight: 800; border-top: 2px solid #D5D9DC; padding-top: 22px; }
.brf-qs__costs--total .is-total b { font-size: 60px; }
.brf-qs__costs--total .is-total small { font-size: 28px; font-weight: 500; }

.brf-qs__policies { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; font-size: 36px; }
.brf-qs__policies li { position: relative; padding-inline-start: 56px; }
.brf-qs__policies li::before { content: ""; position: absolute; inset-inline-start: 0; top: .55em; width: 20px; height: 20px; border-radius: 50%; background: var(--qink); }
.brf-qs__pay { margin-top: auto; display: flex; justify-content: space-between; align-items: flex-end; gap: 60px; }
.brf-qs__bank { display: flex; align-items: center; gap: 32px; }
.brf-qs__bank img { max-height: 150px; max-width: 220px; object-fit: contain; }
.brf-qs__bank div { display: grid; gap: 4px; }
.brf-qs__bank strong { font-size: 40px; font-weight: 800; }
.brf-qs__bank span { font-size: 34px; font-variant-numeric: tabular-nums; }
.brf-qs__contact { display: grid; gap: 18px; font-size: 34px; }
.brf-qs__contact span { display: flex; align-items: center; gap: 18px; }
.brf-qs__contact svg { width: 46px; height: 46px; flex: none; }

.brf-qs__text { font-size: 36px; line-height: 1.75; }
.brf-qs__text p { margin: 0 0 26px; }
.brf-qs__inline { max-width: 100%; max-height: 380px; object-fit: contain; align-self: flex-start; border-radius: 12px; }

@page quote { size: 1920px 1080px; margin: 0; }
@media print {
	.brf-page-quote .brf-qdeck { page: quote; display: block; padding: 0; }
	.brf-page-quote, .brf-page-quote body { background: #fff !important; }
	.brf-qframe { width: 1920px; height: 1080px; aspect-ratio: auto; box-shadow: none; margin: 0; break-after: page; page-break-after: always; }
	.brf-qframe:last-child { break-after: auto; page-break-after: auto; }
	.brf-qscale { transform: none !important; }
	.brf-qbar, .brf-qafter { display: none !important; }
}

/* Editor */
.brf-qeditor { display: grid; gap: 16px; }
.brf-qeditor > .brf-card h2 { font-size: 18px; margin: 0; }
.brf-qpages { display: grid; gap: 10px; }
.brf-qpage { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); }
.brf-qpage > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 12px 16px; cursor: pointer; flex-wrap: wrap; }
.brf-qpage > summary::-webkit-details-marker { display: none; }
.brf-qpage[open] > summary { border-bottom: 1px solid var(--line); }
.brf-qpage__n { min-width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.brf-qpage__name { font-weight: 800; flex: 1; min-width: 120px; }
.brf-qpage__type { font-size: 12.5px; color: var(--muted); }
.brf-qpage__flag { display: none; font-size: 12px; font-weight: 800; padding: 1px 9px; border-radius: 999px; background: #5F6B73; color: #fff; }
.brf-qpage__tools { display: flex; align-items: center; gap: 4px; }
.brf-qpage__body { padding: 16px; }
.brf-qpage.is-hidden { background: #EEF0F2; border-style: dashed; }
.brf-qpage.is-hidden .brf-qpage__n { background: #9AA3A9; }
.brf-qpage.is-hidden .brf-qpage__name { opacity: .6; }
.brf-qpage.is-hidden .brf-qpage__flag { display: inline-block; }
.brf-qrows { display: grid; gap: 8px; }
.brf-qrow { display: flex; gap: 8px; align-items: center; }
.brf-qrow > input:first-child { flex: 1; min-width: 0; }
.brf-qrow__num { width: 110px !important; flex: none; text-align: center; }
.brf-qrow select { width: auto !important; max-width: 200px; }
.brf-qrow__tools { display: flex; gap: 2px; }
.brf-qrows > .brf-btn { justify-self: start; }
.brf-qtotal { margin: 0; font-size: 15px; }
.brf-qtotal b { font-size: 18px; }
.brf-logos--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.brf-logos--1 { display: grid; grid-template-columns: minmax(0, 1fr); }
.brf-qdefaults summary { cursor: pointer; font-weight: 700; }
.brf-qdefaults form { margin-top: 14px; }
.brf-qlist .brf-list__item { gap: 12px; }
@media (max-width: 700px) { .brf-logos--2 { grid-template-columns: 1fr; } .brf-qrow { flex-wrap: wrap; } }
[dir="rtl"] .brf-qs__foot > * { direction: rtl; }
[dir="ltr"] .brf-qs__foot > * { direction: ltr; }
.brf .brf-qs h1, .brf .brf-qs h2 { text-wrap: balance; }
.brf-qbar__btns { display: inline-flex; gap: 8px; flex-wrap: wrap; }

/* ---------- drag handle (quote rows, invoice items) ---------- */
.brf-grip { display: inline-grid; place-items: center; width: 26px; height: 32px; flex: none; color: var(--muted); cursor: grab; user-select: none; -webkit-user-select: none; touch-action: none; font-size: 15px; letter-spacing: -2px; border-radius: 6px; }
.brf-grip:hover, .brf-grip:focus-visible { background: var(--bg); color: var(--ink); outline: none; }
.is-dragging { position: relative; z-index: 6; background: var(--white); box-shadow: 0 8px 22px rgba(0, 0, 0, .18); border-radius: var(--r-sm); cursor: grabbing; }
.is-sorting, .is-sorting * { cursor: grabbing !important; }

/* ---------- simple rich-text editor (quote pages) ---------- */
.brf-rte__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px; background: var(--bg); border: 1.5px solid var(--line); border-bottom: 0; border-radius: var(--r-sm) var(--r-sm) 0 0; }
.brf-rte__btn { min-width: 36px; height: 34px; padding: 0 10px; border: 1px solid var(--line); background: var(--white); border-radius: 6px; font: inherit; font-weight: 700; cursor: pointer; color: var(--ink); }
.brf-rte__btn:hover { border-color: var(--sky); color: var(--sky-strong); }
.brf-rte__mark { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--white); box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.brf-rte__mark:hover { box-shadow: 0 0 0 2px var(--sky); }
.brf-rte__sep { width: 1px; height: 22px; background: var(--line); margin-inline: 2px; }
.brf-rte__area { min-height: 160px; max-height: 420px; overflow: auto; padding: 12px 14px; background: var(--white); border: 1.5px solid var(--line); border-radius: 0 0 var(--r-sm) var(--r-sm); font-size: 18px; line-height: 1.8; }
.brf-rte__area:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 3px var(--sky-50); }
.brf-rte__area p { margin: 0 0 .7em; }
.brf-rte__area b, .brf-rte__area strong { font-weight: 800; }
.brf-qs__text b, .brf-qs__text strong { font-weight: 800; }
.brf-qs__text span[style*="background"] { border-radius: 6px; padding: 0 .12em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.brf-rte__area span[style*="background"] { border-radius: 4px; }

/* ---------- editor with the live preview on the left ---------- */
.brf-dash:has(.brf-qlayout) { max-width: 1600px; }
.brf-qlayout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.brf-qlayout__form { min-width: 0; display: grid; gap: 16px; }
.brf-qlayout__preview { min-width: 0; background: #DDE3E7; border-radius: var(--r); padding: 10px; }
.brf-qlayout.is-off .brf-qlayout__preview { display: none; }
.brf-qlayout__bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 2px 4px 8px; }
.brf-qlayout__deck { max-height: 70vh; overflow: auto; }
.brf-qlayout__deck .brf-qdeck { padding: 0; gap: 12px; }
.brf-qlayout__deck .brf-qframe { width: 100%; }
@media (min-width: 1280px) {
	/* the preview sits on the physical left in both languages */
	.brf-qlayout { direction: ltr; grid-template-columns: minmax(380px, 520px) minmax(0, 1fr); }
	.brf-qlayout.is-off { grid-template-columns: minmax(0, 1fr); }
	.brf-qlayout > * { direction: initial; }
	html[dir="rtl"] .brf-qlayout > * { direction: rtl; }
	.brf-qlayout__preview { position: sticky; top: 76px; order: -1; }
	.brf-qlayout__deck { max-height: calc(100vh - 150px); }
}

/* ---------- password fields with a show/hide button ---------- */
.brf-pw { position: relative; display: block; }
.brf-pw > input { padding-inline-end: 46px !important; }
.brf-pw__btn { position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; display: grid; place-items: center; border: 0; background: transparent; color: var(--muted); border-radius: 6px; cursor: pointer; padding: 0; }
.brf-pw__btn:hover, .brf-pw__btn:focus-visible { background: var(--bg); color: var(--ink); outline: none; }
.brf-pw__btn[aria-pressed="true"] { color: var(--sky-strong); }
.brf-pw__btn svg { width: 20px; height: 20px; }

/* ---------- Professional account request ---------- */
.brf-pro-ask { display: grid; gap: 6px; justify-items: start; }
.brf-pro-ask form { margin: 0; }
.brf-pro-note { color: var(--mustard-ink); background: var(--mustard-50); padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.brf-plan .brf-pro-ask { justify-items: stretch; }
.brf-plan .brf-pro-note { text-align: center; border-radius: 8px; font-size: 12px; }
.brf-pro-wait { display: inline-block; padding: 8px 14px; background: var(--ok-50); color: var(--ok); border-radius: var(--r-sm); font-weight: 700; font-size: 14px; }
.brf-topbar__pro { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; background: var(--mustard-50); color: var(--mustard-ink) !important; border-radius: 999px; font-weight: 800; font-size: 14px; white-space: nowrap; }
.brf-topbar__pro:hover { background: #F6E7AE; color: var(--mustard-ink) !important; }
.brf-topbar__pro span { color: var(--mustard); }
.brf-asks { display: grid; gap: 12px; border-color: var(--mustard); background: #FFFDF5; }
.brf-asks h2 { font-size: 18px; margin: 0; display: flex; align-items: center; gap: 8px; }
.brf-asks__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.brf-asks__list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.brf-asks__who { display: grid; gap: 2px; min-width: 0; }
@media (max-width: 640px) { .brf-topbar__pro { font-size: 12.5px; padding: 5px 9px; } }

/* ---------- messages to members ---------- */
.brf-camp-stat { display: grid; gap: 10px; }
.brf-camp-bar { height: 10px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.brf-camp-bar span { display: block; height: 100%; background: var(--sky); border-radius: 999px; transition: width .3s; }
.brf-camp-preview { width: 100%; height: 480px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; }

/* ---------- contracts ---------- */
.brf-ctnew { display: grid; gap: 18px; }
.brf-ctypes { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.brf-ctypes legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.brf-ctype { display: flex; gap: 10px; align-items: flex-start; padding: 14px; border: 1.5px solid var(--line); border-radius: var(--r); cursor: pointer; background: var(--white); }
.brf-ctype:has(input:checked) { border-color: var(--sky); background: var(--sky-50); }
.brf-ctype b { display: block; }
.brf-ctype small { color: var(--muted); }
.brf-ctbar { display: grid; gap: 14px; }
.brf-ctbar__opts { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: end; }
.brf-ctbar__opts input[type=color] { width: 56px; height: 40px; padding: 2px; }
.brf-cframe-wrap { background: #DDE3E7; border-radius: var(--r); padding: 12px 0; overflow-x: auto; }
.brf-cframe { display: block; width: 100%; min-width: 820px; border: 0; background: #E7ECF0; height: 1200px; }
.brf-cframe-wrap--public { border-radius: 0; padding: 0; }
.brf-page-contract { background: #E7ECF0; }
.brf-ctlegal { text-align: center; }
@media print { .brf-page-contract .brf-cframe-wrap { padding: 0; background: none; } }
