/* Web de demo de WBW con la imagen de aikensoftware.com: Quicksand, azul Aiken (#115EA2), cian (#00A0DE) y gris
   oscuro (#1B2831). Sin dependencias externas: la fuente va en fonts/ (licencia OFL en fonts/OFL-Quicksand.txt). */

@font-face {
	font-family: "Quicksand";
	font-weight: 300;
	font-display: swap;
	src: url("fonts/Quicksand-Light.ttf") format("truetype");
}

@font-face {
	font-family: "Quicksand";
	font-weight: 400;
	font-display: swap;
	src: url("fonts/Quicksand-Regular.ttf") format("truetype");
}

@font-face {
	font-family: "Quicksand";
	font-weight: 500;
	font-display: swap;
	src: url("fonts/Quicksand-Medium.ttf") format("truetype");
}

@font-face {
	font-family: "Quicksand";
	font-weight: 600 700;
	font-display: swap;
	src: url("fonts/Quicksand-Bold.ttf") format("truetype");
}

:root {
	--aiken-blue: #115ea2;
	--aiken-blue-dark: #0d4a80;
	--aiken-cyan: #00a0de;
	--aiken-dark: #1b2831;
	--bg: #f2f5f8;
	--panel: #ffffff;
	--border: #e0e6eb;
	--border-strong: #c9d2da;
	--text: #1b2831;
	--muted: #5e6670;
	--faint: #8b939c;
	--accent: var(--aiken-blue);
	--accent-soft: #e5f4fb;
	--focus: #7fcdee;
	--ok: #1d7a46;
	--ok-soft: #e4f4ea;
	--warn: #92580a;
	--warn-soft: #fdf1dc;
	--err: #b42318;
	--err-soft: #fdeceb;
	--info: var(--aiken-blue);
	--info-soft: #e5f4fb;
	--neutral-soft: #eef1f4;
	--purple: #6941c6;
	--purple-soft: #f1ecfb;
	--radius: 10px;
	--shadow: 0 1px 2px rgba(27, 40, 49, .06), 0 1px 3px rgba(27, 40, 49, .08);
	--mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

* {
	box-sizing: border-box;
}

html,
body {
	height: 100%;
	margin: 0;
}

body {
	font-family: "Quicksand", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.45;
	color: var(--text);
	background: var(--bg);
	display: flex;
	flex-direction: column;
}

button,
input {
	font: inherit;
}

/* El atributo hidden manda aunque la clase fije display */
[hidden] {
	display: none !important;
}

.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* ---------- Cabecera (blanca con el logo, como aikensoftware.com) ---------- */

.topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 24px;
	background: #fff;
	color: var(--text);
	flex: 0 0 auto;
}

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

.brand-logo {
	display: block;
	width: 170px;
	height: auto;
}

.brand-product {
	padding-left: 12px;
	border-left: 1px solid var(--border-strong);
	font-size: 20px;
	font-weight: 500;
	color: var(--aiken-cyan);
	letter-spacing: .2px;
}

.brand-tag {
	font-size: 11px;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 999px;
	background: var(--accent-soft);
	color: var(--aiken-blue);
	letter-spacing: .6px;
}

.user {
	display: flex;
	align-items: center;
	gap: 12px;
}

.user-name {
	font-weight: 600;
	color: var(--aiken-blue);
}

.user-icon {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--aiken-blue);
	position: relative;
}

.user-icon::after {
	content: "";
	position: absolute;
	left: 9px;
	top: 6px;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 9px 0 2px #fff;
	clip-path: inset(0 -4px -6px -4px);
}

/* ---------- Barra azul de secciones ---------- */

.navbar {
	display: flex;
	align-items: stretch;
	min-height: 44px;
	padding: 0 24px;
	background: var(--aiken-blue);
	flex: 0 0 auto;
}

.view-switch {
	display: flex;
	align-items: stretch;
}

.nav-item,
.switch-btn {
	display: inline-flex;
	align-items: center;
	padding: 0;
	margin-right: 32px;
	border: none;
	border-bottom: 3px solid transparent;
	background: none;
	color: rgba(255, 255, 255, .8);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .6px;
	text-transform: uppercase;
}

.switch-btn {
	cursor: pointer;
}

.switch-btn:hover {
	color: #fff;
}

.nav-item.is-current,
.switch-btn[aria-pressed="true"] {
	color: #fff;
	border-bottom-color: var(--aiken-cyan);
}

#logout-form {
	margin: 0;
}

/* ---------- Pie (gris oscuro, como aikensoftware.com) ---------- */

.footer {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 10px 24px;
	background: var(--aiken-dark);
	color: rgba(255, 255, 255, .7);
	font-size: 12px;
	flex: 0 0 auto;
}

.footer span:first-child {
	color: var(--aiken-cyan);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .6px;
}

/* ---------- Botones ---------- */

.btn {
	border: 1px solid transparent;
	border-radius: 8px;
	padding: 7px 16px;
	cursor: pointer;
	font-weight: 500;
}

.btn:disabled {
	cursor: not-allowed;
	opacity: .5;
}

.btn-primary {
	background: var(--accent);
	color: #fff;
}

.btn-primary:not(:disabled):hover {
	background: var(--aiken-blue-dark);
}

.btn-ghost {
	background: transparent;
	color: var(--aiken-blue);
	border-color: var(--aiken-blue);
}

.btn-ghost:hover {
	background: var(--accent-soft);
}

.btn-sm {
	padding: 5px 12px;
	font-size: 14px;
}

.btn-secondary {
	background: #fff;
	color: var(--text);
	border-color: var(--border-strong);
}

.btn-secondary:not(:disabled):hover {
	background: var(--neutral-soft);
}

.btn-warn {
	background: #b45309;
	color: #fff;
}

.btn-warn:not(:disabled):hover {
	background: #92400e;
}

.btn-link {
	background: none;
	border: none;
	padding: 0;
	color: var(--accent);
	cursor: pointer;
	font-weight: 500;
}

.btn-link:hover {
	text-decoration: underline;
}

/* ---------- Columnas ---------- */

.layout {
	flex: 1 1 auto;
	min-height: 0;
	display: grid;
	grid-template-columns: 240px minmax(0, 1fr);
	gap: 16px;
	padding: 16px;
}

/* Aiken: tercera columna con el panel en directo; en la vista Agentes, las tarjetas ocupan clientes y centro */
.layout.is-admin {
	grid-template-columns: 240px minmax(0, 1fr) 350px;
}

.layout.is-admin.mode-agents {
	grid-template-columns: minmax(0, 1fr) 350px;
}

.col {
	background: var(--panel);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	min-height: 0;
	overflow: auto;
}

.col-title {
	margin: 0;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .8px;
	color: var(--muted);
}

/* ---------- Clientes ---------- */

.col-customers {
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.customer-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.customer {
	width: 100%;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border: 1px solid transparent;
	border-radius: 8px;
	background: none;
	text-align: left;
	cursor: pointer;
	color: var(--text);
}

.customer:hover {
	background: var(--neutral-soft);
}

.customer[aria-current="true"] {
	background: var(--accent-soft);
	border-color: #9fd8ef;
}

.customer-text {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.customer-name {
	font-weight: 500;
}

.customer-state {
	font-size: 12px;
	color: var(--muted);
}

.customer.is-offline .customer-name {
	color: var(--muted);
}

.dot {
	display: inline-block;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	flex: 0 0 auto;
	vertical-align: middle;
}

.dot-on {
	background: #22a35a;
	box-shadow: 0 0 0 3px rgba(34, 163, 90, .18);
}

.dot-off {
	background: transparent;
	border: 2px solid #9aa3b0;
}

.dot-paused {
	background: #d97706;
	box-shadow: 0 0 0 3px rgba(217, 119, 6, .18);
}

.legend {
	display: flex;
	gap: 14px;
	font-size: 12px;
	color: var(--muted);
}

.story {
	margin-top: auto;
	padding: 12px;
	border-radius: 8px;
	background: var(--neutral-soft);
	font-size: 13px;
	color: var(--muted);
}

.story p {
	margin: 0;
}

.story-title {
	font-weight: 700;
	color: var(--text);
	margin-bottom: 4px !important;
}

/* ---------- Cliente seleccionado ---------- */

.col-main {
	padding: 20px 24px;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

/* La columna hace scroll entera: sus bloques no se encogen */
.col-main > * {
	flex-shrink: 0;
}

.main-head {
	display: flex;
	align-items: center;
	gap: 12px;
}

.customer-title {
	margin: 0;
	font-size: 22px;
	font-weight: 650;
}

.status-pill {
	font-size: 12px;
	font-weight: 600;
	padding: 3px 10px;
	border-radius: 999px;
}

.status-pill.on {
	background: var(--ok-soft);
	color: var(--ok);
}

.status-pill.off {
	background: var(--neutral-soft);
	color: var(--muted);
}

.status-pill.paused {
	background: var(--warn-soft);
	color: var(--warn);
}

.banner {
	padding: 12px 14px;
	border-radius: 8px;
	font-size: 14px;
}

.banner-offline {
	background: var(--warn-soft);
	color: #6b3f05;
	border: 1px solid #f3d19a;
}

.tabs {
	display: flex;
	gap: 4px;
	border-bottom: 1px solid var(--border);
}

.tab {
	padding: 9px 16px;
	border: none;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
	background: none;
	color: var(--muted);
	font-weight: 500;
	cursor: pointer;
}

.tab:hover {
	color: var(--text);
}

.tab[aria-selected="true"] {
	color: var(--accent);
	border-bottom-color: var(--aiken-cyan);
}

.search-bar form {
	display: flex;
	gap: 8px;
}

.search-bar input {
	flex: 1;
	max-width: 420px;
	padding: 8px 12px;
	border: 1px solid var(--border-strong);
	border-radius: 8px;
	font: inherit;
	font-family: var(--mono);
}

.search-bar input:focus {
	outline: 2px solid var(--focus);
	outline-offset: 0;
	border-color: var(--accent);
}

.breadcrumb {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
	font-size: 14px;
	color: var(--muted);
}

.breadcrumb .sep {
	color: var(--faint);
}

.breadcrumb .current {
	color: var(--text);
	font-weight: 600;
}

.view {
	min-height: 120px;
}

.placeholder {
	padding: 28px;
	border: 1px dashed var(--border-strong);
	border-radius: 8px;
	text-align: center;
	color: var(--muted);
}

.loading {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 20px 0;
	color: var(--muted);
}

.spinner {
	width: 16px;
	height: 16px;
	border: 2px solid var(--border-strong);
	border-top-color: var(--accent);
	border-radius: 50%;
	animation: spin .7s linear infinite;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

.error-box {
	padding: 14px 16px;
	border-radius: 8px;
	background: var(--err-soft);
	color: var(--err);
	border: 1px solid #f6c4bf;
}

/* Línea de tiempos bajo cada resultado: queda fija al pie de la columna para que se vea aunque la tabla sea larga */
.timings {
	position: sticky;
	bottom: -20px;
	margin: 0 -24px -20px;
	padding: 10px 24px;
	background: rgba(255, 255, 255, .96);
	border-top: 1px solid var(--border);
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: var(--muted);
}

.timings .total {
	font-weight: 700;
	color: var(--ok);
	background: var(--ok-soft);
	padding: 2px 8px;
	border-radius: 999px;
	font-variant-numeric: tabular-nums;
}

/* ---------- Resumen ---------- */

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

.card {
	padding: 16px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: #fbfcfd;
}

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

.card-value {
	font-size: 30px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	line-height: 1.2;
	margin-top: 4px;
}

.card.ok .card-value {
	color: var(--ok);
}

.card.err .card-value {
	color: var(--err);
}

.section-title {
	margin: 22px 0 10px;
	font-size: 15px;
	font-weight: 650;
}

.stack {
	display: flex;
	height: 14px;
	border-radius: 999px;
	overflow: hidden;
	background: var(--neutral-soft);
}

.stack span {
	height: 100%;
}

.stack-legend {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 8px;
	margin-top: 12px;
}

.stack-item {
	display: flex;
	flex-direction: column;
	padding: 10px 12px;
	border-radius: 8px;
	border: 1px solid var(--border);
}

.stack-item .swatch {
	display: inline-block;
	width: 10px;
	height: 10px;
	border-radius: 3px;
	margin-right: 6px;
}

.stack-item .name {
	font-size: 13px;
	color: var(--muted);
}

.stack-item .count {
	font-size: 20px;
	font-weight: 650;
	font-variant-numeric: tabular-nums;
}

/* Colores por estado del dispositivo (barra y leyenda) */
.c-PENDING { background: #9aa3b0; }
.c-AUDITED { background: #3b74d1; }
.c-ERASED { background: #22a35a; }
.c-FAILED { background: #d64534; }
.c-RECYCLED { background: #7f56d9; }

/* ---------- Tablas ---------- */

.table-wrap {
	border: 1px solid var(--border);
	border-radius: var(--radius);
	overflow: hidden;
}

table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

th {
	text-align: left;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .4px;
	color: var(--muted);
	background: #f8f9fb;
	padding: 9px 12px;
	border-bottom: 1px solid var(--border);
	position: sticky;
	top: 0;
}

td {
	padding: 9px 12px;
	border-bottom: 1px solid #eef1f4;
}

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

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

td.mono {
	font-family: var(--mono);
	font-size: 13px;
}

td.mono,
td.nowrap {
	white-space: nowrap;
}

tr.clickable {
	cursor: pointer;
}

tr.clickable:hover td,
tr.clickable:focus td {
	background: var(--accent-soft);
}

tr.clickable:focus {
	outline: 2px solid var(--focus);
	outline-offset: -2px;
}

.is-disabled tr.clickable {
	cursor: not-allowed;
}

.is-disabled tr.clickable:hover td {
	background: none;
}

.count-note {
	margin: 8px 2px 0;
	font-size: 13px;
	color: var(--muted);
}

/* Etiquetas de estado */
.pill {
	display: inline-block;
	padding: 2px 9px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
}

.pill-neutral { background: var(--neutral-soft); color: #475467; }
.pill-info { background: var(--info-soft); color: var(--info); }
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-err { background: var(--err-soft); color: var(--err); }
.pill-warn { background: var(--warn-soft); color: var(--warn); }
.pill-purple { background: var(--purple-soft); color: var(--purple); }

.grade {
	display: inline-grid;
	place-items: center;
	width: 24px;
	height: 24px;
	border-radius: 6px;
	background: var(--neutral-soft);
	font-weight: 700;
	font-size: 13px;
}

/* ---------- Detalle ---------- */

.detail-head {
	display: flex;
	align-items: baseline;
	gap: 12px;
	margin-bottom: 14px;
}

.detail-head h3 {
	margin: 0;
	font-size: 18px;
}

.detail-head .serial {
	font-family: var(--mono);
	color: var(--muted);
}

.fields {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0;
	margin: 0;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	overflow: hidden;
}

.field {
	padding: 10px 14px;
	border-bottom: 1px solid #eef1f4;
	border-right: 1px solid #eef1f4;
}

.field dt {
	font-size: 12px;
	color: var(--muted);
}

.field dd {
	margin: 2px 0 0;
	font-weight: 500;
}

/* ---------- Agentes (solo Aiken) ---------- */

.col-agents {
	padding: 20px 24px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.agents-head {
	display: flex;
	align-items: baseline;
	gap: 14px;
}

.agents-summary {
	font-size: 14px;
	color: var(--muted);
}

.agents-intro {
	margin: 0;
	max-width: 760px;
	font-size: 14px;
	color: var(--muted);
}

.agents-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
	gap: 16px;
	align-items: start;
	margin-top: 4px;
}

.agents-error {
	grid-column: 1 / -1;
}

.agent-card {
	border: 1px solid var(--border);
	border-top: 4px solid #9aa3b0;
	border-radius: var(--radius);
	background: #fbfcfd;
	padding: 16px 18px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.agent-card.on {
	border-top-color: #22a35a;
}

.agent-card.paused {
	border-top-color: #d97706;
}

.agent-head {
	display: flex;
	align-items: center;
	gap: 10px;
}

.agent-icon {
	font-size: 16px;
	line-height: 1;
	width: 18px;
	text-align: center;
}

.agent-icon.on { color: #22a35a; }
.agent-icon.off { color: #9aa3b0; }
.agent-icon.paused { color: #d97706; }
.agent-icon.paused.off { color: #9aa3b0; }

.agent-name {
	margin: 0;
	font-size: 17px;
	font-weight: 650;
	flex: 1;
	min-width: 0;
	overflow-wrap: anywhere;
}

.agent-host {
	margin: -4px 0 0 28px;
	font-size: 13px;
	color: var(--muted);
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	overflow-wrap: anywhere;
}

.agent-host .mono {
	font-family: var(--mono);
	color: var(--text);
}

.agent-sep {
	color: var(--faint);
}

.agent-fields {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	margin: 0;
	border: 1px solid var(--border);
	border-radius: 8px;
	background: #fff;
	overflow: hidden;
}

.agent-field {
	padding: 7px 12px;
	border-bottom: 1px solid #eef1f4;
	min-width: 0;
}

.agent-field:nth-child(odd) {
	border-right: 1px solid #eef1f4;
}

.agent-field dt {
	font-size: 12px;
	color: var(--muted);
}

.agent-field dd {
	margin: 1px 0 0;
	font-weight: 500;
	font-variant-numeric: tabular-nums;
	overflow-wrap: anywhere;
}

.agent-actions,
.agent-confirm {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
}

.agent-confirm {
	padding: 8px 10px;
	border-radius: 8px;
	background: var(--warn-soft);
	border: 1px solid #f3d19a;
}

.agent-confirm-text {
	font-weight: 600;
	color: #6b3f05;
	margin-right: auto;
}

.agent-ping {
	margin: 0;
	padding: 7px 12px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

.agent-ping.ok {
	background: var(--ok-soft);
	color: var(--ok);
}

.agent-ping.err {
	background: var(--err-soft);
	color: var(--err);
}

/* ---------- En directo ---------- */

.col-live {
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.live-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 16px 10px;
	border-bottom: 1px solid var(--border);
}

.live-status {
	font-size: 12px;
	font-weight: 600;
	color: var(--muted);
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.live-status::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #9aa3b0;
}

.live-status.on {
	color: var(--ok);
}

.live-status.on::before {
	background: #22a35a;
	animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
	50% {
		opacity: .35;
	}
}

.live-list {
	list-style: none;
	margin: 0;
	padding: 8px 10px 12px;
	overflow: auto;
	flex: 1;
}

.live-empty {
	margin: 0;
	padding: 16px;
	font-size: 13px;
	color: var(--faint);
}

.ev {
	display: grid;
	grid-template-columns: 92px minmax(0, 1fr);
	column-gap: 8px;
	padding: 5px 8px 5px 10px;
	border-left: 3px solid transparent;
	border-radius: 4px;
	font-size: 13px;
	animation: appear .5s ease-out;
}

@keyframes appear {
	from {
		background: #fff7d6;
	}
}

.ev+.ev {
	margin-top: 2px;
}

.ev-time {
	font-family: var(--mono);
	font-size: 12px;
	color: var(--faint);
	padding-top: 1px;
}

/* Primera línea: qué ha pasado y los ms; segunda: cliente y operación */
.ev-body {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.ev-main,
.ev-meta {
	display: flex;
	align-items: baseline;
	gap: 6px;
}

.ev-meta {
	font-size: 12px;
}

.ev-customer {
	font-weight: 600;
	color: var(--muted);
}

.ev-waiting .ev-body {
	flex-direction: row-reverse;
	justify-content: flex-end;
	gap: 6px;
}

.ev-label {
	color: var(--text);
}

.ev-op {
	font-size: 11px;
	line-height: 18px;
	font-weight: 600;
	padding: 0 6px;
	border-radius: 4px;
	background: var(--neutral-soft);
	color: #475467;
}

.ev-query {
	background: #fafbfc;
}

.ev-ms {
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.ev-completed .ev-label {
	color: var(--ok);
	font-weight: 600;
}

.ev-failed .ev-label {
	color: var(--err);
	font-weight: 600;
}

.ev-online .ev-label {
	color: var(--ok);
	font-weight: 600;
}

.ev-offline .ev-label {
	color: var(--err);
	font-weight: 600;
}

.ev-paused .ev-label {
	color: var(--warn);
	font-weight: 600;
}

.ev-resumed .ev-label {
	color: var(--ok);
	font-weight: 600;
}

.ev-op-ping {
	background: var(--info-soft);
	color: var(--info);
}

/* Las esperas del agente llegan cada ~25 s: se muestran discretas */
.ev-waiting {
	opacity: .55;
	font-size: 12px;
	padding-top: 2px;
	padding-bottom: 2px;
}

.live-foot {
	margin: 0;
	padding: 10px 16px;
	border-top: 1px solid var(--border);
	font-size: 12px;
	color: var(--muted);
	background: #fafbfc;
}

/* ---------- Usuarios de la demo (login y columna de clientes) ---------- */

/* En la columna de clientes va abajo; si ya está "Cómo funciona" (gerencia), justo debajo de él */
.col-customers .demo-users {
	margin-top: auto;
	padding: 12px;
	border-radius: 8px;
	background: var(--neutral-soft);
	font-size: 13px;
	color: var(--muted);
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.col-customers .story ~ .demo-users {
	margin-top: 0;
}

.col-customers .demo-users p {
	margin: 0;
}

/* En la columna estrecha, "gerencia / demo-gerencia" debe caber en una línea */
.col-customers .demo-user-credentials {
	font-size: 12px;
	white-space: nowrap;
}

.demo-users-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.demo-user-credentials {
	font-family: var(--mono);
	font-size: 13px;
	color: var(--text);
}

.demo-user-current .demo-user-credentials {
	font-weight: 700;
}

.demo-user-sees {
	display: block;
	font-size: 12px;
	color: var(--muted);
}

/* ---------- Página de login ---------- */

.login-main {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
}

/* Franja cian como la portada de aikensoftware.com; las tarjetas montan sobre su borde inferior */
.login-hero {
	padding: 48px 24px 96px;
	background: var(--aiken-cyan);
	color: #fff;
	text-align: center;
}

.login-hero-title {
	margin: 0 0 10px;
	font-size: 40px;
	font-weight: 300;
	letter-spacing: .3px;
}

.login-hero-text {
	max-width: 560px;
	margin: 0 auto;
	font-size: 17px;
	font-weight: 400;
	color: rgba(255, 255, 255, .9);
}

.login-cards {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: center;
	gap: 16px;
	margin-top: -64px;
	padding: 0 16px 48px;
}

.login-card {
	width: 100%;
	max-width: 360px;
	padding: 24px;
	background: var(--panel);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.login-title {
	margin: 0;
	font-size: 22px;
	font-weight: 700;
	color: var(--aiken-blue);
}

.login-form {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.login-form label {
	font-size: 13px;
	font-weight: 600;
	color: var(--muted);
}

.login-form input {
	padding: 8px 12px;
	margin-bottom: 6px;
	border: 1px solid var(--border-strong);
	border-radius: 8px;
	font: inherit;
}

.login-form input:focus {
	outline: 2px solid var(--focus);
	outline-offset: 0;
	border-color: var(--accent);
}

.login-form .btn {
	margin-top: 6px;
}

.banner-error {
	margin: 0;
	background: var(--err-soft);
	color: var(--err);
	border: 1px solid #f5c2be;
}

.banner-info {
	margin: 0;
	background: var(--info-soft);
	color: var(--info);
	border: 1px solid #c3d4f2;
}

.demo-users-hint {
	margin: 0;
	font-size: 13px;
	color: var(--muted);
}

.demo-user {
	width: 100%;
	text-align: left;
	padding: 10px 12px;
	background: #fff;
	border: 1px solid var(--border-strong);
	border-radius: 8px;
	cursor: pointer;
}

.demo-user:hover {
	background: var(--accent-soft);
	border-color: var(--accent);
}

/* Portátil con proyector: por debajo de 1280 px se estrecha el panel en directo */
@media (max-width: 1279px) {
	.layout {
		grid-template-columns: 220px minmax(0, 1fr);
	}

	.layout.is-admin {
		grid-template-columns: 220px minmax(0, 1fr) 320px;
	}

	.layout.is-admin.mode-agents {
		grid-template-columns: minmax(0, 1fr) 320px;
	}

	.cards,
	.stack-legend {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

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