/*
 * Cubbix Client Portal
 * Design tokens follow cubbix.co.uk (Elementor global kit): Manrope body,
 * Playfair Display display type, orange #F38638 accents on near-black.
 */

@font-face {
	font-family: "Manrope";
	src: url("../fonts/manrope-latin-wght-normal.woff2") format("woff2");
	font-weight: 200 800;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Playfair Display";
	src: url("../fonts/playfair-display-latin-400-normal.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Playfair Display";
	src: url("../fonts/playfair-display-latin-400-italic.woff2") format("woff2");
	font-weight: 400;
	font-style: italic;
	font-display: swap;
}
@font-face {
	font-family: "Playfair Display";
	src: url("../fonts/playfair-display-latin-700-normal.woff2") format("woff2");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Playfair Display";
	src: url("../fonts/playfair-display-latin-700-italic.woff2") format("woff2");
	font-weight: 700;
	font-style: italic;
	font-display: swap;
}

:root {
	--cbx-orange: #F38638;
	--cbx-orange-lt: #FFA765;
	--cbx-orange-ink: #1A0E04;
	--cbx-yellow: #FFD900;
	--cbx-blue: #155EFF;
	--cbx-blue-lt: #7EA6FF;
	--cbx-green: #3DDC97;
	--cbx-red: #FF6B6B;

	--cbx-ink: #08080A;
	--cbx-ink-2: #0D0E11;
	--cbx-panel: #121519;
	--cbx-panel-2: #171B20;
	--cbx-text: #D1D5DB;
	--cbx-dim: #8A8F98;
	--cbx-white: #FFFFFF;
	--cbx-line: rgba(255, 255, 255, 0.09);
	--cbx-line-strong: rgba(255, 255, 255, 0.16);

	--cbx-font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
	--cbx-display: "Playfair Display", Georgia, "Times New Roman", serif;

	--cbx-radius: 20px;
	--cbx-radius-sm: 12px;
	--cbx-pill: 999px;
	--cbx-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
	--cbx-glow: 0 0 0 1px rgba(243, 134, 56, 0.35), 0 12px 40px -12px rgba(243, 134, 56, 0.45);
	--cbx-max: 1200px;
	--cbx-gutter: clamp(16px, 4vw, 40px);
	--cbx-bar-h: 64px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body.cbx {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background: var(--cbx-ink);
	color: var(--cbx-text);
	font-family: var(--cbx-font);
	font-size: 16px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.cbx-bg {
	position: fixed;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background:
		radial-gradient(1200px 700px at 15% -10%, rgba(21, 40, 90, 0.55), transparent 60%),
		radial-gradient(900px 600px at 100% 110%, rgba(243, 134, 56, 0.18), transparent 60%),
		radial-gradient(700px 500px at 0% 100%, rgba(120, 60, 20, 0.25), transparent 60%),
		var(--cbx-ink);
}
.cbx-bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
	background-size: 64px 64px;
	mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 75%);
	-webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 75%);
}

[hidden] { display: none !important; }

a { color: inherit; }
img { max-width: 100%; height: auto; }

:focus-visible {
	outline: 2px solid var(--cbx-orange);
	outline-offset: 3px;
	border-radius: 6px;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
.cbx-skip {
	position: absolute;
	left: 16px; top: -60px;
	z-index: 100;
	padding: 10px 16px;
	border-radius: var(--cbx-pill);
	background: var(--cbx-orange);
	color: var(--cbx-orange-ink);
	font-weight: 700;
	text-decoration: none;
}
.cbx-skip:focus { top: 12px; }

/* ---------- Typography ---------- */

.cbx-eyebrow {
	margin: 0 0 12px;
	color: var(--cbx-dim);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.22em;
	text-transform: uppercase;
}
.cbx-display {
	margin: 0 0 16px;
	color: var(--cbx-white);
	font-family: var(--cbx-display);
	font-weight: 400;
	font-size: clamp(36px, 5.2vw, 64px);
	line-height: 1.08;
	letter-spacing: -0.01em;
}
.cbx-display em { font-style: italic; color: var(--cbx-white); }
.cbx-display--sm { font-size: clamp(30px, 4vw, 48px); }
.cbx-h2 {
	margin: 0 0 10px;
	color: var(--cbx-white);
	font-size: clamp(22px, 2.4vw, 28px);
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: -0.02em;
}
.cbx-h3 {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 12px;
	color: var(--cbx-white);
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -0.01em;
}
.cbx-h3 .cbx-icon { color: var(--cbx-orange); }
.cbx-lead { max-width: 640px; margin: 0; font-size: 17px; color: var(--cbx-text); }
.cbx-muted { color: var(--cbx-dim); }
.cbx-small { font-size: 13px; }
.cbx-link { color: var(--cbx-orange-lt); text-decoration: none; font-weight: 600; }
.cbx-link:hover { text-decoration: underline; }
.cbx-prose p { margin: 0 0 10px; }
.cbx-prose p:last-child { margin-bottom: 0; }

.cbx-icon { flex: none; }

/* ---------- Layout ---------- */

.cbx-main { flex: 1; width: 100%; }
.cbx-wrap {
	width: 100%;
	max-width: var(--cbx-max);
	margin: 0 auto;
	padding: 40px var(--cbx-gutter) 64px;
}

.cbx-topbar {
	position: sticky;
	top: 0;
	z-index: 20;
	padding: 14px var(--cbx-gutter) 0;
}
.cbx-topbar__inner {
	display: flex;
	align-items: center;
	gap: 16px;
	max-width: var(--cbx-max);
	margin: 0 auto;
	padding: 10px 12px 10px 20px;
	border: 1px solid var(--cbx-line-strong);
	border-radius: var(--cbx-pill);
	background: rgba(8, 8, 10, 0.72);
	backdrop-filter: blur(14px) saturate(140%);
	-webkit-backdrop-filter: blur(14px) saturate(140%);
	box-shadow: var(--cbx-shadow);
}
.cbx-brand {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
}
.cbx-brand img { display: block; width: 112px; height: auto; }
.cbx-brand__tag {
	padding-left: 12px;
	border-left: 1px solid var(--cbx-line-strong);
	color: var(--cbx-dim);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}
.cbx-topbar__nav { display: flex; gap: 6px; margin-left: auto; }
.cbx-pill {
	padding: 8px 16px;
	border-radius: var(--cbx-pill);
	color: var(--cbx-text);
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
	transition: background 0.2s, color 0.2s;
}
.cbx-pill:hover { background: rgba(255, 255, 255, 0.06); color: var(--cbx-white); }
.cbx-pill.is-active { background: rgba(255, 255, 255, 0.08); color: var(--cbx-orange); }
.cbx-user { display: flex; align-items: center; gap: 10px; }
.cbx-avatar {
	display: grid;
	place-items: center;
	width: 34px; height: 34px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--cbx-orange), var(--cbx-orange-lt));
	color: var(--cbx-orange-ink);
	font-size: 13px;
	font-weight: 800;
}
.cbx-user__name { color: var(--cbx-white); font-size: 14px; font-weight: 600; }

.cbx-footer { padding: 24px var(--cbx-gutter) 32px; }
.cbx-footer__inner {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 12px;
	max-width: var(--cbx-max);
	margin: 0 auto;
	padding-top: 20px;
	border-top: 1px solid var(--cbx-line);
	color: var(--cbx-dim);
	font-size: 13px;
}
.cbx-footer__links { display: flex; gap: 20px; }
.cbx-footer a { text-decoration: none; }
.cbx-footer a:hover { color: var(--cbx-white); }

/* ---------- Buttons ---------- */

.cbx-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 46px;
	padding: 10px 22px;
	border: 1px solid transparent;
	border-radius: var(--cbx-pill);
	background: transparent;
	color: var(--cbx-white);
	font: inherit;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: transform 0.18s ease, background 0.2s, border-color 0.2s, box-shadow 0.2s, color 0.2s;
}
.cbx-btn:hover { transform: translateY(-1px); }
.cbx-btn:active { transform: translateY(0); }
.cbx-btn--primary { background: var(--cbx-orange); color: var(--cbx-orange-ink); }
.cbx-btn--primary:hover { background: var(--cbx-orange-lt); box-shadow: var(--cbx-glow); }
.cbx-btn--secondary { background: var(--cbx-yellow); color: var(--cbx-ink); }
.cbx-btn--secondary:hover { box-shadow: 0 12px 40px -12px rgba(255, 217, 0, 0.5); }
.cbx-btn--ghost { border-color: var(--cbx-line-strong); background: rgba(255, 255, 255, 0.02); }
.cbx-btn--ghost:hover { border-color: rgba(255, 255, 255, 0.32); background: rgba(255, 255, 255, 0.06); }
.cbx-btn--disabled {
	border-color: var(--cbx-line);
	color: var(--cbx-dim);
	cursor: not-allowed;
	font-weight: 600;
}
.cbx-btn--disabled:hover { transform: none; }
.cbx-btn--sm { min-height: 38px; padding: 7px 14px; font-size: 14px; }
.cbx-btn--lg { min-height: 54px; padding: 12px 14px 12px 26px; font-size: 16px; }
.cbx-btn--block { width: 100%; }
.cbx-btn--icon { width: 38px; padding: 0; }
.cbx-btn__orb {
	display: grid;
	place-items: center;
	width: 30px; height: 30px;
	margin-right: -12px;
	border-radius: 50%;
	background: var(--cbx-ink);
	color: var(--cbx-white);
}
.cbx-btn--lg .cbx-btn__orb { width: 32px; height: 32px; margin-right: 0; }
.cbx-btn__orb .cbx-icon { width: 15px; height: 15px; }

/* Admin-only shortcut back to wp-admin. */
.cbx-btn--wp { border-color: rgba(126, 166, 255, 0.45); background: rgba(21, 94, 255, 0.12); color: #C9D8FF; }
.cbx-btn--wp:hover { border-color: rgba(126, 166, 255, 0.8); background: rgba(21, 94, 255, 0.22); color: #fff; }
.cbx-topbar .cbx-btn--wp { margin-left: 4px; }

/* ---------- Cards, badges ---------- */

.cbx-card {
	position: relative;
	padding: clamp(20px, 3vw, 28px);
	border: 1px solid var(--cbx-line);
	border-radius: var(--cbx-radius);
	background: linear-gradient(180deg, rgba(23, 27, 32, 0.92), rgba(18, 21, 25, 0.92));
	box-shadow: var(--cbx-shadow);
}
.cbx-card + .cbx-card { margin-top: 20px; }
.cbx-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.cbx-badge {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 4px 12px;
	border: 1px solid currentColor;
	border-radius: var(--cbx-pill);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.02em;
	line-height: 1.5;
	white-space: nowrap;
}
.cbx-badge::before {
	content: "";
	width: 6px; height: 6px;
	border-radius: 50%;
	background: currentColor;
}
.cbx-badge--draft,
.cbx-badge--archived { color: var(--cbx-dim); }
.cbx-badge--preview_ready { color: var(--cbx-blue-lt); }
.cbx-badge--awaiting_feedback { color: var(--cbx-yellow); }
.cbx-badge--changes_requested { color: var(--cbx-orange); }
.cbx-badge--approved,
.cbx-badge--launched { color: var(--cbx-green); }
.cbx-badge--purchased { color: var(--cbx-orange-lt); }
.cbx-badge--awaiting_feedback::before,
.cbx-badge--preview_ready::before { animation: cbx-pulse 2s ease-in-out infinite; }

@keyframes cbx-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.35; }
}

.cbx-tag {
	display: inline-block;
	padding: 2px 10px;
	border-radius: var(--cbx-pill);
	background: rgba(243, 134, 56, 0.14);
	color: var(--cbx-orange-lt);
	font-size: 12px;
	font-weight: 700;
}
.cbx-tag--outline { background: transparent; border: 1px solid var(--cbx-line-strong); color: var(--cbx-text); }

/* ---------- Notices ---------- */

.cbx-notice {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0 0 20px;
	padding: 12px 16px;
	border: 1px solid var(--cbx-line-strong);
	border-radius: var(--cbx-radius-sm);
	background: rgba(255, 255, 255, 0.03);
	font-size: 14px;
	font-weight: 500;
}
.cbx-notice .cbx-icon { margin-top: 2px; }
.cbx-notice--success { border-color: rgba(61, 220, 151, 0.4); background: rgba(61, 220, 151, 0.08); color: #B7F5D8; }
.cbx-notice--error { border-color: rgba(255, 107, 107, 0.45); background: rgba(255, 107, 107, 0.08); color: #FFC9C9; }
.cbx-notice--info { border-color: rgba(126, 166, 255, 0.4); background: rgba(21, 94, 255, 0.08); color: #C9D8FF; }

/* ---------- Forms ---------- */

.cbx-form { display: grid; gap: 16px; }
.cbx-form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cbx-form__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14px; }
.cbx-field { display: grid; gap: 6px; }
.cbx-field__label { color: var(--cbx-white); font-size: 13px; font-weight: 600; }
.cbx-input {
	width: 100%;
	min-height: 46px;
	padding: 11px 14px;
	border: 1px solid var(--cbx-line-strong);
	border-radius: var(--cbx-radius-sm);
	background: rgba(8, 8, 10, 0.6);
	color: var(--cbx-white);
	font: inherit;
	font-size: 15px;
	transition: border-color 0.2s, box-shadow 0.2s;
}
textarea.cbx-input { resize: vertical; min-height: 100px; line-height: 1.55; }
select.cbx-input {
	appearance: none;
	-webkit-appearance: none;
	padding-right: 40px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%238A8F98' stroke-width='1.8'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
}
select.cbx-input option { background: var(--cbx-panel); color: var(--cbx-white); }
.cbx-input::placeholder { color: #5C6169; }
.cbx-input:hover { border-color: rgba(255, 255, 255, 0.26); }
.cbx-input:focus { outline: none; border-color: var(--cbx-orange); box-shadow: 0 0 0 3px rgba(243, 134, 56, 0.22); }
.cbx-input--sm { min-height: 38px; padding: 7px 36px 7px 12px; font-size: 14px; }

.cbx-check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.cbx-check--block { align-items: flex-start; font-size: 14px; line-height: 1.5; }
.cbx-check input {
	flex: none;
	width: 18px; height: 18px;
	margin: 1px 0 0;
	accent-color: var(--cbx-orange);
}

.cbx-details { margin-top: 16px; border-top: 1px solid var(--cbx-line); padding-top: 14px; }
.cbx-details summary {
	cursor: pointer;
	color: var(--cbx-orange-lt);
	font-size: 14px;
	font-weight: 700;
	list-style: none;
}
.cbx-details summary::-webkit-details-marker { display: none; }
.cbx-details summary::before { content: "+ "; }
.cbx-details[open] summary::before { content: "– "; }
.cbx-details[open] .cbx-form { margin-top: 14px; }

/* ---------- Auth ---------- */

.cbx--login .cbx-main,
.cbx--lost-password .cbx-main { display: flex; align-items: center; }
.cbx-auth {
	display: grid;
	grid-template-columns: 1.1fr 1fr;
	align-items: center;
	gap: clamp(32px, 6vw, 96px);
	width: 100%;
	max-width: var(--cbx-max);
	margin: 0 auto;
	padding: 48px var(--cbx-gutter);
}
.cbx-auth--single { grid-template-columns: minmax(0, 460px); justify-content: center; }
.cbx-auth__logo { display: block; width: 170px; margin-bottom: 40px; }
.cbx-auth__logo--mobile { display: none; width: 140px; margin-bottom: 28px; }
.cbx-auth--single .cbx-auth__logo { width: 140px; margin-bottom: 28px; }
.cbx-auth__intro .cbx-display { font-size: clamp(40px, 5vw, 68px); }
.cbx-auth__intro .cbx-muted { max-width: 440px; font-size: 17px; }
.cbx-auth__card { padding: clamp(24px, 4vw, 40px); }
.cbx-auth__card .cbx-form { margin-top: 24px; }
.cbx-auth__card .cbx-notice { margin: 20px 0 0; }
.cbx-auth__foot { display: flex; align-items: center; gap: 8px; margin: 24px 0 0; font-size: 13px; }

/* ---------- Dashboard ---------- */

.cbx-hero { padding: 32px 0 40px; }
.cbx-stats { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 0; }
.cbx-stat {
	min-width: 180px;
	padding: 14px 20px;
	border: 1px solid var(--cbx-line);
	border-radius: var(--cbx-radius-sm);
	background: rgba(255, 255, 255, 0.02);
}
.cbx-stat dt { color: var(--cbx-dim); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.cbx-stat dd { margin: 2px 0 0; color: var(--cbx-white); font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.cbx-stat dd.is-hot { color: var(--cbx-orange); }

.cbx-section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.cbx-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.cbx-grid .cbx-card + .cbx-card { margin-top: 0; }
.cbx-project {
	display: flex;
	flex-direction: column;
	gap: 8px;
	transition: transform 0.25s ease, border-color 0.25s;
}
.cbx-project::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	padding: 1px;
	background: linear-gradient(135deg, rgba(243, 134, 56, 0.5), transparent 40%, transparent 60%, rgba(21, 94, 255, 0.35));
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
	opacity: 0;
	transition: opacity 0.25s;
	pointer-events: none;
}
.cbx-project:hover { transform: translateY(-3px); }
.cbx-project:hover::before { opacity: 1; }
.cbx-project__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cbx-project__updated { display: inline-flex; align-items: center; gap: 6px; color: var(--cbx-dim); font-size: 13px; }
.cbx-project__updated .cbx-icon { width: 14px; height: 14px; }
.cbx-project__title { margin: 14px 0 0; font-family: var(--cbx-display); font-size: 28px; font-weight: 400; line-height: 1.15; color: var(--cbx-white); }
.cbx-project__title a { text-decoration: none; }
.cbx-project__title a:hover { color: var(--cbx-orange-lt); }
.cbx-project__meta { margin: 0 0 12px; font-size: 14px; }
.cbx-project__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }

.cbx-empty { max-width: 640px; margin: 0 auto; text-align: center; padding: clamp(32px, 6vw, 56px); }
.cbx-empty .cbx-muted { margin: 0 auto 24px; max-width: 460px; }
.cbx-empty__mark {
	display: grid;
	place-items: center;
	width: 72px; height: 72px;
	margin: 0 auto 20px;
	border: 1px solid rgba(243, 134, 56, 0.35);
	border-radius: 22px;
	background: radial-gradient(circle at 30% 30%, rgba(243, 134, 56, 0.25), rgba(243, 134, 56, 0.04));
	color: var(--cbx-orange);
}
.cbx-empty__mark .cbx-icon { width: 30px; height: 30px; }
.cbx-empty-inline { margin: 20px 0 0; font-size: 14px; }

/* ---------- Project detail ---------- */

.cbx-back {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 24px;
	color: var(--cbx-dim);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
}
.cbx-back:hover { color: var(--cbx-white); }
.cbx-project-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	flex-wrap: wrap;
	margin-bottom: 32px;
}
.cbx-project-head__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0; font-size: 14px; }

.cbx-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.cbx-layout__side { position: sticky; top: calc(var(--cbx-bar-h) + 40px); }
.cbx-layout__side .cbx-card + .cbx-card { margin-top: 20px; }

.cbx-message { border-color: rgba(243, 134, 56, 0.3); }

.cbx-pages { display: grid; gap: 8px; margin: 4px 0 0; padding: 0; list-style: none; }
.cbx-pages a {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px 16px;
	border: 1px solid var(--cbx-line);
	border-radius: var(--cbx-radius-sm);
	background: rgba(255, 255, 255, 0.015);
	text-decoration: none;
	transition: border-color 0.2s, background 0.2s;
}
.cbx-pages a:hover { border-color: rgba(243, 134, 56, 0.45); background: rgba(243, 134, 56, 0.06); }
.cbx-pages a:hover .cbx-icon { color: var(--cbx-orange); transform: translate(2px, -2px); }
.cbx-pages .cbx-icon { margin-left: auto; color: var(--cbx-dim); transition: transform 0.2s, color 0.2s; }
.cbx-pages__num { color: var(--cbx-orange); font-size: 12px; font-weight: 800; letter-spacing: 0.08em; font-variant-numeric: tabular-nums; }
.cbx-pages__label { color: var(--cbx-white); font-weight: 600; }
.cbx-pages--compact { width: 100%; max-width: 420px; margin: 28px auto 0; text-align: left; }

.cbx-timeline { margin: 24px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--cbx-line); }
.cbx-timeline__item { padding: 18px 0; border-bottom: 1px solid var(--cbx-line); }
.cbx-timeline__item:last-child { border-bottom: 0; padding-bottom: 0; }
.cbx-timeline__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13px; }
.cbx-timeline__head time { margin-left: auto; }
.cbx-fb-status { font-size: 12px; font-weight: 700; color: var(--cbx-dim); }
.cbx-fb-status--new { color: var(--cbx-blue-lt); }
.cbx-fb-status--in_progress { color: var(--cbx-yellow); }
.cbx-fb-status--resolved { color: var(--cbx-green); }
.cbx-reply {
	margin-top: 12px;
	padding: 12px 16px;
	border-left: 2px solid var(--cbx-orange);
	border-radius: 0 var(--cbx-radius-sm) var(--cbx-radius-sm) 0;
	background: rgba(243, 134, 56, 0.06);
}
.cbx-reply .cbx-eyebrow { margin-bottom: 4px; font-size: 11px; }

.cbx-decision__current {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 18px;
	padding: 12px 14px;
	border-radius: var(--cbx-radius-sm);
	background: rgba(255, 255, 255, 0.03);
}
.cbx-decision__current div { display: grid; font-size: 14px; }
.cbx-decision__current strong { color: var(--cbx-white); }
.cbx-decision__current--approved { color: var(--cbx-green); background: rgba(61, 220, 151, 0.08); }
.cbx-decision__current--changes_requested { color: var(--cbx-orange); background: rgba(243, 134, 56, 0.08); }

.cbx-cta {
	overflow: hidden;
	border-color: rgba(255, 217, 0, 0.25);
	background:
		radial-gradient(400px 200px at 100% 0%, rgba(255, 217, 0, 0.12), transparent 70%),
		linear-gradient(180deg, rgba(23, 27, 32, 0.92), rgba(18, 21, 25, 0.92));
}
.cbx-cta .cbx-muted { font-size: 14px; }

/* ---------- Preview viewer ---------- */

.cbx--preview { height: 100vh; height: 100dvh; overflow: hidden; }
.cbx--preview .cbx-main { display: flex; min-height: 0; }
.cbx-viewer { display: flex; flex-direction: column; width: 100%; min-height: 0; }
.cbx-viewer__bar {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: var(--cbx-bar-h);
	padding: 10px var(--cbx-gutter);
	border-bottom: 1px solid var(--cbx-line);
	background: rgba(8, 8, 10, 0.88);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}
.cbx-viewer__title {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
	color: var(--cbx-white);
	font-weight: 700;
}
.cbx-viewer__title img { border-radius: 6px; }
.cbx-viewer__title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cbx-viewer__pages { display: flex; align-items: center; gap: 8px; margin-left: auto; color: var(--cbx-dim); }
.cbx-viewer__pages select { min-width: 180px; }
.cbx-viewer__tools { display: flex; align-items: center; gap: 8px; }
.cbx-viewer > .cbx-notice { margin: 12px var(--cbx-gutter) 0; }

.cbx-seg {
	display: inline-flex;
	padding: 3px;
	border: 1px solid var(--cbx-line-strong);
	border-radius: var(--cbx-pill);
}
.cbx-seg__btn {
	display: grid;
	place-items: center;
	width: 34px; height: 30px;
	border: 0;
	border-radius: var(--cbx-pill);
	background: transparent;
	color: var(--cbx-dim);
	cursor: pointer;
}
.cbx-seg__btn:hover { color: var(--cbx-white); }
.cbx-seg__btn.is-active { background: rgba(243, 134, 56, 0.16); color: var(--cbx-orange); }

.cbx-viewer__stage {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	flex: 1;
	min-height: 0;
	padding: 16px;
	overflow: auto;
}
.cbx-frame {
	position: relative;
	flex: 1;
	width: 100%;
	min-height: 0;
	border: 1px solid var(--cbx-line-strong);
	border-radius: 14px;
	overflow: hidden;
	background: #fff;
	box-shadow: var(--cbx-shadow);
	transition: width 0.35s cubic-bezier(.2,.8,.2,1), max-width 0.35s cubic-bezier(.2,.8,.2,1), border-radius 0.35s;
}
.cbx-frame[data-device="tablet"] { max-width: 820px; border-radius: 26px; border-width: 10px; border-color: #1c2026; }
.cbx-frame[data-device="mobile"] { max-width: 400px; border-radius: 36px; border-width: 10px; border-color: #1c2026; }
.cbx-frame iframe { display: block; width: 100%; height: 100%; border: 0; background: #fff; }
.cbx-frame__loading {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	background: var(--cbx-panel);
	transition: opacity 0.3s;
}
.cbx-frame__loading.is-done { opacity: 0; pointer-events: none; }
.cbx-spinner {
	width: 36px; height: 36px;
	border: 3px solid rgba(243, 134, 56, 0.2);
	border-top-color: var(--cbx-orange);
	border-radius: 50%;
	animation: cbx-spin 0.8s linear infinite;
}
@keyframes cbx-spin { to { transform: rotate(360deg); } }
.cbx-viewer__hint { margin: 10px 0 0; font-size: 13px; text-align: center; }

.cbx-fallback { max-width: 620px; margin: auto; text-align: center; }
.cbx-fallback .cbx-muted { margin: 0 auto 24px; }

.cbx-drawer { position: fixed; inset: 0; z-index: 50; }
.cbx-drawer[hidden] { display: none; }
.cbx-drawer__scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.55); animation: cbx-fade 0.2s ease; }
.cbx-drawer__panel {
	position: absolute;
	top: 0; right: 0; bottom: 0;
	width: min(420px, 100%);
	padding: 24px;
	overflow-y: auto;
	border-left: 1px solid var(--cbx-line-strong);
	background: var(--cbx-panel);
	box-shadow: -24px 0 60px -20px rgba(0, 0, 0, 0.8);
	animation: cbx-slide 0.28s cubic-bezier(.2,.8,.2,1);
}
.cbx-drawer__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.cbx-drawer__head .cbx-h3 { margin: 0; }
@keyframes cbx-fade { from { opacity: 0; } }
@keyframes cbx-slide { from { transform: translateX(40px); opacity: 0; } }

/* ---------- New badges & updates ---------- */

.cbx-new {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 3px 10px;
	border-radius: var(--cbx-pill);
	background: var(--cbx-orange);
	color: var(--cbx-orange-ink);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	white-space: nowrap;
}
.cbx-new::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--cbx-orange-ink); }
.cbx-project__badges { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cbx-project.has-news { border-color: rgba(243, 134, 56, 0.45); }
.cbx-project__latest {
	margin: 0 0 14px;
	padding: 10px 12px;
	border-left: 2px solid var(--cbx-orange);
	border-radius: 0 var(--cbx-radius-sm) var(--cbx-radius-sm) 0;
	background: rgba(243, 134, 56, 0.06);
	font-size: 14px;
	line-height: 1.5;
}
.cbx-project__latest .cbx-eyebrow { display: block; margin-bottom: 2px; font-size: 10px; }

.cbx-updates { border-color: rgba(243, 134, 56, 0.3); }
.cbx-updates__list { margin: 4px 0 0; padding: 0; list-style: none; }
.cbx-updates__item { position: relative; padding: 0 0 18px 22px; border-left: 1px solid var(--cbx-line-strong); margin-left: 6px; }
.cbx-updates__item:last-child { padding-bottom: 0; }
.cbx-updates__item::before {
	content: "";
	position: absolute;
	left: -6px; top: 4px;
	width: 11px; height: 11px;
	border-radius: 50%;
	background: var(--cbx-panel);
	border: 2px solid var(--cbx-dim);
}
.cbx-updates__item.is-new::before { border-color: var(--cbx-orange); background: var(--cbx-orange); box-shadow: 0 0 0 4px rgba(243, 134, 56, 0.18); }
.cbx-updates__meta { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; color: var(--cbx-dim); font-size: 13px; }
.cbx-updates__item.is-older { display: none; }
.cbx-updates:has(.cbx-updates__more[open]) .cbx-updates__item.is-older { display: block; }
.cbx-updates__more { margin-top: 10px; }
.cbx-updates__more[open] summary::before { content: "– "; }

/* ---------- Pinned comments ---------- */

.cbx-comment-toggle.is-active { border-color: var(--cbx-orange); background: rgba(243, 134, 56, 0.16); color: var(--cbx-orange-lt); }
.cbx-comment-hint {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 10px var(--cbx-gutter) 0;
	padding: 8px 8px 8px 14px;
	border: 1px solid rgba(243, 134, 56, 0.45);
	border-radius: var(--cbx-pill);
	background: rgba(243, 134, 56, 0.1);
	color: #FFD9BF;
	font-size: 14px;
	font-weight: 600;
}
.cbx-comment-hint .cbx-btn { margin-left: auto; }
.cbx-viewer.is-commenting .cbx-frame { box-shadow: 0 0 0 2px var(--cbx-orange), var(--cbx-shadow); }

.cbx-pin-banner {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	border-radius: var(--cbx-radius-sm);
	background: rgba(21, 94, 255, 0.12);
	color: #C9D8FF;
	font-size: 14px;
	font-weight: 600;
}
.cbx-pin-view { display: grid; gap: 12px; }
.cbx-pin-view__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 13px; }
.cbx-pin-num {
	display: grid;
	place-items: center;
	width: 28px; height: 28px;
	border-radius: 50%;
	background: var(--cbx-orange);
	color: var(--cbx-orange-ink);
	font-weight: 800;
	font-size: 13px;
}
.cbx-pin-view__msg { padding: 14px; border-radius: var(--cbx-radius-sm); background: rgba(255, 255, 255, 0.04); color: var(--cbx-white); white-space: pre-wrap; }

.cbx-toast {
	position: fixed;
	left: 50%;
	bottom: 24px;
	z-index: 60;
	transform: translateX(-50%);
	padding: 12px 20px;
	border: 1px solid rgba(61, 220, 151, 0.45);
	border-radius: var(--cbx-pill);
	background: #0E1A15;
	color: #B7F5D8;
	font-weight: 700;
	box-shadow: var(--cbx-shadow);
	animation: cbx-fade 0.2s ease;
}
.cbx-pinned-tag { display: inline-flex; align-items: center; gap: 4px; }
.cbx-pinned-tag .cbx-icon { width: 13px; height: 13px; }

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
	.cbx-layout { grid-template-columns: 1fr; }
	.cbx-layout__side { position: static; }
	.cbx-auth { grid-template-columns: 1fr; }
	.cbx-auth__intro { display: none; }
	.cbx-auth__logo--mobile { display: block; }
	.cbx-auth__card { max-width: 480px; width: 100%; margin: 0 auto; }
	.cbx-viewer__title { display: none; }
}

@media (max-width: 720px) {
	.cbx-topbar { padding-top: 10px; }
	.cbx-topbar__inner { padding: 8px 8px 8px 16px; border-radius: 22px; }
	.cbx-brand__tag,
	.cbx-user__name,
	.cbx-topbar__nav { display: none; }
	.cbx-user { margin-left: auto; }
	.cbx-user .cbx-btn span,
	.cbx-topbar .cbx-btn--wp span { display: none; }
	.cbx-topbar .cbx-btn--wp { width: 38px; padding: 0; }
	.cbx-user .cbx-btn { width: 38px; padding: 0; }
	.cbx-wrap { padding-top: 24px; }
	.cbx-hero { padding: 16px 0 28px; }
	.cbx-grid { grid-template-columns: 1fr; }
	.cbx-form__grid { grid-template-columns: 1fr; }
	.cbx-project-head .cbx-btn { width: 100%; justify-content: space-between; }
	.cbx-stat { min-width: 0; flex: 1; }

	.cbx-viewer__bar { flex-wrap: wrap; gap: 8px; padding: 8px 12px; }
	.cbx-viewer__back span { display: none; }
	.cbx-viewer__back { width: 38px; padding: 0; }
	.cbx-viewer__pages { flex: 1; margin-left: 0; }
	.cbx-viewer__pages select { min-width: 0; width: 100%; }
	.cbx-viewer__pages > .cbx-icon { display: none; }
	.cbx-seg { display: none; }
	.cbx-viewer__tools .cbx-btn--primary span,
	.cbx-viewer__tools .cbx-comment-toggle span { display: none; }
	.cbx-viewer__tools .cbx-comment-toggle { width: 38px; padding: 0; }
	.cbx-comment-hint { margin: 8px 8px 0; font-size: 13px; }
	.cbx-viewer__tools .cbx-btn--primary { width: 38px; padding: 0; }
	.cbx-viewer__stage { padding: 0; }
	.cbx-frame { border-radius: 0; border-width: 0; }
	.cbx-timeline__head time { margin-left: 0; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
}
