/* Newsroom OS — React Settings (uses nros-theme tokens) */

.newsroom-settings-root {
	margin: 0 0 8px;
}

.newsroom-settings {
	max-width: 1080px;
	margin: 0 0 20px;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	color: var(--nros-text, #1d2327);
}

.newsroom-settings__header {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 12px 16px;
	margin-bottom: 16px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--nros-border-subtle, #f0f0f1);
}

.newsroom-settings__guide {
	margin: 0;
	font-size: 13px;
	color: var(--nros-text-muted, #50575e);
	line-height: 1.45;
	max-width: 56ch;
}

.newsroom-settings__layout {
	display: grid;
	grid-template-columns: 200px minmax(0, 1fr);
	gap: 20px;
	align-items: start;
}

@media (max-width: 900px) {
	.newsroom-settings__layout {
		grid-template-columns: 1fr;
	}
}

.newsroom-settings__nav {
	display: flex;
	flex-direction: column;
	gap: 6px;
	position: sticky;
	top: 36px;
}

.newsroom-settings__nav-btn {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	text-align: left;
	border: 1px solid var(--nros-border, #dcdcde);
	background: var(--nros-surface, #fff);
	border-radius: 10px;
	padding: 10px 12px;
	cursor: pointer;
	color: var(--nros-text, #1d2327);
	font-weight: 600;
	font-size: 13px;
	transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.newsroom-settings__nav-btn:hover {
	border-color: var(--nros-accent, #2271b1);
}

.newsroom-settings__nav-btn.is-active {
	background: var(--nros-accent, #2271b1);
	border-color: var(--nros-accent, #2271b1);
	color: #fff;
}

.newsroom-settings__nav-btn.is-soon:not(.is-active) {
	opacity: 0.92;
}

.newsroom-settings__nav-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.newsroom-settings__nav-label {
	line-height: 1.25;
}

.newsroom-settings__nav-badge {
	display: inline-block;
	width: fit-content;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 1px 6px;
	border-radius: 999px;
	background: var(--nros-bg-muted, #f0f0f1);
	color: var(--nros-text-muted, #646970);
}

.newsroom-settings__nav-btn.is-active .newsroom-settings__nav-badge {
	background: rgba(255, 255, 255, 0.2);
	color: #fff;
}

.newsroom-settings__group-intro {
	margin-bottom: 14px;
}

.newsroom-settings__group-intro h3 {
	margin: 0 0 4px;
	font-size: 17px;
	font-weight: 600;
}

.newsroom-settings__group-intro p {
	margin: 0;
	color: var(--nros-text-muted, #50575e);
	line-height: 1.45;
	font-size: 13px;
}

.newsroom-settings__section {
	margin-bottom: 14px;
	padding: 18px 20px;
}

.newsroom-settings__section.is-dirty {
	box-shadow: inset 3px 0 0 var(--nros-accent, #2271b1);
}

.newsroom-settings__section-head {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 12px;
	margin-bottom: 12px;
}

.newsroom-settings__section-head h4 {
	margin: 0 0 4px;
	font-size: 15px;
	font-weight: 600;
}

.newsroom-settings__section-head p {
	margin: 0;
	color: var(--nros-text-muted, #50575e);
	line-height: 1.45;
	font-size: 13px;
}

.newsroom-settings__dirty-dot {
	flex: 0 0 auto;
	width: 8px;
	height: 8px;
	margin-top: 6px;
	border-radius: 50%;
	background: var(--nros-accent, #2271b1);
}

.newsroom-settings__tips {
	background: var(--nros-accent-soft, #f0f6fc);
	border: 1px solid var(--nros-accent-border, #cce0f0);
	border-radius: 8px;
	padding: 10px 12px;
	margin-bottom: 14px;
	font-size: 12px;
	line-height: 1.45;
}

.newsroom-settings__tips strong {
	font-size: 12px;
}

.newsroom-settings__tips ul {
	margin: 6px 0 0 18px;
	padding: 0;
}

.newsroom-settings__fields {
	display: grid;
	gap: 14px;
}

.newsroom-settings__field {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
	gap: 8px 16px;
	align-items: center;
	padding: 10px 0;
	border-top: 1px solid var(--nros-border-subtle, #f0f0f1);
}

.newsroom-settings__field:first-child {
	border-top: 0;
	padding-top: 0;
}

@media (max-width: 720px) {
	.newsroom-settings__field {
		grid-template-columns: 1fr;
		align-items: start;
	}
}

.newsroom-settings__field-label {
	display: block;
	font-weight: 600;
	margin-bottom: 2px;
	font-size: 13px;
}

.newsroom-settings__field-help {
	margin: 0;
	font-size: 12px;
	color: var(--nros-text-muted, #50575e);
	line-height: 1.4;
}

.newsroom-settings__input {
	width: 100%;
	max-width: 28rem;
	padding: 7px 10px;
	border-radius: 6px;
	border: 1px solid var(--nros-border, #dcdcde);
	background: var(--nros-surface-raised, #fff);
	color: var(--nros-text, #1d2327);
	font-size: 13px;
}

.newsroom-settings__switch {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
}

.newsroom-settings__switch-input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.newsroom-settings__switch-track {
	position: relative;
	width: 40px;
	height: 22px;
	border-radius: 999px;
	background: var(--nros-border, #c3c4c7);
	transition: background 0.15s ease;
}

.newsroom-settings__switch-track::after {
	content: '';
	position: absolute;
	top: 2px;
	left: 2px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
	transition: transform 0.15s ease;
}

.newsroom-settings__switch-input:checked + .newsroom-settings__switch-track {
	background: var(--nros-accent, #2271b1);
}

.newsroom-settings__switch-input:checked + .newsroom-settings__switch-track::after {
	transform: translateX(18px);
}

.newsroom-settings__switch-input:focus-visible + .newsroom-settings__switch-track {
	outline: 2px solid var(--nros-accent, #2271b1);
	outline-offset: 2px;
}

.newsroom-settings__switch-text {
	font-size: 12px;
	font-weight: 600;
	color: var(--nros-text-muted, #50575e);
	min-width: 2rem;
}

.newsroom-settings__section-foot {
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px solid var(--nros-border-subtle, #f0f0f1);
}

.newsroom-settings__health {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	justify-content: flex-end;
}

.newsroom-settings__chip {
	font-size: 11px;
	font-weight: 600;
	padding: 4px 10px;
	border-radius: 999px;
	border: 1px solid var(--nros-border, #dcdcde);
	white-space: nowrap;
}

.newsroom-settings__chip--ok {
	background: rgba(16, 185, 129, 0.1);
	color: #047857;
	border-color: rgba(16, 185, 129, 0.3);
}

.newsroom-settings__chip--warn {
	background: rgba(245, 158, 11, 0.1);
	color: #b45309;
	border-color: rgba(245, 158, 11, 0.3);
}

.newsroom-settings__chip--info {
	background: var(--nros-bg-muted, #f6f7f7);
	color: var(--nros-text-muted, #50575e);
}

.newsroom-settings__wizard {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	margin-bottom: 14px;
	border-radius: 10px;
	border: 1px solid var(--nros-accent-border, #cce0f0);
	background: var(--nros-accent-soft, #f0f6fc);
}

.newsroom-settings__wizard-copy strong {
	font-size: 13px;
}

.newsroom-settings__wizard p {
	margin: 4px 0 0;
	font-size: 12px;
	color: var(--nros-text-muted, #50575e);
	line-height: 1.45;
	max-width: 52ch;
}

.newsroom-settings__notice {
	padding: 10px 12px;
	border-radius: 8px;
	margin-bottom: 12px;
	font-size: 13px;
}

.newsroom-settings__notice--success {
	background: rgba(16, 185, 129, 0.1);
	color: #047857;
	border: 1px solid rgba(16, 185, 129, 0.25);
}

.newsroom-settings__notice--error {
	background: rgba(220, 38, 38, 0.08);
	color: #b91c1c;
	border: 1px solid rgba(220, 38, 38, 0.2);
}

.newsroom-settings__savebar {
	position: sticky;
	bottom: 12px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	padding: 10px 14px;
	margin-top: 6px;
	background: var(--nros-overlay, rgba(255, 255, 255, 0.95));
	border: 1px solid var(--nros-border, #dcdcde);
	border-radius: 10px;
	backdrop-filter: blur(8px);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
	font-size: 13px;
}

.newsroom-settings__coming-soon {
	padding: 28px 20px;
	text-align: center;
	color: var(--nros-text-muted, #50575e);
}

.newsroom-settings__coming-soon p {
	margin: 0 0 12px;
}

/* Loading skeleton */
.newsroom-settings--loading {
	position: relative;
}

.newsroom-settings__loading-label {
	margin: 12px 0 0;
	font-size: 12px;
	color: var(--nros-text-muted, #646970);
}

.newsroom-settings__skeleton-head,
.newsroom-settings__skeleton-nav,
.newsroom-settings__skeleton-card,
.newsroom-settings__skeleton-line {
	background: linear-gradient(90deg, var(--nros-bg-muted, #f0f0f1) 25%, #e8e8ea 50%, var(--nros-bg-muted, #f0f0f1) 75%);
	background-size: 200% 100%;
	animation: newsroom-settings-shimmer 1.2s ease-in-out infinite;
	border-radius: 8px;
}

.newsroom-settings__skeleton-head {
	height: 36px;
	margin-bottom: 16px;
}

.newsroom-settings__skeleton-layout {
	display: grid;
	grid-template-columns: 200px 1fr;
	gap: 20px;
}

.newsroom-settings__skeleton-nav {
	height: 140px;
}

.newsroom-settings__skeleton-line {
	height: 12px;
	margin-bottom: 10px;
}

.newsroom-settings__skeleton-line--lg {
	width: 40%;
	height: 18px;
}

.newsroom-settings__skeleton-card {
	height: 220px;
	margin-top: 8px;
}

@keyframes newsroom-settings-shimmer {
	0% { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

.newsroom-settings__toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px 20px;
	margin-bottom: 16px;
	padding: 14px 16px;
	background: linear-gradient(135deg, #f8fafc 0%, #f0f6fc 100%);
	border: 1px solid #c3d9ed;
}

.newsroom-settings__toolbar-copy {
	flex: 1 1 280px;
	max-width: 56ch;
}

.newsroom-settings__toolbar-copy strong {
	display: block;
	margin-bottom: 4px;
	font-size: 14px;
}

.newsroom-settings__toolbar-copy p {
	margin: 0;
	font-size: 13px;
	line-height: 1.45;
	color: var(--nros-text-muted, #50575e);
}

.newsroom-settings__toolbar-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

/* Classic duplicate form — hide when React is ready */
body.newsroom-settings-react-ready .newsai-classic-settings-wrap--defer-hide {
	display: none;
}

body.newsroom-dashboard-react-ready .newsai-classic-dashboard-wrap--defer-hide {
	display: none;
}

/* Dashboard (React) */
.newsroom-dash {
	margin: 0 0 24px;
}

.newsroom-dash__google {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	padding: 14px 16px;
	border-radius: 8px;
	margin-bottom: 16px;
}

.newsroom-dash__google--ok {
	background: #ecfdf5;
	border: 1px solid #a7f3d0;
}

.newsroom-dash__google--alert {
	background: #fef2f2;
	border: 1px solid #fecaca;
}

.newsroom-dash__google p {
	margin: 4px 0 0;
	font-size: 13px;
	color: #50575e;
}

.newsroom-dash__filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	margin-bottom: 16px;
}

.newsroom-dash__chip {
	border: 1px solid var(--nros-border-subtle, #dcdcde);
	background: #fff;
	border-radius: 999px;
	padding: 6px 12px;
	font-size: 12px;
	cursor: pointer;
}

.newsroom-dash__chip.is-active {
	background: var(--nros-accent, #2271b1);
	border-color: var(--nros-accent, #2271b1);
	color: #fff;
}

.newsroom-dash__add-task {
	margin-left: auto;
}

.newsroom-dash__kpis {
	display: grid;
	grid-template-columns: repeat( auto-fit, minmax( 160px, 1fr ) );
	gap: 12px;
	margin-bottom: 16px;
}

.newsroom-dash__kpi {
	padding: 14px;
	border: 1px solid var(--nros-border-subtle, #dcdcde);
	border-radius: 8px;
	background: var(--nros-surface, #fff);
	text-decoration: none;
	color: inherit;
}

.newsroom-dash__kpi--link:hover {
	border-color: var(--nros-accent, #2271b1);
}

.newsroom-dash__kpi-label {
	font-size: 12px;
	color: var(--nros-text-muted, #646970);
	margin-bottom: 4px;
}

.newsroom-dash__kpi-val {
	font-size: 24px;
	font-weight: 700;
	line-height: 1.2;
}

.newsroom-dash__kpi-unit {
	font-size: 14px;
	font-weight: 500;
	color: var(--nros-text-muted, #646970);
}

.newsroom-dash__kpi-sub {
	font-size: 12px;
	margin-top: 6px;
	color: var(--nros-text-muted, #646970);
}

.newsroom-dash__kpi-sub.is-good { color: #046c4e; }
.newsroom-dash__kpi-sub.is-bad { color: #b91c1c; }
.newsroom-dash__kpi-sub.is-warn { color: #b45309; }
.newsroom-dash__kpi-sub.is-muted { color: var(--nros-text-muted, #646970); }

.newsroom-dash__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
}

@media (min-width: 960px) {
	.newsroom-dash__grid {
		grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr);
	}
}

.newsroom-dash__card {
	padding: 16px;
}

.newsroom-dash__card h3 {
	margin: 0 0 12px;
	font-size: 15px;
}

.newsroom-dash__card-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 12px;
}

.newsroom-dash__card-head h3 {
	margin: 0;
}

.newsroom-dash__card-desc {
	margin: -8px 0 12px;
	font-size: 12px;
	color: var(--nros-text-muted, #646970);
}

.newsroom-dash__table-wrap {
	overflow-x: auto;
}

.newsroom-dash__table {
	width: 100%;
	border-collapse: collapse;
}

.newsroom-dash__table th,
.newsroom-dash__table td {
	padding: 8px 10px;
	text-align: left;
	vertical-align: top;
}

.newsroom-dash__task-kw {
	font-size: 12px;
	color: var(--nros-text-muted, #646970);
}

.newsroom-dash__status {
	display: inline-block;
	font-size: 11px;
	font-weight: 600;
	padding: 2px 8px;
	border-radius: 4px;
}

.newsroom-dash__status--overdue { background: #fef2f2; color: #b91c1c; }
.newsroom-dash__status--due-soon { background: #fffbeb; color: #b45309; }
.newsroom-dash__status--scheduled { color: #646970; }
.newsroom-dash__status--done { background: #ecfdf5; color: #046c4e; }

.newsroom-dash__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

.newsroom-dash__posts {
	list-style: none;
	margin: 0;
	padding: 0;
}

.newsroom-dash__post {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 0;
	border-bottom: 1px solid var(--nros-border-subtle, #f0f0f1);
}

.newsroom-dash__post:last-child {
	border-bottom: none;
}

.newsroom-dash__post-title {
	font-weight: 600;
	text-decoration: none;
}

.newsroom-dash__post-meta {
	font-size: 12px;
	color: var(--nros-text-muted, #646970);
	margin-top: 4px;
}

.newsroom-dash__writers {
	list-style: none;
	margin: 0;
	padding: 0;
}

.newsroom-dash__writer {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	padding: 8px 0;
	border-bottom: 1px solid var(--nros-border-subtle, #f0f0f1);
	font-size: 13px;
}

.newsroom-dash--error {
	padding: 16px;
	border: 1px solid #fecaca;
	background: #fef2f2;
	border-radius: 8px;
}


.newsroom-settings__wizard-link {
	margin: 0 0 14px;
}

.newsroom-settings__profile-block {
	margin-bottom: 18px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--nros-border-subtle, #f0f0f1);
}

.newsroom-settings__profile-block h5 {
	margin: 0 0 10px;
	font-size: 13px;
	font-weight: 600;
}

.newsroom-settings__radio-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 10px;
}

.newsroom-settings__radio-group--inline {
	flex-direction: row;
	flex-wrap: wrap;
	gap: 12px 16px;
}

.newsroom-settings__radio-item {
	display: inline-flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 13px;
	cursor: pointer;
}

.newsroom-settings__radio-item--stacked span {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.newsroom-settings__radio-item small {
	color: var(--nros-text-muted, #646970);
	font-size: 12px;
	font-weight: 400;
}

.newsroom-settings__pro-pill {
	display: inline-block;
	margin-left: 6px;
	padding: 1px 6px;
	border-radius: 999px;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	background: #e0e7ff;
	color: #3730a3;
}

.newsroom-settings__field.is-disabled {
	opacity: 0.65;
}

.newsroom-settings__textarea {
	min-height: 80px;
	resize: vertical;
}

.newsroom-settings__textarea.is-mono {
	font-family: Consolas, Monaco, monospace;
	font-size: 12px;
}

.newsroom-settings__range {
	display: flex;
	align-items: center;
	gap: 10px;
}

.newsroom-settings__range output {
	font-weight: 700;
	min-width: 1.5rem;
}

.newsroom-settings__actions {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid var(--nros-border-subtle, #f0f0f1);
}

.newsroom-settings__tools {
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid var(--nros-border-subtle, #f0f0f1);
}

.newsroom-settings__tools-title {
	margin: 16px 0 8px;
	font-size: 13px;
	font-weight: 600;
}

.newsroom-settings__tools-title:first-child {
	margin-top: 0;
}

.newsroom-settings__tool-row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 8px;
}

.newsroom-settings__json-panel {
	margin-bottom: 8px;
}

.newsroom-settings__checkbox-line {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 8px 0;
	font-size: 13px;
}

.newsroom-settings__chip-inline {
	display: inline-block;
	margin: 0 0 8px;
	padding: 4px 8px;
	border-radius: 4px;
	font-size: 12px;
}

.newsroom-settings__chip-inline--ok {
	color: #046c4e;
	background: #ecfdf5;
	border: 1px solid #a7f3d0;
}

.newsroom-settings__status-line {
	margin: 4px 0;
	font-size: 12px;
	color: var(--nros-text-muted, #646970);
}

.newsroom-settings__status-error {
	margin: 4px 0;
	font-size: 12px;
	color: #b91c1c;
}

.newsroom-settings__tool-msg {
	margin: 8px 0 0;
	font-size: 12px;
	color: var(--nros-text-muted, #646970);
}

.newsroom-settings__policy-btn {
	margin-top: 6px;
}

.newsroom-settings-classic-link {
	margin: 0 0 16px;
	font-size: 12px;
	color: var(--nros-text-muted, #646970);
}

.newsroom-settings-classic-link a {
	color: var(--nros-text-muted, #646970);
	text-decoration: none;
}

.newsroom-settings-classic-link a:hover {
	color: var(--nros-accent, #2271b1);
	text-decoration: underline;
}

.newsroom-settings__error-detail {
	margin: 8px 0 12px;
	font-size: 13px;
	color: var(--nros-muted, #646970);
}

.newsroom-settings__error-detail code {
	display: block;
	padding: 8px 10px;
	background: var(--nros-surface-2, #f6f7f7);
	border-radius: 4px;
	word-break: break-word;
}

/* Dark mode */
body.wp-admin.is-dark-theme .newsroom-settings__chip--ok,
.newsroom-settings__chip--ok {
	/* keep readable in both */
}

body.wp-admin.is-dark-theme .newsroom-settings__chip--ok {
	color: #6ee7b7;
	background: rgba(6, 78, 59, 0.35);
	border-color: rgba(110, 231, 183, 0.25);
}

body.wp-admin.is-dark-theme .newsroom-settings__chip--warn {
	color: #fcd34d;
	background: rgba(146, 64, 14, 0.25);
	border-color: rgba(252, 211, 77, 0.2);
}

body.wp-admin.is-dark-theme .newsroom-settings__notice--success {
	color: #6ee7b7;
	background: rgba(6, 78, 59, 0.35);
	border-color: rgba(110, 231, 183, 0.2);
}

body.wp-admin.is-dark-theme .newsroom-settings__notice--error {
	color: #fca5a5;
	background: rgba(127, 29, 29, 0.35);
	border-color: rgba(252, 165, 165, 0.2);
}

body.wp-admin.is-dark-theme .newsroom-settings__savebar {
	background: rgba(30, 30, 30, 0.92);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

body.wp-admin.is-dark-theme .newsroom-settings__skeleton-head,
body.wp-admin.is-dark-theme .newsroom-settings__skeleton-nav,
body.wp-admin.is-dark-theme .newsroom-settings__skeleton-card,
body.wp-admin.is-dark-theme .newsroom-settings__skeleton-line {
	background: linear-gradient(90deg, #2c2c2c 25%, #3a3a3a 50%, #2c2c2c 75%);
	background-size: 200% 100%;
}

/* —— React Admin Shell (2.7 premium) —— */
/* Hide classic chrome deterministically (PHP body class) + after JS ready. */
body.nros-react-shell-active .nros-nav-tabs,
body.nros-react-shell-active .nros-wrap-header > h1,
body.nros-react-shell-active .nros-site-meta,
body.newsroom-admin-react-ready .nros-nav-tabs,
body.newsroom-admin-react-ready .nros-wrap-header > h1,
body.newsroom-admin-react-ready .nros-site-meta,
body.newsroom-admin-react-ready .newsai-classic-settings-wrap--defer-hide,
body.newsroom-admin-react-ready .newsai-classic-dashboard-wrap--defer-hide,
body.newsroom-admin-react-ready .newsai-classic-insights-wrap--defer-hide,
body.newsroom-admin-react-ready .newsai-classic-perf-wrap--defer-hide,
body.newsroom-admin-react-ready .newsai-classic-pro-wrap--defer-hide {
	display: none !important;
}

/* Full-screen SaaS takeover: hide ALL native WP chrome while shell is active. */
body.nros-react-shell-active #adminmenumain,
body.nros-react-shell-active #adminmenuback,
body.nros-react-shell-active #adminmenuwrap,
body.nros-react-shell-active #wpadminbar,
body.nros-react-shell-active #wpfooter,
body.nros-react-shell-active .update-nag,
body.nros-react-shell-active .notice,
body.nros-react-shell-active .notice-warning,
body.nros-react-shell-active .notice-error,
body.nros-react-shell-active .notice-success,
body.nros-react-shell-active .updated,
body.nros-react-shell-active .error {
	display: none !important;
}
html.wp-toolbar {
	padding-top: 0 !important;
}
body.nros-react-shell-active #wpwrap {
	background: #f6f7f9;
}
body.nros-react-shell-active #wpcontent,
body.nros-react-shell-active #wpbody,
body.nros-react-shell-active #wpbody-content {
	margin: 0 !important;
	padding: 0 !important;
	float: none !important;
	width: 100% !important;
}
body.nros-react-shell-active .nros-admin-wrap.wrap {
	margin: 0;
	max-width: none;
}

.newsroom-admin-root {
	margin: 0;
}

.nros-admin {
	display: grid;
	grid-template-columns: 248px minmax(0, 1fr);
	gap: 0;
	margin: 0;
	min-height: 100vh;
	background: #f6f7f9;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	letter-spacing: -0.01em;
	color: #0f172a;
}

.nros-admin__sidebar {
	background: #ffffff;
	border-right: 1px solid rgba(226, 232, 240, 0.9);
	padding: 22px 16px;
	display: flex;
	flex-direction: column;
	gap: 22px;
	position: sticky;
	top: 0;
	align-self: start;
	height: 100vh;
}

.nros-admin__brand {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 4px 8px;
}

.nros-admin__logo {
	width: 32px;
	height: 32px;
	border-radius: 10px;
	background: linear-gradient(135deg, #6366f1, #8b5cf6);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 14px;
}

.nros-admin__brand-text {
	font-weight: 700;
	font-size: 15px;
	letter-spacing: -0.03em;
}

.nros-admin__nav {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.nros-admin__nav-link {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border-radius: 10px;
	color: #475569;
	text-decoration: none;
	font-size: 14px;
	font-weight: 500;
}

.nros-admin__nav-link:hover {
	background: #eef2ff;
	color: #4338ca;
}

.nros-admin__nav-link.is-active {
	background: #eef2ff;
	color: #4338ca;
	font-weight: 600;
	box-shadow: inset 3px 0 0 #6366f1;
}

.nros-page-error {
	background: #fff;
	border: 1px solid rgba(226, 232, 240, 0.85);
	border-radius: 16px;
	padding: 32px;
	text-align: center;
	max-width: 520px;
	margin: 40px auto;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.nros-page-error h2 { margin: 0 0 8px; font-size: 18px; letter-spacing: -0.02em; }
.nros-page-error code { font-size: 12px; color: #b91c1c; word-break: break-all; }
.nros-page-error .button { margin-top: 12px; }

.nros-empty-card {
	text-align: center;
	color: #64748b;
	padding: 32px;
}

.nros-admin__sidebar-foot {
	margin-top: auto;
	padding: 8px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	border-top: 1px solid rgba(226, 232, 240, 0.9);
}

.nros-admin__pro-link,
.nros-admin__pro-pill {
	font-size: 13px;
	font-weight: 600;
	color: #7c3aed;
	text-decoration: none;
}

.nros-admin__exit-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 12.5px;
	font-weight: 500;
	color: #64748b;
	text-decoration: none;
	transition: color 0.15s ease;
}
.nros-admin__exit-link:hover {
	color: #0f172a;
}
.nros-admin__exit-link span {
	font-size: 14px;
}

.nros-admin__main {
	padding: 28px 36px 44px;
	max-width: 1280px;
	width: 100%;
	margin: 0 auto;
	overflow-x: hidden;
}

.nros-chart-empty {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 240px;
	color: #94a3b8;
	font-size: 13px;
	text-align: center;
	border: 1px dashed rgba(148, 163, 184, 0.4);
	border-radius: 12px;
	background: rgba(248, 250, 252, 0.6);
}

.nros-page__title {
	margin: 0;
	font-size: 28px;
	font-weight: 700;
	letter-spacing: -0.04em;
	color: #0f172a;
}

.nros-page__sub {
	margin: 6px 0 0;
	color: #64748b;
	font-size: 14px;
}

.nros-page__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 20px;
}

.nros-kpi-row--bento {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px;
	margin-bottom: 20px;
}

@media (max-width: 1100px) {
	.nros-kpi-row--bento { grid-template-columns: repeat(2, 1fr); }
	.nros-admin { grid-template-columns: 1fr; }
	.nros-admin__sidebar { flex-direction: row; flex-wrap: wrap; border-right: none; border-bottom: 1px solid #e2e8f0; }
}

.nros-kpi-card {
	background: #fff;
	border: 1px solid rgba(226, 232, 240, 0.85);
	border-radius: 16px;
	padding: 16px 18px;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.nros-kpi-card--link {
	text-decoration: none;
	color: inherit;
}

.nros-kpi-card__top {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 8px;
}

.nros-kpi-card__label {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #94a3b8;
}

.nros-kpi-card__badge {
	font-size: 11px;
	font-weight: 600;
	padding: 2px 8px;
	border-radius: 999px;
}

.nros-kpi-card__badge--good { background: #ecfdf5; color: #059669; }
.nros-kpi-card__badge--bad { background: #fef2f2; color: #dc2626; }
.nros-kpi-card__badge--warn { background: #fffbeb; color: #d97706; }

.nros-kpi-card__body {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 8px;
}

.nros-kpi-card__val {
	font-size: 32px;
	font-weight: 700;
	letter-spacing: -0.04em;
	line-height: 1;
}

.nros-kpi-card__unit {
	font-size: 16px;
	font-weight: 500;
	color: #94a3b8;
	margin-left: 2px;
}

.nros-kpi-card__sub {
	margin-top: 8px;
	font-size: 12px;
	color: #64748b;
}

.nros-bento--dash {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 16px;
}

.nros-bento-card {
	background: #fff;
	border: 1px solid rgba(226, 232, 240, 0.85);
	border-radius: 16px;
	padding: 18px 20px;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.nros-bento-card--workflow {
	grid-column: 1;
}

.nros-bento-side {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.nros-bento-card--posts {
	grid-column: 1 / -1;
}

.nros-workflow__head {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 16px;
}

.nros-workflow__head h3 {
	margin: 0 0 4px;
	font-size: 18px;
	letter-spacing: -0.03em;
}

.nros-workflow__controls {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.nros-workflow__chip {
	border: 1px solid #e2e8f0;
	background: #fff;
	border-radius: 999px;
	padding: 4px 12px;
	font-size: 12px;
	cursor: pointer;
}

.nros-workflow__chip.is-active {
	background: #eef2ff;
	border-color: #c7d2fe;
	color: #4338ca;
}

.nros-view-toggle {
	display: inline-flex;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	overflow: hidden;
}

.nros-view-toggle button {
	border: none;
	background: #fff;
	padding: 4px 10px;
	font-size: 12px;
	cursor: pointer;
}

.nros-view-toggle button.is-active {
	background: #f1f5f9;
	font-weight: 600;
}

.nros-kanban {
	display: grid;
	grid-template-columns: repeat(4, minmax(180px, 1fr));
	gap: 12px;
	overflow-x: auto;
	padding-bottom: 8px;
}

.nros-kanban__col {
	background: #f8fafc;
	border-radius: 12px;
	padding: 10px;
	min-height: 200px;
}

.nros-kanban__col-head {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #64748b;
	margin-bottom: 10px;
}

.nros-kanban__dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
}

.nros-kanban__dot--red { background: #ef4444; }
.nros-kanban__dot--amber { background: #f59e0b; }
.nros-kanban__dot--blue { background: #3b82f6; }
.nros-kanban__dot--gray { background: #94a3b8; }

.nros-kanban__count {
	margin-left: auto;
	background: #e2e8f0;
	border-radius: 999px;
	padding: 0 6px;
	font-size: 11px;
}

.nros-kanban__cards {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.nros-kanban__card {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: 10px 12px;
	cursor: grab;
}

.nros-kanban__card-title {
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 8px;
	line-height: 1.35;
}

.nros-kanban__card-meta {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
}

.nros-kanban__tag {
	font-size: 10px;
	background: #f1f5f9;
	padding: 2px 6px;
	border-radius: 4px;
	color: #64748b;
}

.nros-kanban__avatar {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: #e0e7ff;
	color: #4338ca;
	font-size: 10px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
}

.nros-radar__tabs {
	display: flex;
	gap: 16px;
	margin-bottom: 12px;
	border-bottom: 1px solid #f1f5f9;
}

.nros-radar__tabs button {
	border: none;
	background: none;
	padding: 8px 0;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	color: #94a3b8;
	cursor: pointer;
}

.nros-radar__tabs button.is-active {
	color: #4338ca;
	border-bottom: 2px solid #6366f1;
}

.nros-radar__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.nros-radar__item {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	padding: 10px 0;
	border-bottom: 1px solid #f8fafc;
	font-size: 13px;
}

.nros-radar__pct {
	color: #059669;
	font-weight: 600;
	font-size: 12px;
}

.nros-competitor--accent,
.nros-bento-card--accent {
	border-top: 3px solid transparent;
	border-image: linear-gradient(90deg, #6366f1, #8b5cf6) 1;
}

.nros-competitor__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.nros-competitor__item {
	padding: 12px 0;
	border-bottom: 1px solid #f1f5f9;
}

.nros-competitor__source {
	font-size: 11px;
	font-weight: 600;
	color: #6366f1;
	text-transform: uppercase;
}

.nros-latest-posts {
	list-style: none;
	margin: 0;
	padding: 0;
}

.nros-latest-posts__item {
	display: grid;
	grid-template-columns: 48px 1fr auto;
	gap: 14px;
	align-items: center;
	padding: 14px 0;
	border-bottom: 1px solid #f1f5f9;
}

.nros-latest-posts__thumb {
	width: 48px;
	height: 48px;
	border-radius: 10px;
	background: linear-gradient(135deg, #e2e8f0, #f8fafc);
}

.nros-latest-posts__badge {
	font-size: 10px;
	font-weight: 700;
	color: #059669;
	background: #ecfdf5;
	padding: 4px 8px;
	border-radius: 6px;
}

.nros-perf-card {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 16px;
	padding: 16px 20px;
	margin-bottom: 12px;
}

.nros-perf-card.is-self {
	border-color: #c7d2fe;
	background: linear-gradient(180deg, #fafaff 0%, #fff 100%);
}

.nros-perf-card__main {
	display: grid;
	grid-template-columns: 1fr 2fr auto;
	gap: 16px;
	align-items: center;
}

@media (max-width: 900px) {
	.nros-perf-card__main { grid-template-columns: 1fr; }
	.nros-bento--dash { grid-template-columns: 1fr; }
}

.nros-perf-card__identity {
	display: flex;
	gap: 12px;
	align-items: center;
}

.nros-perf-card__initials,
.nros-perf-card__avatar {
	width: 44px;
	height: 44px;
	border-radius: 50%;
}

.nros-perf-card__initials {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #e0e7ff;
	color: #4338ca;
	font-weight: 700;
}

.nros-perf-card__role {
	display: block;
	font-size: 12px;
	color: #64748b;
}

.nros-perf-card__metrics {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 12px;
}

.nros-perf-metric__label {
	display: block;
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #94a3b8;
	margin-bottom: 4px;
}

.nros-perf-metric__val {
	font-size: 20px;
	font-weight: 700;
	letter-spacing: -0.03em;
}

.nros-progress {
	height: 4px;
	background: #f1f5f9;
	border-radius: 999px;
	margin-top: 6px;
	overflow: hidden;
}

.nros-progress__fill {
	height: 100%;
	border-radius: 999px;
}

.nros-progress__fill--green { background: #22c55e; }
.nros-progress__fill--purple { background: #8b5cf6; }

.nros-perf-coaching {
	margin-top: 12px;
	padding: 12px;
	border-radius: 10px;
	background: linear-gradient(135deg, #fffbeb, #fff7ed);
	border: 1px solid #fed7aa;
}

.nros-movers {
	list-style: none;
	margin: 0;
	padding: 0;
}

.nros-movers li {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 0;
	border-bottom: 1px solid #f1f5f9;
	font-size: 13px;
}

.nros-movers__stat.is-good { color: #059669; font-weight: 600; }
.nros-movers__stat.is-bad { color: #dc2626; font-weight: 600; }

.nros-bento--insights {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr;
	gap: 16px;
}

.nros-bento-card--wide {
	grid-column: span 1;
}

@media (max-width: 1000px) {
	.nros-bento--insights { grid-template-columns: 1fr; }
}

/* Task modal */
.nros-modal-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, 0.45);
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}
.nros-modal {
	width: min(560px, 100%);
	max-height: 90vh;
	overflow: auto;
	padding: 20px 24px;
}
.nros-modal__head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 16px;
}
.nros-modal__close {
	border: 0;
	background: transparent;
	font-size: 24px;
	cursor: pointer;
	color: #64748b;
}
.nros-task-form label {
	display: block;
	margin-bottom: 12px;
}
.nros-task-form label span {
	display: block;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #94a3b8;
	margin-bottom: 4px;
}
.nros-task-form input,
.nros-task-form select,
.nros-task-form textarea {
	width: 100%;
}
.nros-task-form__row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}
.nros-modal__actions {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	margin-top: 8px;
}
.nros-form-error { color: #b91c1c; font-size: 13px; }

/* Page actions */
.nros-page__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}
.nros-days-select,
.nros-brief-mode {
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 6px 10px;
}

/* Device donut + channels */
.nros-device-chips { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.nros-donut-wrap { min-height: 200px; }
.nros-donut-legend { list-style: none; margin: 8px 0 0; padding: 0; font-size: 12px; color: #64748b; }
.nros-donut-legend li { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.nros-donut-legend__dot { width: 8px; height: 8px; border-radius: 50%; }
.nros-channel-bars { list-style: none; margin: 0; padding: 0; }
.nros-channel-bar { margin-bottom: 14px; }
.nros-channel-bar__head { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.nros-channel-bar__track { height: 8px; background: #f1f5f9; border-radius: 999px; overflow: hidden; }
.nros-channel-bar__fill { height: 100%; background: linear-gradient(90deg, #6366f1, #8b5cf6); border-radius: 999px; }
.nros-empty-hint { color: #94a3b8; font-size: 13px; }

/* Author perf tabs */
.nros-perf-expand { border-top: 1px solid #f1f5f9; padding: 16px 20px 20px; }
.nros-perf-tabs { display: flex; gap: 4px; border-bottom: 1px solid #e2e8f0; margin-bottom: 16px; }
.nros-perf-tabs__btn {
	border: 0;
	background: transparent;
	padding: 8px 12px;
	font-size: 13px;
	color: #64748b;
	cursor: pointer;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
}
.nros-perf-tabs__btn.is-active { color: #4338ca; border-bottom-color: #6366f1; font-weight: 600; }
.nros-perf-coaching-panel {
	background: linear-gradient(135deg, #fff7ed, #fffbeb);
	border-radius: 12px;
	padding: 14px;
}
.nros-coaching-list { margin: 0; padding-left: 18px; }
.nros-perf-summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.nros-perf-tags { margin-top: 12px; }
.nros-perf-tag {
	display: inline-block;
	margin: 0 6px 6px 0;
	padding: 4px 10px;
	background: #f1f5f9;
	border-radius: 999px;
	font-size: 12px;
}
.nros-article-list { list-style: none; margin: 0; padding: 0; }
.nros-article-list li {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 8px 0;
	border-bottom: 1px solid #f1f5f9;
	font-size: 13px;
}
.nros-ai-brief-result,
.nros-ai-desk-result { margin-bottom: 16px; }

/* PRO page */
.nros-pro-card { max-width: 720px; }
.nros-pro-status { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.nros-pro-pill.is-active { background: #dcfce7; color: #166534; }
.nros-pro-form label { display: block; margin-bottom: 12px; }
.nros-pro-form input { width: 100%; max-width: 420px; }
.nros-pro-actions { display: flex; gap: 8px; margin-top: 12px; }
.nros-pro-features ul { margin: 8px 0 0 18px; line-height: 1.7; }
.nros-notice { padding: 10px 14px; border-radius: 10px; margin-bottom: 12px; }
.nros-notice--success { background: #ecfdf5; color: #065f46; }
.nros-notice--error { background: #fef2f2; color: #991b1b; }

/* Settings bento inside shell */
.nros-page--settings .newsroom-settings__layout {
	display: grid;
	grid-template-columns: 220px 1fr;
	gap: 20px;
	align-items: start;
}
.nros-page--settings .newsroom-settings__main {
	background: #fff;
	border: 1px solid rgba(226, 232, 240, 0.8);
	border-radius: 16px;
	padding: 20px 24px;
}
.nros-page--settings .newsroom-settings__nav button {
	border-radius: 10px;
}
.nros-page--settings .section-panel,
.nros-page--settings .newsroom-settings__group-intro {
	margin-bottom: 16px;
}

@media print {
	body.newsroom-admin-react-ready #wpadminbar,
	body.newsroom-admin-react-ready #adminmenumain,
	body.newsroom-admin-react-ready .nros-admin__sidebar,
	body.newsroom-admin-react-ready .nros-page__actions { display: none !important; }
	body.newsroom-admin-react-ready .nros-admin__main { margin: 0 !important; padding: 0 !important; }
}

