/* =========================================================================
   Admin Control Centre — front-end dark dashboard
   Relies on --fb-* design-system variables (loaded globally).
   Namespaced under .fm-adcp so it never leaks into theme/admin styles.
   ========================================================================= */

.fm-adcp {
	max-width: 1240px;
	margin: 0 auto;
	padding: 8px 20px 64px;
	color: var(--fb-ink);
	font-family: var(--fb-font-body, "Inter", system-ui, sans-serif);
}

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

/* ---- Access denied ---- */
.fm-adcp--denied {
	display: flex;
	justify-content: center;
	padding: 60px 20px;
}

.fm-adcp-denied-card {
	background: var(--fb-surface);
	border: 1px solid var(--fb-border);
	border-radius: var(--fb-radius-md, 14px);
	padding: 32px 36px;
	text-align: center;
	max-width: 420px;
}

.fm-adcp-denied-card h2 {
	margin: 0 0 8px;
	color: var(--fb-ink);
}

.fm-adcp-denied-card p {
	margin: 0;
	color: var(--fb-ink-soft);
}

/* ---- Header ---- */
.fm-adcp-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	padding: 20px 0 24px;
	border-bottom: 1px solid var(--fb-border);
	margin-bottom: 24px;
}

.fm-adcp-head__eyebrow {
	display: block;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--fb-azure);
	margin-bottom: 4px;
}

.fm-adcp-head__title {
	margin: 0;
	font-family: var(--fb-font-heading, "Montserrat", sans-serif);
	font-size: 34px;
	font-weight: 800;
	line-height: 1.05;
	color: var(--fb-ink);
}

.fm-adcp-head__meta {
	font-size: 13px;
	color: var(--fb-green-soft);
}

/* ---- KPI tiles ---- */
.fm-adcp-kpis {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 14px;
	margin-bottom: 20px;
}

.fm-adcp-kpi {
	background: var(--fb-surface);
	border: 1px solid var(--fb-border);
	border-radius: var(--fb-radius-md, 14px);
	padding: 18px 18px 16px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
	position: relative;
	overflow: hidden;
}

.fm-adcp-kpi::before {
	content: "";
	position: absolute;
	inset: 0 auto 0 0;
	width: 3px;
	background: var(--fb-border-strong);
}

.fm-adcp-kpi--accent::before { background: var(--fb-blue); }
.fm-adcp-kpi--warn::before   { background: #fbbf24; }
.fm-adcp-kpi--pending::before{ background: #fbbf24; }
.fm-adcp-kpi--ok::before     { background: var(--fb-success); }

.fm-adcp-kpi__label {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--fb-green-soft);
}

.fm-adcp-kpi__value {
	font-size: 26px;
	font-weight: 800;
	line-height: 1.1;
	color: var(--fb-ink);
	word-break: break-word;
}

.fm-adcp-kpi--accent .fm-adcp-kpi__value { color: var(--fb-azure); }

.fm-adcp-kpi__sub {
	font-size: 12px;
	color: var(--fb-ink-soft);
}

/* ---- Alert chips ---- */
.fm-adcp-alerts {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 28px;
}

.fm-adcp-alert {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	border: 1px solid var(--fb-border-strong);
	background: var(--fb-sand);
	color: var(--fb-ink);
	transition: transform 0.12s ease, border-color 0.12s ease;
}

.fm-adcp-alert:hover {
	transform: translateY(-1px);
	border-color: var(--fb-azure);
}

.fm-adcp-alert__arrow { opacity: 0.7; }

.fm-adcp-alert--warn  { border-color: rgba(251, 191, 36, 0.5);  background: rgba(251, 191, 36, 0.12); color: #fcd34d; }
.fm-adcp-alert--alert { border-color: rgba(248, 113, 113, 0.5); background: rgba(248, 113, 113, 0.12); color: #fca5a5; }
.fm-adcp-alert--info  { border-color: rgba(124, 192, 255, 0.5); background: rgba(124, 192, 255, 0.12); color: var(--fb-azure); }
.fm-adcp-alert--ok {
	background: rgba(74, 222, 128, 0.10);
	border-color: rgba(74, 222, 128, 0.4);
	color: #86efac;
	cursor: default;
}

/* ---- Panels grid ---- */
.fm-adcp-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 18px;
	margin-bottom: 28px;
}

.fm-adcp-panel {
	background: var(--fb-surface);
	border: 1px solid var(--fb-border);
	border-radius: var(--fb-radius-md, 14px);
	overflow: hidden;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.fm-adcp-panel__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 16px 18px;
	border-bottom: 1px solid var(--fb-border);
	background: var(--fb-sand);
}

.fm-adcp-panel__title {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	color: var(--fb-ink);
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.fm-adcp-panel__count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 0 7px;
	border-radius: 999px;
	background: #fbbf24;
	color: #1a1205;
	font-size: 12px;
	font-weight: 800;
}

.fm-adcp-panel__link {
	font-size: 13px;
	font-weight: 600;
	color: var(--fb-azure);
	text-decoration: none;
	white-space: nowrap;
}

.fm-adcp-panel__link:hover { text-decoration: underline; }

.fm-adcp-panel__body {
	padding: 4px 0 0;
	overflow-x: auto;
}

/* ---- Tables ---- */
.fm-adcp-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13.5px;
}

.fm-adcp-table th {
	text-align: left;
	padding: 10px 16px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--fb-green-soft);
	border-bottom: 1px solid var(--fb-border);
	white-space: nowrap;
}

.fm-adcp-table td {
	padding: 11px 16px;
	border-bottom: 1px solid var(--fb-border);
	color: var(--fb-ink-soft);
	vertical-align: middle;
	white-space: nowrap;
}

.fm-adcp-table tbody tr:last-child td { border-bottom: 0; }
.fm-adcp-table tbody tr:hover td { background: rgba(124, 192, 255, 0.05); }

.fm-adcp-td-strong { color: var(--fb-ink); font-weight: 600; }
.fm-adcp-td-muted  { color: var(--fb-green-soft); }

.fm-adcp-empty {
	padding: 28px 18px;
	text-align: center;
	color: var(--fb-green-soft);
	font-size: 14px;
	margin: 0;
}

/* ---- Status badges ---- */
.fm-adcp-badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 11.5px;
	font-weight: 700;
	line-height: 1.5;
	border: 1px solid transparent;
	white-space: nowrap;
}

.fm-adcp-badge--good    { background: rgba(74, 222, 128, 0.14);  color: #86efac; border-color: rgba(74, 222, 128, 0.35); }
.fm-adcp-badge--warn    { background: rgba(251, 191, 36, 0.14);  color: #fcd34d; border-color: rgba(251, 191, 36, 0.35); }
.fm-adcp-badge--bad     { background: rgba(248, 113, 113, 0.14); color: #fca5a5; border-color: rgba(248, 113, 113, 0.35); }
.fm-adcp-badge--neutral { background: var(--fb-sand);            color: var(--fb-ink-soft); border-color: var(--fb-border-strong); }

/* ---- Quick links ---- */
.fm-adcp-links {
	background: var(--fb-surface);
	border: 1px solid var(--fb-border);
	border-radius: var(--fb-radius-md, 14px);
	padding: 18px 20px 20px;
}

.fm-adcp-links__title {
	margin: 0 0 12px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--fb-green-soft);
}

.fm-adcp-links__row {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.fm-adcp-link {
	display: inline-flex;
	align-items: center;
	padding: 9px 16px;
	border-radius: var(--fb-radius-sm, 8px);
	background: var(--fb-sand);
	border: 1px solid var(--fb-border-strong);
	color: var(--fb-ink);
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.fm-adcp-link:hover {
	background: var(--fb-khaki);
	border-color: var(--fb-azure);
	color: var(--fb-azure);
}

/* ---- Responsive ---- */
@media (max-width: 1100px) {
	.fm-adcp-kpis { grid-template-columns: repeat(3, 1fr); }
}

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

@media (max-width: 640px) {
	.fm-adcp { padding: 8px 14px 48px; }
	.fm-adcp-kpis { grid-template-columns: repeat(2, 1fr); }
	.fm-adcp-head__title { font-size: 26px; }
}

@media (max-width: 420px) {
	.fm-adcp-kpis { grid-template-columns: 1fr; }
}
