/* ==========================================================================
   Print2Buy HQ — the design system.
   One stylesheet skins the whole application: the app shell (sidebar/topbar),
   the branded login, AND every existing screen (they share a small class
   vocabulary: p2b-card, p2b-kpis, widefat tables, .button, .notice, form-table,
   the orders board, the wizard). Dark sidebar + light content, Cairo font,
   RTL-first (flex + logical properties flip automatically with dir="rtl").
   No WordPress admin stylesheet is ever loaded with this.
   ========================================================================== */

:root {
	--hq-ink: #23201c;          /* primary text */
	--hq-ink-2: #6b655d;        /* secondary text */
	--hq-ink-3: #9b948a;        /* muted */
	--hq-bg: #f5f3ef;           /* app background (warm light) */
	--hq-card: #ffffff;
	--hq-line: #e7e2da;
	--hq-line-2: #d8d2c8;
	--hq-side: #211d19;         /* sidebar (warm near-black) */
	--hq-side-ink: #c9c3ba;
	--hq-side-ink-2: #8a847b;
	--hq-accent: #3B82F6;       /* coral */
	--hq-accent-deep: #b6491f;
	--hq-accent-soft: #fbe9e1;
	--hq-good: #1d7a4f;
	--hq-good-soft: #e2f3ea;
	--hq-warn: #9a6a08;
	--hq-warn-soft: #faf0d8;
	--hq-bad: #b3261e;
	--hq-bad-soft: #fce8e6;
	--hq-info: #185fa5;
	--hq-info-soft: #e6f1fb;
	--hq-radius: 12px;
	--hq-shadow: 0 1px 2px rgba(35, 32, 28, .05), 0 4px 16px rgba(35, 32, 28, .06);
	--hq-font: "Cairo", -apple-system, "Segoe UI", Tahoma, sans-serif;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
* { box-sizing: border-box; }
html, body.hq { margin: 0; padding: 0; height: 100%; }
body.hq {
	font-family: var(--hq-font);
	font-size: 14px;
	line-height: 1.6;
	color: var(--hq-ink);
	background: var(--hq-bg);
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
body.hq a { color: var(--hq-accent-deep); text-decoration: none; }
body.hq a:hover { text-decoration: underline; }
body.hq h1, body.hq h2, body.hq h3 { color: var(--hq-ink); font-weight: 700; line-height: 1.3; }
body.hq img { max-width: 100%; height: auto; }
body.hq code { background: #efece6; border-radius: 5px; padding: 1px 6px; font-size: 12px; }

/* --------------------------------------------------------------------------
   App shell
   -------------------------------------------------------------------------- */
.hq-app { display: flex; min-height: 100vh; min-width: 0; }

.hq-side {
	flex: 0 0 232px;
	background: var(--hq-side);
	color: var(--hq-side-ink);
	display: flex;
	flex-direction: column;
	position: sticky;
	top: 0;
	height: 100vh;
	overflow-y: auto;
}
.hq-side__brand {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 18px 16px 14px;
}
.hq-logo {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 10px;
	background: var(--hq-accent);
	color: #fff;
	font-weight: 700;
	font-size: 13px;
	letter-spacing: .02em;
	flex: 0 0 auto;
}
.hq-side__name { color: #f3efe9; font-weight: 700; font-size: 15px; }
.hq-side__name em { font-style: normal; color: var(--hq-accent); }

.hq-nav { flex: 1; padding: 4px 10px 12px; }
.hq-nav__head {
	font-size: 10px;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--hq-side-ink-2);
	padding: 14px 10px 5px;
}
.hq-nav__item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 10px;
	margin-bottom: 2px;
	border-radius: 9px;
	color: var(--hq-side-ink);
	font-size: 13.5px;
	text-decoration: none;
}
body.hq .hq-nav__item { color: var(--hq-side-ink); }
body.hq .hq-nav__item:hover { background: rgba(255, 255, 255, .06); text-decoration: none; }
.hq-nav__item .dashicons { font-size: 17px; width: 17px; height: 17px; color: var(--hq-side-ink-2); }
.hq-nav__item.is-active { background: rgba(37,99,235, .18); color: #ffd9c9; }
.hq-nav__item.is-active .dashicons { color: var(--hq-accent); }

.hq-side__foot { padding: 10px 16px 16px; }
body.hq .hq-side__lang {
	display: inline-block;
	padding: 5px 14px;
	border: 1px solid rgba(255, 255, 255, .18);
	border-radius: 8px;
	color: var(--hq-side-ink);
	font-size: 12px;
}
body.hq .hq-side__lang:hover { border-color: var(--hq-accent); color: #fff; text-decoration: none; }

.hq-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.hq-top {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px 26px;
	background: rgba(255, 255, 255, .75);
	backdrop-filter: blur(6px);
	border-bottom: 1px solid var(--hq-line);
	position: sticky;
	top: 0;
	z-index: 50;
}
.hq-top__title { font-weight: 700; font-size: 16px; }
.hq-top__spacer { flex: 1; }
.hq-top__user { color: var(--hq-ink-2); font-size: 13px; }
body.hq .hq-top__link {
	color: var(--hq-ink-2);
	font-size: 13px;
	border: 1px solid var(--hq-line-2);
	border-radius: 8px;
	padding: 4px 12px;
}
body.hq .hq-top__link:hover { color: var(--hq-accent-deep); border-color: var(--hq-accent); text-decoration: none; }

.hq-main { flex: 1; padding: 22px 26px 70px; max-width: 1280px; width: 100%; }

/* --------------------------------------------------------------------------
   Screen chrome (the shared vocabulary of the existing screens)
   -------------------------------------------------------------------------- */
.hq-main .wrap { margin: 0; max-width: none; }
.hq-main .p2b-hub { max-width: none; }

.hq-main .p2b-hub__bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 18px; }
.hq-main .p2b-hub__title, .hq-main h1 { font-size: 20px; margin: 0; padding: 0; }
.hq-main .p2b-hub__hello { color: var(--hq-ink-2); font-size: 13px; }
.hq-main .p2b-hub__spacer { flex: 1; }
.hq-main h2 { font-size: 15px; margin: 22px 0 10px; }
.hq-main .description { color: var(--hq-ink-3); font-size: 12.5px; }

/* Cards + KPI grid */
.hq-main .p2b-kpis {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
	gap: 14px;
	margin-bottom: 6px;
}
.hq-main .p2b-card {
	background: var(--hq-card);
	border: 1px solid var(--hq-line);
	border-radius: var(--hq-radius);
	box-shadow: var(--hq-shadow);
	padding: 16px 18px;
}
.hq-main .p2b-card__label {
	margin: 0 0 6px;
	color: var(--hq-ink-3);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
}
.hq-main .p2b-card__value { font-size: 26px; font-weight: 700; line-height: 1.15; }
.hq-main .p2b-card__sub { margin: 4px 0 0; color: var(--hq-ink-2); font-size: 12px; }
.hq-main .p2b-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; margin-top: 14px; }
@media (max-width: 960px) { .hq-main .p2b-row { grid-template-columns: 1fr; } }
.hq-main .p2b-spark { width: 100%; height: 92px; margin-top: 8px; }
.hq-main .p2b-spark polyline { stroke: var(--hq-accent); }
.hq-main .p2b-spark polygon { fill: rgba(37,99,235, .12); }

/* Quick chips + attention queue */
.hq-main .p2b-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
body.hq .p2b-quick__item {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 8px 14px;
	background: var(--hq-card);
	border: 1px solid var(--hq-line-2);
	border-radius: 10px;
	color: var(--hq-ink);
	font-size: 13px;
	font-weight: 600;
}
body.hq .p2b-quick__item:hover { border-color: var(--hq-accent); color: var(--hq-accent-deep); text-decoration: none; }
.hq-main .p2b-queue__list { margin: 6px 0 0; padding: 0; list-style: none; }
.hq-main .p2b-queue__list li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--hq-bg); }
.hq-main .p2b-queue__list li:first-child { border-top: 0; }
.hq-main .p2b-queue__text { flex: 1; font-size: 13px; }
.hq-main .p2b-queue__empty { color: var(--hq-ink-3); font-size: 13px; }
.hq-main .p2b-queue .dashicons { color: var(--hq-accent); }
.hq-main .p2b-hub__foot { margin-top: 20px; color: var(--hq-ink-3); font-size: 12px; }

/* Buttons (the screens use WP's .button classes — restyled here, no WP CSS loaded) */
body.hq .button, body.hq button.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	font-family: var(--hq-font);
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	color: var(--hq-ink);
	background: var(--hq-card);
	border: 1px solid var(--hq-line-2);
	border-radius: 9px;
	padding: 9px 16px;
	min-height: 38px;
	cursor: pointer;
	text-decoration: none;
	transition: border-color .15s, background .15s, color .15s;
	white-space: normal;
}
body.hq .button:hover { border-color: var(--hq-accent); color: var(--hq-accent-deep); text-decoration: none; }
body.hq .button-primary, body.hq button.button-primary {
	background: var(--hq-accent);
	border-color: var(--hq-accent);
	color: #fff;
}
body.hq .button-primary:hover { background: var(--hq-accent-deep); border-color: var(--hq-accent-deep); color: #fff; }
body.hq .button-small { padding: 6px 11px; font-size: 12px; }
body.hq .button-hero { padding: 12px 24px; font-size: 14px; border-radius: 11px; }
body.hq .button:focus, body.hq input:focus, body.hq select:focus, body.hq textarea:focus {
	outline: 2px solid rgba(37,99,235, .35);
	outline-offset: 1px;
}

/* Notices */
.hq-main .notice, .hq-alert {
	border: 0;
	border-radius: 10px;
	padding: 12px 16px;
	margin: 0 0 14px;
	font-size: 13.5px;
	background: var(--hq-info-soft);
	color: var(--hq-info);
	box-shadow: none;
}
.hq-main .notice p { margin: 0; }
.hq-main .notice-success { background: var(--hq-good-soft); color: var(--hq-good); }
.hq-main .notice-error, .hq-alert--error { background: var(--hq-bad-soft); color: var(--hq-bad); }
.hq-main .notice-warning { background: var(--hq-warn-soft); color: var(--hq-warn); }
.hq-main .notice.is-dismissible { padding-inline-end: 16px; }
.hq-main .notice .notice-dismiss { display: none; }

/* Tables (the screens use .widefat) */
.hq-main table.widefat {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	background: var(--hq-card);
	border: 1px solid var(--hq-line);
	border-radius: var(--hq-radius);
	overflow: hidden;
	box-shadow: var(--hq-shadow);
	font-size: 13px;
	margin: 6px 0 18px;
}
.hq-main table.widefat th {
	text-align: start;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--hq-ink-3);
	background: #faf8f5;
	padding: 11px 14px;
	border-bottom: 1px solid var(--hq-line);
}
.hq-main table.widefat td {
	padding: 11px 14px;
	border-bottom: 1px solid var(--hq-bg);
	vertical-align: middle;
}
.hq-main table.widefat tbody tr:last-child td { border-bottom: 0; }
.hq-main table.widefat.striped tbody tr:nth-child(odd) { background: transparent; }
.hq-main table.widefat tbody tr:hover { background: #faf7f3; }

/* Forms (form-table + inputs) */
.hq-main .form-table { width: 100%; border-collapse: collapse; }
.hq-main .form-table th {
	text-align: start;
	width: 220px;
	padding: 12px 0;
	vertical-align: top;
	font-weight: 600;
	font-size: 13px;
	color: var(--hq-ink);
}
.hq-main .form-table td { padding: 10px 0 10px 12px; }
[dir="rtl"] .hq-main .form-table td { padding: 10px 12px 10px 0; }
body.hq input[type="text"], body.hq input[type="password"], body.hq input[type="email"],
body.hq input[type="number"], body.hq input[type="tel"], body.hq input[type="url"],
body.hq select, body.hq textarea {
	font-family: var(--hq-font);
	font-size: 13.5px;
	color: var(--hq-ink);
	background: var(--hq-card);
	border: 1px solid var(--hq-line-2);
	border-radius: 9px;
	padding: 8px 12px;
	max-width: 100%;
	min-height: 40px;
}
body.hq input[type="file"] { font-family: var(--hq-font); font-size: 13px; }
body.hq .regular-text { width: 320px; }
body.hq .large-text { width: 100%; }
body.hq .small-text { width: 80px; }
body.hq input[type="checkbox"], body.hq input[type="radio"] { accent-color: var(--hq-accent); width: 16px; height: 16px; }
body.hq kbd {
	background: #efece6;
	border: 1px solid var(--hq-line-2);
	border-radius: 5px;
	padding: 0 6px;
	font-size: 11px;
	font-family: var(--hq-font);
}

/* Orders board (kanban) */
.hq-main .p2b-board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 10px; align-items: flex-start; }
.hq-main .p2b-board__col { flex: 0 0 228px; background: #ece8e1; border-radius: var(--hq-radius); padding: 8px; }
.hq-main .p2b-board__head {
	display: flex; align-items: center; justify-content: space-between;
	font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
	color: var(--hq-ink-2); padding: 4px 6px 8px;
}
.hq-main .p2b-board__count { background: var(--hq-card); border-radius: 10px; padding: 0 8px; font-size: 11px; }
.hq-main .p2b-board__body { display: flex; flex-direction: column; gap: 8px; min-height: 24px; }
.hq-main .p2b-board__empty { color: var(--hq-ink-3); text-align: center; margin: 6px 0; }
.hq-main .p2b-jobcard { background: var(--hq-card); border: 1px solid var(--hq-line); border-radius: 10px; padding: 10px; box-shadow: var(--hq-shadow); }
.hq-main .p2b-jobcard__top { display: flex; align-items: center; justify-content: space-between; font-size: 12px; }
.hq-main .p2b-jobcard__method { color: var(--hq-ink-3); text-transform: uppercase; font-size: 10px; }
.hq-main .p2b-jobcard__name { font-size: 13px; margin: 5px 0 4px; line-height: 1.35; font-weight: 600; }
.hq-main .p2b-jobcard__meta { display: flex; gap: 8px; flex-wrap: wrap; color: var(--hq-ink-2); font-size: 11px; }
.hq-main .p2b-jobcard__actions { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; }
.hq-main .p2b-jobcard__act { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.hq-main .p2b-jobcard__act input[type="text"] { flex: 1; min-width: 70px; font-size: 12px; padding: 5px 8px; }
.hq-main .p2b-done-chip {
	background: var(--hq-good-soft); color: var(--hq-good);
	border-radius: 12px; padding: 2px 10px; font-size: 12px; display: inline-block; margin: 2px;
}

/* Wizard */
.hq-main .p2b-wizard-form .p2b-card { margin-bottom: 14px; }
.hq-main .p2b-caps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.hq-main .p2b-caps label {
	display: flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 600;
	background: #faf8f5; border: 1px solid var(--hq-line); border-radius: 10px; padding: 10px 12px; cursor: pointer;
}
.hq-main .p2b-caps label:hover { border-color: var(--hq-accent); }
.hq-main .p2b-img-preview { margin-top: 8px; }
.hq-main .p2b-img-preview img { max-width: 120px; border: 1px solid var(--hq-line); border-radius: 8px; }
.hq-main .p2b-split { background: #faf8f5; border: 1px solid var(--hq-line); border-radius: 10px; padding: 14px 16px; max-width: 440px; }
.hq-main .p2b-split__row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 14px; }
.hq-main .p2b-split__row--total { border-bottom: 1px solid var(--hq-line-2); font-weight: 700; margin-bottom: 4px; }
.hq-main .p2b-split__row span:last-child { font-variant-numeric: tabular-nums; font-weight: 600; }

/* Gallery/design thumbs in tables */
.hq-main table.widefat img { border-radius: 7px; display: block; }

/* Status pills (finance runs, RMA states) */
.hq-main .p2b-pill { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #ece8e1; color: var(--hq-ink-2); }
.hq-main .p2b-pill--ok { background: var(--hq-good-soft); color: var(--hq-good); }
.hq-main .p2b-pill--bad { background: var(--hq-bad-soft); color: var(--hq-bad); }
.hq-main .p2b-pill--warn { background: rgba(230, 162, 60, 0.16); color: #2563EB; }

/* Card accents (RTL-safe logical border; replaces inline border-left styles) */
.hq-main .p2b-card--info { border-inline-start: 4px solid var(--hq-info); }
.hq-main .p2b-card--frozen { border-inline-start: 4px solid var(--hq-bad); }

/* Destructive actions must LOOK destructive */
body.hq .button-link-delete { color: var(--hq-bad); border-color: var(--hq-bad); background: var(--hq-card); }
body.hq .button-link-delete:hover { background: var(--hq-bad-soft); color: var(--hq-bad); border-color: var(--hq-bad); }

/* Orders board extras + list helpers (ported from the wp-admin-era stylesheets) */
.hq-main .p2b-jobcard__proof { display: inline-block; margin-top: 4px; font-size: 11px; }
.hq-main .p2b-board__done { display: flex; flex-wrap: wrap; gap: 6px; }
.hq-main .row-actions { color: var(--hq-ink-3); font-size: 11px; }

/* Accessibility: screen-reader-only text (wp-admin defines this; our document must too) */
body.hq .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	border: 0;
	word-wrap: normal;
}

/* Command palette (hub.js) */
.p2b-cmd-overlay { position: fixed; inset: 0; background: rgba(20, 17, 14, .45); display: none; align-items: flex-start; justify-content: center; z-index: 100000; }
.p2b-cmd-overlay.is-open { display: flex; }
.p2b-cmd-box { margin-top: 12vh; width: 480px; max-width: 92vw; background: var(--hq-card); border-radius: 14px; box-shadow: 0 18px 60px rgba(20, 17, 14, .35); overflow: hidden; }
body.hq .p2b-cmd-box input { width: 100%; border: 0; border-bottom: 1px solid var(--hq-line); border-radius: 0; padding: 15px 18px; font-size: 15px; }
.p2b-cmd-list { list-style: none; margin: 0; padding: 8px; max-height: 320px; overflow-y: auto; }
body.hq .p2b-cmd-list a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--hq-ink); font-size: 14px; }
body.hq .p2b-cmd-list a:hover, body.hq .p2b-cmd-list li.is-active a { background: var(--hq-accent-soft); color: var(--hq-accent-deep); text-decoration: none; }

/* Dashicons alignment inside our chrome */
body.hq .dashicons { vertical-align: middle; }

/* --------------------------------------------------------------------------
   Login
   -------------------------------------------------------------------------- */
body.hq--login { background: var(--hq-side); }
.hq-login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.hq-login__card {
	width: 400px; max-width: 94vw;
	background: var(--hq-card);
	border-radius: 18px;
	padding: 34px 32px 26px;
	box-shadow: 0 24px 80px rgba(0, 0, 0, .45);
}
.hq-login__brand { text-align: center; margin-bottom: 20px; }
.hq-login__brand .hq-logo { width: 52px; height: 52px; border-radius: 15px; font-size: 18px; margin-bottom: 10px; }
.hq-login__brand h1 { margin: 4px 0 2px; font-size: 22px; }
.hq-login__brand p { margin: 0; color: var(--hq-ink-2); font-size: 13px; }
.hq-field { display: block; margin-bottom: 14px; }
.hq-field span { display: block; font-size: 12.5px; font-weight: 600; color: var(--hq-ink-2); margin-bottom: 5px; }
body.hq .hq-field input { width: 100%; padding: 11px 13px; font-size: 14px; }
.hq-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--hq-ink-2); margin: 4px 0 16px; }
.hq-btn {
	font-family: var(--hq-font); font-weight: 700; font-size: 14px;
	border-radius: 10px; border: 1px solid var(--hq-line-2); padding: 11px 18px; cursor: pointer;
	background: var(--hq-card); color: var(--hq-ink);
}
.hq-btn--primary { background: var(--hq-accent); border-color: var(--hq-accent); color: #fff; }
.hq-btn--primary:hover { background: var(--hq-accent-deep); }
.hq-btn--block { display: block; width: 100%; }
.hq-login__foot { text-align: center; margin: 16px 0 0; font-size: 13px; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
	.hq-side { flex-basis: 62px; }
	.hq-side__name, .hq-nav__label, .hq-nav__head { display: none; }
	body.hq .hq-side__lang { display: none; }
	.hq-nav__item { justify-content: center; padding: 10px 0; }
	.hq-main { padding: 16px 14px 60px; }
	.hq-top { padding: 10px 14px; }
}

@media (max-width: 780px) {
	html, body.hq { height: auto; min-height: 100%; }
	body.hq { font-size: 15px; }
	.hq-app { flex-direction: column; min-height: 100dvh; }
	.hq-side {
		position: sticky;
		top: 0;
		z-index: 80;
		width: 100%;
		height: auto;
		flex: 0 0 auto;
		flex-direction: row;
		align-items: center;
		gap: 8px;
		padding: 8px;
		border-bottom: 1px solid rgba(255,255,255,.08);
		overflow: hidden;
	}
	.hq-side__brand { padding: 0 4px; }
	.hq-side__name { display: none; }
	.hq-nav {
		display: flex;
		align-items: center;
		gap: 6px;
		padding: 0;
		overflow-x: auto;
		overflow-y: hidden;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: thin;
	}
	.hq-nav__head { display: none; }
	.hq-nav__item {
		flex: 0 0 auto;
		min-height: 44px;
		justify-content: center;
		padding: 8px 11px;
		margin: 0;
		white-space: nowrap;
	}
	.hq-nav__label { display: inline !important; font-size: 12.5px; }
	.hq-side__foot { display: none; }
	.hq-top {
		position: static;
		padding: 10px 12px;
		gap: 8px;
		background: rgba(255,255,255,.94);
	}
	.hq-top__title { font-size: 15px; }
	.hq-top__user { display: none; }
	body.hq .hq-top__link { min-height: 38px; padding: 7px 10px; }
	.hq-main {
		padding: 12px 10px 56px;
		width: 100%;
		max-width: 100%;
		overflow-x: hidden;
	}
	.hq-main .p2b-hub__bar { gap: 8px; margin-bottom: 12px; }
	.hq-main .p2b-hub__title, .hq-main h1 { font-size: 19px; }
	.hq-main .p2b-hub__spacer { display: none; }
	.hq-main .p2b-kpis { grid-template-columns: 1fr; gap: 10px; }
	.hq-main .p2b-card { padding: 12px; border-radius: 10px; }
	.hq-main .p2b-card__value { font-size: 22px; }
	body.hq .button,
	body.hq button.button,
	body.hq input[type="text"],
	body.hq input[type="password"],
	body.hq input[type="email"],
	body.hq input[type="number"],
	body.hq input[type="tel"],
	body.hq input[type="url"],
	body.hq select,
	body.hq textarea {
		min-height: 44px;
		font-size: 16px;
	}
	body.hq input[type="checkbox"],
	body.hq input[type="radio"] {
		width: 20px;
		height: 20px;
	}
	body.hq .regular-text,
	body.hq .small-text,
	body.hq input,
	body.hq select,
	body.hq textarea {
		width: 100%;
		max-width: 100%;
	}
	.hq-main .form-table,
	.hq-main .form-table tbody,
	.hq-main .form-table tr,
	.hq-main .form-table th,
	.hq-main .form-table td {
		display: block;
		width: 100%;
	}
	.hq-main .form-table th { padding: 10px 0 3px; }
	.hq-main .form-table td,
	[dir="rtl"] .hq-main .form-table td { padding: 0 0 12px; }
	.hq-main table.widefat {
		display: block;
		width: 100%;
		border: 0;
		background: transparent;
		box-shadow: none;
		overflow: visible;
	}
	.hq-main table.widefat thead { display: none; }
	.hq-main table.widefat tbody,
	.hq-main table.widefat tr,
	.hq-main table.widefat td {
		display: block;
		width: 100%;
	}
	.hq-main table.widefat tr {
		margin: 0 0 12px;
		padding: 10px;
		border: 1px solid var(--hq-line);
		border-radius: 12px;
		background: var(--hq-card);
		box-shadow: var(--hq-shadow);
	}
	.hq-main table.widefat td {
		padding: 8px 4px;
		border-bottom: 1px solid var(--hq-bg);
		overflow-wrap: anywhere;
	}
	.hq-main table.widefat td:last-child { border-bottom: 0; }
	.hq-main table.widefat td form {
		width: 100%;
	}
	.hq-main table.widefat td form input,
	.hq-main table.widefat td form select,
	.hq-main table.widefat td form button {
		flex: 1 1 130px;
	}
	.hq-main .p2b-board {
		margin-inline: -10px;
		padding-inline: 10px;
		scroll-snap-type: x proximity;
	}
	.hq-main .p2b-board__col {
		flex-basis: min(82vw, 300px);
		scroll-snap-align: start;
	}
}

@media (max-width: 420px) {
	.hq-brandimg { height: 28px; }
	.hq-nav__item { padding-inline: 10px; }
	.hq-nav__label { font-size: 12px; }
	.hq-main { padding-inline: 8px; }
	body.hq .button,
	body.hq button.button { width: 100%; }
	.hq-main table.widefat td .button,
	.hq-main table.widefat td button.button { width: auto; }
}

/* ------------------------------------------------------------------ *
 *  Motion (kept subtle; fully disabled for reduced-motion users)
 * ------------------------------------------------------------------ */
/* IMPORTANT: the keyframe must END at transform:none — with fill-mode:both a retained translateY(0)
   would leave a permanent transform on .hq-main children, turning them into containing blocks that
   break position:fixed descendants (the Lab's publish modal, toasts). */
@keyframes hqFadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
body.hq .hq-main > * { animation: hqFadeUp .28s ease both; }
body.hq .hq-main > *:nth-child(2) { animation-delay: .04s; }
body.hq .hq-main > *:nth-child(3) { animation-delay: .08s; }
body.hq .hq-main > *:nth-child(4) { animation-delay: .12s; }
body.hq .hq-nav__item { transition: background .15s ease, color .15s ease, padding-inline-start .15s ease; }
body.hq .hq-nav__item:hover { padding-inline-start: 18px; }
body.hq .p2b-card { transition: box-shadow .18s ease; }
body.hq .p2b-card:hover { box-shadow: 0 4px 18px rgba(33, 29, 25, 0.07); }
body.hq .button, body.hq .hq-btn { transition: transform .12s ease, background .15s ease; }
body.hq .button:active, body.hq .hq-btn:active { transform: scale(0.97); }
@media (prefers-reduced-motion: reduce) {
	body.hq .hq-main > * { animation: none; }
	body.hq .hq-nav__item, body.hq .p2b-card, body.hq .button, body.hq .hq-btn { transition: none; }
}

/* ------------------------------------------------------------------ *
 *  Onboarding tour (first visit only)
 * ------------------------------------------------------------------ */
.hq-tour-dim { position: fixed; inset: 0; background: rgba(20, 17, 14, 0.55); z-index: 100000; }
.hq-tour-target { position: relative; z-index: 100001; box-shadow: 0 0 0 3px #3B82F6, 0 0 0 7px rgba(37,99,235, 0.35); border-radius: 8px; }
/* The sticky sidebar is its own stacking context — a ringed nav item can't escape it, so while a
   sidebar step is highlighted the WHOLE sidebar is raised above the dim (spotlight effect). */
body.hq .hq-side.hq-tour-side { z-index: 100001; }
.hq-tour-tip {
	position: fixed; z-index: 100002; max-width: 300px; background: #fff; color: #23201c;
	border-radius: 12px; padding: 14px 16px; box-shadow: 0 10px 34px rgba(0, 0, 0, 0.3);
	font-size: 13.5px; line-height: 1.55; animation: hqFadeUp .22s ease both;
}
.hq-tour-tip p { margin: 0 0 10px; }
.hq-tour-btns { display: flex; justify-content: space-between; gap: 8px; }
.hq-tour-skip { background: none; border: none; color: #8a8378; cursor: pointer; font-size: 12.5px; padding: 6px 2px; }
.hq-tour-next {
	background: #3B82F6; color: #fff; border: none; border-radius: 8px; padding: 7px 14px;
	font-weight: 700; font-size: 13px; cursor: pointer; font-family: inherit;
}
.hq-tour-next:hover { background: #2563EB; }

/* ------------------------------------------------------------------ *
 *  Seller activation checklist
 * ------------------------------------------------------------------ */
.hq-main .p2b-checklist { border-inline-start: 4px solid #3B82F6; }
.p2b-checklist__count { float: inline-end; font-weight: 700; color: #3B82F6; }
.p2b-checklist__bar { height: 7px; background: #eee8df; border-radius: 99px; overflow: hidden; margin: 6px 0 12px; }
.p2b-checklist__bar span { display: block; height: 100%; background: #3B82F6; border-radius: 99px; transition: width .4s ease; }
.p2b-checklist__steps { list-style: none; margin: 0 0 6px; padding: 0; }
.p2b-checklist__steps li { display: flex; gap: 10px; align-items: center; padding: 6px 0; font-size: 13.5px; }
.p2b-checklist__steps li.is-done { opacity: .55; text-decoration: line-through; }
.p2b-checklist__steps a { font-weight: 600; }
.p2b-checklist__tick {
	width: 22px; height: 22px; border-radius: 50%; flex: none; display: inline-flex; align-items: center;
	justify-content: center; font-size: 12px; background: #f0ece5; color: #8a8378;
}
.p2b-checklist__steps li.is-done .p2b-checklist__tick { background: var(--hq-good-soft, #e6f6ee); color: var(--hq-good, #00803a); }

/* ------------------------------------------------------------------ *
 *  Vendor signup (/hub/join) — extends the login card
 * ------------------------------------------------------------------ */
.hq-join__card { max-width: 460px; }
.hq-join__ttl { margin: 4px 0 6px; font-size: 19px; color: #23201c; }
.hq-join__sub { margin: 0 0 16px; color: #6b655d; font-size: 13.5px; line-height: 1.6; }
.hq-join__row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 420px) { .hq-join__row { grid-template-columns: 1fr; gap: 0; } }
.hq-join__code {
	text-align: center; letter-spacing: 8px; font-size: 26px; font-weight: 700;
	font-variant-numeric: tabular-nums; direction: ltr;
}
.hq-join__resend { margin-top: 10px; text-align: center; }
.hq-join__link { background: none; border: none; color: #3B82F6; cursor: pointer; font-size: 13px; font-family: inherit; text-decoration: underline; }
.hq-join__hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; opacity: 0; }
.hq-alert--ok { background: var(--hq-good-soft, #e6f6ee); color: var(--hq-good, #00803a); border-radius: 9px; padding: 10px 14px; margin-bottom: 14px; font-size: 13.5px; }

.hq-brandimg { height: 34px; width: auto; display: block; background: #fff; border-radius: 8px; padding: 3px 6px; }
