/*
 * Área privada · ASDE Scouts de Balears
 * Complementa al tema Enfold: hereda tipografía, formularios y botones, y solo
 * añade lo que el tema no tiene. Colores desde las variables de Enfold.
 */

.asde-ap {
	--asde-primary: var(--enfold-main-color-primary, #632599);
	--asde-primary-dark: #421866;
	--asde-lila: #c7a2e8;
	--asde-text: var(--enfold-main-color-color, #444444);
	--asde-muted: #666666;
	--asde-border: #e1e1e1;
	--asde-radius: 6px;
	margin-bottom: 40px;
}

/* Menú */
.asde-ap .asde-nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 16px;
	margin: 0 0 24px;
	border-bottom: 2px solid var(--asde-lila);
}
.asde-ap .asde-nav__tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.asde-ap .asde-nav__tabs li {
	margin: 0;
	padding: 0;
	list-style: none;
}
.asde-ap .asde-nav__tabs a {
	display: block;
	margin-bottom: -2px;
	padding: 10px 14px;
	border-bottom: 3px solid transparent;
	color: var(--asde-primary);
	font-weight: 600;
	text-decoration: none;
}
.asde-ap .asde-nav__tabs a:hover,
.asde-ap .asde-nav__tabs a:focus-visible,
.asde-ap .asde-nav__tabs a.is-active {
	border-bottom-color: var(--asde-primary);
}
.asde-ap .asde-nav__user {
	margin: 0;
	padding: 8px 0;
	color: var(--asde-muted);
	font-size: 13px;
}

/* Tarjetas */
.asde-ap .asde-card {
	margin: 0 0 24px;
	padding: 20px 24px;
	border: 1px solid var(--asde-border);
	border-radius: var(--asde-radius);
	background: #ffffff;
}
.asde-ap .asde-card > h2:first-child,
.asde-ap .asde-card > h3:first-child {
	margin-top: 0;
}
.asde-ap .asde-card__header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	margin-bottom: 12px;
}
.asde-ap .asde-card__header--split {
	justify-content: space-between;
}
.asde-ap .asde-card__title {
	margin: 0;
}
.asde-ap .asde-card--narrow {
	max-width: 540px;
}
.asde-ap .asde-back {
	margin: 0 0 12px;
}

/* Etiquetas */
.asde-ap .asde-badge {
	display: inline-block;
	margin: 0 4px 4px 0;
	padding: 2px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.6;
	white-space: nowrap;
	vertical-align: middle;
}
.asde-ap .asde-badge--rol {
	background: #f1e9f8;
	color: var(--asde-primary-dark);
}
.asde-ap .asde-badge--estado-invitado {
	background: #fff3cd;
	color: #664d03;
}
.asde-ap .asde-badge--estado-activo {
	background: #e6f4d7;
	color: #2d4f06;
}
.asde-ap .asde-badge--estado-desactivado {
	background: #eeeeee;
	color: #555555;
}

/* Avisos */
.asde-ap .asde-notice {
	margin: 0 0 16px;
	padding: 12px 16px;
	border-left: 4px solid;
	border-radius: 4px;
}
.asde-ap .asde-notice--success {
	border-color: #5a8f00;
	background: #eef7e6;
}
.asde-ap .asde-notice--error {
	border-color: #b32d2e;
	background: #fdecea;
}
.asde-ap .asde-notice--warning {
	border-color: #c99400;
	background: #fff8e1;
}
.asde-ap .asde-notice--info {
	border-color: var(--asde-primary);
	background: #f3eefa;
}

/* Búsqueda y filtros */
.asde-ap .asde-search {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: stretch;
}
.asde-ap .asde-search input[type="search"] {
	flex: 1 1 260px;
	min-width: 0;
	margin: 0;
}
.asde-ap .asde-filter {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0 0 16px;
}
.asde-ap .asde-filter select {
	width: auto;
	margin: 0;
}
.asde-ap .asde-filter label {
	margin: 0;
	font-weight: 600;
}

/* Tablas: en móvil, cada fila pasa a ser una tarjeta */
.asde-ap .asde-table {
	width: 100%;
	border-collapse: collapse;
}
.asde-ap .asde-table th,
.asde-ap .asde-table td {
	padding: 10px 8px;
	border-bottom: 1px solid var(--asde-border);
	text-align: left;
	vertical-align: top;
}
@media (max-width: 767px) {
	.asde-ap .asde-table:not(.asde-table--informe) thead {
		display: none;
	}
	.asde-ap .asde-table:not(.asde-table--informe) tr {
		display: block;
		margin-bottom: 12px;
		padding: 8px 12px;
		border: 1px solid var(--asde-border);
		border-radius: var(--asde-radius);
	}
	.asde-ap .asde-table:not(.asde-table--informe) td {
		display: flex;
		gap: 8px;
		padding: 4px 0;
		border: 0;
		overflow-wrap: anywhere;
	}
	.asde-ap .asde-table:not(.asde-table--informe) td[data-label]:not([data-label=""])::before {
		content: attr(data-label);
		flex: 0 0 96px;
		color: var(--asde-muted);
		font-weight: 600;
	}
}

/* Banco */
.asde-ap .asde-importar {
	margin: 16px 0;
	padding: 12px 16px;
	border: 1px solid var(--asde-border);
	border-radius: var(--asde-radius);
}
.asde-ap .asde-importar summary {
	cursor: pointer;
}
.asde-ap .asde-importe {
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
	text-align: right;
}
.asde-ap .asde-importe--ingreso {
	color: #1e6b32;
	font-weight: 600;
}
.asde-ap .asde-importe--gasto {
	color: #a12622;
}
.asde-ap .asde-conciliar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin: 4px 0;
}
.asde-ap .asde-conciliar select {
	width: auto;
	max-width: 100%;
	margin: 0;
}
.asde-ap .asde-badge--banco-pendiente {
	background: #fff4d6;
	color: #7a5a00;
}
.asde-ap .asde-badge--banco-conciliado {
	background: #e7f5ea;
	color: #1e6b32;
}
.asde-ap .asde-badge--banco-ignorado {
	background: #eeeeee;
	color: #555555;
}

/* Registro de emails */
.asde-ap .asde-badge--email-enviado {
	background: #e7f5ea;
	color: #1e6b32;
}
.asde-ap .asde-badge--email-error {
	background: #fbeaea;
	color: #a12622;
}
.asde-ap .asde-badge--email-sin_email {
	background: #fff4d6;
	color: #7a5a00;
}
.asde-ap .asde-email-preview {
	display: block;
	width: 100%;
	height: 680px;
	border: 1px solid var(--asde-border);
	border-radius: var(--asde-radius);
	background: #f4f1f7;
}

/* Ordenar por columnas */
.asde-ap .asde-orden {
	color: inherit;
	text-decoration: none;
	white-space: nowrap;
}
.asde-ap .asde-orden:hover,
.asde-ap .asde-orden:focus {
	color: var(--asde-primary);
	text-decoration: underline;
}
.asde-ap .asde-orden__flecha {
	font-size: 11px;
	opacity: 0.45;
}
.asde-ap .asde-orden.is-active .asde-orden__flecha {
	opacity: 1;
	color: var(--asde-primary);
}
.asde-ap .asde-solo-movil {
	display: none;
}
@media (max-width: 767px) {
	.asde-ap .asde-solo-movil {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: 8px;
	}
}

/* Paginación */
.asde-ap .asde-paginacion {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 16px;
	margin: 16px 0 0;
}
.asde-ap .asde-paginacion__info {
	margin: 0;
	color: var(--asde-muted);
	font-size: 13px;
}
.asde-ap .asde-paginacion__botones {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.asde-ap .asde-paginacion__botones li {
	margin: 0;
	padding: 0;
	list-style: none;
}
.asde-ap .asde-paginacion__botones a,
.asde-ap .asde-paginacion__botones span {
	display: inline-block;
	min-width: 34px;
	padding: 5px 8px;
	border: 1px solid var(--asde-border);
	border-radius: var(--asde-radius);
	line-height: 1.4;
	text-align: center;
	text-decoration: none;
}
.asde-ap .asde-paginacion__botones a:hover,
.asde-ap .asde-paginacion__botones a:focus {
	border-color: var(--asde-primary);
	color: var(--asde-primary);
}
.asde-ap .asde-paginacion__botones .is-current {
	border-color: var(--asde-primary);
	background: var(--asde-primary);
	color: #ffffff;
	font-weight: 600;
}
.asde-ap .asde-paginacion__botones .is-disabled {
	color: var(--asde-muted);
	opacity: 0.5;
}
.asde-ap .asde-paginacion__botones .asde-paginacion__hueco {
	border-color: transparent;
}
.asde-ap .asde-paginacion__tamano {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	font-size: 13px;
}
.asde-ap .asde-paginacion__tamano select {
	width: auto;
	margin: 0;
}

/* Datos de la ficha */
.asde-ap .asde-datos {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 12px 24px;
	margin: 0 0 12px;
}
.asde-ap .asde-datos div {
	margin: 0;
}
.asde-ap .asde-datos dt {
	margin: 0;
	color: var(--asde-muted);
	font-size: 12px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}
.asde-ap .asde-datos dd {
	margin: 2px 0 0;
	overflow-wrap: anywhere;
}

/* Formularios */
.asde-ap .asde-form fieldset {
	margin: 0 0 16px;
	padding: 12px 16px;
	border: 1px solid var(--asde-border);
	border-radius: var(--asde-radius);
}
.asde-ap .asde-form legend {
	padding: 0 6px;
	font-weight: 600;
}
.asde-ap .asde-form p > label {
	display: block;
	margin: 0 0 4px;
	font-weight: 600;
}
.asde-ap .asde-choice {
	display: flex;
	gap: 8px;
	align-items: flex-start;
	margin: 6px 0;
	font-weight: normal;
	cursor: pointer;
}
.asde-ap .asde-choice input {
	flex: 0 0 auto;
	margin: 4px 0 0;
}
.asde-ap .asde-choice.is-disabled {
	color: var(--asde-muted);
	cursor: not-allowed;
}
.asde-ap .asde-help {
	display: block;
	color: var(--asde-muted);
	font-size: 12px;
	font-weight: normal;
}
.asde-ap .asde-help--warning {
	color: #7a5a00;
}
.asde-ap .asde-help--inline {
	display: inline;
}

/* Acceso socios */
.asde-ap .asde-acceso {
	margin-right: auto;
	margin-left: auto;
}
.asde-ap .asde-acceso select,
.asde-ap .asde-acceso input[type="text"],
.asde-ap .asde-acceso input[type="password"] {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}
.asde-ap .asde-destacado {
	padding: 10px 12px;
	border-left: 4px solid var(--asde-primary);
	background: #f7f2fb;
}
.asde-ap .asde-grid-2 {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 0 16px;
}
.asde-ap .asde-muted {
	color: var(--asde-muted);
	font-size: 13px;
}

/* Acciones en tablas */
.asde-ap .asde-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 12px;
}
.asde-ap .asde-actions form {
	margin: 0;
}
.asde-ap .asde-btn-link {
	padding: 0;
	border: 0;
	background: none;
	color: var(--asde-primary);
	font: inherit;
	text-decoration: underline;
	cursor: pointer;
}
.asde-ap .asde-btn-danger {
	color: #b32d2e;
}

/* Accesos directos del inicio */
.asde-ap .asde-tiles {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 16px;
	margin: 0 0 24px;
}
.asde-ap .asde-tile {
	display: block;
	padding: 16px 20px;
	border: 1px solid var(--asde-border);
	border-top: 4px solid var(--asde-primary);
	border-radius: var(--asde-radius);
	color: var(--asde-text);
	text-decoration: none;
}
.asde-ap .asde-tile:hover,
.asde-ap .asde-tile:focus-visible {
	border-color: var(--asde-lila);
	border-top-color: var(--asde-primary);
}
.asde-ap .asde-tile strong {
	display: block;
	margin-bottom: 4px;
	color: var(--asde-primary);
	font-size: 16px;
}

.asde-ap [hidden] {
	display: none !important;
}

.asde-ap .asde-search__option {
	flex: 1 1 100%;
	margin: 0;
	font-size: 13px;
}

/* Informes */
.asde-ap .asde-table-wrap {
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}
.asde-ap .asde-table--informe {
	min-width: 100%;
	font-size: 13px;
}
.asde-ap .asde-table--informe th {
	white-space: nowrap;
}
.asde-ap .asde-columnas {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 0 16px;
}
.asde-ap .asde-columnas__grupo--salud {
	border-color: #e3c9f5;
	background: #fbf7fe;
}
.asde-ap .asde-columnas__todas {
	margin: 0 0 4px;
	font-size: 12px;
}
.asde-ap .asde-choice--inline {
	display: inline-flex;
	margin-right: 12px;
}
.asde-ap .asde-badge--salud {
	background: #fdecea;
	color: #8a1c1c;
}
.asde-ap .asde-actions--botones {
	gap: 8px;
}
.asde-ap .button.asde-button-secundario {
	background: #ffffff;
	color: var(--asde-primary);
	border: 1px solid var(--asde-primary);
}
.asde-ap .asde-wordfence {
	overflow-x: auto;
}

@media print {
	#header,
	#footer,
	#socket,
	.title_container,
	.asde-nav,
	.asde-no-print,
	.cky-consent-container,
	.cky-btn-revisit-wrapper {
		display: none !important;
	}
	.asde-ap .asde-card {
		border: 0;
		padding: 0;
	}
	.asde-ap .asde-table-wrap {
		overflow: visible;
	}
	.asde-ap .asde-table--informe {
		font-size: 10px;
	}
}

/* Tesorería */
.asde-ap .asde-subnav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 16px;
	margin: -8px 0 20px;
}
.asde-ap .asde-subnav__tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.asde-ap .asde-subnav__tabs li {
	margin: 0;
	list-style: none;
}
.asde-ap .asde-subnav__tabs a {
	display: block;
	padding: 6px 12px;
	border: 1px solid var(--asde-border);
	border-radius: 999px;
	color: var(--asde-primary);
	font-size: 13px;
	text-decoration: none;
}
.asde-ap .asde-subnav__tabs a.is-active,
.asde-ap .asde-subnav__tabs a:hover {
	border-color: var(--asde-primary);
	background: #f1e9f8;
}
.asde-ap .asde-subnav__ronda {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
}
.asde-ap .asde-subnav__ronda label {
	margin: 0;
	font-weight: 600;
}
.asde-ap .asde-subnav__ronda select {
	width: auto;
	margin: 0;
}
.asde-ap .asde-progreso {
	height: 10px;
	margin: 0 0 12px;
	border-radius: 999px;
	background: #eeeeee;
	overflow: hidden;
}
.asde-ap .asde-progreso span {
	display: block;
	height: 100%;
	background: var(--asde-primary);
}
.asde-ap .asde-badge--pago-pagado { background: #e6f4d7; color: #2d4f06; }
.asde-ap .asde-badge--pago-parcial { background: #e3eefc; color: #0b3a7a; }
.asde-ap .asde-badge--pago-pendiente { background: #fff3cd; color: #664d03; }
.asde-ap .asde-badge--pago-atrasado { background: #fdecea; color: #8a1c1c; }
.asde-ap .asde-badge--pago-exento { background: #eeeeee; color: #555555; }
.asde-ap .asde-grid-3 {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 0 16px;
}
.asde-ap .asde-grid-2--top {
	align-items: start;
}
.asde-ap .asde-tramos {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
	gap: 0 12px;
}
.asde-ap .asde-miembro {
	display: inline-block;
	margin: 0 12px 4px 0;
}
.asde-ap .asde-miembro--fuera,
.asde-ap .asde-anulado td {
	color: var(--asde-muted);
	text-decoration: line-through;
}
.asde-ap .asde-table--resumen th {
	font-weight: normal;
	text-align: left;
}
.asde-ap .asde-table--resumen td {
	text-align: right;
	white-space: nowrap;
}
.asde-ap .asde-total th,
.asde-ap .asde-total td {
	border-top: 2px solid var(--asde-border);
	font-weight: 700;
}
.asde-ap .asde-lista-miembros {
	margin: 0 0 12px;
}
.asde-ap .asde-sugerencia {
	margin: 0 0 12px;
	padding: 10px 14px;
	border: 1px dashed var(--asde-lila);
	border-radius: var(--asde-radius);
}
.asde-ap .asde-sugerencia ul {
	margin: 0 0 8px;
	list-style: none;
}
