body .cl-wrapper,
body .cl-wrapper * {
	box-sizing: border-box;
}

body .cl-wrapper {
	background: #0f294a;
	color: #f8fafc;
	font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	padding: 24px;
	border-radius: 14px;
	border: 1px solid #3b82f6;
	max-width: 1150px;
	margin: 20px auto;
	overflow-x: hidden;
}

.cl-gold { color: #fde047; }

.cl-badge-live {
	display: inline-block;
	background: rgba(16, 185, 129, 0.18);
	border: 1px solid #34d399;
	color: #6ee7b7;
	font-size: 11px;
	font-weight: 700;
	padding: 4px 12px;
	border-radius: 20px;
	margin-bottom: 8px;
}

.cl-header-flex {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 22px;
}

.cl-copa-logo {
	width: 72px;
	height: auto;
	flex-shrink: 0;
	object-fit: contain;
}

.cl-main-heading,
.cl-title {
	margin: 0;
	font-size: clamp(20px, 3vw, 28px);
	font-weight: 900;
	text-transform: uppercase;
	line-height: 1.2;
	color: #ffffff;
}

.cl-grid-2 {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}

.cl-col-full { grid-column: 1 / -1; }
.cl-field { min-width: 0; }

.cl-field label {
	display: block;
	font-size: 13px;
	font-weight: 700;
	color: #e0f2fe;
	margin-bottom: 6px;
}

.cl-field input[type="text"],
.cl-field input[type="email"],
.cl-field input[type="number"],
.cl-field input[type="file"],
.cl-field select {
	width: 100%;
	max-width: 100%;
	background: #1d4ed8;
	border: 1px solid #60a5fa;
	color: #ffffff;
	padding: 11px 14px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	min-height: 44px;
	color-scheme: light;
}

.cl-field input::placeholder {
	color: #bfdbfe;
}

.cl-field select option,
.cl-filtros-panel select option {
	background-color: #e0f2fe;
	color: #0f172a;
	font-weight: 600;
}

.cl-categorias-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
	margin-top: 8px;
}

.cl-cat-box {
	background: #163a6b;
	border: 1px solid #3b82f6;
	padding: 12px;
	border-radius: 8px;
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	font-weight: 700;
	font-size: 13px;
	color: #ffffff;
	min-height: 46px;
}

.cl-cat-box input[type="checkbox"] {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	accent-color: #facc15;
}

.cl-cat-box:hover { border-color: #fde047; background: #1e4985; }
.cl-cat-box input:checked + span { color: #fde047; }

.cl-garantia-box {
	margin-top: 22px;
	background: linear-gradient(90deg, #1e40af 0%, #1d4ed8 100%);
	border: 1px solid #fde047;
	border-radius: 10px;
	padding: 16px 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
}

.cl-garantia-label { font-weight: 800; font-size: 15px; display: block; color: #ffffff; }
.cl-garantia-hint { color: #dbeafe; font-size: 12px; }
.cl-garantia-monto { font-size: clamp(22px, 4vw, 28px); font-weight: 900; color: #fde047; }

.cl-pago-resumen {
	margin-top: 12px;
	background: #163a6b;
	border-left: 4px solid #34d399;
	padding: 12px 15px;
	border-radius: 6px;
	font-size: 13px;
	color: #f8fafc;
}

.cl-btn-primary {
	background: #2563eb;
	color: #ffffff;
	border: 1px solid #93c5fd;
	padding: 12px 20px;
	border-radius: 8px;
	font-weight: 800;
	cursor: pointer;
	font-size: 13px;
	text-transform: uppercase;
	min-height: 44px;
}

.cl-btn-primary:hover { background: #3b82f6; }

.cl-btn-secondary {
	background: #1e3a8a;
	color: #fde047;
	border: 1px solid #60a5fa;
	padding: 12px 18px;
	border-radius: 8px;
	font-weight: 700;
	cursor: pointer;
	font-size: 13px;
	min-height: 44px;
}

.cl-filtros-panel {
	background: #13315c;
	border: 1px solid #3b82f6;
	border-radius: 12px;
	padding: 16px;
	margin: 20px 0;
}

.cl-filtros-row {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
	gap: 12px;
}

.cl-search-input-wrap { position: relative; min-width: 0; }
.cl-search-icon { position: absolute; left: 12px; top: 12px; pointer-events: none; }

.cl-search-input-wrap input {
	width: 100%;
	padding: 11px 14px 11px 38px;
	background: #1e40af;
	border: 1px solid #60a5fa;
	border-radius: 8px;
	color: #ffffff;
	min-height: 44px;
}

.cl-search-input-wrap input::placeholder { color: #bfdbfe; }

.cl-filtros-panel select {
	width: 100%;
	background: #1e40af;
	border: 1px solid #60a5fa;
	color: #ffffff;
	padding: 11px;
	border-radius: 8px;
	font-weight: 600;
	min-height: 44px;
}

.cl-filtros-bottom {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 15px;
	padding-top: 14px;
	border-top: 1px solid #2563eb;
	font-size: 13px;
	color: #e0f2fe;
}

.cl-quick-tags {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
}

.cl-tag-sede {
	background: #1e40af;
	border: 1px solid #60a5fa;
	color: #ffffff;
	padding: 6px 12px;
	border-radius: 6px;
	cursor: pointer;
	font-size: 12px;
	font-weight: 600;
	min-height: 36px;
}

.cl-tag-mini {
	padding: 4px 9px;
	font-size: 11px;
	min-height: 28px;
	border-radius: 5px;
}

.cl-tag-sede.active,
.cl-tag-sede:hover {
	background: #2563eb;
	border-color: #fde047;
	color: #fde047;
}

.cl-tabla-clubes {
	width: 100%;
	border-collapse: collapse;
	background: #13315c;
	border-radius: 10px;
	overflow: hidden;
}

.cl-tabla-clubes th {
	text-align: left;
	padding: 14px;
	font-size: 12px;
	color: #fde047;
	background: #1a3f73;
	border-bottom: 1px solid #3b82f6;
}

.cl-tabla-clubes td {
	padding: 14px;
	border-bottom: 1px solid #254e85;
	vertical-align: middle;
}

.cl-code-pill {
	background: #1e40af;
	border: 1px solid #93c5fd;
	color: #fde047;
	padding: 5px 10px;
	border-radius: 6px;
	font-weight: 800;
	font-size: 12px;
	white-space: nowrap;
	display: inline-block;
}

.cl-club-info-cell {
	display: flex;
	align-items: center;
	gap: 12px;
}

.cl-club-mini-logo {
	width: 44px;
	height: 44px;
	border-radius: 8px;
	object-fit: cover;
	background: #ffffff;
	padding: 2px;
	border: 1px solid #93c5fd;
	flex-shrink: 0;
}

.cl-cat-pill {
	display: inline-block;
	background: #1e40af;
	border: 1px solid #60a5fa;
	color: #ffffff;
	font-size: 11px;
	font-weight: 700;
	padding: 3px 8px;
	border-radius: 5px;
	margin: 2px;
}

.cl-status-inscrito {
	background: rgba(16, 185, 129, 0.22);
	border: 1px solid #34d399;
	color: #6ee7b7;
	padding: 5px 12px;
	border-radius: 20px;
	font-size: 11px;
	font-weight: 800;
	white-space: nowrap;
	display: inline-block;
}

.cl-status-revision {
	background: rgba(245, 158, 11, 0.22);
	border: 1px solid #fbbf24;
	color: #fde047;
	padding: 5px 12px;
	border-radius: 20px;
	font-size: 11px;
	font-weight: 800;
	white-space: nowrap;
	display: inline-block;
}

.cl-btn-ficha {
	background: #2563eb;
	color: #ffffff;
	border: 1px solid #93c5fd;
	padding: 9px 14px;
	border-radius: 6px;
	font-weight: 800;
	font-size: 12px;
	cursor: pointer;
	min-height: 38px;
}

.cl-btn-ficha:hover { background: #3b82f6; }

.cl-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(15, 41, 74, 0.72);
	backdrop-filter: blur(2px);
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 12px;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.cl-modal-card {
	background: #173b6e;
	border: 2px solid #60a5fa;
	border-radius: 12px;
	width: 100%;
	max-width: 540px;
	max-height: 92vh;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	color: #ffffff;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.cl-modal-header {
	background: #1e4985;
	padding: 14px 18px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	border-bottom: 1px solid #60a5fa;
	position: sticky;
	top: 0;
	z-index: 2;
}

.cl-modal-header h3 { margin: 0; font-size: 15px; color: #ffffff; }

.cl-modal-close {
	background: #2563eb;
	border: 1px solid #93c5fd;
	color: #ffffff;
	width: 32px;
	height: 32px;
	border-radius: 6px;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.cl-modal-body { padding: 18px; }

.cl-recibo-paper {
	background: #ffffff;
	color: #0f172a;
	border-radius: 12px;
	padding: 20px;
	border: 1px solid #cbd5e1;
	font-family: system-ui, -apple-system, sans-serif;
}

.cl-recibo-top {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
}

.cl-recibo-top img {
	width: 58px;
	height: 58px;
	object-fit: contain;
}

.cl-recibo-top h4 { margin: 0; color: #1e3a8a; font-size: 17px; }
.cl-recibo-top p { margin: 2px 0; font-size: 12px; color: #475569; }

.cl-recibo-nro {
	display: inline-block;
	background: #fef08a;
	padding: 3px 8px;
	font-size: 12px;
	border-radius: 4px;
	margin-top: 4px;
}

.cl-recibo-datos p {
	margin: 5px 0;
	font-size: 13px;
	overflow-wrap: anywhere;
}

.cl-recibo-tabla {
	width: 100%;
	border-collapse: collapse;
	margin: 14px 0;
}

.cl-recibo-tabla th,
.cl-recibo-tabla td {
	border: 1px solid #e2e8f0;
	padding: 8px 10px;
	text-align: left;
	font-size: 13px;
}

.cl-recibo-tabla th {
	background: #f1f5f9;
}

.cl-recibo-tabla th:last-child,
.cl-recibo-tabla td:last-child {
	white-space: nowrap;
	width: 1%;
}

.cl-recibo-totales {
	text-align: right;
	font-size: 14px;
	line-height: 1.6;
}

.cl-recibo-totales p { margin: 4px 0; }
.cl-saldo { color: #dc2626; font-size: 14px; }

.cl-modal-footer-btns {
	padding: 14px 18px;
	background: #1e4985;
	border-top: 1px solid #60a5fa;
	display: flex;
	justify-content: flex-end;
	flex-wrap: wrap;
	gap: 10px;
}

#cl-print-recibo-host {
	display: none;
}

@media (max-width: 900px) {
	.cl-categorias-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.cl-filtros-row { grid-template-columns: 1fr 1fr; }
	.cl-search-input-wrap { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
	body .cl-wrapper {
		padding: 10px;
		margin: 8px auto;
		border-radius: 10px;
	}

	body .cl-header-flex {
		flex-direction: row;
		align-items: center;
		gap: 10px;
		margin-bottom: 12px;
	}

	body .cl-copa-logo {
		width: 40px;
	}

	body .cl-main-heading,
	body .cl-title {
		font-size: 17px;
	}

	body .cl-grid-2,
	body .cl-categorias-grid,
	body .cl-filtros-row {
		grid-template-columns: 1fr;
		gap: 8px;
	}

	body .cl-cat-box {
		padding: 8px 10px;
		min-height: 36px;
		font-size: 12px;
	}

	body .cl-garantia-box {
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
		padding: 10px 12px;
		margin-top: 12px;
	}

	body .cl-btn-primary,
	body .cl-btn-secondary {
		width: 100%;
		text-align: center;
		min-height: 38px;
		padding: 8px 12px;
		font-size: 12px;
	}

	body .cl-filtros-panel {
		padding: 10px;
		margin: 10px 0;
	}

	body .cl-filtros-bottom {
		margin-top: 8px;
		padding-top: 8px;
		gap: 6px;
		font-size: 11px;
	}

	body table.cl-tabla-clubes,
	body table.cl-tabla-clubes thead,
	body table.cl-tabla-clubes tbody,
	body table.cl-tabla-clubes th,
	body table.cl-tabla-clubes tr,
	body table.cl-tabla-clubes td {
		display: block !important;
		width: 100% !important;
		max-width: 100% !important;
	}

	body table.cl-tabla-clubes thead {
		display: none !important;
	}

	body table.cl-tabla-clubes {
		background: transparent !important;
		border-radius: 0 !important;
	}

	body table.cl-tabla-clubes tr {
		background: #13315c !important;
		border: 1px solid #3b82f6 !important;
		border-radius: 8px !important;
		padding: 8px 10px !important;
		margin-bottom: 8px !important;
	}

	body table.cl-tabla-clubes td {
		padding: 2px 0 !important;
		border: none !important;
		text-align: left !important;
		min-height: 0 !important;
	}

	body table.cl-tabla-clubes td[data-label]::before {
		display: none !important;
	}

	body .cl-code-pill {
		font-size: 10px !important;
		padding: 2px 6px !important;
	}

	body .cl-club-info-cell {
		gap: 8px !important;
	}

	body .cl-club-mini-logo {
		width: 30px !important;
		height: 30px !important;
		border-radius: 5px !important;
	}

	body .cl-club-info-cell strong {
		font-size: 13px !important;
		line-height: 1.2 !important;
	}

	body .cl-cat-pill {
		font-size: 10px !important;
		padding: 2px 6px !important;
		margin: 2px 2px 0 0 !important;
	}

	body .cl-status-inscrito,
	body .cl-status-revision {
		font-size: 10px !important;
		padding: 2px 7px !important;
		margin-top: 2px !important;
	}

	body .cl-btn-ficha {
		width: 100% !important;
		padding: 6px 8px !important;
		min-height: 32px !important;
		font-size: 11px !important;
		margin-top: 4px !important;
	}
}

@media print {
	body.cl-imprimiendo-recibo > * {
		display: none !important;
	}

	body.cl-imprimiendo-recibo > #cl-print-recibo-host {
		display: flex !important;
		justify-content: center !important;
		align-items: flex-start !important;
		position: static !important;
		width: 100% !important;
		margin: 0 auto !important;
		padding: 0 !important;
		background: #ffffff !important;
		visibility: visible !important;
	}

	body.cl-imprimiendo-recibo > #cl-print-recibo-host,
	body.cl-imprimiendo-recibo > #cl-print-recibo-host * {
		visibility: visible !important;
	}

	body.cl-imprimiendo-recibo > #cl-print-recibo-host .cl-recibo-paper {
		width: 100% !important;
		max-width: 680px !important;
		margin: 0 auto !important;
		box-shadow: none !important;
		border: 1px solid #cbd5e1 !important;
		background: #ffffff !important;
		color: #0f172a !important;
		border-radius: 8px !important;
	}

	@page {
		size: A4 portrait;
		margin: 12mm;
	}
}