/**
 * AutoPro Core — marketplace app shell + settings + dashboard (Phase 3 UI).
 * Dark brand palette from the site kit: #171717 / #E10012 / Space Grotesk.
 * Depends on apc-auth.css being loaded first (declared dependency).
 */

/* ---------- Palette (re-declared for shell roots) ---------- */

.apc-app,
.apc-settings {
	--apc-red: #e10012;
	--apc-red-dark: #b8000f;
	--apc-card: #171717;
	--apc-card-2: #121212;
	--apc-input-bg: #0e0e0e;
	--apc-border: #363636;
	--apc-text: #f5f5f5;
	--apc-muted: #f5f5f5bf;
	--apc-radius: 12px;
	color-scheme: dark;
}

/* ---------- App shell ---------- */

.apc-app {
	display: grid;
	grid-template-columns: 250px minmax(0, 1fr);
	gap: 0;
	width: auto;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	font-family: inherit;
	color: var(--apc-text);
	box-sizing: border-box;
}

.apc-app *,
.apc-settings * {
	box-sizing: border-box;
}

.apc-app__side {
	position: sticky;
	top: 0;
	align-self: start;
	height: 100vh;
	height: 100dvh;
	display: flex;
	flex-direction: column;
	gap: 18px;
	padding: 20px 16px;
	background: var(--apc-input-bg);
	border-right: 1px solid #363636;
	border-radius: 0;
}

.apc-appnav {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.apc-appnav__item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	border-radius: 10px;
	border-left: 3px solid transparent;
	color: var(--apc-muted);
	font-size: 14.5px;
	font-weight: 600;
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease;
}

.apc-appnav__item .apc-ico {
	display: inline-flex;
	width: 20px;
	height: 20px;
	flex: none;
}

.apc-appnav__item .apc-ico svg {
	width: 100%;
	height: 100%;
}

.apc-appnav__item:hover,
.apc-appnav__item:focus-visible {
	color: var(--apc-text);
	background: rgba(255, 255, 255, 0.04);
	outline: none;
}

.apc-appnav__item.is-active {
	color: #ffffff;
	background: linear-gradient(90deg, rgba(225, 0, 18, 0.18), rgba(225, 0, 18, 0.05));
	border-left-color: var(--apc-red);
}

.apc-appnav__item.is-soon {
	cursor: not-allowed;
	opacity: 0.8;
}

.apc-appnav__chip {
	margin-left: auto;
	padding: 2px 8px;
	border-radius: 999px;
	border: 1px solid rgba(225, 0, 18, 0.5);
	background: rgba(225, 0, 18, 0.08);
	color: var(--apc-red);
	font-style: normal;
	font-size: 10.5px;
	font-weight: 800;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.apc-appnav__user {
	margin-top: auto;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 6px 2px;
	border-top: 1px solid var(--apc-border);
}

.apc-avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	flex: none;
	border-radius: 50%;
	background: var(--apc-red);
	color: #ffffff;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.02em;
}

.apc-avatar--xl {
	width: 96px;
	height: 96px;
	font-size: 30px;
}

.apc-appnav__usermeta strong {
	display: block;
	color: var(--apc-text);
	font-size: 14px;
	line-height: 1.3;
}

.apc-appnav__usermeta a {
	color: var(--apc-muted);
	font-size: 12.5px;
	text-decoration: none;
}

.apc-appnav__usermeta a:hover,
.apc-appnav__usermeta a:focus-visible {
	color: var(--apc-red);
	text-decoration: underline;
}

.apc-app__main {
	min-width: 0;
	padding: 30px 34px 60px;
}

/* ---------- Top bar (inside the main column, right of the sidebar) ---------- */

.apc-topbar {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 16px;
	margin: 0 0 20px;
	padding: 14px 18px;
	background: var(--apc-card-2);
	border: 1px solid #363636;
	border-radius: var(--apc-radius);
}

.apc-topbar__title {
	margin: 0;
	font-family: var(--apc-heading, 'Space Grotesk', sans-serif);
	font-size: 21px;
	font-weight: 700;
	color: var(--apc-text);
	letter-spacing: -0.02em;
}

.apc-topbar__sub { margin: 3px 0 0; font-size: 13px; color: var(--apc-muted); }

.apc-topbar__user { position: relative; flex: 0 0 auto; }

/* Phase 21: Elementor kits paint a white background on hover — kill it. */
.apc-topbar__user[class],
.apc-topbar__user[class]:hover,
.apc-topbar__user[class]:focus-within,
.apc-topbar__user[class] .apc-topbar__chip[class],
.apc-topbar__user[class] .apc-topbar__chip[class]:hover {
	background: transparent !important;
	border: 0 !important;
}

.apc-topbar__chip[class] {
	display: flex;
	align-items: center;
	gap: 7px;
	background: transparent;
	border: 0;
	padding: 2px;
	cursor: pointer;
	transition: opacity 0.15s ease;
}

.apc-topbar__chip[class]:hover { opacity: 0.82; }
.apc-topbar__chip[class]:focus-visible { outline: 2px solid var(--apc-red); outline-offset: 2px; border-radius: 999px; }

.apc-topbar__ava {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--apc-red);
	color: #ffffff;
	display: grid;
	place-items: center;
	font-size: 12px;
	font-weight: 700;
}

.apc-topbar__chevron { width: 14px; height: 14px; color: var(--apc-muted); transition: transform 0.15s ease; }
.apc-topbar__user.is-open .apc-topbar__chevron { transform: rotate(180deg); }

.apc-topbar__menu {
	position: absolute;
	right: 0;
	top: calc(100% + 8px);
	min-width: 190px;
	background: var(--apc-card-2);
	border: 1px solid #363636;
	border-radius: 12px;
	padding: 6px;
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
	z-index: 60;
}

.apc-topbar__menu a {
	display: block;
	padding: 9px 12px;
	border-radius: 8px;
	color: var(--apc-text);
	text-decoration: none;
	font-size: 13.5px;
	font-weight: 600;
}

.apc-topbar__menu a:hover { background: rgba(255, 255, 255, 0.06); }

.apc-topbar__menu a.apc-topbar__logout { color: var(--apc-red); }
.apc-topbar__menu a.apc-topbar__logout:hover { background: rgba(225, 0, 18, 0.12); }

@media (max-width: 720px) {
	.apc-topbar { padding: 12px 14px; margin-bottom: 16px; }
	.apc-topbar__title { font-size: 18px; }
	.apc-topbar__sub { font-size: 12px; }
}

/* ---------- Membership status banner (mechanic dashboard, Phase 14) ---------- */

.apc-mship {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	border-radius: 12px;
	border: 1px solid var(--apc-border);
	background: var(--apc-card-2);
	margin: 0 0 18px;
}

.apc-mship__ico {
	width: 22px;
	height: 22px;
	flex: none;
	display: inline-flex;
}

.apc-mship__ico svg {
	width: 100%;
	height: 100%;
}

.apc-mship__body {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.apc-mship__body strong {
	color: var(--apc-text);
	font-size: 14px;
}

.apc-mship__body span {
	color: var(--apc-muted);
	font-size: 12.5px;
}

.apc-mship__link {
	margin-left: auto;
	color: var(--apc-red);
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
}

.apc-mship__link:hover,
.apc-mship__link:focus-visible {
	text-decoration: underline;
}

.apc-mship--active {
	border-color: rgba(34, 197, 94, 0.45);
	background: rgba(34, 197, 94, 0.08);
}

.apc-mship--active .apc-mship__ico {
	color: #22c55e;
}

.apc-mship--warn {
	border-color: rgba(225, 0, 18, 0.4);
	background: rgba(225, 0, 18, 0.06);
}

.apc-mship--warn .apc-mship__ico {
	color: var(--apc-red);
}

.apc-mship__link--cta {
	padding: 8px 14px;
	border: 1px solid var(--apc-border);
	border-radius: 8px;
}

.apc-mship__link--cta:hover,
.apc-mship__link--cta:focus-visible {
	background: #ffffff;
	border-color: var(--apc-red);
	color: #080808;
	text-decoration: none;
}

@media (max-width: 720px) {
	.apc-mship {
		flex-wrap: wrap;
	}

	.apc-mship__link {
		margin-left: 0;
	}
}

/* ---------- Buttons & chips ---------- */

/* Specificity note: Elementor Site Settings → Buttons emits
   `.elementor-kit-N button { ... }` (0,1,1) and `:hover` at (0,2,1), which
   beats single-class rules on bare <button> elements. Every rule below that
   styles a bare button carries a [class] attribute selector so it wins. */

.apc-btn[class] {
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	padding: 13px 18px;
	border: 1px solid transparent;
	border-radius: 10px;
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

/* Inline button icons (SVG arrows) are always 15px squares — a missing
   class can never let an inline SVG balloon to replaced-element size
   (Phase 22: the profile Save Changes arrow rendered page-sized). The
   SVGs also carry intrinsic width/height attributes. */
.apc-btn .apc-btn__ico,
.apc-btn svg {
	width: 15px;
	height: 15px;
	flex: 0 0 auto;
}

.apc-btn--primary[class] {
	background: var(--apc-red);
	color: #ffffff;
}

.apc-btn--primary[class]:hover:not([disabled]),
.apc-btn--primary[class]:focus-visible:not([disabled]) {
	background: var(--apc-red-dark);
	color: #171717;
	outline: none;
}

.apc-btn--dark[class] {
	background: var(--apc-input-bg);
	color: var(--apc-text);
	border-color: var(--apc-border);
}

.apc-btn--dark[class]:hover:not([disabled]),
.apc-btn--dark[class]:focus-visible:not([disabled]) {
	border-color: var(--apc-red);
	outline: none;
}

.apc-btn--outline[class] {
	background: transparent;
	color: var(--apc-text);
	border-color: var(--apc-border);
}

.apc-btn--outline[class]:hover:not([disabled]),
.apc-btn--outline[class]:focus-visible:not([disabled]) {
	border-color: var(--apc-red);
	outline: none;
}

.apc-btn--muted[class] {
	background: rgba(255, 255, 255, 0.06);
	color: var(--apc-muted);
	border-color: var(--apc-border);
}

.apc-btn[class][disabled] {
	cursor: not-allowed;
	opacity: 0.85;
}

.apc-chip {
	display: inline-flex;
	align-items: center;
	padding: 2px 8px;
	border-radius: 999px;
	border: 1px solid rgba(225, 0, 18, 0.45);
	background: rgba(225, 0, 18, 0.1);
	color: var(--apc-red);
	font-style: normal;
	font-size: 10.5px;
	font-weight: 800;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	white-space: nowrap;
}

/* ---------- Settings section ---------- */

.apc-settings {
	min-width: 0;
	color: var(--apc-text);
}

.apc-settings__title {
	margin: 0 0 4px;
	color: #ffffff;
	font-family: "Space Grotesk", inherit;
	font-size: 26px;
	font-weight: 700;
	line-height: 1.2;
}

.apc-settings__sub {
	margin: 0 0 18px;
	color: var(--apc-muted);
	font-size: 14px;
}

.apc-settings__tabs {
	display: flex;
	gap: 4px;
	margin: 0 0 24px;
	padding: 4px;
	background: #0d0d0d;
	border: 1px solid #363636;
	border-radius: 14px;
	width: fit-content;
	max-width: 100%;
	overflow-x: auto;
}

.apc-settings__tab[class] {
	appearance: none;
	flex: 1 1 auto;
	background: none;
	border: 0;
	border-radius: 10px;
	padding: 10px 24px;
	color: var(--apc-muted);
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
	cursor: pointer;
	transition: color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.apc-settings__tab[class]:hover {
	color: #000000;
}

.apc-settings__tab[class]:focus-visible {
	outline: 2px solid var(--apc-red);
	outline-offset: 2px;
}

.apc-settings__tab[class].is-active {
	background: var(--apc-red);
	color: #ffffff;
	box-shadow: 0 6px 18px rgba(225, 0, 18, 0.28);
}

/* JS progressively enhances: without it, panels stack vertically. */
[data-apc-js] .apc-settings__panel {
	display: none;
}

[data-apc-js] .apc-settings__panel.is-active {
	display: block;
}

.apc-settings__panel + .apc-settings__panel {
	margin-top: 18px;
}

/* ---------- Cards & panel headers ---------- */

.apc-card,
.apc-panel {
	background: var(--apc-card);
	border: 1px solid #363636;
	border-radius: var(--apc-radius);
	padding: 26px;
	margin: 0 0 18px;
}

.apc-card__title {
	margin: 0 0 6px;
	color: #ffffff;
	font-family: "Space Grotesk", inherit;
	font-size: 21px;
	font-weight: 700;
}

.apc-card__sub {
	margin: 0 0 18px;
	color: var(--apc-muted);
	font-size: 14px;
}

/* ---------- Profile ---------- */

.apc-profile__avatar {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	margin: 8px 0 24px;
	text-align: center;
}

.apc-profile__upload {
	appearance: none;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: none;
	border: 0;
	padding: 4px;
	color: var(--apc-red);
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	cursor: help;
}

.apc-profile__upload .apc-ico {
	display: inline-flex;
	width: 17px;
	height: 17px;
}

.apc-profile__upload .apc-ico svg {
	width: 100%;
	height: 100%;
}

.apc-profile__hint {
	margin: 0;
	color: var(--apc-muted);
	font-size: 12.5px;
}

/* ---------- Forms ---------- */

.apc-form {
	max-width: 470px;
	margin: 0 auto;
}

.apc-field {
	margin: 0 0 16px;
}

.apc-field label {
	display: block;
	margin-bottom: 7px;
	color: var(--apc-text);
	font-size: 13.5px;
	font-weight: 600;
}

.apc-field input[type="text"],
.apc-field input[type="email"],
.apc-field input[type="password"],
.apc-field input[type="url"],
.apc-field input[type="tel"],
.apc-field select,
.apc-field textarea {
	width: 100%;
	padding: 12px 14px;
	background: var(--apc-input-bg);
	border: 1px solid #363636;
	border-radius: 9px;
	color: var(--apc-text);
	font-family: inherit;
	font-size: 15px;
}

.apc-field select {
	appearance: none;
	-webkit-appearance: none;
	padding-right: 42px;
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23f5f5f5' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	cursor: pointer;
}

.apc-field select option {
	background: #141414;
	color: #f5f5f5;
}

.apc-field textarea {
	min-height: 150px;
	resize: vertical;
	line-height: 1.6;
}

.apc-field input::placeholder,
.apc-field textarea::placeholder {
	color: rgba(245, 245, 245, 0.45);
}

.apc-field input:focus,
.apc-field select:focus,
.apc-field textarea:focus {
	border-color: var(--apc-red);
	box-shadow: 0 0 0 3px rgba(225, 0, 18, 0.18);
	outline: none;
}

.apc-field__hint {
	display: block;
	margin-top: 6px;
	color: var(--apc-muted);
	font-size: 12.5px;
}

.apc-form__fieldset {
	margin: 20px 0;
	padding: 16px;
	border: 1px solid #363636;
	border-radius: 10px;
}

.apc-form__fieldset legend {
	padding: 0 8px;
	color: var(--apc-text);
	font-size: 13.5px;
	font-weight: 700;
}

/* ---------- Role cards ---------- */

.apc-roles__current {
	margin: 0 0 20px;
	color: var(--apc-muted);
	font-size: 14.5px;
}

.apc-accent {
	color: var(--apc-red);
	font-weight: 700;
}

.apc-roles {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 18px;
}

.apc-role-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 22px;
	background: var(--apc-card-2);
	border: 1px solid #363636;
	border-radius: 12px;
}

.apc-role-card.is-current {
	border-color: var(--apc-red);
	box-shadow: 0 0 0 1px rgba(225, 0, 18, 0.35), 0 14px 34px rgba(0, 0, 0, 0.4);
}

.apc-role-card__badge {
	position: absolute;
	top: 14px;
	right: 14px;
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--apc-red);
	color: #ffffff;
	font-size: 10.5px;
	font-weight: 800;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.apc-role-card__icon {
	display: inline-flex;
	width: 30px;
	height: 30px;
	color: var(--apc-red);
}

.apc-role-card__icon svg {
	width: 100%;
	height: 100%;
}

.apc-role-card h4 {
	margin: 0;
	color: #ffffff;
	font-family: "Space Grotesk", inherit;
	font-size: 17px;
}

.apc-role-card__desc {
	margin: 0;
	color: var(--apc-muted);
	font-size: 13.5px;
}

.apc-role-card__list {
	list-style: none;
	margin: 0 0 6px;
	padding: 0;
}

.apc-role-card__list li {
	position: relative;
	margin: 8px 0;
	padding-left: 20px;
	color: var(--apc-text);
	font-size: 13.5px;
}

.apc-role-card__list li::before {
	content: "—";
	position: absolute;
	left: 0;
	color: var(--apc-muted);
}

.apc-role-card form,
.apc-role-card .apc-btn {
	margin-top: auto;
}

.apc-roles__note {
	margin: 16px 0 0;
	color: var(--apc-muted);
	font-size: 13px;
	text-align: center;
}

/* ---------- Notices & membership ---------- */

.apc-notice {
	margin: 0 0 20px;
	padding: 14px 16px;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid #363636;
	border-radius: 10px;
}

.apc-notice strong {
	display: block;
	margin-bottom: 2px;
	color: var(--apc-text);
	font-size: 14.5px;
}

.apc-notice span {
	color: var(--apc-muted);
	font-size: 13px;
}

.apc-notice--warn {
	border-color: rgba(225, 0, 18, 0.5);
	background: rgba(225, 0, 18, 0.08);
}

.apc-notice--active {
	border-color: rgba(34, 197, 94, 0.45);
	background: rgba(34, 197, 94, 0.08);
}

.apc-notice--active strong { color: #4ade80; }

.apc-notice .apc-btn { margin-top: 10px; text-decoration: none; }

.apc-plan--featured {
	border-color: rgba(225, 0, 18, 0.55);
	box-shadow: 0 10px 30px rgba(225, 0, 18, 0.12);
}

/* Standalone membership plans page */
.apc-mempage { max-width: 1100px; margin: 0 auto; padding: 38px 22px 90px; }
.apc-mempage .apc-plans { margin-top: 20px; }

.apc-plans {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 18px;
}

.apc-plan {
	display: flex;
	flex-direction: column;
	padding: 20px;
	background: var(--apc-card-2);
	border: 1px solid #363636;
	border-radius: 12px;
}

.apc-plan h4 {
	margin: 0 0 6px;
	color: #ffffff;
	font-size: 15px;
}

.apc-plan__price {
	margin: 0;
	color: #ffffff;
	font-family: "Space Grotesk", inherit;
	font-size: 24px;
	font-weight: 800;
}

.apc-plan__price span {
	color: var(--apc-muted);
	font-family: inherit;
	font-size: 13px;
	font-weight: 500;
}

.apc-plan__save {
	margin: 0;
	align-self: flex-start;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.02em;
	line-height: 1;
	padding: 4px 10px;
	border-radius: 999px;
	background: rgba(225, 0, 18, 0.16);
	border: 1px solid rgba(225, 0, 18, 0.45);
	color: #ff6b74;
}

.apc-plan__note {
	margin: 4px 0 0;
	color: var(--apc-muted);
	font-size: 12.5px;
}

.apc-plan__features {
	list-style: none;
	margin: 14px 0 16px;
	padding: 0;
}

.apc-plan__features li {
	position: relative;
	margin: 7px 0;
	padding-left: 22px;
	color: var(--apc-muted);
	font-size: 13.5px;
}

.apc-plan__features li::before {
	content: "✓";
	position: absolute;
	left: 0;
	color: var(--apc-red);
	font-weight: 700;
}

.apc-plan .apc-btn {
	margin-top: auto;
}

/* ---------- Dashboard ---------- */

.apc-dash__header {
	margin-bottom: 22px;
}

.apc-dash__greeting {
	margin: 0 0 4px;
	color: #ffffff;
	font-family: "Space Grotesk", inherit;
	font-size: 26px;
	font-weight: 700;
}

.apc-dash__sub {
	margin: 0;
	color: var(--apc-muted);
	font-size: 14px;
}

.apc-dash__actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
	margin: 0 0 22px;
}

.apc-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 14px;
	margin: 0 0 22px;
}

.apc-stat {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	padding: 18px;
	background: var(--apc-card);
	border: 1px solid #363636;
	border-radius: 12px;
}

.apc-stat__value {
	display: block;
	color: #ffffff;
	font-family: "Space Grotesk", inherit;
	font-size: 26px;
	font-weight: 800;
	line-height: 1.1;
}

.apc-stat__label {
	display: block;
	margin-top: 4px;
	color: var(--apc-muted);
	font-size: 13px;
}

.apc-stat__icon {
	display: inline-flex;
	width: 22px;
	height: 22px;
	flex: none;
	color: var(--apc-red);
}

.apc-stat__icon svg {
	width: 100%;
	height: 100%;
}

/* ---------- Profile photo avatars (photo variant everywhere) ---------- */
.apc-avatar--photo[class],
.apc-topbar__ava[class] {
	background-size: cover;
	background-position: center;
	color: transparent;
}

.apc-avatar--md {
	width: 42px;
	height: 42px;
	font-size: 15px;
}

/* ---------- Profile photo actions ---------- */
.apc-profile__avatar-actions {
	display: flex;
	gap: 10px;
	justify-content: center;
	align-items: center;
	margin-top: 14px;
	flex-wrap: wrap;
}

.apc-profile__removeform {
	display: inline-flex;
	margin: 0;
}

/* ---------- Photo cropper modal ---------- */
.apc-crop {
	display: contents;
}

[data-apc-crop-file] {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

.apc-crop__modal {
	position: fixed;
	inset: 0;
	z-index: 10050;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.82);
	padding: 20px;
}

.apc-crop__modal[hidden] {
	display: none;
}

.apc-crop__box {
	background: #121212;
	border: 1px solid #363636;
	border-radius: 16px;
	padding: 22px;
	width: min(420px, 100%);
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

.apc-crop__title {
	margin: 0 0 14px;
	font-size: 17px;
	color: #ededed;
}

.apc-crop__viewport {
	position: relative;
	width: 280px;
	height: 280px;
	max-width: 100%;
	margin: 0 auto;
	overflow: hidden;
	border-radius: 12px;
	background: #0a0a0a;
	border: 1px solid #363636;
	touch-action: none;
	cursor: grab;
}

.apc-crop__viewport:active {
	cursor: grabbing;
}

.apc-crop__img {
	position: absolute;
	top: 0;
	left: 0;
	max-width: none;
	user-select: none;
	-webkit-user-drag: none;
}

.apc-crop__zoom {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 16px 0 0;
	color: #a3a3a3;
	font-size: 13px;
}

.apc-crop__zoom input[type="range"] {
	flex: 1;
	accent-color: #E10012;
}

.apc-crop__actions {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	margin-top: 18px;
}

/* ---------- Preferences toggles (Phase 15) ---------- */
.apc-prefs {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.apc-pref {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 14px 16px;
	border: 1px solid var(--apc-border, #363636);
	border-radius: 12px;
	background: var(--apc-card-2, #121212);
	cursor: pointer;
}

.apc-pref__text {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.apc-pref__text strong {
	color: var(--apc-text, #f5f5f5);
	font-size: 14.5px;
}

.apc-pref__hint {
	color: var(--apc-muted, #f5f5f5bf);
	font-size: 12.5px;
}

.apc-switch {
	position: relative;
	flex: none;
	display: inline-flex;
	align-items: center;
}

.apc-switch input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.apc-switch__track {
	width: 46px;
	height: 26px;
	border-radius: 999px;
	background: #2a2a2a;
	border: 1px solid #3a3a3a;
	display: inline-flex;
	align-items: center;
	padding: 2px;
	transition: background 0.18s ease, border-color 0.18s ease;
}

.apc-switch__thumb {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #8a8a8a;
	transition: transform 0.18s ease, background 0.18s ease;
}

.apc-switch input:checked + .apc-switch__track {
	background: var(--apc-red, #e10012);
	border-color: var(--apc-red, #e10012);
}

.apc-switch input:checked + .apc-switch__track .apc-switch__thumb {
	transform: translateX(20px);
	background: #ffffff;
}

.apc-switch input:focus-visible + .apc-switch__track {
	outline: 2px solid var(--apc-red, #e10012);
	outline-offset: 2px;
}

/* ===== Phase 21 — header CTA shortcode [apc_header_cta] ===== */
.apc-headcta {
	display: inline-flex;
	align-items: center;
	gap: 12px;
}

.apc-headcta__login[class],
.apc-headcta__cta[class] {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: auto !important;
	padding: 12px 22px !important;
	border-radius: 8px !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	text-decoration: none !important;
	line-height: 1.2 !important;
	cursor: pointer !important;
}

.apc-headcta__login[class] {
	background: #111111 !important;
	border: 1px solid #3a3a3a !important;
	color: #ffffff !important;
}

.apc-headcta__login[class]:hover {
	border-color: #6a6a6a !important;
	color: #ffffff !important;
}

.apc-headcta__cta[class] {
	background: var(--apc-red, #e10012) !important;
	border: 1px solid var(--apc-red, #e10012) !important;
	color: #ffffff !important;
}

.apc-headcta__cta[class]:hover {
	background: #c5000f !important;
	color: #ffffff !important;
}

@media (max-width: 600px) {
	.apc-headcta { gap: 8px; }
	.apc-headcta__login[class],
	.apc-headcta__cta[class] { padding: 10px 14px !important; font-size: 13.5px !important; }
}

/* ===== Phase 21 — password accordion (profile tab) ===== */
.apc-acc {
	border: 1px solid var(--apc-border, #363636);
	border-radius: 10px;
	background: var(--apc-card-2, #121212);
	margin: 0 0 18px;
	overflow: hidden;
}

.apc-acc__summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 13px 16px;
	cursor: pointer;
	font-weight: 600;
	font-size: 14.5px;
	color: var(--apc-text, #f5f5f5);
	list-style: none;
}

.apc-acc__summary::-webkit-details-marker { display: none; }

.apc-acc__summary svg {
	width: 18px;
	height: 18px;
	flex: none;
	color: var(--apc-muted, #9a9a9a);
	transition: transform 0.15s ease;
}

.apc-acc[open] .apc-acc__summary svg { transform: rotate(180deg); }

.apc-acc__body {
	padding: 4px 16px 16px;
	border-top: 1px solid var(--apc-border, #363636);
}

.apc-panel__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 8px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--apc-border);
}

.apc-panel__head h3 {
	margin: 0;
	color: #ffffff;
	font-family: "Space Grotesk", inherit;
	font-size: 17px;
}

.apc-panel__link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--apc-red);
	font-size: 13.5px;
	font-weight: 700;
}

.apc-empty {
	padding: 34px 16px 26px;
	text-align: center;
}

.apc-empty__icon {
	display: inline-flex;
	width: 44px;
	height: 44px;
	margin-bottom: 10px;
	color: #5a5a5a;
}

.apc-empty__icon svg {
	width: 100%;
	height: 100%;
}

.apc-empty h4 {
	margin: 0 0 6px;
	color: var(--apc-text);
	font-size: 16.5px;
}

.apc-empty p {
	margin: 0 auto 16px;
	max-width: 430px;
	color: var(--apc-muted);
	font-size: 13.5px;
}

.apc-empty .apc-btn {
	max-width: 300px;
	margin: 0 auto;
}

/* ---------- Toast ---------- */

.apc-toast {
	position: fixed;
	right: 22px;
	bottom: 22px;
	z-index: 9999;
	display: flex;
	align-items: center;
	gap: 14px;
	max-width: 360px;
	padding: 14px 16px;
	background: var(--apc-input-bg);
	border: 1px solid #363636;
	border-left: 3px solid var(--apc-red);
	border-radius: 10px;
	color: var(--apc-text);
	font-size: 14px;
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
	opacity: 1;
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.apc-toast--error {
	color: #ff9c9c;
}

.apc-toast__close[class] {
	appearance: none;
	background: none;
	border: 0;
	padding: 0 2px;
	color: var(--apc-muted);
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
}

.apc-toast.is-leaving {
	opacity: 0;
	transform: translateY(8px);
}

/* ---------- Responsive ---------- */

@media (max-width: 920px) {
	.apc-app {
		grid-template-columns: 1fr;
	}

	/* The nav sidebar becomes an off-canvas drawer: the topbar shows a
	   hamburger, the scrim / Escape / a nav tap close it again. */
	.apc-app__side {
		position: fixed;
		top: 0;
		bottom: 0;
		left: 0;
		width: min(84vw, 320px);
		margin: 0;
		border-right: 1px solid #363636;
		border-radius: 0;
		overflow-y: auto;
		transform: translateX(-103%);
		transition: transform 0.22s ease;
		z-index: 100002;
	}

	.apc-app__side.is-open {
		transform: translateX(0);
	}

	.apc-app__scrim {
		position: fixed;
		inset: 0;
		z-index: 100001;
		background: rgba(0, 0, 0, 0.62);
		opacity: 0;
		transition: opacity 0.18s ease;
	}

	.apc-app__scrim.is-open {
		opacity: 1;
	}

	.apc-app__scrim[hidden] {
		display: none !important;
	}

	.apc-app__main {
		padding: 20px 16px 40px;
	}

	/* Scoped + higher specificity: beats the base display:none rule that
	   appears later in the file. (An earlier edit accidentally nested this
	   inside the rule above, breaking the burger's mobile visibility.) */
	.apc-app .apc-appnav__burger[class] {
		display: inline-flex !important;
	}
}

@media (max-width: 600px) {
	.apc-card,
	.apc-panel {
		padding: 18px 14px;
	}

	.apc-dash__actions {
		grid-template-columns: 1fr;
	}

	.apc-settings__tabs {
		width: 100%;
	}

	.apc-settings__tab[class] {
		flex: 1 1 0;
		padding: 10px 12px;
	}
}

/* ===== Phase 22 — [apc_header_cta] mobile off-canvas (≤767px) =====
   The shortcode always renders the canvas markup; desktop hides the burger
   and keeps the log-in/sign-up buttons or the avatar chip. Mobile swaps
   them for the hamburger, which opens this right-side panel. */

.apc-headcta__wrap {
	display: inline-flex;
	align-items: center;
	gap: 12px;
}

.apc-headcta__burger[class] {
	display: none !important;
	align-items: center !important;
	justify-content: center !important;
	width: 44px !important;
	height: 44px !important;
	padding: 0 !important;
	background: transparent !important;
	border: 0 !important;
	border-radius: 8px !important;
	color: #ffffff !important;
	cursor: pointer !important;
}

.apc-headcta__burger[class] svg {
	width: 24px;
	height: 24px;
}

.apc-headcta__burger[class]:hover,
.apc-headcta__burger[class]:focus-visible {
	background: rgba(255, 255, 255, 0.08) !important;
	color: #ffffff !important;
}

.apc-headcta__burger[class]:focus-visible {
	outline: 2px solid var(--apc-red, #e10012) !important;
	outline-offset: 2px !important;
}

@media (max-width: 767px) {
	.apc-headcta[class],
	.apc-topbar__user--header[class] {
		display: none !important;
	}

	.apc-headcta__burger[class] {
		display: inline-flex !important;
	}
}

.apc-headcta__canvas {
	position: fixed;
	inset: 0;
	z-index: 100001;
}

.apc-headcta__canvas[hidden] {
	display: none !important;
}

.apc-headcta__scrim {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.62);
	opacity: 0;
	transition: opacity 0.18s ease;
}

.apc-headcta__panel {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: min(86vw, 360px);
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 16px 16px calc(18px + env(safe-area-inset-bottom));
	background: #0e0e0e;
	border-left: 1px solid #363636;
	overflow-y: auto;
	transform: translateX(102%);
	transition: transform 0.22s ease;
	color: var(--apc-text, #f5f5f5);
	color-scheme: dark;
}

.apc-headcta__canvas.is-open .apc-headcta__scrim { opacity: 1; }
.apc-headcta__canvas.is-open .apc-headcta__panel { transform: translateX(0); }

@media (prefers-reduced-motion: reduce) {
	.apc-headcta__scrim,
	.apc-headcta__panel {
		transition: none;
	}
}

.apc-headcta__canvashead {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 2px 2px 0;
}

.apc-headcta__canvashead img[class] {
	display: block !important;
	max-height: 42px !important;
	width: auto !important;
}

.apc-headcta__sitename[class] {
	color: #ffffff !important;
	font-size: 19px !important;
	font-weight: 800 !important;
	letter-spacing: 0.01em !important;
	text-decoration: none !important;
}

.apc-headcta__xclose[class] {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 40px !important;
	height: 40px !important;
	padding: 0 !important;
	background: transparent !important;
	border: 0 !important;
	border-radius: 8px !important;
	color: #a3a3a3 !important;
	cursor: pointer !important;
}

.apc-headcta__xclose[class] svg {
	width: 20px;
	height: 20px;
}

.apc-headcta__xclose[class]:hover,
.apc-headcta__xclose[class]:focus-visible {
	background: rgba(255, 255, 255, 0.06) !important;
	color: #ffffff !important;
}

.apc-headcta__nav[class] {
	display: flex !important;
	flex-direction: column !important;
	background: #171717 !important;
	border: 1px solid #363636 !important;
	border-radius: 14px !important;
	overflow: hidden !important;
}

.apc-headcta__navlink[class] {
	display: flex !important;
	align-items: center !important;
	min-height: 52px;
	padding: 13px 16px !important;
	border-top: 1px solid rgba(255, 255, 255, 0.07) !important;
	color: #f5f5f5 !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	line-height: 1.3 !important;
	text-decoration: none !important;
	transition: background 0.15s ease, color 0.15s ease;
}

.apc-headcta__navlink[class]:first-child {
	border-top: 0 !important;
}

.apc-headcta__navlink[class]:hover,
.apc-headcta__navlink[class]:focus-visible {
	background: rgba(255, 255, 255, 0.05) !important;
	color: #ffffff !important;
	outline: none !important;
}

.apc-headcta__auth[class] {
	display: grid !important;
	grid-template-columns: 1fr 1fr !important;
	gap: 10px !important;
}

@media (max-width: 380px) {
	.apc-headcta__auth[class] {
		grid-template-columns: 1fr !important;
	}
}

.apc-headcta__me[class] {
	display: flex !important;
	align-items: center !important;
	gap: 12px !important;
	padding: 14px !important;
	background: #171717 !important;
	border: 1px solid #363636 !important;
	border-radius: 14px !important;
}

.apc-headcta__ava {
	width: 46px;
	height: 46px;
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: #262626 center / cover no-repeat;
	color: #ffffff;
	font-size: 16px;
	font-weight: 700;
	overflow: hidden;
}

.apc-headcta__meta {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.apc-headcta__meta strong[class] {
	color: #ffffff !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	line-height: 1.25 !important;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.apc-headcta__meta em[class] {
	color: #a3a3a3 !important;
	font-size: 11px !important;
	font-style: normal !important;
	font-weight: 700 !important;
	letter-spacing: 0.08em !important;
	text-transform: uppercase !important;
}

.apc-headcta__out[class] {
	margin-left: auto;
	display: inline-flex !important;
	align-items: center !important;
	color: var(--apc-red, #e10012) !important;
	font-size: 13.5px !important;
	font-weight: 700 !important;
	text-decoration: none !important;
	white-space: nowrap;
}

.apc-headcta__out[class]:hover,
.apc-headcta__out[class]:focus-visible {
	color: #ff4d5b !important;
	text-decoration: underline !important;
}

body.apc-canvas-lock {
	overflow: hidden !important;
}

/* ===== Phase 22.5 — notification bell, live poll, presence ===== */

.apc-ntf {
	position: relative;
	flex: 0 0 auto;
}

.apc-ntf__bell[class] {
	position: relative !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 40px !important;
	height: 40px !important;
	padding: 0 !important;
	background: transparent !important;
	border: 0 !important;
	border-radius: 999px !important;
	color: #ffffff !important;
	cursor: pointer !important;
}

.apc-ntf__bell[class]:hover,
.apc-ntf__bell[class]:focus-visible {
	background: rgba(255, 255, 255, 0.08) !important;
	color: #ffffff !important;
}

.apc-ntf__bell[class]:focus-visible {
	outline: 2px solid var(--apc-red, #e10012) !important;
	outline-offset: 2px !important;
}

.apc-ntf__dot[class] {
	position: absolute !important;
	top: 1px !important;
	right: -2px !important;
	min-width: 17px !important;
	height: 17px !important;
	padding: 0 3px !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	background: var(--apc-red, #e10012) !important;
	color: #ffffff !important;
	font-size: 10.5px !important;
	font-weight: 800 !important;
	line-height: 1 !important;
	border-radius: 999px !important;
	border: 2px solid #0e0e0e;
	box-sizing: content-box !important;
}

.apc-ntf__dot[class][hidden] {
	display: none !important;
}

.apc-ntf__menu[class] {
	position: absolute !important;
	top: calc(100% + 10px) !important;
	right: 0 !important;
	width: min(330px, calc(100vw - 24px)) !important;
	background: #171717 !important;
	border: 1px solid #363636 !important;
	border-radius: 14px !important;
	box-shadow: 0 22px 44px rgba(0, 0, 0, 0.5) !important;
	z-index: 60 !important;
	overflow: hidden !important;
}

.apc-ntf__menu[class][hidden] {
	display: none !important;
}

.apc-ntf__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 12px 14px;
	border-bottom: 1px solid #363636;
}

.apc-ntf__head strong[class] {
	color: #ffffff !important;
	font-size: 14px !important;
	font-weight: 700 !important;
}

.apc-ntf__readall[class] {
	appearance: none !important;
	background: transparent !important;
	border: 0 !important;
	padding: 0 !important;
	color: var(--apc-red, #e10012) !important;
	font-size: 12px !important;
	font-weight: 700 !important;
	cursor: pointer !important;
}

.apc-ntf__readall[class]:hover {
	color: #ff4d5b !important;
}

.apc-ntf__list {
	max-height: 340px;
	overflow-y: auto;
}

.apc-ntf__empty {
	margin: 0 !important;
	padding: 26px 14px !important;
	text-align: center !important;
	color: #a3a3a3 !important;
	font-size: 13.5px !important;
}

.apc-ntf__item[class] {
	display: flex !important;
	align-items: flex-start !important;
	gap: 10px !important;
	padding: 12px 14px !important;
	border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
	text-decoration: none !important;
	transition: background 0.15s ease;
}

.apc-ntf__item[class]:first-child {
	border-top: 0 !important;
}

.apc-ntf__item[class]:hover,
.apc-ntf__item[class]:focus-visible {
	background: rgba(255, 255, 255, 0.05) !important;
	outline: none !important;
}

.apc-ntf__icon[class] {
	flex: none !important;
	width: 30px !important;
	height: 30px !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	border-radius: 8px !important;
	background: rgba(255, 255, 255, 0.07) !important;
	color: #a3a3a3 !important;
}

.apc-ntf__icon--message[class] {
	background: rgba(225, 0, 18, 0.14) !important;
	color: #ff4d5b !important;
}

.apc-ntf__text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.apc-ntf__text strong[class] {
	color: #e8e8e8 !important;
	font-size: 13.5px !important;
	font-weight: 700 !important;
	line-height: 1.35 !important;
}

.apc-ntf__item.is-unread .apc-ntf__text strong[class] {
	color: #ffffff !important;
}

.apc-ntf__item.is-unread .apc-ntf__icon[class] {
	color: #ffffff !important;
}

.apc-ntf__text em[class] {
	color: #a3a3a3 !important;
	font-size: 12.5px !important;
	font-style: normal !important;
	line-height: 1.4 !important;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.apc-ntf__text time[class] {
	color: #767676 !important;
	font-size: 11px !important;
}

/* Sidebar Messages badge: the element always renders on dashboard pages so
   the live poll can flip it without layout jumps. */
.apc-appnav__badge[class][hidden] {
	display: none !important;
}

/* ---------- Presence (messages page) ---------- */

.apc-conv__avatar-cell {
	position: relative;
}

.apc-presence-dot {
	position: absolute;
	right: -1px;
	bottom: -1px;
	width: 11px;
	height: 11px;
	border-radius: 50%;
	background: #6f6f6f;
	border: 2px solid #171717;
	display: block;
}

.apc-presence-dot.is-online {
	background: #22c55e;
}

.apc-presence-dot.is-away {
	background: #f59e0b;
}

.apc-presence {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 2px 0 0;
	color: #a3a3a3;
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: 0.04em;
}

.apc-presence i {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #6f6f6f;
	display: inline-block;
}

.apc-presence.is-online i {
	background: #22c55e;
}

.apc-presence.is-away i {
	background: #f59e0b;
}

.apc-presence em[class] {
	color: #a3a3a3 !important;
	font-style: normal !important;
}

.apc-presence.is-online em[class] {
	color: #22c55e !important;
}

/* ===== Phase 23 — dashboard topbar cluster + mobile nav drawer ===== */

/* Bell + avatar pill stay together on the right edge of the topbar
   (space-between alone pushed the bell to the middle). */
.apc-topbar__right {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-left: auto;
	flex: 0 0 auto;
}

/* Hamburger that opens the nav drawer on ≤920px (hidden on desktop). */
.apc-appnav__burger[class] {
	display: none !important;
	align-items: center !important;
	justify-content: center !important;
	width: 40px !important;
	height: 40px !important;
	padding: 0 !important;
	background: transparent !important;
	border: 0 !important;
	border-radius: 8px !important;
	color: var(--apc-text, #f5f5f5) !important;
	cursor: pointer !important;
	flex: 0 0 auto !important;
}

.apc-appnav__burger[class] svg {
	width: 24px;
	height: 24px;
}

.apc-appnav__burger[class]:hover,
.apc-appnav__burger[class]:focus-visible {
	background: rgba(255, 255, 255, 0.08) !important;
	color: #ffffff !important;
}

.apc-appnav__burger[class]:focus-visible {
	outline: 2px solid var(--apc-red, #e10012) !important;
	outline-offset: 2px !important;
}

@media (prefers-reduced-motion: reduce) {
	.apc-app__side,
	.apc-app__scrim {
		transition: none;
	}
}


/* Membership plans: guests get a disabled Subscribe + log-in hint */
.apc-plan__login { margin: 12px 0 0; text-align: center; font-size: 12.5px; }
.apc-plan__login a { color: var(--apc-red, #e10012); font-weight: 600; }
.apc-plan .apc-btn[disabled] { opacity: 0.55; cursor: not-allowed; }

