:root{
	--bg:#1a2236;
	--bg-deep:#141b2d;
	--ink:#eef3fb;
	--muted:#c2cfe4;
	--line:#3d4b68;
	--surface:#27334a;
	--surface-strong:#2b3850;
	--surface-soft:#dce5f4;
	--surface-soft-ink:#1c2b45;
	--brand:#5579de;
	--brand-strong:#476bd0;
	--accent:#7db3eb;
	--warn:#efc06d;
	--danger:#f49a8f;
	--ok:#7ad3a4;
	--shadow:0 6px 16px rgba(7,12,24,0.10);
}

*{
	box-sizing:border-box;
}

html,body{
	margin:0;
	padding:0;
}

body{
	font-family:"Manrope","Segoe UI",sans-serif;
	background:linear-gradient(180deg,var(--bg) 0%,var(--bg-deep) 100%);
	color:var(--ink);
	min-height:100vh;
}

a{
	color:inherit;
}

.admin-shell{
	min-height:100vh;
}

.personal-admin-shell{
	--bg:#f6f8ff;
	--bg-deep:#edf3ff;
	--ink:#122033;
	--muted:#58677f;
	--line:#dbe5f4;
	--surface:#ffffff;
	--surface-strong:#f2f6ff;
	--surface-soft:#eef4ff;
	--surface-soft-ink:#122033;
	--brand:#5d8ff2;
	--brand-strong:#4379e6;
	--accent:#8db8ff;
	--warn:#f59e0b;
	--danger:#ef4444;
	--ok:#0f766e;
	--shadow:0 10px 24px rgba(114,139,196,0.12);
}

.personal-admin-shell .topbar{
	background:linear-gradient(180deg,#dbe7ff 0%,#cfddff 100%);
	border-bottom:1px solid #bfd1ff;
}

.personal-admin-shell .brand-mark{
	background:#5d8ff2;
}

.personal-admin-shell .nav-link{
	background:rgba(255,255,255,0.7);
	border-color:#bfd1ff;
	color:#33517a;
}

.personal-admin-shell .nav-link.is-current{
	background:#eef4ff;
	border-color:#a9c2ff;
	color:#335cc8;
}

.personal-admin-shell .panel,
.personal-admin-shell .metric-card{
	background:#ffffff;
	border-color:#dbe5f4;
	box-shadow:0 10px 24px rgba(114,139,196,0.12);
}

.personal-admin-shell .table-shell,
.personal-admin-shell .detail-summary,
.personal-admin-shell .info-box,
.personal-admin-shell .feed-item,
.personal-admin-shell .trend-item,
.personal-admin-shell .doc-list a,
.personal-admin-shell .empty-state{
	background:#f2f6ff;
	border-color:#dbe5f4;
}

.personal-admin-shell th{
	background:#eef4ff;
	color:#58677f;
}

.personal-admin-shell tbody tr:hover{
	background:#f7faff;
}

.personal-admin-shell tbody tr.is-selected{
	background:#eaf1ff;
}

.personal-admin-shell .button-secondary{
	background:#eef4ff;
	border-color:#bfd1ff;
	color:#335cc8;
}

.personal-admin-shell .button-secondary:hover{
	background:#dbe7ff;
}

.personal-admin-shell .button-success{
	background:rgba(15,118,110,0.1);
	border-color:rgba(15,118,110,0.2);
	color:#0f766e;
}

.personal-admin-shell .button-danger{
	background:rgba(239,68,68,0.08);
	border-color:rgba(239,68,68,0.16);
	color:#dc2626;
}

.personal-admin-shell .search-form input,
.personal-admin-shell .field input,
.personal-admin-shell .textarea{
	background:#ffffff;
	border-color:#dbe5f4;
	color:#122033;
}

.personal-admin-shell .search-form input::placeholder{
	color:#7c8da6;
}

.personal-admin-shell .status-active,
.personal-admin-shell .status-paid,
.personal-admin-shell .status-done,
.personal-admin-shell .status-normal{
	background:rgba(15,118,110,0.1);
	color:#0f766e;
}

.personal-admin-shell .status-trial,
.personal-admin-shell .status-processing,
.personal-admin-shell .status-pending,
.personal-admin-shell .status-alerta{
	background:rgba(245,158,11,0.12);
	color:#b45309;
}

.personal-admin-shell .status-blocked,
.personal-admin-shell .status-off,
.personal-admin-shell .status-failed,
.personal-admin-shell .status-cancelled,
.personal-admin-shell .status-none,
.personal-admin-shell .status-ocr_failed{
	background:rgba(239,68,68,0.1);
	color:#dc2626;
}

.personal-admin-shell .status-ready_for_confirmation{
	background:rgba(93,143,242,0.12);
	color:#335cc8;
}

.login-shell{
	display:flex;
	align-items:center;
	justify-content:center;
	padding:32px 18px;
}

.login-card{
	width:min(480px,100%);
	background:rgba(39,51,74,0.96);
	border:1px solid rgba(72,90,121,0.72);
	border-radius:20px;
	box-shadow:var(--shadow);
	padding:28px;
}

.login-eyebrow,
.section-eyebrow{
	display:inline-flex;
	align-items:center;
	gap:8px;
	padding:6px 12px;
	border-radius:999px;
	background:rgba(105,167,234,0.14);
	color:var(--accent);
	font-size:12px;
	font-weight:800;
	letter-spacing:0.03em;
}

.login-card h1{
	margin:16px 0 10px;
	font-size:34px;
	line-height:1.1;
}

.login-card p{
	margin:0 0 18px;
	color:var(--muted);
	line-height:1.55;
}

.login-card-footer{
	margin:14px 0 0;
	font-size:14px;
}

.login-card-footer a{
	color:var(--accent);
	font-weight:700;
	text-decoration:none;
}

.login-card-footer a:hover{
	text-decoration:underline;
}

.login-form,
.search-form{
	display:grid;
	gap:14px;
}

.field{
	display:grid;
	gap:8px;
}

.field label{
	font-size:13px;
	font-weight:700;
	color:var(--muted);
}

.field input,
.search-form input,
.search-form button,
.button,
.textarea{
	font:inherit;
}

.field input,
.search-form input,
.textarea{
	width:100%;
	padding:14px 16px;
	border:1px solid rgba(52,66,93,0.85);
	border-radius:16px;
	background:var(--surface-soft);
	color:var(--surface-soft-ink);
}

.field input:focus,
.search-form input:focus,
.textarea:focus{
	outline:2px solid rgba(105,167,234,0.22);
	border-color:rgba(105,167,234,0.55);
}

.field-password .password-input-wrap{
	position:relative;
	display:block;
}

.field-password .password-input-wrap input{
	padding-right:112px;
}

.password-toggle{
	position:absolute;
	right:10px;
	top:50%;
	transform:translateY(-50%);
	margin:0;
	padding:8px 10px;
	border:none;
	border-radius:10px;
	background:rgba(105,167,234,0.12);
	color:var(--accent);
	font:inherit;
	font-size:12px;
	font-weight:800;
	cursor:pointer;
	line-height:1.2;
}

.password-toggle:hover{
	background:rgba(105,167,234,0.2);
}

.password-toggle:focus-visible{
	outline:2px solid rgba(105,167,234,0.55);
	outline-offset:2px;
}

.button{
	display:inline-flex;
	align-items:center;
	justify-content:center;
	gap:8px;
	min-height:40px;
	padding:0 14px;
	border:none;
	border-radius:12px;
	cursor:pointer;
	font-weight:800;
	font-size:13px;
	text-decoration:none;
	transition:background 160ms ease,border-color 160ms ease;
}

.button-primary{
	background:var(--brand);
	color:#fff;
}

.button-primary:hover{
	background:var(--brand-strong);
}

.button-secondary{
	background:rgba(49,63,89,0.96);
	color:var(--ink);
	border:1px solid rgba(78,96,128,0.72);
}

.button-danger{
	background:rgba(244,154,143,0.14);
	color:var(--danger);
	border:1px solid rgba(244,154,143,0.24);
}

.button-success{
	background:rgba(122,211,164,0.14);
	color:var(--ok);
	border:1px solid rgba(122,211,164,0.24);
}

.button-compact{
	min-height:32px;
	padding:0 12px;
	border-radius:10px;
	font-size:12px;
}

.message{
	margin-top:16px;
	padding:12px 14px;
	border-radius:16px;
	font-size:14px;
	font-weight:700;
}

.message.error{
	background:rgba(244,154,143,0.14);
	color:var(--danger);
	border:1px solid rgba(244,154,143,0.2);
}

.message.success{
	background:rgba(122,211,164,0.14);
	color:var(--ok);
	border:1px solid rgba(122,211,164,0.2);
}

.topbar{
	position:relative;
	z-index:20;
	display:flex;
	align-items:center;
	justify-content:space-between;
	gap:16px;
	padding:16px 24px;
	background:#222c43;
	border-bottom:1px solid rgba(78,96,128,0.58);
}

/* Topbar fixo: navegação e ações sempre visíveis; --admin-topbar-h vem de admin-session-meta.js */
body.admin-shell{
	--admin-topbar-h:72px;
}

body.admin-shell > .topbar{
	position:fixed;
	top:0;
	left:0;
	right:0;
	z-index:100;
	width:100%;
	box-sizing:border-box;
	box-shadow:0 4px 24px rgba(7,12,24,0.35);
}

body.admin-shell > .admin-main{
	padding-top:calc(var(--admin-topbar-h) + 22px);
}

body.admin-shell.compact-admin > .admin-main{
	padding-top:calc(var(--admin-topbar-h) + 10px);
}

.topbar-start{
	display:flex;
	align-items:center;
	gap:18px;
	flex-wrap:wrap;
}

.brand{
	display:flex;
	align-items:center;
	gap:14px;
	text-decoration:none;
}

.topbar-links{
	display:flex;
	align-items:center;
	gap:8px;
	flex-wrap:wrap;
}

.nav-link{
	display:inline-flex;
	align-items:center;
	min-height:38px;
	padding:0 14px;
	border-radius:12px;
	border:1px solid rgba(78,96,128,0.52);
	background:rgba(39,51,74,0.72);
	color:var(--muted);
	font-size:13px;
	font-weight:700;
	text-decoration:none;
}

.nav-link.is-current{
	background:rgba(85,121,222,0.18);
	border-color:rgba(125,179,235,0.34);
	color:var(--ink);
}

.brand-mark{
	width:40px;
	height:40px;
	border-radius:14px;
	display:grid;
	place-items:center;
	background:#32456c;
	color:#fff;
	font-weight:800;
	font-size:18px;
}

.brand-copy strong{
	display:block;
	font-size:18px;
}

.brand-copy span,
.topbar-meta{
	color:var(--muted);
	font-size:13px;
}

.topbar-actions{
	display:flex;
	align-items:center;
	gap:10px;
	flex-wrap:wrap;
}

.admin-main{
	padding:22px 24px 28px;
	max-width:1320px;
	margin:0 auto;
}

.panel{
	background:rgba(39,51,74,0.96);
	border:1px solid rgba(78,96,128,0.58);
	border-radius:18px;
	box-shadow:var(--shadow);
}

.panel h2{
	margin:0;
	font-size:17px;
}

.panel p,
.mini-note{
	margin:0;
	color:var(--muted);
	line-height:1.5;
}

.metric-grid{
	display:grid;
	grid-template-columns:repeat(4,minmax(0,1fr));
	gap:12px;
	margin-bottom:16px;
}

.metric-card{
	padding:14px 16px;
	background:rgba(39,51,74,0.96);
	border:1px solid rgba(78,96,128,0.54);
	border-radius:16px;
}

.metric-label{
	font-size:13px;
	font-weight:800;
	color:var(--muted);
	text-transform:uppercase;
	letter-spacing:0.06em;
}

.metric-value{
	margin-top:10px;
	font-size:24px;
	line-height:1;
}

.metric-sub{
	margin-top:8px;
	font-size:13px;
	color:var(--muted);
}

/* Métricas: uma linha por cartão; separadores verticais no interior; cartões bem espaçados */
.metric-grid-inline{
	column-gap:18px;
	row-gap:8px;
	margin-bottom:12px;
}

.metric-grid-inline .metric-card{
	display:flex;
	flex-direction:row;
	flex-wrap:nowrap;
	align-items:stretch;
	gap:0;
	padding:3px 10px;
	min-height:28px;
	border-radius:10px;
	box-shadow:0 1px 0 rgba(0,0,0,0.18);
}

.metric-grid-inline .metric-label{
	margin:0;
	align-self:center;
	font-size:9px;
	font-weight:800;
	text-transform:uppercase;
	letter-spacing:0.06em;
	color:var(--muted);
	white-space:nowrap;
	flex-shrink:0;
	line-height:1;
	padding-right:8px;
}

.metric-grid-inline .metric-value{
	margin:0;
	align-self:center;
	font-size:13px;
	font-weight:800;
	line-height:1;
	white-space:nowrap;
	flex-shrink:0;
	padding:0 8px;
	border-left:1px solid rgba(78,96,128,0.5);
	display:flex;
	align-items:center;
}

.metric-grid-inline .metric-sub{
	margin:0;
	align-self:center;
	font-size:9px;
	line-height:1;
	color:var(--muted);
	min-width:0;
	flex:1 1 auto;
	overflow:hidden;
	text-overflow:ellipsis;
	white-space:nowrap;
	padding-left:8px;
	border-left:1px solid rgba(78,96,128,0.5);
	display:flex;
	align-items:center;
	min-height:100%;
}

.personal-admin-shell .metric-grid-inline .metric-value,
.personal-admin-shell .metric-grid-inline .metric-sub{
	border-left-color:#c5d4ef;
}

.personal-admin-shell .metric-grid-inline .metric-card{
	box-shadow:0 1px 2px rgba(114,139,196,0.14);
}

.panel-grid{
	display:grid;
	grid-template-columns:minmax(0,1.35fr) minmax(360px,0.85fr);
	gap:16px;
	margin-bottom:16px;
}

.panel{
	padding:18px;
}

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

.panel-head h2{
	margin-bottom:4px;
}

.panel-head-compact{
	margin-bottom:10px;
}

.search-form{
	grid-template-columns:minmax(0,1fr) auto auto;
	align-items:center;
	gap:10px;
}

.search-form-compact{
	grid-template-columns:minmax(0,1fr) auto;
}

.table-shell{
	overflow:auto;
	border:1px solid rgba(78,96,128,0.54);
	border-radius:16px;
	background:#243047;
}

table{
	width:100%;
	border-collapse:collapse;
}

th,
td{
	padding:10px 10px;
	font-size:13px;
	text-align:left;
	border-bottom:1px solid rgba(78,96,128,0.42);
	vertical-align:top;
}

th{
	font-size:11px;
	text-transform:uppercase;
	letter-spacing:0.06em;
	color:var(--muted);
	background:#223049;
	position:sticky;
	top:0;
	z-index:1;
}

tbody tr{
	cursor:pointer;
	transition:background 140ms ease;
}

tbody tr:hover{
	background:#2d3b55;
}

tbody tr.is-selected{
	background:rgba(85,121,222,0.16);
}

tbody tr:last-child td{
	border-bottom:none;
}

.user-name{
	font-weight:800;
	font-size:13px;
}

.user-inline{
	display:flex;
	align-items:center;
	flex-wrap:wrap;
	gap:4px 10px;
	font-size:12px;
	line-height:1.35;
}

.user-inline.has-linked-accountant{
	color:#9ec5ff;
}

.user-accountant-tag{
	display:inline-flex;
	align-items:center;
	padding:2px 8px;
	border-radius:999px;
	font-size:10px;
	font-weight:800;
	letter-spacing:0.02em;
	background:rgba(125,179,235,0.2);
	color:#cbe3ff;
	border:1px solid rgba(157,198,245,0.42);
}

.user-inline span{
	white-space:nowrap;
}

.user-inline span:first-child{
	font-weight:800;
	font-size:13px;
}

.user-sub{
	display:block;
	margin-top:3px;
	font-size:11px;
	color:var(--muted);
}

.table-action-cell{
	white-space:nowrap;
}

.table-action-link{
	min-width:0;
}

.status{
	display:inline-flex;
	align-items:center;
	gap:8px;
	padding:5px 10px;
	border-radius:999px;
	font-size:11px;
	font-weight:800;
	text-transform:capitalize;
	white-space:nowrap;
}

.status-active,
.status-paid,
.status-done{
	background:rgba(122,211,164,0.16);
	color:var(--ok);
}

.status-trial,
.status-processing,
.status-pending,
.status-alerta{
	background:rgba(239,192,109,0.16);
	color:var(--warn);
}

.status-blocked,
.status-off,
.status-failed,
.status-cancelled,
.status-none,
.status-ocr_failed{
	background:rgba(244,154,143,0.16);
	color:var(--danger);
}

.status-ready_for_confirmation{
	background:rgba(85,121,222,0.16);
	color:var(--accent);
}

.status-normal{
	background:rgba(122,211,164,0.16);
	color:var(--ok);
}

.detail-card{
	display:grid;
	gap:18px;
}

.detail-header{
	display:flex;
	align-items:flex-start;
	justify-content:space-between;
	gap:12px;
}

.detail-header h3{
	margin:0;
	font-size:24px;
}

.detail-header p{
	margin:8px 0 0;
}

.detail-inline{
	display:flex;
	align-items:center;
	flex-wrap:wrap;
	gap:6px 10px;
	margin-top:8px;
	font-size:12px;
	color:var(--muted);
}

.detail-inline-sep{
	font-weight:700;
	color:var(--muted);
}

.detail-actions{
	display:flex;
	gap:10px;
	flex-wrap:wrap;
}

.mini-stats,
.doc-list,
.feed-list,
.trend-list{
	display:grid;
	gap:12px;
}

.detail-stack{
	display:grid;
	gap:14px;
}

.detail-section{
	display:grid;
	gap:12px;
}

.detail-section-head{
	display:flex;
	align-items:center;
	justify-content:space-between;
	gap:12px;
}

.detail-section-head strong{
	font-size:13px;
}

.detail-section-head span{
	font-size:12px;
	color:var(--muted);
}

.detail-summary{
	display:grid;
	gap:0;
	margin-bottom:2px;
	border:1px solid rgba(78,96,128,0.52);
	border-radius:14px;
	overflow:hidden;
	background:var(--surface-strong);
}

.detail-row{
	display:flex;
	align-items:center;
	justify-content:space-between;
	gap:16px;
	padding:12px 14px;
	border-bottom:1px solid rgba(78,96,128,0.38);
}

.detail-row:last-child{
	border-bottom:none;
}

.detail-row strong{
	font-size:13px;
	color:var(--muted);
}

.detail-row span{
	font-size:13px;
	text-align:right;
}

.readonly-input{
	width:100%;
	min-height:40px;
	padding:0 12px;
	border-radius:12px;
	border:1px solid rgba(78,96,128,0.52);
	background:var(--surface-strong);
	color:var(--ink);
	font:inherit;
}

.readonly-input[readonly]{
	cursor:text;
}

.info-box,
.feed-item,
.trend-item{
	padding:12px 14px;
	background:var(--surface-strong);
	border:1px solid rgba(78,96,128,0.5);
	border-radius:14px;
}

.info-box strong,
.feed-item strong,
.trend-item strong{
	display:block;
	margin-bottom:6px;
}

.info-box span,
.feed-item span,
.trend-item span,
.doc-list span{
	color:var(--muted);
	font-size:12px;
	line-height:1.5;
}

.feed-button{
	width:100%;
	font:inherit;
	color:inherit;
	text-align:left;
	cursor:pointer;
}

.feed-button:hover{
	border-color:rgba(125,179,235,0.52);
}

.month-register{
	display:grid;
	grid-template-columns:repeat(auto-fit,minmax(72px,1fr));
	gap:10px;
}

.month-register-item{
	display:grid;
	gap:4px;
	padding:10px 12px;
	background:var(--surface-strong);
	border:1px solid rgba(78,96,128,0.5);
	border-radius:14px;
}

.month-register-item strong{
	margin:0;
	font-size:16px;
	line-height:1;
}

.month-register-item span{
	color:var(--muted);
	font-size:12px;
}

.month-register-item.is-active{
	border-color:rgba(125,179,235,0.6);
	box-shadow:0 0 0 1px rgba(125,179,235,0.22);
}

.detail-alert{
	display:grid;
	gap:4px;
	padding:12px 14px;
	background:rgba(239,192,109,0.14);
	border:1px solid rgba(239,192,109,0.28);
	border-radius:14px;
}

.detail-alert strong{
	font-size:13px;
}

.detail-alert span{
	color:var(--muted);
	font-size:12px;
}

.detail-alert-danger{
	background:rgba(244,154,143,0.12);
	border-color:rgba(244,154,143,0.24);
}

.doc-list a{
	display:flex;
	align-items:center;
	justify-content:space-between;
	gap:12px;
	padding:12px 14px;
	background:var(--surface-strong);
	border:1px solid rgba(78,96,128,0.5);
	border-radius:14px;
	text-decoration:none;
}

.doc-list a:hover{
	border-color:rgba(125,179,235,0.52);
}

.analytics-grid{
	display:grid;
	grid-template-columns:repeat(3,minmax(0,1fr));
	gap:16px;
}

.blocked-panel{
	margin-bottom:16px;
}

.blocked-layout{
	display:grid;
	grid-template-columns:minmax(0,1.45fr) minmax(280px,0.55fr);
	gap:16px;
}

.blocked-alerts{
	display:grid;
	align-content:start;
	gap:12px;
}

.is-blocked-row{
	background:rgba(244,154,143,0.08);
}

.is-blocked-row:hover{
	background:rgba(244,154,143,0.12);
}

.analytics-grid-duo{
	grid-template-columns:repeat(2,minmax(0,1fr));
}

.analytics-grid-simple{
	margin-top:18px;
}

.empty-state{
	padding:16px;
	text-align:center;
	color:var(--muted);
	background:var(--surface-strong);
	border:1px dashed rgba(78,96,128,0.5);
	border-radius:14px;
}

.flash{
	position:fixed;
	right:24px;
	bottom:24px;
	max-width:360px;
	padding:14px 16px;
	border-radius:14px;
	box-shadow:var(--shadow);
	z-index:30;
}

.muted{
	color:var(--muted);
}

/* Modo compacto para listas grandes (10k+ utilizadores) */
.compact-admin{
	font-size:11px;
}

.compact-admin .panel{
	padding:10px;
}

.compact-admin .panel-head{
	gap:6px;
	margin-bottom:6px;
}

.compact-admin .panel-head h2{
	font-size:15px;
	margin:0;
}

.compact-admin .search-form{
	gap:6px;
}

.compact-admin .search-form input,
.compact-admin .field input,
.compact-admin .textarea{
	padding:6px 8px;
	border-radius:8px;
	font-size:11px;
}

.compact-admin .button{
	padding:5px 8px;
	border-radius:8px;
	font-size:10px;
	font-weight:700;
}

.compact-admin th{
	padding:6px 8px;
	font-size:10px;
}

.compact-admin td{
	padding:5px 8px;
	font-size:10px;
}

.compact-admin .user-inline{
	gap:2px;
	font-size:10px;
}

.compact-admin .detail-header h3{
	font-size:13px;
	margin:0;
}

.compact-admin .detail-stack{
	gap:6px;
}

.compact-admin .detail-section{
	padding:7px;
}

.compact-admin .detail-row{
	padding:4px 0;
}

.compact-admin .detail-row strong,
.compact-admin .detail-row span{
	font-size:10px;
}

.compact-admin .feed-item{
	padding:6px 7px;
}

.compact-admin .topbar{
	padding:8px 12px;
}

.compact-admin .brand{
	gap:6px;
}

.compact-admin .brand-mark{
	width:26px;
	height:26px;
	font-size:11px;
}

.compact-admin .brand-copy strong{
	font-size:12px;
	line-height:1.1;
}

.compact-admin .brand-copy span{
	font-size:10px;
}

.compact-admin .topbar-links{
	gap:6px;
}

.compact-admin .nav-link{
	padding:5px 8px;
	font-size:10px;
	border-radius:8px;
}

.compact-admin .admin-main{
	padding-left:12px;
	padding-right:12px;
	padding-bottom:16px;
}

.compact-admin .hub-card{
	padding:8px 10px;
}

.compact-admin .hub-card strong{
	font-size:11px;
}

.compact-admin .hub-card span{
	font-size:10px;
}

.compact-admin .status{
	font-size:10px;
	padding:2px 6px;
	border-radius:999px;
}

.compact-admin .readonly-input{
	padding:6px 8px;
	font-size:10px;
	border-radius:8px;
}

.compact-admin .metric-grid-inline{
	column-gap:14px;
}

.compact-admin .metric-grid-inline .metric-card{
	padding:2px 8px;
	min-height:24px;
	border-radius:8px;
}

.compact-admin .metric-grid-inline .metric-label{
	font-size:8px;
	padding-right:6px;
}

.compact-admin .metric-grid-inline .metric-value{
	font-size:11px;
	padding:0 6px;
}

.compact-admin .metric-grid-inline .metric-sub{
	font-size:8px;
	padding-left:6px;
}

@media (max-width: 1220px){
	.metric-grid,
	.metric-grid-inline{
		grid-template-columns:repeat(2,minmax(0,1fr));
	}

	.panel-grid,
	.analytics-grid,
	.blocked-layout{
		grid-template-columns:1fr;
	}

	.analytics-grid .panel:last-child{
		grid-column:auto;
	}
}

@media (max-width: 760px){
	.topbar,
	.admin-main{
		padding-left:16px;
		padding-right:16px;
	}

	.topbar{
		align-items:flex-start;
	}

	.topbar-start,
	.topbar-links,
	.topbar-actions{
		width:100%;
	}

	.search-form{
		grid-template-columns:1fr;
	}

	.metric-grid,
	.metric-grid-inline,
	.detail-summary{
		grid-template-columns:1fr;
	}

	th,
	td{
		padding:12px 10px;
	}

	.detail-row{
		flex-direction:column;
		align-items:flex-start;
	}

	.detail-row span{
		text-align:left;
	}
}

.admin-hub-strip{
	display:grid;
	grid-template-columns:repeat(auto-fit, minmax(200px, 1fr));
	gap:12px;
	margin-bottom:20px;
}

.hub-card{
	display:flex;
	flex-direction:column;
	gap:4px;
	padding:14px 16px;
	border-radius:14px;
	border:1px solid rgba(78,96,128,0.55);
	background:rgba(39,51,74,0.75);
	text-decoration:none;
	color:inherit;
	transition:border-color .15s ease, background .15s ease, transform .12s ease;
}

.hub-card:hover{
	border-color:rgba(125,179,235,0.5);
	background:rgba(47,62,90,0.92);
}

.hub-card strong{
	font-size:14px;
	font-weight:800;
}

.hub-card span{
	font-size:12px;
	color:var(--muted);
	line-height:1.4;
}

.hub-card.is-current{
	border-color:rgba(85,121,222,0.55);
	background:rgba(85,121,222,0.14);
}

.personal-admin-shell .hub-card{
	background:rgba(255,255,255,0.92);
	border-color:#bfd1ff;
}

.personal-admin-shell .hub-card:hover{
	background:#ffffff;
	border-color:#a9c2ff;
}

.personal-admin-shell .hub-card.is-current{
	background:#eef4ff;
	border-color:#a9c2ff;
}

.admin-ecosystem-note{
	margin:0 0 20px;
	padding:12px 16px;
	border-radius:14px;
	border:1px solid rgba(78,96,128,0.45);
	background:rgba(39,51,74,0.55);
	font-size:13px;
	line-height:1.55;
	color:var(--muted);
}

.admin-ecosystem-note strong{
	color:var(--ink);
	font-weight:800;
}

.admin-ecosystem-note a{
	color:#9ec5ff;
	font-weight:700;
	text-decoration:none;
}

.admin-ecosystem-note a:hover{
	text-decoration:underline;
}

.personal-admin-shell .admin-ecosystem-note{
	background:rgba(255,255,255,0.85);
	border-color:#bfd1ff;
	color:#58677f;
}

.personal-admin-shell .admin-ecosystem-note strong{
	color:#122033;
}

.personal-admin-shell .admin-ecosystem-note a{
	color:#335cc8;
}

.metric-grid.metric-grid-five{
	grid-template-columns:repeat(5,minmax(0,1fr));
}

@media (max-width: 1400px){
	.metric-grid.metric-grid-five{
		grid-template-columns:repeat(3,minmax(0,1fr));
	}
}

@media (max-width: 900px){
	.metric-grid.metric-grid-five{
		grid-template-columns:repeat(2,minmax(0,1fr));
	}
}

.upload-dedup-panel{
	margin-bottom:16px;
}

.upload-dedup-root{
	min-height:48px;
}

.dedup-note{
	margin:0 0 12px;
	font-size:13px;
	line-height:1.5;
	color:var(--muted);
}

.dedup-table-wrap{
	overflow:auto;
	border:1px solid rgba(78,96,128,0.54);
	border-radius:12px;
	background:rgba(39,51,74,0.5);
}

table.dedup-table{
	margin:0;
	font-size:12px;
}

table.dedup-table th,
table.dedup-table td{
	white-space:nowrap;
}

table.dedup-table td.num{
	text-align:right;
	font-variant-numeric:tabular-nums;
}

table.dedup-table .dedup-total-row{
	background:rgba(85,121,222,0.12);
}

table.dedup-table .dedup-other-row{
	opacity:0.9;
	font-size:11px;
}

.compact-admin table.dedup-table th,
.compact-admin table.dedup-table td{
	padding:6px 8px;
	font-size:11px;
}
