/* ══════════════════════════════════════════════════════════════════
   CECO FLEET v33 — VIEWS.CSS
   Estilos propios de cada vista: mando, flota, mantenimiento,
   inventario, recibos, operadores, horas, inspecciones, mapa y QR.
   ══════════════════════════════════════════════════════════════════ */

/* ══ 1. CENTRO DE MANDO ═══════════════════════════════════════ */

.stat-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
	gap: 10px;
	margin-bottom: 16px;
}
.stat-card {
	background: var(--bg-1);
	border: 1px solid var(--stroke);
	border-radius: var(--radius);
	padding: 14px 12px;
	text-align: center;
	cursor: pointer;
	transition: transform var(--t-fast), border-color var(--t-fast);
}
.stat-card:hover { transform: translateY(-2px); border-color: var(--stroke-2); }
.stat-card .stat-icon { display: block; font-size: 21px; margin-bottom: 5px; }
.stat-card b { display: block; font-size: 22px; font-weight: 900; color: #fff; line-height: 1.1; }
.stat-card .stat-label { font-size: 9.5px; color: var(--muted); letter-spacing: .5px; }
.stat-card.red b { color: var(--red); }
.stat-card.amber b { color: var(--amber); }
.stat-card.green b { color: var(--emerald); }

.panel {
	background: var(--bg-1);
	border: 1px solid var(--stroke);
	border-radius: var(--radius);
	padding: 15px;
	margin-bottom: 16px;
}
.panel-head {
	display: flex;
	align-items: center;
	gap: 9px;
	margin-bottom: 12px;
}
.panel-head h4 { font-size: 13.5px; margin: 0; flex: 1; }

/* Mapa */
.map-box {
	height: 340px;
	border-radius: var(--radius);
	overflow: hidden;
	border: 1px solid var(--stroke-2);
	background: var(--bg-2);
}
#map { width: 100%; height: 100%; }
.tracker-map {
	height: 320px;
	border-radius: var(--radius);
	overflow: hidden;
	border: 1px solid var(--stroke-2);
	margin-bottom: 14px;
	background: var(--bg-2);
}

/* Marcador de maquina */
.ceco-marker .pin {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--pin, var(--accent));
	border: 3px solid rgba(255, 255, 255, .92);
	box-shadow: 0 6px 18px rgba(0, 0, 0, .55);
	display: grid;
	place-items: center;
	font-size: 9.5px;
	font-weight: 900;
	color: #1a1209;
	letter-spacing: -.3px;
}
.leaflet-popup-content-wrapper {
	background: var(--bg-1);
	color: var(--text);
	border-radius: 2px;
	border: 1px solid var(--stroke-2);
}
.leaflet-popup-tip { background: var(--bg-1); }
.map-pop { font-size: 12px; line-height: 1.6; }
.map-pop b { color: #fff; font-size: 13px; }
.map-pop button {
	margin-top: 7px;
	background: var(--emerald-soft);
	border: 1px solid var(--emerald);
	color: var(--emerald);
	border-radius: 2px;
	padding: 5px 10px;
	font-size: 11px;
	cursor: pointer;
}

/* Panel de beacons GPS */
.gps-row {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 8px 0;
	border-bottom: 1px solid var(--stroke);
	font-size: 12px;
}
.gps-row:last-child { border-bottom: none; }
.gps-row b { color: #fff; cursor: pointer; flex: 1; }
.gps-row .dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--muted);
	flex-shrink: 0;
}
.gps-row.live .dot { background: var(--emerald); animation: cecoPulse 1.4s infinite; }
.gps-row.live .small { color: var(--emerald); }
.gps-row .small { color: var(--muted); }

/* Alertas de mantenimiento */
.alert-head {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 10px;
	font-size: 12.5px;
}
.alert-head b { color: var(--red); }
.alert-head span { color: var(--muted); font-size: 11px; flex: 1; }
.alert-list { max-height: 260px; overflow-y: auto; }
.alert-row {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 10px;
	border-radius: var(--radius-sm);
	margin-bottom: 5px;
	font-size: 11.5px;
	cursor: pointer;
	background: var(--bg-2);
	border-left: 3px solid var(--amber);
}
.alert-row.critical { border-left-color: var(--red); }
.alert-row b { color: #fff; min-width: 62px; }
.alert-row i { font-style: normal; margin-left: auto; color: var(--muted); }
.alert-row.critical i { color: #fca5a5; }
.alert-ok {
	background: var(--emerald-soft);
	border: 1px solid rgba(255, 140, 26, .3);
	color: var(--emerald);
	border-radius: var(--radius-sm);
	padding: 12px;
	font-size: 12.5px;
	text-align: center;
}

/* ══ 2. ACTIVIDAD / REPORTES ══════════════════════════════════ */

.activity-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
	gap: 11px;
}
.activity-card {
	background: var(--bg-1);
	border: 1px solid var(--stroke);
	border-left: 4px solid var(--blue);
	border-radius: var(--radius);
	padding: 12px;
	animation: cecoFade .35s ease backwards;
}
.activity-card.move { border-left-color: var(--purple); }
.activity-card.incident { border-left-color: var(--red); }
.activity-card.maintenance { border-left-color: var(--amber); }

.ac-top { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.ac-photo {
	width: 52px;
	height: 52px;
	object-fit: cover;
	border-radius: 2px;
	border: 1px solid var(--stroke-2);
	cursor: pointer;
	flex-shrink: 0;
}
.ac-icon {
	width: 52px;
	height: 52px;
	border-radius: 2px;
	background: var(--bg-2);
	display: grid;
	place-items: center;
	font-size: 22px;
	flex-shrink: 0;
}
.ac-who { flex: 1; min-width: 0; }
.ac-title { font-size: 12.5px; font-weight: 700; color: #fff; }
.ac-title a { color: #fff; }
.ac-title a.green { color: var(--emerald); }
.ac-sub { font-size: 10.5px; color: var(--muted); }
.ac-note {
	font-size: 11.5px;
	color: var(--text-2);
	line-height: 1.6;
	word-break: break-word;
}
.ac-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ac-time { font-size: 10px; color: var(--muted); margin-top: 7px; }

.location-link {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: var(--blue-soft);
	border: 1px solid rgba(255, 140, 26, .28);
	color: #93c5fd;
	border-radius: 2px;
	padding: 4px 9px;
	font-size: 10px;
	font-weight: 700;
}

/* Historial en linea de tiempo */
.timeline { max-height: 420px; overflow-y: auto; }
.event { display: flex; gap: 11px; padding: 10px 0; border-bottom: 1px solid var(--stroke); }
.event:last-child { border-bottom: none; }
.event-icon {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--purple-soft);
	color: var(--purple);
	display: grid;
	place-items: center;
	font-size: 13px;
	flex-shrink: 0;
}
.event h4 { font-size: 12px; margin: 0 0 2px; }
.event p { font-size: 11px; color: var(--text-2); margin: 0; }
.event p.small { font-size: 10px; color: var(--muted); }

/* ══ 3. FLOTA ═════════════════════════════════════════════════ */

.fleet-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
	gap: 12px;
}
.fleet-card {
	background: var(--bg-1);
	border: 1px solid var(--stroke);
	border-radius: var(--radius);
	overflow: hidden;
	cursor: pointer;
	transition: transform var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
}
.fleet-card:hover {
	transform: translateY(-3px);
	border-color: var(--stroke-2);
	box-shadow: 0 14px 34px rgba(0, 0, 0, .4);
}
.fleet-card.critical { border-color: rgba(230, 95, 58, .45); }
.fleet-card.soon { border-color: rgba(232, 181, 60, .4); }
.fleet-card.out { opacity: .62; }

.fc-img { position: relative; height: 128px; background: var(--bg-2); }
.fc-img img { width: 100%; height: 100%; object-fit: cover; }
.fc-status {
	position: absolute;
	top: 8px;
	left: 8px;
	border-radius: 999px;
	padding: 3px 9px;
	font-size: 9px;
	font-weight: 800;
	letter-spacing: .4px;
	background: var(--emerald-soft);
	color: var(--emerald);
	backdrop-filter: blur(6px);
}
.fc-status.critical { background: rgba(230, 95, 58, .9); color: #fff; }
.fc-status.soon { background: rgba(232, 181, 60, .92); color: #1a1206; }
.fc-status.out { background: rgba(148, 137, 122, .85); color: #fff; }
.fc-alert {
	position: absolute;
	top: 8px;
	right: 8px;
	font-size: 17px;
	animation: cecoPulse 1.6s infinite;
}

.fc-body { padding: 11px 12px 13px; }
.fc-body h4 { font-size: 14px; margin: 0 0 3px; letter-spacing: .5px; }
.fc-body p {
	font-size: 10.5px;
	color: var(--muted);
	margin: 0 0 8px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.fc-meta { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--text-2); }
.fc-meta .overdue { color: var(--red); font-weight: 700; }
.fc-meta .soon { color: var(--amber); font-weight: 700; }
.fc-meta .ok { color: var(--emerald); }

/* ══ 4. MANTENIMIENTO ═════════════════════════════════════════ */

.maint-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
	gap: 12px;
}
.maint-card {
	background: var(--bg-1);
	border: 1px solid var(--stroke);
	border-top: 3px solid var(--emerald);
	border-radius: var(--radius);
	padding: 14px;
}
.maint-card.soon { border-top-color: var(--amber); }
.maint-card.overdue { border-top-color: var(--red); }

.maint-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.maint-head > div:first-child { flex: 1; min-width: 0; }
.maint-head h4 { font-size: 14px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.maint-head p { font-size: 10.5px; color: var(--muted); margin: 0; }
.maint-hours { text-align: right; display: flex; align-items: center; gap: 6px; }
.maint-hours b { font-size: 15px; color: #fff; }

.extreme-toggle {
	display: flex;
	align-items: center;
	gap: 7px;
	font-size: 10.5px;
	color: var(--text-2);
	margin-bottom: 11px;
	cursor: pointer;
}
.extreme-toggle input { accent-color: var(--amber); width: 15px; height: 15px; }

.tier-list { display: grid; gap: 7px; }
.tier-chip {
	display: grid;
	grid-template-columns: 22px 1fr 64px 54px 30px;
	align-items: center;
	gap: 8px;
	background: var(--bg-2);
	border: 1px solid var(--stroke);
	border-radius: var(--radius-sm);
	padding: 8px 10px;
	cursor: pointer;
	transition: border-color var(--t-fast);
}
.tier-chip:hover { border-color: var(--stroke-2); }
.tier-chip.soon { border-color: rgba(232, 181, 60, .4); }
.tier-chip.overdue { border-color: rgba(230, 95, 58, .45); background: rgba(230, 95, 58, .08); }

.tier-icon { font-size: 15px; }
.tier-name {
	font-size: 11.5px;
	color: var(--text);
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.tier-bar { height: 6px; background: var(--bg-0); border-radius: 3px; overflow: hidden; }
.tier-bar i { display: block; height: 100%; background: var(--emerald); border-radius: 3px; }
.tier-chip.soon .tier-bar i { background: var(--amber); }
.tier-chip.overdue .tier-bar i { background: var(--red); }
.tier-remain { font-size: 10.5px; text-align: right; color: var(--muted); }
.tier-chip.soon .tier-remain { color: var(--amber); }
.tier-chip.overdue .tier-remain { color: var(--red); font-weight: 800; }

.tier-do {
	width: 26px;
	height: 26px;
	border: 1px solid var(--stroke-2);
	border-radius: 2px;
	background: var(--emerald-soft);
	color: var(--emerald);
	font-size: 12px;
	cursor: pointer;
}
.tier-do:hover { background: var(--emerald); color: #1a1209; }

.mini-tiers { display: grid; gap: 6px; }
.mini-tier {
	display: flex;
	align-items: center;
	gap: 7px;
	background: var(--bg-2);
	border: 1px solid var(--stroke);
	border-radius: var(--radius-sm);
	padding: 8px 11px;
	font-size: 11.5px;
	cursor: pointer;
}
.mini-tier b { flex: 1; color: var(--text); font-weight: 600; }
.mini-tier span { color: var(--muted); font-size: 11px; }
.mini-tier.soon { border-color: rgba(232, 181, 60, .35); }
.mini-tier.soon span { color: var(--amber); }
.mini-tier.overdue { border-color: rgba(230, 95, 58, .4); }
.mini-tier.overdue span { color: var(--red); font-weight: 800; }

.tier-status {
	background: var(--bg-2);
	border-left: 4px solid var(--emerald);
	border-radius: var(--radius-sm);
	padding: 11px 13px;
	font-size: 12px;
	color: var(--text-2);
	margin-bottom: 6px;
}
.tier-status.soon { border-left-color: var(--amber); }
.tier-status.overdue { border-left-color: var(--red); }
.tier-status b { color: #fff; }

/* ══ 5. INVENTARIO (filtros y partes) ═════════════════════════ */

.inv-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
	gap: 10px;
}
.inv-card {
	background: var(--bg-1);
	border: 1px solid var(--stroke);
	border-radius: var(--radius);
	padding: 12px;
	display: flex;
	flex-direction: column;
	gap: 9px;
}
.inv-card.low { border-color: rgba(230, 95, 58, .4); }
.inv-top { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.inv-top > div { flex: 1; min-width: 0; }
.inv-icon {
	width: 42px;
	height: 42px;
	border-radius: 2px;
	background: var(--bg-2);
	display: grid;
	place-items: center;
	font-size: 19px;
	flex-shrink: 0;
}
.inv-photo { width: 42px; height: 42px; border-radius: 2px; object-fit: cover; flex-shrink: 0; }
.inv-card h4 { font-size: 12.5px; margin: 0 0 2px; }
.inv-card p { font-size: 10.5px; color: var(--muted); margin: 0; }
.inv-card p b { color: var(--text-2); font-family: var(--font-mono); }

.inv-stock {
	display: flex;
	align-items: center;
	gap: 8px;
	border-top: 1px solid var(--stroke);
	padding-top: 9px;
}
.inv-stock b { font-size: 17px; min-width: 30px; text-align: center; }
.inv-stock .min { font-size: 10px; color: var(--muted); margin-left: auto; }

/* ══ 6. RECIBOS ═══════════════════════════════════════════════ */

.rec-grid { display: grid; gap: 9px; }
.rec-card {
	display: flex;
	align-items: center;
	gap: 11px;
	background: var(--bg-1);
	border: 1px solid var(--stroke);
	border-radius: var(--radius);
	padding: 11px 13px;
	cursor: pointer;
}
.rec-card:hover { border-color: var(--stroke-2); }
.rec-photo { width: 46px; height: 46px; border-radius: 2px; object-fit: cover; flex-shrink: 0; }
.rec-icon {
	width: 46px;
	height: 46px;
	border-radius: 2px;
	background: var(--bg-2);
	display: grid;
	place-items: center;
	font-size: 20px;
	flex-shrink: 0;
}
.rec-body { flex: 1; min-width: 0; }
.rec-body h4 { font-size: 12.5px; margin: 0 0 2px; }
.rec-body p { font-size: 10.5px; color: var(--muted); margin: 0; }
.rec-amount { font-size: 15px; color: var(--emerald); white-space: nowrap; }

.ocr-status { font-size: 11.5px; color: var(--text-2); margin-bottom: 10px; min-height: 18px; }
.ocr-text {
	background: var(--bg-2);
	border: 1px solid var(--stroke);
	border-radius: var(--radius-sm);
	padding: 11px;
	font-size: 10.5px;
	font-family: var(--font-mono);
	color: var(--muted);
	white-space: pre-wrap;
	max-height: 200px;
	overflow-y: auto;
}

/* ══ 7. OPERADORES ════════════════════════════════════════════ */

.op-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
	gap: 10px;
}
.op-card {
	display: flex;
	align-items: center;
	gap: 11px;
	background: var(--bg-1);
	border: 1px solid var(--stroke);
	border-radius: var(--radius);
	padding: 12px;
	cursor: pointer;
}
.op-card:hover { border-color: var(--stroke-2); }
.op-avatar {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	/* Avatares: tierra, para no competir con el naranja de accion. */
	background: linear-gradient(135deg, #7a6349, #3d3125);
	display: grid;
	place-items: center;
	font-weight: 900;
	font-size: 14px;
	color: #fff;
	flex-shrink: 0;
}
.op-card h4 { font-size: 13px; margin: 0 0 2px; }
.op-card p { font-size: 10.5px; color: var(--muted); margin: 0; }

/* ══ 8. HORAS ═════════════════════════════════════════════════ */

.hours-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
	gap: 10px;
	margin-bottom: 16px;
}
.stat {
	background: var(--bg-1);
	border: 1px solid var(--stroke);
	border-radius: var(--radius);
	padding: 13px;
}
.stat span { display: block; font-size: 9.5px; color: var(--muted); letter-spacing: .5px; }
.stat b { font-size: 19px; color: #fff; }

.hbar {
	display: grid;
	grid-template-columns: 74px 1fr 76px;
	align-items: center;
	gap: 10px;
	padding: 7px 0;
	cursor: pointer;
}
.hbar-label { font-size: 11.5px; font-weight: 700; color: var(--text); }
.hbar-track { height: 9px; background: var(--bg-2); border-radius: 5px; overflow: hidden; }
.hbar-track i {
	display: block;
	height: 100%;
	background: linear-gradient(90deg, var(--accent), var(--accent-2));
	border-radius: 5px;
}
.hbar-value { font-size: 11px; color: var(--muted); text-align: right; }

/* ══ 9. INSPECCIONES ══════════════════════════════════════════ */

.insp-card {
	background: var(--bg-1);
	border: 1px solid var(--stroke);
	border-left: 4px solid var(--emerald);
	border-radius: var(--radius);
	padding: 12px;
	margin-bottom: 10px;
}
.insp-head { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.insp-head b { font-size: 13px; color: #fff; cursor: pointer; }
.insp-head span { font-size: 10.5px; color: var(--muted); margin-left: auto; }
.insp-checks, .insp-fluids { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 7px; }
.insp-note { font-size: 11.5px; color: var(--text-2); margin: 0; }

/* ══ 10. ATTACHMENTS ══════════════════════════════════════════ */

.att-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
	gap: 10px;
}
.att-card {
	background: var(--bg-1);
	border: 1px solid var(--stroke);
	border-radius: var(--radius);
	padding: 12px;
}
.att-card.lost { border-color: rgba(232, 181, 60, .45); }
.att-card.un { opacity: .78; }
.att-head { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.att-head b { font-size: 12.5px; color: #fff; flex: 1; }
.att-card p { font-size: 10.5px; color: var(--muted); margin: 0 0 3px; }
.att-foot { display: flex; align-items: center; gap: 6px; margin-top: 9px; }
.att-foot .chip { flex: 1; }

/* ══ 11. ESCANER QR ═══════════════════════════════════════════ */

.qr-modal {
	position: fixed;
	inset: 0;
	z-index: 9600;
	background: #000;
	display: none;
	flex-direction: column;
}
.qr-modal.active { display: flex; }

.qr-head {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px;
	padding-top: calc(14px + env(safe-area-inset-top));
	background: var(--bg-1);
	border-bottom: 1px solid var(--stroke);
}
.qr-head h3 { font-size: 15px; margin: 0; flex: 1; }

#qrReader { flex: 1; position: relative; overflow: hidden; background: #000; }
#qrReader video { width: 100% !important; height: 100% !important; object-fit: cover !important; }
#qrReader img[alt="Info icon"] { display: none; }

.scanner-status {
	padding: 14px;
	padding-bottom: calc(20px + env(safe-area-inset-bottom));
	background: var(--bg-1);
	text-align: center;
	font-size: 12.5px;
	color: var(--text-2);
	border-top: 1px solid var(--stroke);
}
.scanner-status.ok { color: var(--emerald); }
.scanner-status.error { color: #fca5a5; }

/* Etiquetas QR para imprimir */
.qr-labels { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-bottom: 14px; }
.qr-label {
	background: #fff;
	border-radius: 2px;
	padding: 14px;
	text-align: center;
	min-width: 200px;
}
.qr-box { display: grid; place-items: center; min-height: 190px; }
.qr-box img, .qr-box canvas { display: block; }
.qr-label b { display: block; color: #1a1209; font-size: 19px; margin-top: 8px; }
.qr-label span { font-size: 9.5px; color: #475569; letter-spacing: 2px; }

.qr-urls { display: grid; gap: 6px; margin-bottom: 8px; }
.qr-urls code {
	display: block;
	background: var(--bg-2);
	border: 1px solid var(--stroke);
	border-radius: 2px;
	padding: 8px 10px;
	font-size: 10px;
	color: var(--muted);
	word-break: break-all;
}

/* ══ 12. FORMULARIO DE ESCANEO ════════════════════════════════ */

.mode-selector {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin-bottom: 14px;
}
.mode-option {
	background: var(--bg-2);
	border: 2px solid var(--stroke);
	border-radius: var(--radius);
	padding: 16px 12px;
	text-align: center;
	cursor: pointer;
	transition: border-color var(--t-fast), background var(--t-fast);
}
.mode-option:hover { border-color: var(--stroke-2); }
.mode-option.active { border-color: var(--emerald); background: var(--emerald-soft); }
.mode-option .icon { display: block; font-size: 28px; margin-bottom: 6px; }
.mode-option h5 { font-size: 12.5px; margin: 0 0 3px; }
.mode-option p { font-size: 10px; color: var(--muted); margin: 0; }

.subtype-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
	gap: 7px;
	margin-bottom: 12px;
}
.subtype-btn {
	background: var(--bg-2);
	border: 1px solid var(--stroke);
	border-radius: var(--radius-sm);
	padding: 11px 8px;
	text-align: center;
	font-size: 11.5px;
	font-weight: 700;
	cursor: pointer;
}
.subtype-btn.active { background: var(--emerald-soft); border-color: var(--emerald); color: var(--emerald); }

.scan-form { border-top: 1px solid var(--stroke); padding-top: 14px; margin-top: 14px; }

/* ══ 13. RESPONSIVE ═══════════════════════════════════════════ */

@media (max-width: 600px) {
	.stat-grid { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
	.stat-card b { font-size: 18px; }
	.fleet-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 9px; }
	.fc-img { height: 100px; }
	.maint-grid { grid-template-columns: 1fr; }
	.activity-grid { grid-template-columns: 1fr; }
	.map-box { height: 260px; }
	.tier-chip { grid-template-columns: 20px 1fr 46px 46px 28px; gap: 6px; padding: 7px 8px; }
	.tier-name { font-size: 10.5px; }
	.qr-label { min-width: 160px; }
}

@media (min-width: 1400px) {
	.fleet-grid { grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); }
}

/* ══ 14. FONDO DEL OPERARIO QUE ESCANEA (sin login) ═══════════ */

.scan-backdrop { display: none; }

body.ceco-mode-scan .scan-backdrop {
	display: grid;
	place-content: center;
	text-align: center;
	min-height: 100vh;
	min-height: 100dvh;
	padding: 24px;
	gap: 4px;
}
body.ceco-mode-scan.ceco-auth .scan-backdrop { display: none; }

.scan-backdrop-logo {
	width: 84px;
	height: 84px;
	margin: 0 auto 14px;
	border-radius: 24px;
	background: linear-gradient(135deg, var(--accent), var(--accent-2));
	display: grid;
	place-items: center;
	font-size: 40px;
}
.scan-backdrop h2 { font-size: 20px; letter-spacing: 1px; }
.scan-backdrop p { color: var(--text-2); font-size: 13px; margin: 0; }

/* ══ 16. LEAFLET SIN IMAGENES EXTERNAS ════════════════════════
   La libreria busca iconos PNG en /images/. Como no los incluimos
   (para no depender de archivos sueltos), se dibujan con CSS.
   ══════════════════════════════════════════════════════════════ */

.leaflet-control-layers-toggle {
	background-image: none !important;
	display: grid !important;
	place-items: center;
	font-size: 19px;
	width: 36px !important;
	height: 36px !important;
}
.leaflet-control-layers-toggle::after { content: '🗺️'; }
.leaflet-control-layers {
	background: var(--bg-1) !important;
	color: var(--text);
	border: 1px solid var(--stroke-2) !important;
	border-radius: 10px !important;
}
.leaflet-control-layers-expanded { padding: 10px 12px !important; font-size: 12px; }
.leaflet-control-layers label { display: flex; align-items: center; gap: 6px; margin: 4px 0; }
.leaflet-bar a {
	background: var(--bg-1) !important;
	color: var(--text) !important;
	border-color: var(--stroke) !important;
}
.leaflet-bar a:hover { background: var(--bg-3) !important; }
.leaflet-container { background: var(--bg-2); font-family: var(--font); }

/* ══════════════════════════════════════════════════════════════════
   17. v30.2 — CENTRO DE MANDO MEJORADO
   ══════════════════════════════════════════════════════════════════ */

.command-hero {
	display: grid;
	grid-template-columns: minmax(210px, 300px) 1fr;
	gap: 14px;
	background: linear-gradient(135deg, var(--bg-1), var(--bg-2));
	border: 1px solid var(--stroke);
	border-radius: var(--radius);
	padding: 16px;
	margin-bottom: 16px;
	position: relative;
	overflow: hidden;
}
.command-hero::before {
	content: '';
	position: absolute;
	inset: 0;
	background: radial-gradient(circle at 12% 0%, rgba(255, 140, 26, .16), transparent 55%);
	pointer-events: none;
}

/* ══════════════════════════════════════════════════════════════════
   RELOJ DE ODOMETRO  (v41)
   ──────────────────────────────────────────────────────────────────
   Cada cifra es una tira del 0 al 9 dentro de una ventanita. Para
   enseñar el 7, la tira sube 7 alturas. Lo mueve la tarjeta grafica
   (transform), asi que no cuesta nada aunque el segundero corra.
   ══════════════════════════════════════════════════════════════════ */

.clk-d {
	display: inline-block;
	position: relative;
	width: .60em;
	height: 1em;
	overflow: hidden;
	vertical-align: baseline;
}
.clk-d > b {
	position: absolute;
	top: 0; left: 0; right: 0;
	display: block;
	font-weight: inherit;
	transition: transform .5s cubic-bezier(.22, 1, .3, 1);
	will-change: transform;
}
.clk-d > b > span {
	display: block;
	height: 1em;
	line-height: 1em;
	text-align: center;
}

/* Los dos puntos laten al ritmo del segundo. */
.clk-sep { animation: clkLatido 1s steps(1, end) infinite; opacity: .85; }
@keyframes clkLatido { 0%, 55% { opacity: .9; } 56%, 100% { opacity: .25; } }

/* Cuando cambia el dia, la fecha entra sola. */
.clk-date.nueva { animation: clkFecha .7s cubic-bezier(.16, 1, .3, 1); }
@keyframes clkFecha {
	from { opacity: 0; transform: translateY(6px); }
	to   { opacity: 1; transform: none; }
}

/* Reloj de sala de control */
.cmd-clock { position: relative; display: flex; flex-direction: column; justify-content: center; }
.cmd-clock .clk-time {
	display: flex;
	align-items: baseline;
	gap: 2px;
	font-size: clamp(30px, 6vw, 44px);
	font-weight: 900;
	color: var(--text);
	letter-spacing: -1px;
	line-height: 1;
	font-variant-numeric: tabular-nums;
	text-shadow: 0 0 26px rgba(255, 140, 26, .3);
}
.cmd-clock .clk-sec {
	display: inline-flex;
	font-size: 15px;
	font-style: normal;
	font-weight: 700;
	color: var(--accent);
	background: var(--accent-soft);
	border-radius: 2px;
	padding: 2px 5px;
	margin-left: 6px;
}
.cmd-clock .clk-ampm {
	font-size: 13px;
	font-style: normal;
	font-weight: 700;
	letter-spacing: .12em;
	color: var(--muted);
	margin-left: 6px;
}
.cmd-clock .clk-date {
	font-size: 12px;
	color: var(--text-2);
	text-transform: uppercase;
	letter-spacing: .14em;
	margin-top: 8px;
}
.cmd-clock .clk-hi { font-size: 11px; color: var(--muted); margin-top: 3px; }

/* Version compacta para la cabecera */
.clock-mini { display: flex; align-items: center; gap: 8px; font-size: 10.5px; color: var(--muted); }
.clock-mini .clk-time {
	display: flex;
	align-items: baseline;
	gap: 1px;
	font-size: 13px;
	font-weight: 800;
	color: var(--text);
	line-height: 1;
	font-variant-numeric: tabular-nums;
}
.clock-mini .clk-sec { display: inline-flex; font-size: 10px; font-style: normal; color: var(--accent); margin-left: 3px; }
.clock-mini .clk-ampm { font-size: 9px; font-style: normal; letter-spacing: .1em; margin-left: 4px; color: var(--muted); }
.clock-mini .clk-date { font-size: 10px; margin: 0; text-transform: uppercase; letter-spacing: .1em; }
.clock-mini .clk-hi { display: none; }

/* En pantalla pequeña la fecha sobra: manda la hora. */
@media (max-width: 720px) {
	.clock-mini .clk-date { display: none; }
}

/* ⚠️ Con movimiento reducido las cifras cambian sin deslizarse.
   Se sigue viendo la hora perfectamente. */
@media (prefers-reduced-motion: reduce) {
	.clk-d > b { transition: none; }
	.clk-sep, .clk-date.nueva { animation: none; }
}

/* Acciones rapidas */
.quick-actions {
	position: relative;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
	gap: 8px;
	align-content: center;
}
.qa-btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 5px;
	padding: 12px 6px;
	background: var(--bg-2);
	border: 1px solid var(--stroke);
	border-radius: var(--radius-sm);
	color: var(--text-2);
	font-family: inherit;
	font-size: 10.5px;
	font-weight: 700;
	cursor: pointer;
	transition: transform var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}
.qa-btn:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--text); }
.qa-btn:active { transform: scale(.95); }
.qa-btn.primary {
	background: linear-gradient(135deg, var(--accent), var(--accent-2));
	border-color: transparent;
	color: #1a1209;
}
.qa-icon { font-size: 21px; }
.qa-label { text-align: center; line-height: 1.2; }

/* Marca en la cabecera (solo movil) */
.header-brand { display: none; align-items: center; gap: 8px; flex: 1; justify-content: center; min-width: 0; }
.hb-logo {
	width: 30px;
	height: 30px;
	border-radius: 2px;
	background: linear-gradient(135deg, var(--accent), var(--accent-2));
	display: grid;
	place-items: center;
	font-size: 15px;
	flex-shrink: 0;
}
.hb-logo img { width: 20px; height: 20px; object-fit: contain; }
.hb-name {
	font-size: 12.5px;
	font-weight: 900;
	color: #fff;
	letter-spacing: .5px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.lang-btn { font-size: 11px !important; font-weight: 900; letter-spacing: .5px; }

/* Anillo del cargador */
.loader-box { position: relative; }
.loader-ring {
	position: absolute;
	top: -22px;
	left: 50%;
	width: 120px;
	height: 120px;
	margin-left: -60px;
	border: 2px solid transparent;
	border-top-color: var(--emerald);
	border-right-color: var(--blue);
	border-radius: 50%;
	animation: cecoSpin 1.4s linear infinite;
}
.loader-logo img { width: 46px; height: 46px; object-fit: contain; }
@keyframes cecoSpin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════════════════════════
   18. v30.2 — INVENTARIO CON FOTO
   ══════════════════════════════════════════════════════════════════ */

.inv-grid, .att-grid, .rec-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 12px;
}

.inv-tile {
	background: var(--bg-1);
	border: 1px solid var(--stroke);
	border-radius: var(--radius);
	overflow: hidden;
	cursor: pointer;
	transition: transform var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
}
.inv-tile:hover {
	transform: translateY(-3px);
	border-color: var(--stroke-2);
	box-shadow: 0 14px 34px rgba(0, 0, 0, .4);
}
.inv-tile.low { border-color: rgba(230, 95, 58, .45); }

.it-img {
	position: relative;
	height: 118px;
	background: var(--bg-2);
	display: grid;
	place-items: center;
}
.it-img img { width: 100%; height: 100%; object-fit: cover; }
.ic-empty { font-size: 40px; opacity: .55; }

.it-badge {
	position: absolute;
	top: 8px;
	left: 8px;
	border-radius: 999px;
	padding: 3px 9px;
	font-size: 9.5px;
	font-weight: 800;
	letter-spacing: .3px;
	background: rgba(28, 23, 18, .88);
	color: var(--text);
	backdrop-filter: blur(6px);
}
.it-badge.green { background: rgba(158, 196, 79, .9); color: #1a1209; }
.it-badge.red { background: rgba(230, 95, 58, .9); color: #fff; }
.it-badge.money { background: rgba(255, 140, 26, .16); color: var(--accent); font-size: 11px; }
.it-corner { position: absolute; top: 8px; right: 8px; font-size: 15px; }

.it-body { padding: 10px 12px 12px; }
.it-body h4 {
	font-size: 13px;
	margin: 0 0 2px;
	display: -webkit-box;
	-webkit-line-clamp: 1;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.it-body p { font-size: 10.5px; color: var(--muted); margin: 0 0 6px; font-family: var(--font-mono); }
.it-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 10px; color: var(--text-2); }

.hero-empty {
	height: 130px;
	display: grid;
	place-items: center;
	font-size: 54px;
	background: var(--bg-2);
	border: 1px solid var(--stroke);
	border-radius: var(--radius);
	margin-bottom: 14px;
	opacity: .6;
}

/* Barra de stock */
.stock-bar {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	background: var(--bg-2);
	border: 1px solid var(--stroke);
	border-radius: var(--radius);
	padding: 12px;
	margin-bottom: 14px;
}
.stock-bar div { text-align: center; }
.stock-bar b { display: block; font-size: 26px; font-weight: 900; color: var(--emerald); line-height: 1; }
.stock-bar span { font-size: 10px; color: var(--muted); }
.stock-bar.low b { color: var(--red); }
.stock-bar .mini-btn { width: 40px; height: 40px; font-size: 18px; border-radius: 2px; }

/* Importe del recibo */
.amount-hero {
	background: linear-gradient(135deg, var(--accent-soft), transparent);
	border: 1px solid rgba(255, 140, 26, .3);
	border-radius: var(--radius);
	padding: 16px;
	text-align: center;
	margin-bottom: 14px;
}
.amount-hero span { display: block; font-size: 10px; color: var(--muted); letter-spacing: 1px; }
.amount-hero b { display: block; font-size: 32px; font-weight: 900; color: var(--emerald); line-height: 1.1; }
.amount-hero i { font-size: 11px; color: var(--text-2); font-style: normal; }

/* Enlaces con foto real */
.link-row { display: flex; flex-wrap: wrap; gap: 8px; }
.mini-link {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	background: var(--bg-2);
	border: 1px solid var(--stroke);
	border-radius: 999px;
	padding: 5px 12px 5px 5px;
	color: var(--text);
	font-family: inherit;
	font-size: 11.5px;
	font-weight: 700;
	cursor: pointer;
}
.mini-link:hover { border-color: var(--emerald); }
.mini-link img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.ml-icon { width: 26px; height: 26px; display: grid; place-items: center; font-size: 14px; }

.link-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
	gap: 9px;
	margin-bottom: 6px;
}
.link-tile {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 5px;
	background: var(--bg-2);
	border: 1px solid var(--stroke);
	border-radius: var(--radius-sm);
	padding: 10px 7px;
	color: var(--text-2);
	font-family: inherit;
	cursor: pointer;
	text-align: center;
	transition: transform var(--t-fast), border-color var(--t-fast);
}
.link-tile:hover { transform: translateY(-2px); border-color: var(--emerald); }
.link-tile.low { border-color: rgba(230, 95, 58, .4); }
.link-tile img { width: 52px; height: 52px; border-radius: 2px; object-fit: cover; }
.lt-icon { width: 52px; height: 52px; display: grid; place-items: center; font-size: 26px; }
.link-tile b {
	font-size: 11px;
	color: #fff;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.link-tile span { font-size: 9.5px; color: var(--muted); }
.link-grid.docs .lt-icon { font-size: 30px; }

/* Formularios en rejilla */
.form-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 0 12px;
}
.form-grid .field.wide { grid-column: 1 / -1; }

.photo-block { margin-top: 6px; }
.thumb-main {
	position: absolute;
	bottom: -4px;
	left: 50%;
	transform: translateX(-50%);
	background: var(--emerald);
	color: #1a1209;
	font-size: 8px;
	font-weight: 800;
	border-radius: 4px;
	padding: 1px 5px;
	letter-spacing: .3px;
}

.note-box {
	background: var(--bg-2);
	border-left: 3px solid var(--stroke-2);
	border-radius: 2px;
	padding: 11px 13px;
	font-size: 12.5px;
	color: var(--text-2);
	line-height: 1.7;
	margin: 0 0 12px;
}

.ocr-details { margin-top: 12px; }
.ocr-details summary { cursor: pointer; font-size: 11.5px; color: var(--muted); }
.tab.danger.active { background: var(--red-soft); border-color: var(--red); color: #fca5a5; }
.hint.ok { background: var(--emerald-soft); border-left-color: var(--emerald); color: var(--emerald); }

/* ══════════════════════════════════════════════════════════════════
   19. v30.2 — FICHA DE MAQUINA CON PESTANAS
   ══════════════════════════════════════════════════════════════════ */

/* ⚠️ overflow-y: auto, NUNCA hidden.
   Con hidden la ficha se quedaba cortada y no habia manera de bajar
   a ver mantenimiento, filtros ni el historial. Las esquinas se
   recortan igual de bien con auto. */
.modal-machine {
	padding: 0 !important;
	overflow-y: auto;
	overflow-x: hidden;
	-webkit-overflow-scrolling: touch;
}

.mm-hero { position: relative; height: 190px; background: var(--bg-2); }
.mm-photo { width: 100%; height: 100%; object-fit: cover; }
.mm-hero-fade {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(19, 16, 12, .12) 0%, rgba(19, 16, 12, .6) 55%, var(--bg-1) 100%);
}
.modal-close.floating {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 3;
	background: rgba(19, 16, 12, .75);
	backdrop-filter: blur(6px);
}
.mm-hero-text { position: absolute; left: 16px; right: 16px; bottom: 12px; }
.mm-hero-text h3 { font-size: 26px; margin: 4px 0 2px; letter-spacing: -.5px; }
.mm-hero-text p { font-size: 12px; color: var(--text-2); margin: 0; }
.mm-badge {
	display: inline-block;
	border-radius: 999px;
	padding: 3px 10px;
	font-size: 9.5px;
	font-weight: 800;
	letter-spacing: .5px;
	background: rgba(255, 140, 26, .85);
	color: #1a1209;
}
.mm-badge.critical { background: rgba(230, 95, 58, .9); color: #fff; }
.mm-badge.soon { background: rgba(232, 181, 60, .9); color: #1a1206; }
.mm-badge.out { background: rgba(100, 116, 139, .9); color: #fff; }

.mm-stats {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1px;
	background: var(--stroke);
	border-bottom: 1px solid var(--stroke);
}
.mms { background: var(--bg-1); padding: 11px 6px; text-align: center; }
.mms b { display: block; font-size: 15px; color: #fff; line-height: 1.2; }
.mms span { font-size: 9px; color: var(--muted); letter-spacing: .3px; }
.mms.overdue b { color: var(--red); }
.mms.soon b { color: var(--amber); }
.mms.ok b { color: var(--emerald); }

.mm-actions {
	display: flex;
	gap: 7px;
	overflow-x: auto;
	padding: 12px 14px;
	-webkit-overflow-scrolling: touch;
	border-bottom: 1px solid var(--stroke);
}

.mm-tabs {
	display: flex;
	gap: 4px;
	overflow-x: auto;
	padding: 0 10px;
	background: var(--bg-2);
	border-bottom: 1px solid var(--stroke);
	-webkit-overflow-scrolling: touch;
}
.mm-tab {
	background: transparent;
	border: none;
	border-bottom: 3px solid transparent;
	color: var(--muted);
	font-family: inherit;
	font-size: 11.5px;
	font-weight: 700;
	padding: 11px 10px;
	white-space: nowrap;
	cursor: pointer;
}
.mm-tab.active { color: var(--emerald); border-bottom-color: var(--emerald); }
.mm-tab span { margin-left: 3px; }

.mm-body { padding: 16px 16px 20px; }

/* Escalones dentro de la ficha */
.mini-tiers { display: grid; gap: 7px; }
.mini-tier {
	display: grid;
	grid-template-columns: 24px 1fr 70px 52px auto;
	align-items: center;
	gap: 9px;
	background: var(--bg-2);
	border: 1px solid var(--stroke);
	border-radius: var(--radius-sm);
	padding: 9px 11px;
}
.mt-icon { font-size: 15px; }
.mt-info b { display: block; font-size: 11.5px; color: var(--text); }
.mt-info span { font-size: 9.5px; color: var(--muted); }
.mt-bar { height: 6px; background: var(--bg-0); border-radius: 3px; overflow: hidden; }
.mt-bar i { display: block; height: 100%; background: var(--emerald); }
.mini-tier.soon .mt-bar i { background: var(--amber); }
.mini-tier.overdue .mt-bar i { background: var(--red); }
.mt-remain { font-size: 11px; text-align: right; color: var(--muted); }
.mini-tier.soon .mt-remain { color: var(--amber); }
.mini-tier.overdue { border-color: rgba(230, 95, 58, .4); background: rgba(230, 95, 58, .08); }
.mini-tier.overdue .mt-remain { color: var(--red); font-weight: 800; }

/* Niveles de fluidos */
.fluid-list { display: grid; gap: 7px; }
.fluid-row {
	display: grid;
	grid-template-columns: 130px 1fr 42px;
	align-items: center;
	gap: 10px;
	font-size: 11.5px;
	color: var(--text-2);
}
.fluid-track { height: 8px; background: var(--bg-2); border-radius: 4px; overflow: hidden; }
.fluid-track i { display: block; height: 100%; background: var(--emerald); border-radius: 4px; }
.fluid-track i.mid { background: var(--amber); }
.fluid-track i.low { background: var(--red); }
.fluid-row b { text-align: right; color: #fff; font-size: 11.5px; }

.fchip {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	background: var(--emerald-soft);
	color: var(--emerald);
	border-radius: 999px;
	padding: 3px 9px;
	font-size: 10px;
	font-weight: 700;
}
.fchip.mid { background: var(--amber-soft); color: var(--amber); }
.fchip.low { background: var(--red-soft); color: #fca5a5; }
.ac-fluids { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }

.fc-atts {
	position: absolute;
	bottom: 8px;
	right: 8px;
	background: rgba(28, 23, 18, .88);
	border-radius: 999px;
	padding: 2px 8px;
	font-size: 9.5px;
	color: var(--text-2);
	backdrop-filter: blur(6px);
}

.ac-arrow { color: var(--muted); margin: 0 3px; }
.ac-status { font-weight: 800; }
.ac-hours { color: var(--text-2); font-size: 10.5px; }
.activity-card.inspection { border-left-color: var(--cyan); }

/* ══════════════════════════════════════════════════════════════════
   20. v30.2 — INSPECCIONES
   ══════════════════════════════════════════════════════════════════ */

.insp-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.insp-actions .btn { width: auto; padding: 10px 16px; }

.insp-card { cursor: pointer; transition: border-color var(--t-fast), transform var(--t-fast); }
.insp-card:hover { transform: translateY(-2px); border-left-color: var(--cyan); }
.insp-head { display: flex; align-items: center; gap: 10px; }
.insp-photo { width: 44px; height: 44px; border-radius: 2px; object-fit: cover; flex-shrink: 0; }
.insp-icon {
	width: 44px;
	height: 44px;
	border-radius: 2px;
	background: var(--bg-2);
	display: grid;
	place-items: center;
	font-size: 20px;
	flex-shrink: 0;
}
.insp-head > div { flex: 1; min-width: 0; }
.insp-head b { display: block; font-size: 13px; color: #fff; }
.insp-head span { font-size: 10.5px; color: var(--muted); margin: 0; }
.insp-score {
	font-size: 13px;
	font-weight: 900;
	border-radius: 2px;
	padding: 6px 10px;
	background: var(--emerald-soft);
	color: var(--emerald);
}
.insp-score.mid { background: var(--amber-soft); color: var(--amber); }
.insp-score.low { background: var(--red-soft); color: #fca5a5; }

.check-review { display: grid; gap: 4px; }
.cr-item {
	font-size: 12px;
	padding: 7px 10px;
	border-radius: 2px;
	background: var(--bg-2);
	color: var(--text-2);
}
.cr-item.ok { background: var(--emerald-soft); color: var(--emerald); }
.cr-item.no { opacity: .55; }

/* ══════════════════════════════════════════════════════════════════
   21. v30.2 — ETIQUETAS QR
   ══════════════════════════════════════════════════════════════════ */

.qr-preview { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-bottom: 14px; }
.qr-label-card {
	width: 236px;
	background: #fff;
	border: 3px solid #000;
	border-radius: 2px;
	padding: 12px 10px;
	text-align: center;
}
.qr-label-card.purple { border-color: #5b21b6; }
.qlc-head {
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 1.4px;
	text-transform: uppercase;
	color: #000;
	border-bottom: 2px solid #000;
	padding-bottom: 6px;
	margin-bottom: 8px;
}
.qr-label-card.purple .qlc-head { border-color: #5b21b6; color: #5b21b6; }
.qlc-code { font-size: 26px; font-weight: 900; color: #000; letter-spacing: .5px; margin-top: 6px; line-height: 1; }
.qlc-desc { font-size: 10.5px; color: #444; min-height: 24px; padding: 2px 4px; }
.qlc-foot {
	margin-top: 8px;
	background: #000;
	color: #fff;
	font-size: 9px;
	font-weight: 800;
	letter-spacing: 1.4px;
	padding: 5px;
	border-radius: 2px;
}
.qr-label-card.purple .qlc-foot { background: #5b21b6; }

/* ══════════════════════════════════════════════════════════════════
   22. v30.2 — RESPONSIVE
   ══════════════════════════════════════════════════════════════════ */

@media (max-width: 1023px) {
	.header-brand { display: flex; }
	.header-title { display: none; }
}

@media (max-width: 700px) {
	.command-hero { grid-template-columns: 1fr; }
	.quick-actions { grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); }
	.mm-stats { grid-template-columns: repeat(2, 1fr); }
	.mm-hero { height: 158px; }
	.mm-hero-text h3 { font-size: 21px; }
	.inv-grid, .att-grid, .rec-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 9px; }
	.it-img { height: 96px; }
	.link-grid { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); }
	.link-tile img, .lt-icon { width: 44px; height: 44px; }
	.mini-tier { grid-template-columns: 20px 1fr 46px 44px auto; gap: 6px; padding: 8px; }
	.mt-info span { display: none; }
	.fluid-row { grid-template-columns: 96px 1fr 38px; }
}

/* ══ 23. FIX: alturas de las fotos de cabecera ═════════════════
   La regla general "img { height:auto }" del reset ganaba por
   especificidad y estiraba las fotos fuera de su marco.
   ══════════════════════════════════════════════════════════════ */

.ceco-app .mm-hero .mm-photo { width: 100%; height: 100%; object-fit: cover; }
.ceco-app .machine-hero .machine-photo { width: 100%; height: 190px; object-fit: cover; }
.ceco-app .it-img img { width: 100%; height: 100%; object-fit: cover; }
.ceco-app .fc-img img { width: 100%; height: 100%; object-fit: cover; }
.ceco-app .link-tile img { width: 52px; height: 52px; object-fit: cover; }
.ceco-app .mini-link img { width: 26px; height: 26px; object-fit: cover; }
.ceco-app .insp-photo { width: 44px; height: 44px; object-fit: cover; }
.ceco-app .ac-photo { width: 52px; height: 52px; object-fit: cover; }
.ceco-app .rec-photo, .ceco-app .inv-photo { width: 46px; height: 46px; object-fit: cover; }
.ceco-app .thumbs img { width: 62px; height: 62px; object-fit: cover; }
.ceco-app .gallery img { width: 58px; height: 58px; object-fit: cover; }
.ceco-app .gallery.big img { width: 110px; height: 110px; object-fit: cover; }
.ceco-app .user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ceco-app .hb-logo img { width: 20px; height: 20px; object-fit: contain; }
.ceco-app .loader-logo img { width: 46px; height: 46px; object-fit: contain; }

/* ══════════════════════════════════════════════════════════════════
   24. v30.4 — ETIQUETA QR LIMPIA (igual a las calcomanias pegadas)
   ══════════════════════════════════════════════════════════════════ */

.qr-label-card {
	width: 260px;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 2px;
	padding: 16px 12px 14px;
	text-align: center;
}
.qlc-code {
	font-size: 22px;
	font-weight: 900;
	color: #111;
	letter-spacing: -.3px;
	line-height: 1.15;
	margin-bottom: 2px;
}
.qlc-desc {
	font-size: 11px;
	color: #555;
	min-height: 16px;
	margin-bottom: 8px;
	padding: 0 4px;
}
.qlc-foot {
	margin-top: 8px;
	background: transparent;
	color: #111;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0;
	padding: 0;
	border-radius: 0;
}
.qlc-head { display: none; }

.qr-actions { flex-wrap: wrap; }
.qr-actions .btn { flex: 1 1 120px; }

/* Tabla de verificacion de QR */
.qr-check .url a { color: #93c5fd; font-family: var(--font-mono); font-size: 11px; }
.qr-check tr.bad td { background: var(--red-soft); }

/* ══════════════════════════════════════════════════════════════════
   25. v30.4 — SIN CAMARA EN PC
   ══════════════════════════════════════════════════════════════════ */

body.ceco-desktop .scan-fab { display: none; }
body.ceco-desktop .app-header .icon-btn.primary::after { content: none; }

/* ══════════════════════════════════════════════════════════════════
   26. v30.4 — UBICACION MANUAL
   ══════════════════════════════════════════════════════════════════ */

.loc-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }

.loc-map {
	height: 280px;
	border-radius: var(--radius);
	overflow: hidden;
	border: 1px solid var(--stroke-2);
	background: var(--bg-2);
	margin-bottom: 12px;
}

/* ══════════════════════════════════════════════════════════════════
   27. v30.4 — CALENDARIO
   ══════════════════════════════════════════════════════════════════ */

.cal-layout {
	display: grid;
	grid-template-columns: 1fr minmax(240px, 320px);
	gap: 14px;
	align-items: start;
}

.cal-head {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	margin-bottom: 12px;
}
.cal-head h4 {
	flex: 1;
	margin: 0;
	font-size: 16px;
	text-transform: capitalize;
	min-width: 140px;
}
.cal-head .cal-add { width: auto; padding: 8px 14px; font-size: 12px; }

.cal-week {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
	margin-bottom: 4px;
}
.cal-week span {
	text-align: center;
	font-size: 10px;
	color: var(--muted);
	letter-spacing: .5px;
	text-transform: uppercase;
}

.cal-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
}
.cal-cell {
	min-height: 64px;
	background: var(--bg-2);
	border: 1px solid var(--stroke);
	border-radius: 2px;
	padding: 5px 6px;
	cursor: pointer;
	transition: border-color var(--t-fast), transform var(--t-fast);
}
.cal-cell:hover { border-color: var(--stroke-2); transform: translateY(-1px); }
.cal-cell.empty { background: transparent; border-color: transparent; cursor: default; }
.cal-cell.empty:hover { transform: none; }
.cal-cell.today { border-color: var(--emerald); box-shadow: inset 0 0 0 1px var(--emerald); }
.cal-cell.has { background: var(--bg-3); }

.cal-num { font-size: 11.5px; font-weight: 700; color: var(--text-2); }
.cal-cell.today .cal-num { color: var(--emerald); }

.cal-dots { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 4px; }
.cal-dot {
	display: inline-grid;
	place-items: center;
	width: 17px;
	height: 17px;
	border-radius: 5px;
	font-size: 9px;
	background: var(--blue-soft);
}
.cal-dot.service { background: var(--emerald-soft); }
.cal-dot.inspection { background: rgba(95, 168, 160, .18); }
.cal-dot.incident { background: var(--red-soft); }
.cal-dot.planned { background: var(--amber-soft); }
.cal-dot.done { background: var(--emerald-soft); }
.cal-more { font-size: 9px; color: var(--muted); align-self: center; }

.cal-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 12px;
	font-size: 10.5px;
	color: var(--muted);
}
.cal-legend span { display: flex; align-items: center; gap: 4px; }
.cal-legend i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }

/* Dia abierto */
.day-list { display: grid; gap: 7px; }
.day-item {
	display: flex;
	align-items: center;
	gap: 10px;
	background: var(--bg-2);
	border: 1px solid var(--stroke);
	border-left: 3px solid var(--blue);
	border-radius: var(--radius-sm);
	padding: 9px 11px;
	cursor: pointer;
}
.day-item.service { border-left-color: var(--emerald); }
.day-item.inspection { border-left-color: var(--cyan); }
.day-item.incident { border-left-color: var(--red); }
.day-item.planned { border-left-color: var(--amber); }
.day-item.done { border-left-color: var(--emerald); opacity: .7; }
.day-item > div { flex: 1; min-width: 0; }
.di-icon { font-size: 18px; }
.day-item b { display: block; font-size: 12.5px; color: #fff; }
.day-item span { font-size: 11.5px; color: var(--text-2); }
.day-item i { display: block; font-size: 10.5px; color: var(--muted); font-style: normal; }

/* Lista de programados */
.plan-row {
	display: grid;
	grid-template-columns: 78px 1fr auto;
	align-items: center;
	gap: 8px;
	padding: 8px 0;
	border-bottom: 1px solid var(--stroke);
	font-size: 11.5px;
}
.plan-row:last-child { border-bottom: none; }
.plan-row b { color: var(--text-2); font-family: var(--font-mono); font-size: 10.5px; }
.plan-row span { color: #fff; font-weight: 700; cursor: pointer; }
.plan-row i { grid-column: 1 / -1; font-style: normal; color: var(--muted); font-size: 10.5px; }
.plan-row.late b { color: var(--red); }

@media (max-width: 900px) {
	.cal-layout { grid-template-columns: 1fr; }
	.cal-cell { min-height: 54px; padding: 4px; }
	.cal-dot { width: 14px; height: 14px; font-size: 8px; }
}

/* ══════════════════════════════════════════════════════════════════
   [28] 📊 TABLAS DE DATOS
   Las usan: registro de horas, verificacion de QR, lista de compras
   y la pantalla de unidades. Antes se dibujaban sin estilo.
   ══════════════════════════════════════════════════════════════════ */

.ceco-app .table-wrap {
	overflow-x: auto;                 /* En movil se desliza a los lados */
	-webkit-overflow-scrolling: touch;
	border: 1px solid var(--stroke);
	border-radius: var(--radius-sm);
	background: var(--bg-1);
}

.ceco-app .data-table {
	width: 100%;
	min-width: 460px;
	border-collapse: collapse;
	font-size: 12.5px;
}

.ceco-app .data-table thead th {
	position: sticky;
	top: 0;
	z-index: 2;
	background: var(--bg-2);
	color: var(--text-2);
	text-align: left;
	font-size: 10.5px;
	letter-spacing: .06em;
	text-transform: uppercase;
	font-weight: 800;
	padding: 9px 10px;
	white-space: nowrap;
	border-bottom: 1px solid var(--stroke-2);
}

.ceco-app .data-table td {
	padding: 9px 10px;
	border-bottom: 1px solid var(--stroke);
	color: var(--text-2);
	vertical-align: middle;
}

.ceco-app .data-table tbody tr:last-child td { border-bottom: none; }
.ceco-app .data-table tbody tr:hover { background: var(--blue-soft); }
.ceco-app .data-table td b { color: #fff; }
.ceco-app .data-table td small { color: var(--muted); font-size: 10.5px; }

.ceco-app .data-table .num {
	text-align: right;
	font-family: var(--font-mono);
	white-space: nowrap;
}

.ceco-app .data-table select {
	width: 100%;
	min-width: 120px;
	padding: 6px 8px;
	background: var(--bg-0);
	border: 1px solid var(--stroke-2);
	border-radius: 2px;
	color: #fff;
	font-size: 12px;
}

/* Semaforo dentro de tablas */
.ceco-app .data-table .ok  { color: var(--emerald); font-weight: 700; }
.ceco-app .data-table .bad { color: var(--red);     font-weight: 700; }

/* ══════════════════════════════════════════════════════════════════
   [29] 📏 UNIDADES DE MEDIDA (horas / millas / fechas)
   ══════════════════════════════════════════════════════════════════ */

/* Nota chica debajo de un campo del formulario. */
.ceco-app .field-hint {
	display: block;
	margin-top: 5px;
	color: var(--muted);
	font-size: 10.5px;
	line-height: 1.4;
}

/* Etiqueta de las maquinas que se controlan por fecha (trailers). */
.ceco-app b.unit-days {
	color: var(--amber);
	font-size: 11px;
	font-weight: 800;
	white-space: nowrap;
}

.ceco-app .maint-hours b.unit-days { font-size: 11px; }

/* ══════════════════════════════════════════════════════════════════
   [30] 🧾 ORDENES DE TRABAJO  (v31)
   ══════════════════════════════════════════════════════════════════ */

.ceco-app .wo-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 12px;
}

.ceco-app .wo-card {
	background: var(--bg-2);
	border: 1px solid var(--stroke);
	border-left: 4px solid var(--muted);
	border-radius: var(--radius);
	padding: 12px 13px;
	cursor: pointer;
	transition: transform .12s ease, border-color .12s ease;
}

.ceco-app .wo-card:hover { transform: translateY(-2px); border-color: var(--stroke-2); }

/* El color del borde dice en que va el trabajo, de un vistazo. */
.ceco-app .wo-card.open     { border-left-color: var(--red); }
.ceco-app .wo-card.progress { border-left-color: var(--amber); }
.ceco-app .wo-card.waiting  { border-left-color: var(--blue); }
.ceco-app .wo-card.done     { border-left-color: var(--emerald); opacity: .72; }

.ceco-app .wo-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 6px;
}

.ceco-app .wo-status {
	font-size: 10.5px;
	font-weight: 800;
	letter-spacing: .04em;
	color: var(--text-2);
}

.ceco-app .wo-date {
	font-size: 10.5px;
	color: var(--muted);
	font-family: var(--font-mono);
}

.ceco-app .wo-card h4 { font-size: 14px; margin: 0 0 5px; }

.ceco-app .wo-machine {
	font-size: 11.5px;
	color: var(--text-2);
	margin: 0 0 6px;
}

.ceco-app .wo-urgent {
	color: var(--red);
	font-weight: 800;
	font-size: 10px;
	letter-spacing: .05em;
}

.ceco-app .wo-notes {
	font-size: 11px;
	color: var(--muted);
	margin: 0 0 8px;
	line-height: 1.45;
}

.ceco-app .wo-foot {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	font-size: 10.5px;
	color: var(--muted);
	border-top: 1px solid var(--stroke);
	padding-top: 7px;
}

/* ══════════════════════════════════════════════════════════════════
   [31] 📄 PAPELES QUE VENCEN  (v31)
   ══════════════════════════════════════════════════════════════════ */

.ceco-app .doc-row {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 11px;
	margin-bottom: 5px;
	background: var(--bg-2);
	border-radius: var(--radius-sm);
	border-left: 3px solid var(--stroke-2);
}

.ceco-app .doc-row.soon    { border-left-color: var(--amber); }
.ceco-app .doc-row.overdue { border-left-color: var(--red); background: var(--red-soft); }

.ceco-app .doc-icon { font-size: 17px; line-height: 1; }

.ceco-app .doc-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ceco-app .doc-info b { color: #fff; font-size: 12px; }
.ceco-app .doc-info span { color: var(--muted); font-size: 10.5px; }
.ceco-app .doc-row.overdue .doc-info span { color: #fca5a5; font-weight: 700; }

/* ══════════════════════════════════════════════════════════════════
   [32] 📝 FILAS DE CAMPOS EN LOS FORMULARIOS  (v31)
   Dos campos cortos uno al lado del otro (fecha + numero, etc.).
   En movil se apilan solos.
   ══════════════════════════════════════════════════════════════════ */

.ceco-app .field-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.ceco-app .field-row.wrap {
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

@media (max-width: 520px) {
	.ceco-app .field-row { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════════════════
   [33] 📡 REPORTES ESPERANDO SENAL  (v31)
   El globito rojo de la cabecera con los reportes guardados en el
   telefono que todavia no se han podido mandar.
   ══════════════════════════════════════════════════════════════════ */

.ceco-app .offline-badge {
	display: none;
	align-items: center;
	justify-content: center;
	min-width: 26px;
	height: 26px;
	padding: 0 7px;
	border: none;
	border-radius: 13px;
	background: var(--amber);
	color: #241700;
	font-weight: 900;
	font-size: 12px;
	cursor: pointer;
	animation: cecoPulse 1.8s ease-in-out infinite;
}

@keyframes cecoPulse {
	0%, 100% { box-shadow: 0 0 0 0 rgba(232, 181, 60, .55); }
	50%      { box-shadow: 0 0 0 7px rgba(232, 181, 60, 0); }
}

/* ══════════════════════════════════════════════════════════════════
   [34] 🏷️ ETIQUETA QR DE ADITAMENTOS  (v31)
   Misma pinta que las de las maquinas, pero mas chica: van pegadas
   en un bucket o en un martillo.
   ══════════════════════════════════════════════════════════════════ */

.ceco-app .qr-card {
	width: 224px;
	background: #fff;
	border: 3px solid #000;
	border-radius: 2px;
	padding: 12px 10px;
	text-align: center;
}

.ceco-app .qr-code-text {
	font-size: 17px;
	font-weight: 900;
	color: #000;
	line-height: 1.05;
	letter-spacing: -.4px;
}

.ceco-app .qr-desc-text { font-size: 10.5px; color: #555; margin-top: 3px; }

.ceco-app .qr-card img {
	width: 158px;
	height: 158px;
	margin: 9px auto 6px;
	display: block;
}

.ceco-app .qr-foot-text { font-size: 9px; font-weight: 800; color: #000; letter-spacing: .02em; }

/* Boton de borrar chiquito dentro de las tablas. */
.ceco-app .btn-danger.mini {
	padding: 3px 7px;
	font-size: 11px;
	border-radius: 2px;
}

/* ══════════════════════════════════════════════════════════════════
   [35] 🧩 SISTEMAS DE LA MAQUINA  (v32)
   Las casillas de "que tiene esta maquina". De aqui sale que fluidos
   se le piden, que se le revisa y que filtros usa.
   ══════════════════════════════════════════════════════════════════ */

.ceco-app .sys-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 8px;
	margin-bottom: 4px;
}

.ceco-app .sys-item {
	display: grid;
	grid-template-columns: auto auto minmax(0, 1fr);
	align-items: center;
	gap: 9px;
	padding: 10px 12px;
	background: var(--bg-2);
	border: 1px solid var(--stroke);
	border-radius: var(--radius-sm);
	cursor: pointer;
	/* 44px de alto minimo: se marca con el dedo con guante puesto. */
	min-height: 44px;
	transition: border-color .12s ease, background .12s ease;
}

.ceco-app .sys-item:hover { border-color: var(--stroke-2); }

/* Marcado = verde. Se ve de un vistazo que tiene la maquina. */
.ceco-app .sys-item.on {
	background: var(--emerald-soft);
	border-color: rgba(255, 140, 26, .45);
}

.ceco-app .sys-item input {
	width: 18px;
	height: 18px;
	accent-color: var(--emerald);
	margin: 0;
	flex-shrink: 0;
}

.ceco-app .sys-icon { font-size: 17px; line-height: 1; }

.ceco-app .sys-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ceco-app .sys-text b { color: #fff; font-size: 12.5px; font-weight: 700; }
.ceco-app .sys-text small { color: var(--muted); font-size: 10.5px; line-height: 1.35; }
.ceco-app .sys-item.on .sys-text b { color: var(--emerald); }

@media (max-width: 520px) {
	.ceco-app .sys-grid { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════════════════
   [36] 🧾 RECIBOS POR LOTE  (v33)
   Un borrador por foto, con semaforo de confianza en cada campo.
   ══════════════════════════════════════════════════════════════════ */

/* Zona de subida grande: se toca con guante puesto. */
.ceco-app .photo-upload.big { padding: 26px 18px; }

/* ── Barra de progreso del OCR ── */
.ceco-app .batch-bar {
	height: 6px;
	background: var(--bg-2);
	border-radius: 3px;
	overflow: hidden;
	margin: 12px 0 6px;
}
.ceco-app .batch-bar i {
	display: block;
	height: 100%;
	background: var(--emerald);
	transition: width .3s ease;
}
.ceco-app .batch-note { font-size: 12px; color: var(--muted); margin: 0 0 10px; }
.ceco-app .batch-note.done { color: var(--emerald); font-weight: 600; }

/* ── Tarjeta de borrador ── */
.ceco-app .batch-card {
	background: var(--bg-2);
	border: 1px solid var(--stroke);
	border-radius: var(--radius);
	padding: 12px 13px;
	margin-bottom: 12px;
}

.ceco-app .bc-top {
	display: grid;
	grid-template-columns: 64px minmax(0, 1fr);
	gap: 11px;
	align-items: start;
	margin-bottom: 10px;
}

.ceco-app .bc-top img {
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: var(--radius-sm);
	border: 1px solid var(--stroke-2);
	cursor: zoom-in;
}

.ceco-app .bc-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}
.ceco-app .bc-head b { color: #fff; font-size: 13px; }

.ceco-app .bc-form { gap: 9px; }

/* ── Semaforo de confianza ── */
.ceco-app i.cf {
	display: inline-block;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	vertical-align: middle;
	margin-left: 3px;
}
.ceco-app i.cf.ok { background: var(--emerald); }
.ceco-app i.cf.guess { background: var(--amber); }

.ceco-app .batch-warn {
	font-size: 11.5px;
	color: var(--amber);
	background: var(--amber-soft);
	border-radius: 2px;
	padding: 6px 9px;
	margin: 0 0 9px;
	line-height: 1.4;
}

@media (max-width: 520px) {
	.ceco-app .bc-form { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════════════════
   RECIBOS POR LOTES (v50) — los lee el servidor
   ──────────────────────────────────────────────────────────────────
   La pantalla ensena primero los que hay que mirar y deja los
   comprobados plegados en una linea. ✏️ Para que salgan todos
   abiertos siempre, pon verBuenos en true en 12-receipts.js.
   ══════════════════════════════════════════════════════════════════ */

/* ── El resumen: cuantos van bien y cuantos hay que mirar ── */
.ceco-app .rx-resumen {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 14px 0 6px;
}
.ceco-app .rx-chip {
	font-family: var(--font-head);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	padding: 5px 11px;
	border-radius: 2px;
	border: 1px solid transparent;
}
.ceco-app .rx-chip.ok {
	color: var(--emerald);
	background: var(--emerald-soft);
	border-color: var(--emerald);
}
.ceco-app .rx-chip.warn {
	color: var(--amber);
	background: var(--amber-soft);
	border-color: var(--amber);
}

/* ── Los encabezados de cada grupo ── */
.ceco-app .rx-titulo {
	font-family: var(--font-head);
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .07em;
	text-transform: uppercase;
	color: var(--text-2);
	margin: 20px 0 10px;
	padding-bottom: 7px;
	border-bottom: 1px solid var(--stroke);
	display: flex;
	align-items: center;
	gap: 9px;
}

/* ── Los comprobados, plegados: una linea cada uno ──
   ⚠️ Esto es lo que evita tener que ir uno por uno: de un vistazo
   se ve negocio, fecha e importe de los 38. */
.ceco-app .rx-lista-corta {
	border: 1px solid var(--stroke);
	border-radius: 2px;
	overflow: hidden;
}
.ceco-app .rx-fila {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto auto;
	gap: 10px;
	align-items: center;
	padding: 9px 11px;
	border-bottom: 1px solid var(--stroke);
	font-size: 13px;
}
.ceco-app .rx-fila:last-child { border-bottom: 0; }
.ceco-app .rx-fila:nth-child(odd) { background: rgba(242, 236, 224, .022); }
.ceco-app .rx-fila b {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.ceco-app .rx-fila span {
	font-family: var(--font-mono);
	font-size: 12px;
	color: var(--muted);
}
.ceco-app .rx-fila .rx-total {
	color: var(--text);
	font-weight: 600;
	min-width: 72px;
	text-align: right;
}

/* ── LA PRUEBA DE LA SUMA ──
   Si subtotal + impuesto da el total, el total esta bien leido.
   Es la mejor comprobacion que hay sin mirar el papel. */
.ceco-app .rx-cuentas {
	font-family: var(--font-mono);
	font-size: 11.5px;
	margin: 0 0 9px;
	padding: 6px 9px;
	border-radius: 2px;
	border-left: 2px solid var(--stroke);
}
.ceco-app .rx-cuentas.ok {
	color: var(--emerald);
	background: var(--emerald-soft);
	border-left-color: var(--emerald);
}
.ceco-app .rx-cuentas.mal {
	color: var(--amber);
	background: var(--amber-soft);
	border-left-color: var(--amber);
}

/* ── "Puedes cerrar e irte" ──
   Este aviso es media funcion: si no lo lee, se queda mirando la
   pantalla 20 minutos sin necesidad. */
.ceco-app .hint.rx-libre {
	color: var(--emerald);
	background: var(--emerald-soft);
	border-left: 2px solid var(--emerald);
	font-weight: 600;
}

/* ── Que se compro ── */
.ceco-app .rx-items {
	font-size: 12px;
	color: var(--muted);
	margin: 2px 0 0;
	line-height: 1.45;
}

/* ── Una foto que no se pudo leer ── */
.ceco-app .batch-card.rx-fallo {
	border-color: var(--red);
	background: linear-gradient(180deg, var(--red-soft), transparent 60%);
}

/* ══════════════════════════════════════════════════════════════════
   ⚠️ .btn-ghost — ESTABA USADO Y NO TENIA ESTILO
   Se usa en 4 sitios del codigo desde hace varias versiones, pero
   nunca se definio: esos botones salian con la forma base y nada
   mas, planos y sin borde. Aqui queda: boton de tercera, el que
   esta ahi pero no quieres que llame la atencion.
   ══════════════════════════════════════════════════════════════════ */
.ceco-app .btn.btn-ghost {
	background: transparent;
	color: var(--text-2);
	border: 1px solid var(--stroke);
}
.ceco-app .btn.btn-ghost:hover {
	background: var(--bg-3);
	color: var(--text);
	border-color: var(--stroke-2);
}

@media (max-width: 520px) {
	/* En el telefono la fila de un comprobado se parte en dos: el
	   nombre arriba y la fecha con el importe debajo. Si no, el
	   nombre se queda en 3 letras. */
	.ceco-app .rx-fila {
		grid-template-columns: minmax(0, 1fr) auto;
	}
	.ceco-app .rx-fila b { grid-column: 1 / -1; }
}
