/* OneRestau FO Shell — scoped to .sgp-rc-app / .sgp-rc-app-page */

.sgp-rc-app-page {
	--sgp-rc-primary: #1f4b3a;
	--sgp-rc-secondary: #c45c26;
	--sgp-rc-accent: #0cc21e;
	--sgp-rc-success: #0cc21e;
	--sgp-rc-danger: #dc2626;
	--sgp-rc-warning: #f59e0b;
	--sgp-rc-console-bg: #102f3a;
	--sgp-rc-surface-bg: #071014;
	--sgp-rc-card-bg: #f8fafc;
	--sgp-rc-text-dark: #122033;
	--sgp-rc-text-light: #f8fafc;
	--sgp-rc-card-radius: 18px;
	--sgp-rc-app-sidebar: 240px;
	--sgp-rc-app-topbar: 64px;
	margin: 0;
	background: var(--sgp-rc-surface-bg);
	color: var(--sgp-rc-text-light);
}

.sgp-rc-app-page,
.sgp-rc-app-page #wpadminbar {
	font-family: "Segoe UI", system-ui, sans-serif;
}

html:has(.sgp-rc-app-page),
.sgp-rc-app-page {
	height: 100%;
	overflow: hidden;
}

.sgp-rc-app {
	--sgp-fo-motion-fast: 160ms;
	--sgp-fo-motion-normal: 200ms;
	--sgp-fo-motion-exit: 250ms;
	--sgp-fo-ease-standard: ease-out;
	display: flex;
	flex-direction: column;
	height: 100vh;
	background: var(--sgp-rc-surface-bg);
	color: var(--sgp-rc-text-light);
}

.admin-bar .sgp-rc-app {
	height: calc(100vh - 32px);
}

.sgp-rc-app__sr {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.sgp-rc-app__skip {
	position: absolute;
	left: -999px;
	top: 8px;
	z-index: 100;
	padding: 8px 12px;
	background: var(--sgp-rc-primary);
	color: #fff;
}

.sgp-rc-app__skip:focus {
	left: 8px;
}

.sgp-rc-app__topbar {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: var(--sgp-rc-app-topbar);
	padding: 0 16px;
	background: var(--sgp-rc-console-bg);
	border-bottom: 1px solid rgba(248, 250, 252, 0.08);
	flex: 0 0 auto;
}

.sgp-rc-app__topbar-main {
	display: flex;
	align-items: flex-end;
	gap: 12px;
	min-width: 0;
	flex: 1 1 auto;
}

.sgp-rc-app__menu-btn {
	display: none;
	align-items: center;
	justify-content: center;
	position: relative;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.06);
	color: var(--sgp-rc-text-light);
	cursor: pointer;
}

.sgp-rc-app__menu-icon,
.sgp-rc-app__menu-icon::before,
.sgp-rc-app__menu-icon::after {
	display: block;
	width: 18px;
	height: 2px;
	background: currentColor;
	border-radius: 1px;
}

.sgp-rc-app__menu-icon {
	position: relative;
}

.sgp-rc-app__menu-icon::before,
.sgp-rc-app__menu-icon::after {
	content: "";
	position: absolute;
	left: 0;
}

.sgp-rc-app__menu-icon::before {
	top: -6px;
}

.sgp-rc-app__menu-icon::after {
	top: 6px;
}

.sgp-rc-app__brand {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-width: 0;
	line-height: 1.15;
}

.sgp-rc-app__brand-kicker {
	margin: 0;
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	opacity: 0.7;
	line-height: 1.2;
}

.sgp-rc-app__brand-name,
.sgp-rc-app__user-name {
	margin: 0;
	font-weight: 650;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.25;
}

.sgp-rc-app__screen-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	max-width: min(100%, 240px);
	padding: 4px 10px;
	border-radius: 999px;
	border: 1px solid rgba(248, 250, 252, 0.18);
	background: rgba(248, 250, 252, 0.08);
	color: var(--sgp-rc-text-light);
	font-size: 13px;
	font-weight: 650;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sgp-rc-app__user {
	margin-left: auto;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	min-width: 0;
	max-width: 100%;
	font-size: 13px;
}

.sgp-rc-app__user-name {
	opacity: 0.85;
	max-width: 240px;
}

.sgp-rc-app__visit {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	flex: 0 0 auto;
	height: 28px;
	padding: 0 12px;
	border-radius: 999px;
	border: 1px solid rgba(248, 250, 252, 0.22);
	background: rgba(248, 250, 252, 0.1);
	color: var(--sgp-rc-text-light);
	font-size: 12px;
	font-weight: 650;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
}

.sgp-rc-app__visit:hover {
	background: rgba(248, 250, 252, 0.18);
	border-color: rgba(248, 250, 252, 0.4);
	color: #fff;
}

.sgp-rc-app__visit:focus {
	outline: none;
}

.sgp-rc-app__visit:focus-visible {
	outline: 2px solid var(--sgp-rc-text-light);
	outline-offset: 2px;
}

.sgp-rc-app__visit-icon {
	display: block;
	flex: 0 0 auto;
}

.sgp-rc-app__body {
	display: flex;
	flex: 1 1 auto;
	min-height: 0;
	position: relative;
	overflow: hidden;
}

.sgp-rc-app__sidebar {
	display: flex;
	flex-direction: column;
	flex: 0 0 var(--sgp-rc-app-sidebar);
	width: var(--sgp-rc-app-sidebar);
	background: var(--sgp-rc-console-bg);
	border-right: 1px solid rgba(248, 250, 252, 0.08);
	padding: 12px 8px;
	overflow-x: hidden;
	overflow-y: auto;
}

.sgp-rc-app__nav {
	display: flex;
	flex-direction: column;
	gap: 4px;
	flex: 1 1 auto;
	min-height: 0;
}

.sgp-rc-app__nav-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	border-radius: 12px;
	color: var(--sgp-rc-text-light);
	text-decoration: none;
	opacity: 0.82;
	position: relative;
	transition:
		background-color var(--sgp-fo-motion-fast, 160ms) var(--sgp-fo-ease-standard, ease-out),
		opacity var(--sgp-fo-motion-fast, 160ms) var(--sgp-fo-ease-standard, ease-out),
		box-shadow var(--sgp-fo-motion-fast, 160ms) var(--sgp-fo-ease-standard, ease-out);
}

.sgp-rc-app__nav-item:hover,
.sgp-rc-app__nav-item:focus {
	background-color: rgba(255, 255, 255, 0.06);
	opacity: 1;
	outline: none;
}

.sgp-rc-app__nav-item:focus-visible,
.sgp-rc-app__sidebar-toggle:focus-visible {
	outline: 2px solid var(--sgp-rc-accent, #0cc21e);
	outline-offset: 2px;
}

.sgp-rc-app__nav-item.is-active,
.sgp-rc-app__nav-item[aria-current="page"] {
	background-color: rgba(12, 194, 30, 0.16);
	opacity: 1;
	box-shadow: inset 3px 0 0 var(--sgp-rc-accent);
}

.sgp-rc-app__nav-icon {
	display: inline-flex;
	flex: 0 0 22px;
}

.sgp-rc-app__nav-badge,
.sgp-rc-app__menu-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	margin-left: auto;
	border-radius: 999px;
	background: var(--sgp-rc-accent, #0cc21e);
	color: #04140a;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
	flex: 0 0 auto;
	letter-spacing: 0;
}

.sgp-rc-app__nav-badge[hidden],
.sgp-rc-app__menu-badge[hidden] {
	display: none !important;
}

.sgp-rc-app__sidebar-toggle {
	display: none;
	align-items: center;
	gap: 12px;
	width: 100%;
	margin-top: 8px;
	padding: 10px 12px;
	border: 1px solid rgba(248, 250, 252, 0.16);
	border-radius: 12px;
	background: transparent;
	color: var(--sgp-rc-text-light);
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	text-align: left;
	cursor: pointer;
	opacity: 0.82;
}

.sgp-rc-app__sidebar-toggle:hover,
.sgp-rc-app__sidebar-toggle:focus {
	background: rgba(255, 255, 255, 0.06);
	opacity: 1;
	outline: none;
}

.sgp-rc-app__sidebar-toggle-icon {
	display: inline-flex;
	flex: 0 0 22px;
}

.sgp-rc-app__sidebar-tip {
	position: fixed;
	z-index: 80;
	transform: translateY(-50%);
	max-width: 240px;
	padding: 6px 10px;
	border-radius: 8px;
	background: #04140a;
	color: var(--sgp-rc-text-light, #f8fafc);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
	pointer-events: none;
}

.sgp-rc-app__sidebar-tip[hidden] {
	display: none !important;
}

@media (min-width: 1024px) {
	.sgp-rc-app__sidebar-toggle {
		display: inline-flex;
	}
}

.sgp-rc-app__main {
	flex: 1 1 auto;
	min-width: 0;
	overflow: auto;
	background: var(--sgp-rc-surface-bg);
}

.sgp-rc-app__panel {
	padding: 24px;
	min-height: 100%;
	outline: none;
	overflow-x: auto;
	opacity: 1;
	transition: opacity var(--sgp-fo-motion-fast, 160ms) var(--sgp-fo-ease-standard, ease-out);
}

.sgp-rc-app__panel .sgp-rc-service-console,
.sgp-rc-app__panel .sgp-wo-console {
	max-width: 100%;
}

.sgp-rc-app.is-busy .sgp-rc-app__panel {
	opacity: 0.55;
	pointer-events: none;
}

.sgp-rc-app__overlay {
	display: none;
}

.sgp-rc-app__toast {
	position: fixed;
	right: 16px;
	bottom: 16px;
	z-index: 40;
	display: flex;
	align-items: center;
	gap: 12px;
	max-width: min(420px, calc(100vw - 24px));
	padding: 12px 14px;
	border-radius: 12px;
	background: #7f1d1d;
	color: #fff;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.sgp-rc-app__toast[hidden] {
	display: none;
}

.sgp-rc-app__toast-text {
	margin: 0;
	flex: 1;
}

.sgp-rc-app__btn,
.sgp-rc-app__toast-retry {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 8px 14px;
	border-radius: 999px;
	border: 0;
	background: var(--sgp-rc-primary);
	color: #fff;
	text-decoration: none;
	font: inherit;
	cursor: pointer;
}

.sgp-rc-app__btn--ghost {
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.12);
}

.sgp-rc-app__panel-title {
	margin: 0 0 8px;
	font-size: 28px;
	line-height: 1.2;
}

.sgp-rc-screen__lead {
	margin: 0 0 24px;
	opacity: 0.8;
	max-width: 52rem;
}

.sgp-rc-dash {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}

.sgp-rc-dash img.emoji {
	display: inline-block !important;
	width: 1em !important;
	height: 1em !important;
	max-width: 1em !important;
	max-height: 1em !important;
	margin: 0 0.15em !important;
	vertical-align: -0.1em !important;
	object-fit: contain !important;
}

.sgp-rc-dash__widget {
	min-width: 0;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(248, 250, 252, 0.08);
	border-radius: var(--sgp-rc-card-radius);
	padding: 18px;
}

.sgp-rc-dash__widget--wide {
	grid-column: 1 / -1;
}

.sgp-rc-dash__metrics {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
	gap: 10px;
}

.sgp-rc-dash__metric {
	min-width: 0;
	padding: 12px 14px;
	border: 1px solid rgba(248, 250, 252, 0.08);
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.03);
}

.sgp-rc-dash__metric-value {
	display: block;
	font-size: 28px;
	font-weight: 700;
	line-height: 1.1;
}

.sgp-rc-dash__metric-label {
	display: block;
	margin-top: 4px;
	font-size: 12px;
	font-weight: 650;
	letter-spacing: 0.02em;
	opacity: 0.72;
}

.sgp-rc-dash__next {
	margin: 14px 0 0;
	padding: 12px 14px;
	border-radius: 12px;
	border: 1px solid rgba(248, 250, 252, 0.08);
	background: rgba(255, 255, 255, 0.03);
}

.sgp-rc-dash__next-kicker {
	margin: 0 0 4px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	opacity: 0.65;
}

.sgp-rc-dash__next-value {
	margin: 0;
	font-size: 16px;
	font-weight: 650;
	line-height: 1.35;
}

.sgp-rc-dash__pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 12px 0 0;
}

.sgp-rc-dash__pill--warn {
	background: rgba(180, 83, 9, 0.22);
	color: #fdba74;
}

.sgp-rc-dash__widget-title {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 12px;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	opacity: 0.88;
}

.sgp-rc-dash__widget-icon {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	color: var(--sgp-rc-accent, var(--sgp-rc-primary));
}

.sgp-rc-dash__widget-icon svg {
	display: block;
	width: 20px;
	height: 20px;
}

.sgp-rc-dash__widget-label {
	min-width: 0;
}

.sgp-rc-dash-tabs {
	display: flex;
	flex-direction: column;
	gap: 16px;
	min-width: 0;
}

.sgp-rc-dash-tabs__list {
	display: flex;
	flex-wrap: nowrap;
	gap: 6px;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	padding: 4px 0 6px;
	margin: 0;
	scrollbar-width: thin;
}

.sgp-rc-dash-tabs__tab {
	flex: 0 0 auto;
	min-height: 44px;
	padding: 10px 16px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: inherit;
	font: inherit;
	font-weight: 700;
	opacity: 0.72;
	cursor: pointer;
	white-space: nowrap;
}

.sgp-rc-dash-tabs__tab.is-active,
.sgp-rc-dash-tabs__tab[aria-selected="true"] {
	opacity: 1;
	background: rgba(255, 255, 255, 0.06);
	box-shadow: inset 0 0 0 1px rgba(248, 250, 252, 0.18);
}

.sgp-rc-dash-tabs__tab:focus-visible {
	outline: 2px solid var(--sgp-rc-accent, #0cc21e);
	outline-offset: 2px;
}

.sgp-rc-dash-tabs__panel {
	min-width: 0;
}

.sgp-rc-dash-tabs__panel[hidden] {
	display: none;
}

.sgp-rc-dash__widget-body p {
	margin: 0 0 8px;
}

.sgp-rc-dash__estab {
	font-size: 22px;
	font-weight: 700;
}

.sgp-rc-dash__pill {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 999px;
	background: rgba(12, 194, 30, 0.2);
	color: var(--sgp-rc-accent);
	font-weight: 650;
}

.sgp-rc-dash__actions {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.sgp-rc-placeholder {
	max-width: 40rem;
	padding: 28px;
	border-radius: var(--sgp-rc-card-radius);
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(248, 250, 252, 0.08);
}

.sgp-rc-placeholder__kicker {
	margin: 0 0 8px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 12px;
	opacity: 0.65;
}

.sgp-rc-placeholder__title {
	margin: 0 0 12px;
	font-size: 22px;
	font-weight: 700;
}

.sgp-rc-forbidden {
	min-height: 100vh;
	display: grid;
	place-items: center;
	padding: 24px;
	background: var(--sgp-rc-surface-bg);
	color: var(--sgp-rc-text-light);
}

.sgp-rc-forbidden__card {
	max-width: 28rem;
	padding: 28px;
	border-radius: var(--sgp-rc-card-radius);
	background: var(--sgp-rc-console-bg);
}

.sgp-rc-forbidden__kicker {
	text-transform: uppercase;
	letter-spacing: 0.08em;
	opacity: 0.7;
}

@media (min-width: 1024px) {
	.sgp-rc-app__sidebar {
		transition:
			width var(--sgp-fo-motion-fast, 160ms) var(--sgp-fo-ease-standard, ease-out),
			flex-basis var(--sgp-fo-motion-fast, 160ms) var(--sgp-fo-ease-standard, ease-out);
	}

	html.sgp-rc-sidebar-collapsed .sgp-rc-app-page {
		--sgp-rc-app-sidebar: 68px;
	}

	html.sgp-rc-sidebar-collapsed .sgp-rc-app__sidebar {
		box-sizing: border-box;
	}

	html.sgp-rc-sidebar-collapsed .sgp-rc-app__nav-label,
	html.sgp-rc-sidebar-collapsed .sgp-rc-app__sidebar-toggle-label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
	}

	html.sgp-rc-sidebar-collapsed .sgp-rc-app__nav-item,
	html.sgp-rc-sidebar-collapsed .sgp-rc-app__sidebar-toggle {
		justify-content: center;
		padding: 12px 8px;
		gap: 0;
	}

	html.sgp-rc-sidebar-collapsed .sgp-rc-app__nav-badge {
		position: absolute;
		top: 4px;
		right: 4px;
		margin-left: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sgp-rc-app__sidebar {
		transition: none;
	}
}

@media (max-width: 1023px) {
	.sgp-rc-app__menu-btn {
		display: inline-flex;
		width: 44px;
		height: 44px;
		min-width: 44px;
		min-height: 44px;
	}

	.sgp-rc-app__screen-pill {
		max-width: min(42vw, 180px);
	}

	.sgp-rc-app__sidebar {
		position: absolute;
		z-index: 20;
		top: 0;
		bottom: 0;
		left: 0;
		width: min(280px, 86vw);
		transform: translateX(-105%);
		transition: transform var(--sgp-fo-motion-fast, 160ms) var(--sgp-fo-ease-standard, ease-out);
		box-shadow: none;
	}

	.sgp-rc-app.is-drawer-open .sgp-rc-app__sidebar {
		transform: translateX(0);
		box-shadow: 8px 0 24px rgba(0, 0, 0, 0.35);
	}

	.sgp-rc-app__nav-label {
		position: static;
		width: auto;
		height: auto;
		clip: auto;
		overflow: visible;
	}

	.sgp-rc-app__nav-item {
		justify-content: flex-start;
		padding: 10px 12px;
	}

	.sgp-rc-app__nav-badge {
		position: static;
		margin-left: auto;
	}

	.sgp-rc-app__menu-badge {
		position: absolute;
		top: 2px;
		right: 2px;
		margin-left: 0;
	}

	.sgp-rc-app__overlay {
		display: block;
		position: absolute;
		inset: 0;
		z-index: 15;
		background: rgba(0, 0, 0, 0.45);
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
		transition:
			opacity var(--sgp-fo-motion-fast, 160ms) var(--sgp-fo-ease-standard, ease-out),
			visibility 0s linear var(--sgp-fo-motion-fast, 160ms);
	}

	.sgp-rc-app.is-drawer-open .sgp-rc-app__overlay {
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
		transition:
			opacity var(--sgp-fo-motion-fast, 160ms) var(--sgp-fo-ease-standard, ease-out),
			visibility 0s linear 0s;
	}

	.sgp-rc-app__panel {
		padding: 16px;
	}

	.sgp-rc-dash {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 782px) {
	.admin-bar .sgp-rc-app {
		height: calc(100vh - 46px);
	}

	.sgp-rc-dash__metric-value {
		font-size: 24px;
	}

	.sgp-rc-dash__widget {
		padding: 14px;
	}
}

@media (max-width: 720px) {
	.sgp-rc-app__user {
		flex-wrap: wrap;
		row-gap: 4px;
	}

	.sgp-rc-app__user-name {
		max-width: 140px;
	}
}

@media (max-width: 480px) {
	.sgp-rc-app__user-name {
		display: none;
	}

	.sgp-rc-app__visit {
		height: 26px;
		padding: 0 10px;
	}

	.sgp-rc-app__topbar {
		gap: 8px;
		padding: 0 10px;
	}

	.sgp-rc-app__topbar-main {
		gap: 8px;
	}

	.sgp-rc-app__brand {
		flex: 1 1 auto;
		min-width: 0;
	}

	.sgp-rc-app__brand-name {
		max-width: 100%;
	}

	.sgp-rc-app__screen-pill {
		flex-shrink: 1;
		max-width: min(36vw, 140px);
	}
}

@media (max-width: 767px) {
	.sgp-rc-app__visit {
		display: none;
	}

	.sgp-rc-app__topbar-main {
		min-width: 0;
		flex: 1 1 auto;
	}

	.sgp-rc-app__brand {
		min-width: 0;
		flex: 1 1 auto;
	}

	.sgp-rc-app__brand-name {
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
		max-width: 100%;
	}

	.sgp-rc-app__screen-pill {
		flex: 0 0 auto;
		flex-shrink: 0;
		max-width: none;
		white-space: nowrap;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sgp-rc-app {
		--sgp-fo-motion-fast: 0ms;
		--sgp-fo-motion-normal: 0ms;
		--sgp-fo-motion-exit: 0ms;
	}
}
