/* SA Budget Calculator — studio dashboard. Quiet warm neutrals, brand red only where it means something. */
.sabc-admin,
.sabc-login {
	--sa-bg: #f2f0ee;
	--sa-surface: #fff;
	--sa-side: #2b2421;
	--sa-side-ink: #cfc5be;
	--sa-ink: #231e1b;
	--sa-muted: #7a706a;
	--sa-line: #e5dfda;
	--sa-line-strong: #cfc6bf;
	--sa-red: #c40000;
	--sa-red-dark: #8f0000;
	--sa-red-soft: #fbeaea;
	--sa-olive: #d6d38c;
	--sa-radius: 10px;
	--sa-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Open Sans', Roboto, Helvetica, Arial, sans-serif;
	--sa-display: 'Oswald', 'Arial Narrow', 'Segoe UI', sans-serif;
	font-family: var(--sa-font);
	color: var(--sa-ink);
	font-size: 14px;
	line-height: 1.45;
}
.sabc-admin *,
.sabc-admin *::before,
.sabc-admin *::after { box-sizing: border-box; }
.sabc-admin :where(h1, h2, h3, p, dl, dd, ol, ul) { margin: 0; padding: 0; }
.sabc-admin :where(h1, h2, h3, h4) { font-family: inherit; letter-spacing: normal; text-transform: none; color: inherit; }
.sabc-admin :where(button, input, select, textarea) { font-family: inherit; font-size: inherit; letter-spacing: normal; text-transform: none; box-shadow: none; }
.sabc-admin a { color: inherit; }
.sabc-admin :focus-visible { outline: 2px solid var(--sa-red-dark); outline-offset: 2px; }

/* ------------------------------------------------------------ shell */
.sabc-admin--wp { margin: 16px 16px 0 0; }
.sabc-wrap { margin: 0 !important; }
.sabc-admin.is-fullscreen { position: fixed !important; inset: 0 !important; z-index: 99999; width: auto !important; max-width: none !important; height: auto !important; margin: 0 !important; padding: 0 !important; background: var(--sa-bg); overflow: hidden; }
html.sabc-lock,
html.sabc-lock body { overflow: hidden !important; }

.sa-app {
	display: grid;
	grid-template-columns: 228px minmax(0, 1fr);
	min-height: 70vh;
	background: var(--sa-bg);
	border-radius: 12px;
	overflow: hidden;
}
.sabc-admin--wp .sa-app { min-height: calc(100vh - 32px - 40px); border: 1px solid var(--sa-line); }
.is-fullscreen .sa-app { height: 100%; border-radius: 0; }
.sabc-admin--front:not(.is-fullscreen) .sa-app { border: 1px solid var(--sa-line); }

.sa-side { background: var(--sa-side); color: var(--sa-side-ink); display: flex; flex-direction: column; padding: 18px 12px; gap: 18px; }
.is-fullscreen .sa-side { overflow-y: auto; }
.sa-brand { display: flex; flex-direction: column; align-items: stretch; gap: 7px; position: relative; }
/* The logo's lettering is transparent, so it always sits on a light plate. */
.sa-brand__plate { display: block; background: #fff; border-radius: 9px; padding: 9px 10px; }
.sa-brand__plate img { display: block; width: 100%; height: auto; max-width: 190px; margin: 0 auto; }
.sa-brand__cap { color: #9d928b; font-size: 11.5px; padding-left: 4px; letter-spacing: .02em; }
.sa-menu-btn { display: none !important; color: #fff !important; }
.sa-nav { display: flex; flex-direction: column; gap: 2px; }
.sa-nav__item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 10px;
	border-radius: 8px;
	color: var(--sa-side-ink) !important;
	text-decoration: none !important;
	font-size: 14px;
	position: relative;
	transition: background .12s, color .12s;
}
.sa-nav__item:hover { background: rgba(255, 255, 255, .06); color: #fff !important; }
.sa-nav__item.is-on { background: rgba(255, 255, 255, .1); color: #fff !important; }
.sa-nav__item.is-on::before { content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--sa-red); }
.sa-nav__item svg { flex: none; opacity: .85; }
.sa-side__foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; border-top: 1px solid rgba(255, 255, 255, .08); padding-top: 12px; }
.sa-me { padding: 0 10px 8px; }
.sa-me b { display: block; color: #fff; font-weight: 600; font-size: 13px; }
.sa-me small { color: #9d928b; font-size: 12px; }

.sa-main { padding: 26px 30px 60px; min-width: 0; }
.is-fullscreen .sa-main { overflow-y: auto; height: 100%; }

/* ------------------------------------------------------------ page head */
.sa-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.sa-head h1 { font-family: var(--sa-display); font-weight: 500; font-size: 27px; line-height: 1.15; letter-spacing: .005em; color: var(--sa-ink); }
.sa-head p { color: var(--sa-muted); margin-top: 3px; max-width: 64ch; }
.sa-head__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.sa-back { display: inline-flex; align-items: center; gap: 4px; color: var(--sa-muted) !important; text-decoration: none !important; font-size: 13px; margin-bottom: 8px; }
.sa-back:hover { color: var(--sa-ink) !important; }
.sa-sub-h { font-size: 14px; font-weight: 600; margin: 18px 0 8px !important; display: flex; align-items: center; gap: 8px; }
.sa-sub-h small { font-weight: 400; color: var(--sa-muted); }
.sa-sub-h i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.sa-muted { color: var(--sa-muted); }
.sa-small { font-size: 12.5px; margin: 6px 0 10px !important; }
.sa-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.sa-link { background: none; border: 0; padding: 0; color: var(--sa-red-dark) !important; font-weight: 600; font-size: 13px; cursor: pointer; text-decoration: none !important; }
.sa-link:hover { text-decoration: underline !important; }
.sa-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.is-dim { opacity: .55; transition: opacity .15s; }

/* ------------------------------------------------------------ cards */
.sa-card { background: var(--sa-surface); border: 1px solid var(--sa-line); border-radius: var(--sa-radius); padding: 16px 18px; margin-bottom: 16px; }
.sa-card--flush { padding: 0; overflow: hidden; }
.sa-card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.sa-card__head h2,
.sa-card__title { font-size: 15px; font-weight: 600; color: var(--sa-ink); }
.sa-card--flush .sa-card__head { padding: 14px 18px 0; }
.sa-card__title { margin-bottom: 10px !important; }
.sa-card__row { display: flex; align-items: baseline; justify-content: space-between; }
.sa-grid-2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; }

/* KPIs */
.sa-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.sa-kpi { background: var(--sa-surface); border: 1px solid var(--sa-line); border-radius: var(--sa-radius); padding: 14px 16px; text-decoration: none !important; color: var(--sa-ink) !important; display: block; }
.sa-kpi span { display: block; font-size: 12.5px; color: var(--sa-muted); }
.sa-kpi strong { display: block; margin-top: 4px; font-family: var(--sa-display); font-weight: 500; font-size: 26px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.sa-kpi strong small { font-size: 13px; color: var(--sa-muted); font-family: var(--sa-font); font-weight: 600; }
.sa-kpi--accent { border-color: var(--sa-red); background: var(--sa-red-soft); }
.sa-kpi--accent strong { color: var(--sa-red-dark); }
a.sa-kpi--accent:hover { background: #f6dcdc; }

/* chart */
.sa-chart { width: 100%; height: auto; display: block; }
.sa-chart__grid { stroke: var(--sa-line); stroke-width: 1; }
.sa-chart__axis { fill: var(--sa-muted); font-size: 11px; }
.sa-chart__lead { fill: var(--sa-red); }
.sa-chart__draft { fill: #ddd3cc; }
.sa-legend { font-size: 12px; color: var(--sa-muted); display: inline-flex; align-items: center; gap: 6px; }
.sa-legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; margin-left: 8px; }
.sa-legend i.is-lead { background: var(--sa-red); }
.sa-legend i.is-draft { background: #ddd3cc; }

/* funnel */
.sa-funnel { display: grid; gap: 7px; }
.sa-funnel__row { display: grid; grid-template-columns: 118px minmax(0, 1fr) 34px 38px; align-items: center; gap: 8px; font-size: 13px; }
.sa-funnel__row b { text-align: right; font-variant-numeric: tabular-nums; }
.sa-funnel__row em { font-style: normal; color: var(--sa-muted); font-size: 12px; text-align: right; }
.sa-funnel__bar { height: 9px; border-radius: 9px; background: #efeae6; overflow: hidden; }
.sa-funnel__bar i { display: block; height: 100%; background: var(--sa-ink); border-radius: 9px; }
.sa-funnel__bar--pkg i { background: #a39b4a; }

/* ------------------------------------------------------------ tables */
.sa-table-wrap { overflow-x: auto; }
.sa-table { width: 100%; border-collapse: collapse; font-size: 13.5px; background: transparent; border: 0; }
.sa-table th {
	text-align: left;
	font-weight: 600;
	font-size: 12px;
	color: var(--sa-muted);
	padding: 10px 14px;
	border-bottom: 1px solid var(--sa-line);
	background: #faf8f7;
	white-space: nowrap;
}
.sa-table td { padding: 10px 14px; border-bottom: 1px solid var(--sa-line); vertical-align: middle; }
.sa-table tbody tr:last-child td { border-bottom: 0; }
.sa-table td b { font-weight: 600; }
.sa-table td small { display: block; color: var(--sa-muted); font-size: 12px; }
.sa-table .is-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sa-table .is-tight { width: 1%; white-space: nowrap; }
.sa-table .is-unit { width: 1%; color: var(--sa-muted); font-size: 12px; }
.sa-table tr.is-link { cursor: pointer; }
.sa-table tr.is-link:hover td,
.sa-table tr.is-link:focus td { background: #faf7f5; }
.sa-table tr.is-link:focus { outline: none; }
.sa-table tr.is-link:focus-visible td:first-child { box-shadow: inset 3px 0 0 var(--sa-red); }
.sa-table tr.is-off td { color: var(--sa-muted); }
.sa-table tr.is-off td b { font-weight: 500; }
.sa-table--form td { padding: 6px 10px; }
.sa-table--form .sa-num { width: 100%; min-width: 84px; }
.sa-table tr.is-base td { background: #faf8f7; }
.sa-table tr.is-group td { padding-top: 10px; }
.sa-table tr.is-variant td:first-child { padding-left: 30px; color: var(--sa-ink); }
.sa-price { margin-bottom: 12px; }
.sa-price th:first-child { color: var(--sa-ink); font-size: 14px; }

.sa-pill { display: inline-block; font-size: 12px; font-weight: 600; line-height: 1; padding: 4px 8px; border-radius: 999px; white-space: nowrap; }
.sa-pill--red { background: var(--sa-red-soft); color: var(--sa-red-dark); }
.sa-pill--amber { background: #fcf0d3; color: #7a5200; }
.sa-pill--blue { background: #e4edfb; color: #1d4580; }
.sa-pill--green { background: #e2f3e6; color: #1b6630; }
.sa-pill--grey { background: #efebe8; color: #6b625c; }

.sa-chips { display: inline-flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
td:not(.is-num) > .sa-chips { justify-content: flex-start; }
.sa-chips span { background: #f1ede9; border-radius: 5px; padding: 2px 7px; font-size: 12px; color: var(--sa-ink); }
.sa-chips span i { font-style: normal; color: var(--sa-muted); }

/* tabs & filters */
.sa-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 12px; border-bottom: 1px solid var(--sa-line); }
.sa-tab {
	background: none !important;
	border: 0 !important;
	border-bottom: 2px solid transparent !important;
	margin-bottom: -1px;
	padding: 8px 10px !important;
	color: var(--sa-muted) !important;
	font-weight: 600;
	font-size: 13.5px;
	cursor: pointer;
	display: inline-flex;
	gap: 6px;
	align-items: center;
	border-radius: 0 !important;
}
.sa-tab span { background: #ebe6e2; color: var(--sa-muted); border-radius: 999px; padding: 1px 7px; font-size: 11.5px; }
.sa-tab:hover { color: var(--sa-ink) !important; }
.sa-tab.is-on { color: var(--sa-ink) !important; border-bottom-color: var(--sa-red) !important; }
.sa-tab.is-on span { background: var(--sa-red-soft); color: var(--sa-red-dark); }
.sa-filters { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.sa-filters input[type=search] { flex: 1 1 260px; max-width: 420px; }
.sa-pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 12px; color: var(--sa-muted); font-size: 13px; }

/* ------------------------------------------------------------ controls */
.sa-input {
	width: 100%;
	min-height: 36px;
	padding: 6px 10px;
	border: 1px solid var(--sa-line-strong);
	border-radius: 8px;
	background: #fff;
	color: var(--sa-ink);
	font-size: 14px;
	line-height: 1.3;
}
select.sa-input { width: auto; padding-right: 28px; }
.sa-field select.sa-input,
.sa-detail select.sa-input { width: 100%; }
textarea.sa-input { resize: vertical; min-height: 70px; }
.sa-input:focus { outline: none; border-color: var(--sa-ink); box-shadow: 0 0 0 3px rgba(35, 30, 27, .08); }
.sa-input:disabled { background: #f6f3f1; color: var(--sa-muted); }
.sa-num { text-align: right; font-variant-numeric: tabular-nums; max-width: 130px; }
.sa-num.is-dirty { border-color: #b8a24a; background: #fdfbe9; }
.sa-color { width: 48px; height: 34px; padding: 2px; border: 1px solid var(--sa-line-strong); border-radius: 8px; background: #fff; }

.sa-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 36px;
	padding: 0 14px !important;
	border: 1px solid var(--sa-line-strong) !important;
	border-radius: 8px !important;
	background: #fff !important;
	color: var(--sa-ink) !important;
	font-size: 13.5px !important;
	font-weight: 600 !important;
	line-height: 1 !important;
	text-decoration: none !important;
	cursor: pointer;
	white-space: nowrap;
	transition: background .12s, border-color .12s;
}
.sa-btn:hover { background: #f7f4f2 !important; border-color: #b9aea6 !important; }
.sa-btn:disabled { opacity: .5; cursor: default; }
.sa-btn svg { width: 16px; height: 16px; }
.sa-btn--primary { background: var(--sa-red) !important; border-color: var(--sa-red) !important; color: #fff !important; }
.sa-btn--primary:hover { background: #a80000 !important; border-color: #a80000 !important; }
.sa-btn--danger-ghost { color: var(--sa-red-dark) !important; }
.sa-btn--danger-ghost:hover { background: var(--sa-red-soft) !important; border-color: #e3b5b5 !important; }
.sa-btn--wa { margin-top: 12px; width: 100%; background: #eaf6ee !important; border-color: #bfe2c9 !important; color: #16572a !important; }
.sa-btn--small { min-height: 30px; padding: 0 10px !important; font-size: 12.5px !important; margin-top: 8px; }
.sa-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 7px !important;
	background: transparent !important;
	color: var(--sa-muted) !important;
	cursor: pointer;
	font-size: 20px;
	line-height: 1;
}
.sa-icon-btn:hover:not(:disabled) { background: #f1ede9 !important; color: var(--sa-ink) !important; }
.sa-icon-btn.is-danger:hover:not(:disabled) { background: var(--sa-red-soft) !important; color: var(--sa-red-dark) !important; }
.sa-icon-btn:disabled { opacity: .3; cursor: default; }
.sa-order,
.sa-row-actions { display: flex; gap: 2px; }
.sa-order .sa-icon-btn { width: 26px; height: 26px; }

.sa-toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; margin: 6px 0; }
.sa-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sa-toggle__track { flex: none; width: 36px; height: 20px; border-radius: 20px; background: #d4cbc4; position: relative; transition: background .15s; }
.sa-toggle__track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .15s; }
.sa-toggle input:checked + .sa-toggle__track { background: #2f7d45; }
.sa-toggle input:checked + .sa-toggle__track::after { transform: translateX(16px); }
.sa-toggle input:focus-visible + .sa-toggle__track { outline: 2px solid var(--sa-red-dark); outline-offset: 2px; }
.sa-toggle.is-disabled { cursor: default; opacity: .6; }

.sa-field { display: flex; flex-direction: column; gap: 5px; margin: 0; }
.sa-field--wide { grid-column: 1 / -1; }
.sa-field__label { font-size: 13px; font-weight: 600; color: var(--sa-ink); }
.sa-field__hint { font-size: 12px; color: var(--sa-muted); }
.sa-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; margin: 4px 0 12px; }
.sa-form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sa-form-grid .sa-num { max-width: none; text-align: left; }
.sa-form-error { background: var(--sa-red-soft); color: var(--sa-red-dark); border-radius: 8px; padding: 8px 12px; margin-bottom: 12px !important; font-weight: 600; font-size: 13px; }
.sa-divider { height: 1px; background: var(--sa-line); margin: 16px 0; }
.sa-stack { display: flex; flex-direction: column; gap: 10px; }
.sa-stack > .sa-toggle { margin: 0; }
.sa-row { display: flex; gap: 8px; align-items: center; }
.sa-row--wrap { flex-wrap: wrap; }
.sa-inline { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 13.5px; }
.sa-inline .sa-num { width: 90px; }
.sa-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 6px 14px; }
.sa-check { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; margin: 4px 0; }
.sa-check input,
.sa-radio input { accent-color: var(--sa-red); width: 16px; height: 16px; margin: 0; }
.sa-radio { display: inline-flex; padding: 4px; cursor: pointer; }

/* notices & states */
.sa-notice { background: #fff; border: 1px solid var(--sa-line); border-left: 3px solid var(--sa-ink); border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; font-size: 13.5px; }
.sa-notice a { color: var(--sa-red-dark); font-weight: 600; }
.sa-notice--warn { border-left-color: #d49a00; background: #fffaf0; }
.sa-loading { display: flex; align-items: center; gap: 10px; padding: 40px 20px; justify-content: center; color: var(--sa-muted); }
.sa-loading span { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--sa-line-strong); border-top-color: var(--sa-red); animation: sa-spin .7s linear infinite; }
.sa-error-box { padding: 24px; text-align: center; color: var(--sa-red-dark); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.sa-empty { padding: 40px 20px; text-align: center; color: var(--sa-muted); }
.sa-empty h3 { color: var(--sa-ink); font-size: 15px; margin-bottom: 4px !important; }

/* ------------------------------------------------------------ estimate detail */
.sa-detail { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.sa-detail__side .sa-card { margin-bottom: 12px; }
.sa-detail__side textarea { margin-bottom: 8px; }
.sa-dl { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 6px 10px; font-size: 13.5px; }
.sa-dl dt { color: var(--sa-muted); }
.sa-dl dd { word-break: break-word; }
.sa-dl a { color: var(--sa-red-dark); }
.sa-dl--boxed { background: #faf8f7; border: 1px solid var(--sa-line); border-radius: 8px; padding: 12px; margin: 12px 0; grid-template-columns: 100px minmax(0, 1fr); }
.sa-history { list-style: none; display: grid; gap: 10px; max-height: 280px; overflow-y: auto; }
.sa-history li { display: flex; flex-direction: column; font-size: 13px; padding-left: 12px; border-left: 2px solid var(--sa-line); }
.sa-history small { color: var(--sa-muted); font-size: 12px; }

.sabc-ev--admin { --ev-field: #fff; }
.sabc-ev--admin .sabc-ev__room { background: #fcfbfa; }
.sabc-ev--admin .sabc-ev__btn { background: #fff; }

/* ------------------------------------------------------------ add-ons split */
.sa-split { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; align-items: start; }
.sa-roomnav { display: flex; flex-direction: column; gap: 2px; background: var(--sa-surface); border: 1px solid var(--sa-line); border-radius: var(--sa-radius); padding: 6px; }
.sa-roomnav__item {
	display: flex !important;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	width: 100%;
	padding: 8px 10px !important;
	border: 0 !important;
	border-radius: 7px !important;
	background: transparent !important;
	color: var(--sa-ink) !important;
	font-size: 13.5px !important;
	text-align: left;
	cursor: pointer;
}
.sa-roomnav__item small { color: var(--sa-muted); font-size: 12px; }
.sa-roomnav__item:hover { background: #f5f2ef !important; }
.sa-roomnav__item.is-on { background: var(--sa-ink) !important; color: #fff !important; }
.sa-roomnav__item.is-on small { color: #cfc5be; }
.sa-roomnav__item.is-off span { text-decoration: line-through; opacity: .7; }

/* pricing */
.sa-adjust .sa-row { margin-top: 2px; }
.has-savebar { padding-bottom: 84px; }
.sa-savebar {
	position: fixed;
	bottom: calc(14px + env(safe-area-inset-bottom, 0px));
	left: 18px;
	right: 18px;
	z-index: 100000;
	display: flex;
	align-items: center;
	gap: 10px;
	justify-content: flex-end;
	background: var(--sa-ink);
	color: #fff;
	border-radius: 14px;
	padding: 10px 12px 10px 18px;
	box-shadow: 0 10px 30px rgba(35, 30, 27, .3);
}
.sa-savebar__msg { margin-right: auto; font-weight: 600; display: flex; align-items: center; gap: 8px; min-width: 0; color: #cfc5be; }
.sa-savebar.is-dirty .sa-savebar__msg { color: #fff; }
.sa-savebar__dot { width: 9px; height: 9px; border-radius: 50%; background: #f5a623; flex: none; box-shadow: 0 0 0 4px rgba(245, 166, 35, .25); }
.sa-savebar .sa-btn:not(.sa-btn--primary) { background: transparent !important; color: #fff !important; border-color: rgba(255, 255, 255, .3) !important; }
.sa-savebar .sa-btn:disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 520px) {
	.sa-savebar { padding: 8px 8px 8px 12px; gap: 6px; border-radius: 12px; }
	.sa-savebar__msg { font-size: 12.5px; }
	.sa-savebar .sa-btn { padding-left: 12px; padding-right: 12px; }
}

/* settings */
.sa-settings { padding: 20px 22px; }
.sa-list-editor { display: grid; gap: 6px; max-width: 520px; }
.sa-list-editor__row { display: flex; gap: 6px; align-items: center; }
.sa-list-editor__row .sa-num { width: 84px; }
.sa-pkg-edit { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.sa-pkg-edit__col { display: flex; flex-direction: column; gap: 10px; }
.sa-pkg-edit__col .sa-sub-h { margin-top: 0 !important; }
.sa-perm { border: 1px solid var(--sa-line); border-radius: 8px; overflow: hidden; }
.sa-perm td:not(:first-child),
.sa-perm th:not(:first-child) { text-align: center; width: 110px; }
.sa-perm td { padding: 6px 14px; }

/* ------------------------------------------------------------ modal & toasts */
.sa-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: rgba(35, 30, 27, .45);
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 6vh 16px 16px;
	overflow-y: auto;
	animation: sa-fade .15s ease-out;
}
.sa-modal__box { width: 100%; max-width: 560px; background: #fff; border-radius: 14px; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.sa-modal__box.is-wide { max-width: 760px; }
.sa-modal header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 8px; }
.sa-modal header h2 { font-family: var(--sa-display); font-weight: 500; font-size: 21px; }
.sa-modal__body { padding: 6px 20px 16px; }
.sa-modal__body > p { margin-bottom: 10px !important; }
.sa-modal footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--sa-line); background: #faf8f7; border-radius: 0 0 14px 14px; }
.sa-toasts { position: fixed; right: 20px; bottom: 20px; z-index: 100001; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.sa-toast { background: var(--sa-ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 13.5px; font-weight: 600; box-shadow: 0 8px 20px rgba(0, 0, 0, .2); animation: sa-rise .2s ease-out; max-width: 380px; }
.sa-toast--error { background: var(--sa-red-dark); }

@keyframes sa-spin { to { transform: rotate(360deg); } }
@keyframes sa-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sa-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1100px) {
	.sa-grid-2,
	.sa-detail { grid-template-columns: minmax(0, 1fr); }
	.sa-pkg-edit { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
	.sabc-admin--wp { margin-right: 10px; }
	.sa-app { grid-template-columns: minmax(0, 1fr); }
	.is-fullscreen .sa-app { grid-template-rows: auto minmax(0, 1fr); }
	.sa-side { padding: 10px 14px; gap: 0; }
	.sa-menu-btn { display: inline-flex !important; position: absolute; right: 0; top: 50%; transform: translateY(-50%); }
	.sa-brand { flex-direction: row; align-items: center; padding-right: 40px; }
	.sa-brand__plate { padding: 6px 8px; }
	.sa-brand__plate img { max-width: 150px; }
	.sa-brand__cap { display: none; }
	.sa-nav,
	.sa-side__foot { display: none; }
	.is-nav-open .sa-nav,
	.is-nav-open .sa-side__foot { display: flex; margin-top: 10px; }
	.sa-nav__item.is-on::before { display: none; }
	.sa-main { padding: 18px 14px 50px; }
	.sa-split { grid-template-columns: minmax(0, 1fr); }
	.sa-roomnav { flex-direction: row; overflow-x: auto; }
	.sa-roomnav__item { width: auto; white-space: nowrap; }
	.sa-form-grid,
	.sa-form-grid--3 { grid-template-columns: minmax(0, 1fr); }
	.sa-funnel__row { grid-template-columns: 100px minmax(0, 1fr) 30px 36px; }
	.sa-head h1 { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) {
	.sabc-admin *,
	.sa-modal,
	.sa-toast { animation: none !important; transition: none !important; }
}

/* ------------------------------------------------------------ frontend login */
.sabc-login { display: flex; justify-content: center; padding: 40px 16px; }
.sabc-login__card {
	width: 100%;
	max-width: 380px;
	background: #fff;
	border: 1px solid var(--sa-line);
	border-radius: 16px;
	padding: 28px 26px 22px;
	box-shadow: 0 12px 34px rgba(35, 30, 27, .1);
	display: flex;
	flex-direction: column;
	gap: 12px;
	text-align: left;
}
.sabc-login__logo { display: block; width: 100%; max-width: 250px; height: auto; margin: 0 auto 8px; }
.sabc-login h2 { margin: 0; font-family: var(--sa-display); font-weight: 500; font-size: 26px; color: var(--sa-ink); }
.sabc-login__sub,
.sabc-login p { margin: 0; color: var(--sa-muted); font-size: 14px; }
.sabc-login label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--sa-ink); margin: 0; }
.sabc-login input[type=text],
.sabc-login input[type=password] {
	width: 100%;
	min-height: 40px;
	padding: 8px 12px;
	border: 1px solid var(--sa-line-strong);
	border-radius: 9px;
	font-size: 15px;
	background: #fff;
	color: var(--sa-ink);
	box-sizing: border-box;
}
.sabc-login input:focus { outline: none; border-color: var(--sa-ink); box-shadow: 0 0 0 3px rgba(35, 30, 27, .08); }
.sabc-login .sabc-login__remember { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
.sabc-login__remember input { accent-color: var(--sa-red); }
.sabc-login button {
	min-height: 42px;
	border: 0;
	border-radius: 9px;
	background: var(--sa-red);
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	font-family: inherit;
}
.sabc-login button:hover { background: #a80000; }
.sabc-login__lost { font-size: 13px; color: var(--sa-muted); text-align: center; }
.sabc-login__error { background: var(--sa-red-soft); color: var(--sa-red-dark) !important; border-radius: 8px; padding: 8px 12px; font-weight: 600; }

/* ------------------------------------------------------------ blog */
.sa-kpi--warn { border-color: #d49a00; background: #fffaf0; }
.sa-kpi--warn strong { color: #7a5200; }
.sa-postcell { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.sa-postcell img,
.sa-postcell__ph { flex: none; width: 52px; height: 40px; border-radius: 6px; object-fit: cover; background: #efeae6; }
.sa-postcell__ph { background: repeating-linear-gradient(45deg, #efeae6 0 6px, #e6dfda 6px 12px); }
.sa-blogtable td:nth-child(4) { white-space: nowrap; }
.sa-filters .sa-toggle { margin: 0 0 0 4px; }
.sa-checks--col { grid-template-columns: minmax(0, 1fr); gap: 2px; }
.sa-blogperm { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 16px; align-items: start; background: #faf8f7; border: 1px solid var(--sa-line); border-radius: 8px; padding: 12px 14px; }
.sa-row--tight { gap: 6px; margin: 8px 0 12px; }
.sa-row--tight .sa-input { min-width: 0; }

/* editor */
.sa-editor__top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.sa-editor__top .sa-back { margin: 0; }
.sa-editor__state { display: flex; align-items: center; gap: 8px; margin-right: auto; font-size: 13px; }
.sa-editor__grid { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 18px; align-items: start; }
.sa-editor__main { min-width: 0; }
.sa-editor__side .sa-card { margin-bottom: 12px; }
.sa-editor__title {
	display: block;
	width: 100%;
	resize: none;
	overflow: hidden;
	border: 0 !important;
	background: transparent !important;
	padding: 4px 0 !important;
	font-family: var(--sa-display) !important;
	font-size: 32px !important;
	font-weight: 500;
	line-height: 1.15;
	color: var(--sa-ink);
	box-shadow: none !important;
}
.sa-editor__title:focus { outline: none; }
.sa-editor__title::placeholder { color: #b7ada6; }
.sa-editor__url { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; margin: 2px 0 12px; min-width: 0; }
.sa-editor__urltext { color: var(--sa-muted); overflow-wrap: anywhere; }
.sa-editor__urltext b { color: var(--sa-ink); font-weight: 600; }
.sa-input--slug { width: 240px; min-height: 30px; padding: 3px 8px; font-size: 13px; }
.sa-editor__excerpt { margin-top: 14px; }
.sa-when { display: flex; flex-direction: column; gap: 2px; margin: 10px 0 4px; }
.sa-when .sa-input { margin-top: 4px; }
.sa-feat img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 8px; margin-bottom: 8px; background: #efeae6; }
.sa-drop {
	display: flex !important;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	width: 100%;
	padding: 22px 12px !important;
	border: 1.5px dashed var(--sa-line-strong) !important;
	border-radius: 10px !important;
	background: #faf8f7 !important;
	color: var(--sa-ink) !important;
	cursor: pointer;
	text-align: center;
	font-size: 14px !important;
	font-weight: 600;
}
.sa-drop:hover:not(:disabled) { border-color: var(--sa-ink) !important; background: #fff !important; }
.sa-drop small { font-weight: 400; color: var(--sa-muted); font-size: 12px; }
.sa-drop svg { width: 24px; height: 24px; color: var(--sa-muted); }
.sa-catlist { max-height: 190px; overflow-y: auto; display: flex; flex-direction: column; }
.sa-catlist .sa-check { margin: 3px 0; }
.sa-serp { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--sa-line); border-radius: 8px; margin-bottom: 12px; font-family: Arial, sans-serif; }
.sa-serp__url { font-size: 12px; color: #4d5156; overflow-wrap: anywhere; }
.sa-serp__title { font-size: 17px; color: #1a0dab; line-height: 1.25; }
.sa-serp__desc { font-size: 13px; color: #4d5156; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sa-editor__side .sa-field { margin-top: 10px; }

/* rich text editor */
.sa-rte { border: 1px solid var(--sa-line-strong); border-radius: 10px; background: #fff; }
.sa-rte:focus-within { border-color: var(--sa-ink); box-shadow: 0 0 0 3px rgba(35, 30, 27, .06); }
.sa-rte__bar {
	position: sticky;
	top: 0;
	z-index: 3;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 2px;
	padding: 6px 8px;
	border-bottom: 1px solid var(--sa-line);
	background: #faf8f7;
	border-radius: 10px 10px 0 0;
}
.sabc-admin--wp .sa-rte__bar { top: 32px; }
.sa-rte__block { min-height: 30px; padding: 2px 24px 2px 8px; border: 1px solid var(--sa-line-strong); border-radius: 6px; background: #fff; font-size: 13px; color: var(--sa-ink); }
.sa-rte__btn {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	min-width: 30px;
	height: 30px;
	padding: 0 6px !important;
	border: 0 !important;
	border-radius: 6px !important;
	background: transparent !important;
	color: var(--sa-ink) !important;
	font-size: 15px !important;
	cursor: pointer;
}
.sa-rte__btn:hover:not(:disabled) { background: #ece6e1 !important; }
.sa-rte__btn.is-on { background: var(--sa-ink) !important; color: #fff !important; }
.sa-rte__btn:disabled { opacity: .35; cursor: default; }
.sa-rte__btn b, .sa-rte__btn i, .sa-rte__btn u { font-family: Georgia, serif; font-size: 16px; }
.sa-rte__code { font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.sa-rte__sep { width: 1px; height: 20px; background: var(--sa-line-strong); margin: 0 4px; }
.sa-rte__grow { flex: 1; }
.sa-rte__area { min-height: 360px; padding: 18px 22px 24px; outline: none; font-size: 16px; line-height: 1.7; color: #2d2723; }
.sa-rte.is-disabled .sa-rte__area { background: #fbfaf9; }
.sa-rte__source { display: block; width: 100%; min-height: 360px; padding: 14px 16px; border: 0; border-radius: 0 0 10px 10px; font: 13px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--sa-ink); resize: vertical; }
.sa-rte__source:focus { outline: none; }
.sa-rte__area > :first-child { margin-top: 0; }
.sa-rte__area p { margin: 0 0 1em; }
.sa-rte__area h2 { font-family: var(--sa-display); font-weight: 500; font-size: 26px; line-height: 1.2; margin: 1.3em 0 .5em; }
.sa-rte__area h3 { font-family: var(--sa-display); font-weight: 500; font-size: 21px; line-height: 1.25; margin: 1.2em 0 .45em; }
.sa-rte__area h4 { font-size: 16px; font-weight: 700; margin: 1.1em 0 .4em; }
.sa-rte__area ul, .sa-rte__area ol { margin: 0 0 1em 1.4em; padding: 0; }
.sa-rte__area li { margin: .25em 0; }
.sa-rte__area blockquote { margin: 1.2em 0; padding: 4px 0 4px 16px; border-left: 3px solid var(--sa-red); color: #4a423d; font-style: italic; }
.sa-rte__area a { color: var(--sa-red-dark); text-decoration: underline; }
.sa-rte__area figure { margin: 1.2em 0; }
.sa-rte__area img { display: block; max-width: 100%; height: auto; border-radius: 8px; }
.sa-rte__area hr { border: 0; border-top: 1px solid var(--sa-line-strong); margin: 1.6em 0; }
.sa-rte__area .sb-embed { position: relative; aspect-ratio: 16 / 9; }
.sa-rte__area .sb-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 8px; pointer-events: none; }
.sa-rte__area:empty::before { content: 'Start writing…'; color: #b7ada6; }

/* settings → blog */
.sa-colorrow { display: flex; gap: 8px; align-items: center; }
.sa-input--hex { max-width: 110px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }
.sa-blogcolors { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; align-items: start; }
.sa-blogswatch { background: #998675; border-radius: 10px; padding: 16px; }
.sa-blogswatch__band { display: inline-block; background: var(--b); color: #fff; font-family: var(--sa-display); font-size: 18px; padding: 4px 12px; margin-bottom: 12px; }
.sa-blogswatch__card { background: var(--c); border-radius: 10px; padding: 12px 14px; color: var(--t); font-size: 12.5px; }
.sa-blogswatch__card i { display: inline-block; font-style: normal; font-size: 11px; font-weight: 700; color: #fff; background: var(--a); border-radius: 4px; padding: 1px 7px; }
.sa-blogswatch__card b { display: block; color: var(--h); font-family: var(--sa-display); font-weight: 500; font-size: 17px; line-height: 1.2; margin: 6px 0 4px; }
.sa-blogswatch__card p { margin: 0; }
.sa-settings code { background: #f1ede9; border-radius: 4px; padding: 1px 5px; font-size: 12.5px; }

@media (max-width: 1100px) {
	.sa-editor__grid,
	.sa-blogcolors { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
	.sa-blogperm { grid-template-columns: minmax(0, 1fr); }
	.sa-editor__title { font-size: 25px !important; }
	.sa-blogtable th:nth-child(2), .sa-blogtable td:nth-child(2),
	.sa-blogtable th:nth-child(4), .sa-blogtable td:nth-child(4) { display: none; }
	.sa-rte__area { padding: 14px; min-height: 260px; }
	.sa-editor__top .sa-head__actions { width: 100%; }
	.sa-editor__top .sa-head__actions .sa-btn { flex: 1; }
}

/* ------------------------------------------------------------ small-screen polish */
@media (max-width: 860px) {
	.sa-table-wrap { -webkit-overflow-scrolling: touch; }
	.sa-table .sa-pill { white-space: normal; text-align: left; }
	.sa-table--form td:first-child,
	.sa-table--form th:first-child { position: sticky; left: 0; z-index: 1; background: #fff; box-shadow: 1px 0 0 var(--sa-line); min-width: 120px; }
	.sa-table--form tr.is-group td:first-child { position: static; box-shadow: none; }
	.sa-table--form tr.is-base td:first-child { background: #fbf8f5; }
	.sa-table--form thead th:first-child { background: #faf7f4; }
	.sa-filters { flex-direction: column; align-items: stretch; }
	.sa-filters .sa-input { width: 100%; max-width: none; }
	.sa-head__actions .sa-btn { flex: 1 1 auto; }
	.sa-modal__box,
	.sa-modal__panel { max-width: calc(100vw - 20px); }
}
@media (max-width: 420px) {
	.sa-main { padding: 14px 10px 50px; }
	.sa-kpis { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
}

/* ------------------------------------------------------------ desktop overflow guard
   Theme or browser quirks must never push the dashboard sideways: the page itself never
   scrolls horizontally, and wide tables scroll inside their own card instead. */
.sabc-admin .sa-main { overflow-x: hidden; }
.sabc-admin .sa-card,
.sabc-admin .sa-card--flush { min-width: 0; max-width: 100%; }
.sabc-admin .sa-card--flush { overflow: hidden; }
.sabc-admin .sa-table-wrap { max-width: 100%; min-width: 0; overflow-x: auto; }
.sabc-admin .sa-table { width: 100%; max-width: none; table-layout: auto; }
.sabc-admin .sa-table th,
.sabc-admin .sa-table td { min-width: 0; }

/* Some themes style every <section> as a full-bleed band (width: 100vw; margin-left: calc(50% - 50vw)),
   which blows the dashboard cards out past the content column. Pin them back. */
html body .sabc-admin.sabc-admin section,
html body .sabc-admin.sabc-admin article,
html body .sabc-admin.sabc-admin aside,
html body .sabc-admin.sabc-admin header,
html body .sabc-admin.sabc-admin footer,
html body .sabc-admin.sabc-admin .sa-card {
	width: auto !important;
	max-width: 100% !important;
	min-width: 0 !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	left: auto !important;
	right: auto !important;
	float: none !important;
	box-sizing: border-box;
}
html body .sabc-admin.sabc-admin .sa-modal footer,
html body .sabc-admin.sabc-admin .sa-modal header { max-width: none !important; }

/* ------------------------------------------------------------ invoices & customers */
.sabc-admin .sa-kpis--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sabc-admin .sa-invlines { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.sabc-admin .sa-invlines__head,
.sabc-admin .sa-invlines__row { display: grid; grid-template-columns: minmax(0, 1fr) 70px 110px 100px 36px; gap: 8px; align-items: center; }
.sabc-admin .sa-invlines__head { font-size: 12px; color: var(--sa-muted); }
.sabc-admin .sa-invlines__amt { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.sabc-admin .sa-invsums { grid-template-columns: 1fr 160px; margin-top: 16px; max-width: 380px; margin-left: auto; align-items: center; }
.sabc-admin .sa-invsums dd { text-align: right; }
.sabc-admin .sa-paylist { list-style: none; margin: 0 0 10px; padding: 0; }
.sabc-admin .sa-paylist li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--sa-line); }
.sabc-admin .sa-paylist li:last-child { border-bottom: 0; }
.sabc-admin .sa-paylist small { display: block; color: var(--sa-muted); font-size: 12.5px; }
.sabc-admin .sa-paynew { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--sa-line); }
@media (max-width: 700px) {
	.sabc-admin .sa-kpis--3 { grid-template-columns: 1fr; }
	.sabc-admin .sa-invlines__head { display: none; }
	.sabc-admin .sa-invlines__row { grid-template-columns: minmax(0, 1fr) 80px 36px; padding-bottom: 10px; border-bottom: 1px solid var(--sa-line); }
	.sabc-admin .sa-invlines__row > :nth-child(1) { grid-column: 1 / -1; }
	.sabc-admin .sa-invlines__row > :nth-child(2) { grid-column: 1; }
	.sabc-admin .sa-invlines__row > :nth-child(3) { grid-column: 1; }
	.sabc-admin .sa-invlines__amt { grid-column: 2; grid-row: 2 / span 2; }
	.sabc-admin .sa-invlines__row > button { grid-column: 3; grid-row: 2 / span 2; }
	.sabc-admin .sa-invsums { max-width: none; }
}

/* ------------------------------------------------------------ invoices & customers */
.sabc-admin .sa-kpis--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sabc-admin .sa-invlines { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.sabc-admin .sa-invlines__head,
.sabc-admin .sa-invlines__row { display: grid; grid-template-columns: minmax(0, 1fr) 70px 110px 100px 36px; gap: 8px; align-items: center; }
.sabc-admin .sa-invlines__head { font-size: 12px; color: var(--sa-muted); }
.sabc-admin .sa-invlines__amt { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.sabc-admin .sa-invsums { grid-template-columns: 1fr 160px; margin-top: 16px; max-width: 380px; margin-left: auto; align-items: center; }
.sabc-admin .sa-invsums dd { text-align: right; }
.sabc-admin .sa-paylist { list-style: none; margin: 0 0 10px; padding: 0; }
.sabc-admin .sa-paylist li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--sa-line); }
.sabc-admin .sa-paylist li:last-child { border-bottom: 0; }
.sabc-admin .sa-paylist small { display: block; color: var(--sa-muted); font-size: 12.5px; }
.sabc-admin .sa-paynew { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--sa-line); }
@media (max-width: 700px) {
	.sabc-admin .sa-kpis--3 { grid-template-columns: 1fr; }
	.sabc-admin .sa-invlines__head { display: none; }
	.sabc-admin .sa-invlines__row { grid-template-columns: minmax(0, 1fr) 80px 36px; padding-bottom: 10px; border-bottom: 1px solid var(--sa-line); }
	.sabc-admin .sa-invlines__row > :nth-child(1) { grid-column: 1 / -1; }
	.sabc-admin .sa-invlines__row > :nth-child(2) { grid-column: 1; }
	.sabc-admin .sa-invlines__row > :nth-child(3) { grid-column: 1; }
	.sabc-admin .sa-invlines__amt { grid-column: 2; grid-row: 2 / span 2; }
	.sabc-admin .sa-invlines__row > button { grid-column: 3; grid-row: 2 / span 2; }
	.sabc-admin .sa-invsums { max-width: none; }
}
.sabc-admin .sa-head__actions .sa-pill { white-space: nowrap; align-self: center; }

/* Phones: list tables become stacked cards (no sideways scrolling). */
@media (max-width: 700px) {
	.sabc-admin .sa-table--cards,
	.sabc-admin .sa-table--cards tbody,
	.sabc-admin .sa-table--cards tr,
	.sabc-admin .sa-table--cards td { display: block; width: 100%; box-sizing: border-box; }
	.sabc-admin .sa-table--cards thead { display: none; }
	.sabc-admin .sa-table--cards tr { padding: 10px 14px; border-bottom: 1px solid var(--sa-line); }
	.sabc-admin .sa-table--cards tr:last-child { border-bottom: 0; }
	.sabc-admin .sa-table--cards td { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 4px 0 !important; border: 0 !important; text-align: right !important; min-width: 0; }
	.sabc-admin .sa-table--cards td::before { content: attr(data-label); flex: none; color: var(--sa-muted); font-size: 12px; text-align: left; }
	.sabc-admin .sa-table--cards td > div { text-align: right; min-width: 0; overflow-wrap: anywhere; }
	.sabc-admin .sa-table--cards td small { display: block; }
	.sabc-admin .sa-table--cards td:not([data-label])::before { content: none; }
}
@media (max-width: 860px) {
	.sabc-admin .sa-filters > * { flex: 0 0 auto !important; }
}

/* ------------------------------------------------------------ portfolio */
.sabc-admin .sa-pfthumb { width: 76px; }
.sabc-admin .sa-pfthumb img, .sabc-admin .sa-pfthumb span { display: block; width: 64px; height: 48px; object-fit: cover; border-radius: 6px; background: var(--sa-line); }
.sabc-admin .sa-pfmove { white-space: nowrap; text-align: right; }
.sabc-admin .sa-pfdrop { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px 14px; margin-bottom: 12px; border: 2px dashed var(--sa-line); border-radius: var(--sa-radius); text-align: center; color: var(--sa-muted); }
.sabc-admin .sa-pfdrop.is-drag { border-color: var(--sa-red); background: var(--sa-red-soft); }
.sabc-admin .sa-pfdrop p { margin: 0; }
.sabc-admin .sa-pfyt { display: flex; gap: 8px; margin-bottom: 14px; }
.sabc-admin .sa-pfyt .sa-input { flex: 1; min-width: 0; }
.sabc-admin .sa-pfitems { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.sabc-admin .sa-pfitems li { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px; border: 1px solid var(--sa-line); border-radius: 10px; background: var(--sa-surface); }
.sabc-admin .sa-pfitem__thumb { position: relative; display: block; width: 84px; height: 60px; border-radius: 6px; overflow: hidden; background: var(--sa-line); }
.sabc-admin .sa-pfitem__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sabc-admin .sa-pfitem__thumb i { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-style: normal; color: #fff; background: rgba(0, 0, 0, .35); font-size: 20px; }
.sabc-admin .sa-pfpick { display: flex; flex-direction: column; gap: 10px; }
.sabc-admin .sa-pfpick__prev { display: flex; align-items: center; justify-content: center; min-height: 90px; max-height: 150px; border: 1px dashed var(--sa-line); border-radius: 10px; overflow: hidden; background: var(--sa-bg, #f4f1ee); color: var(--sa-muted); font-size: 13px; }
.sabc-admin .sa-pfpick__prev img { max-width: 100%; max-height: 150px; object-fit: contain; display: block; }
.sabc-admin .sa-pfcats { display: flex; flex-wrap: wrap; gap: 8px; }
.sabc-admin .sa-pfcat { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1.5px solid var(--sa-line); border-radius: 999px; font-size: 13.5px; cursor: pointer; }
.sabc-admin .sa-pfcat.is-on { border-color: var(--sa-red); background: var(--sa-red-soft); color: var(--sa-red-dark); }
.sabc-admin .sa-pfaddcat { margin-top: 14px; }
.sabc-admin .sa-pfaddcat .sa-input { flex: 1; min-width: 0; }
@media (max-width: 700px) {
	.sabc-admin .sa-pfitems li { grid-template-columns: 70px minmax(0, 1fr); }
	.sabc-admin .sa-pfitems li > .sa-row { grid-column: 1 / -1; justify-content: flex-end; }
	.sabc-admin .sa-pfitem__thumb { width: 70px; height: 52px; }
	.sabc-admin .sa-pfthumb { display: none !important; }
	.sabc-admin .sa-pfmove { justify-content: flex-end !important; }
	.sabc-admin .sa-pfyt { flex-direction: column; }
}

.sabc-admin .sa-pfitem__fields { display: flex; gap: 8px; min-width: 0; }
.sabc-admin .sa-pfitem__fields input { flex: 1 1 auto; min-width: 0; }
.sabc-admin .sa-pfitem__fields select { flex: 0 0 120px; width: 120px; }
@media (max-width: 560px) { .sabc-admin .sa-pfitem__fields { flex-direction: column; } .sabc-admin .sa-pfitem__fields select { width: 100%; flex-basis: auto; } }

.sabc-admin .sa-pfitem__thumb .sa-pfitem__ext { background: #2a2421; font-size: 15px; font-weight: 700; letter-spacing: .5px; }
