/* The Link · Miembros — usa las variables del tema The Link, con valores de respaldo */
.tlm {
	--m-primary: var(--tl-indigo, #1800AD);
	--m-dark: var(--tl-navy, #0E1847);
	--m-accent: var(--tl-orange, #FF5004);
	--m-on-accent: var(--tl-on-accent, #0E1847);
	--m-soft: var(--tl-mist, #EFEFFB);
	--m-text: var(--tl-gray, #4D4D4D);
	--m-line: var(--tl-line, #DADCF2);
	font-family: var(--tl-font, "Poppins", system-ui, sans-serif);
	color: var(--m-text);
}
.tlm *, .tlm *::before, .tlm *::after { box-sizing: border-box; }
.tlm-wrap { width: 100%; max-width: calc(1100px + 2 * clamp(20px, 4vw, 40px)); margin-inline: auto; padding-inline: clamp(20px, 4vw, 40px); }
.tlm-section { padding-block: clamp(40px, 6vw, 72px) clamp(64px, 8vw, 104px); }

/* Encabezado */
.tlm-hero { background: var(--m-primary); color: rgba(255, 255, 255, .85); padding-block: clamp(40px, 6vw, 72px); }
.tlm-hero__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.tlm-hero__title { color: #fff; margin: 0; font-size: clamp(2rem, 1.2rem + 3vw, 3.5rem); line-height: 1.05; letter-spacing: -0.04em; font-weight: 700; }
.tlm-hero__intro { margin: 14px 0 0; max-width: 52ch; font-size: 1.0625rem; }
.tlm-hero__kicker { margin: 0 0 8px; font-size: .9375rem; font-weight: 500; }

/* Botones */
.tlm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 26px; border-radius: 999px; border: 2px solid transparent; font-family: inherit; font-size: .9375rem; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer; transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease; }
.tlm-btn:active { transform: scale(.97); }
.tlm-btn--primary { background: var(--m-accent); color: var(--m-on-accent); }
.tlm-btn--primary:hover { background: color-mix(in srgb, var(--m-accent) 88%, #000); color: var(--m-on-accent); }
.tlm-btn--light { background: #fff; color: var(--m-primary); }
.tlm-btn--light:hover { background: var(--m-soft); color: var(--m-primary); }
.tlm-btn--ghost { border-color: rgba(255, 255, 255, .5); color: #fff; }
.tlm-btn--ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .08); color: #fff; }
.tlm-btn--block { width: 100%; }
.tlm a:focus-visible, .tlm button:focus-visible, .tlm input:focus-visible, .tlm summary:focus-visible { outline: 3px solid var(--m-accent); outline-offset: 3px; }

/* Avisos */
.tlm-alert { padding: 12px 16px; border-radius: 12px; font-size: .9375rem; margin: 0 0 18px; }
.tlm-alert--error { background: #FDECEC; color: #9B1C1C; }
.tlm-alert--ok { background: #E6F4EA; color: #1E6B34; }
.tlm-alert--info { background: var(--m-soft); color: var(--m-dark); }
.tlm-alert a { color: inherit; font-weight: 600; }

/* Inicio de sesión */
.tlm-login { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; max-width: 920px; margin: 0 auto; align-items: stretch; }
.tlm-login__form { background: #fff; border: 1px solid var(--m-line); border-radius: 24px; padding: clamp(24px, 4vw, 40px); box-shadow: 0 24px 60px color-mix(in srgb, var(--m-primary) 8%, transparent); }
.tlm-login__title { font-size: 1.5rem; font-weight: 700; color: var(--m-primary); letter-spacing: -0.02em; margin: 0 0 20px; }
.tlm-login__links { margin: 16px 0 0; text-align: center; font-size: .9375rem; }
.tlm-login__links a { color: var(--m-primary); }
.tlm-login__aside { background: var(--m-primary); color: rgba(255, 255, 255, .85); border-radius: 24px; padding: clamp(24px, 4vw, 40px); display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; }
.tlm-login__aside p { margin: 0; }
.tlm-login__asidetitle { color: #fff; font-size: 1.375rem; font-weight: 700; letter-spacing: -0.02em; }
.tlm-login__aside .tlm-btn { align-self: flex-start; margin-top: 10px; }
@media (max-width: 760px) { .tlm-login { grid-template-columns: 1fr; } }

.tlm-field { margin-bottom: 16px; }
.tlm-field label { display: block; font-size: .875rem; font-weight: 600; color: var(--m-dark); margin-bottom: 6px; }
.tlm-field input { width: 100%; padding: 13px 16px; border: 1.5px solid var(--m-line); border-radius: 12px; font: inherit; font-size: 1rem; color: var(--m-dark); background: #fff; }
.tlm-field input:focus { outline: 3px solid color-mix(in srgb, var(--m-accent) 35%, transparent); outline-offset: 0; border-color: var(--m-accent); }
.tlm-field input[aria-invalid="true"] { border-color: #C62828; }

/* Puntos */
.tlm-points { margin-top: 8px; }
.tlm-reach { list-style: none; margin: 6px 0 0; padding: 0; font-size: .9375rem; color: var(--m-dark); }
.tlm-reach li { padding: 6px 0; border-top: 1px solid var(--m-line); }
.tlm-points__form .tlm-field { margin-bottom: 12px; }
.tlm-points__form select { width: 100%; padding: 12px 14px; border: 1.5px solid var(--m-line); border-radius: 12px; font: inherit; color: var(--m-dark); background: #fff; }
.tlm-points__cost { font-weight: 700; color: var(--m-primary); margin: 4px 0 14px !important; }
.tlm-points__cost.is-short { color: #9B1C1C; }
.tlm-btn:disabled { opacity: .5; cursor: not-allowed; }
.tlm-linkbtn { border: 0; background: none; padding: 0; color: var(--m-primary); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }

/* Ver u ocultar contraseña */
.tlm-pass { position: relative; display: block; }
.tlm-pass input { padding-right: 52px; }
.tlm-pass__toggle {
	position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
	width: 40px; height: 40px; padding: 0; border: 0; border-radius: 10px;
	background: transparent; color: var(--m-text); cursor: pointer;
	display: inline-flex; align-items: center; justify-content: center;
}
.tlm-pass__toggle:hover { background: var(--m-soft); color: var(--m-primary); }
.tlm-pass__toggle[aria-pressed="true"] { color: var(--m-primary); }
.tlm-pass__toggle svg { width: 22px; height: 22px; }
.tlm-check { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 20px; font-size: .9375rem; line-height: 1.45; }
.tlm-check input { margin-top: 3px; width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--m-primary); }
.tlm-check a { color: var(--m-primary); font-weight: 600; }
.tlm-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 480px) { .tlm-row2 { grid-template-columns: 1fr; gap: 0; } }
.tlm-field__error { display: block; margin-top: 6px; color: #9B1C1C; font-size: .875rem; font-weight: 500; }
p.tlm-field__error { margin: -12px 0 16px; }
.tlm-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.tlm-btn--outline { border-color: var(--m-primary); color: var(--m-primary); background: transparent; }
.tlm-btn--outline:hover { background: var(--m-primary); color: #fff; }
.tlm-empty__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 16px; }
.tlm-empty__actions .tlm-btn { margin-top: 0; }

/* Tablero */
.tlm-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; align-items: start; }
.tlm-side { display: grid; gap: 20px; }
@media (max-width: 860px) { .tlm-grid { grid-template-columns: 1fr; } }

.tlm-card { background: var(--m-soft); border-radius: 24px; padding: clamp(22px, 3vw, 32px); }
.tlm-card p { margin: 0 0 10px; }
.tlm-card--main { background: var(--m-primary); color: rgba(255, 255, 255, .85); }
.tlm-card--accent { background: #fff; border: 1.5px solid var(--m-line); }
.tlm-card__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.tlm-card__label { font-size: .875rem; font-weight: 600; color: var(--m-dark); }
.tlm-card--main .tlm-card__label { color: rgba(255, 255, 255, .8); margin: 0; }
.tlm-card__plan { color: #fff; font-size: clamp(2rem, 1.4rem + 2vw, 3rem); line-height: 1.05; letter-spacing: -0.04em; font-weight: 700; margin: 16px 0 4px; }
.tlm-card__mod { font-size: 1.0625rem; }
.tlm-card__big { font-size: 2.25rem; font-weight: 700; color: var(--m-primary); letter-spacing: -0.03em; line-height: 1.1; }
.tlm-card__big small { font-size: .9375rem; font-weight: 500; color: var(--m-text); letter-spacing: 0; }
.tlm-card__days { color: #fff; font-weight: 600; margin-top: 10px !important; }
.tlm-card__note { margin-top: 16px !important; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .18); font-size: .9375rem; }
.tlm-muted { font-size: .875rem; }

.tlm-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 24px 0 20px; }
.tlm-dates div { background: rgba(255, 255, 255, .1); border-radius: 14px; padding: 12px 14px; }
.tlm-dates dt { font-size: .8125rem; font-weight: 500; margin: 0 0 2px; }
.tlm-dates dd { margin: 0; color: #fff; font-weight: 600; font-size: 1rem; }
@media (max-width: 420px) { .tlm-dates { grid-template-columns: 1fr; } }

.tlm-progress { height: 10px; border-radius: 99px; background: rgba(255, 255, 255, .18); overflow: hidden; }
.tlm-progress span { display: block; height: 100%; border-radius: inherit; background: var(--m-accent); }
.tlm-progress--soft { background: color-mix(in srgb, var(--m-primary) 12%, #fff); margin: 12px 0 10px; }

.tlm-badge { display: inline-block; padding: 4px 12px; border-radius: 99px; font-size: .8125rem; font-weight: 600; white-space: nowrap; }
.tlm-badge--activa { background: #E6F4EA; color: #1E6B34; }
.tlm-badge--por_vencer { background: #FFF1D6; color: #7A4A00; }
.tlm-badge--vencida { background: #FDECEC; color: #9B1C1C; }
.tlm-badge--proxima { background: #E8EAFD; color: #1800AD; }

.tlm-h2 { color: var(--m-primary); font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); letter-spacing: -0.03em; margin: clamp(40px, 5vw, 56px) 0 16px; }
.tlm-tablewrap { overflow-x: auto; border: 1px solid var(--m-line); border-radius: 18px; }
.tlm-table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.tlm-table th { text-align: left; padding: 12px 16px; background: var(--m-soft); color: var(--m-dark); font-weight: 600; font-size: .8125rem; white-space: nowrap; }
.tlm-table td { padding: 14px 16px; border-top: 1px solid var(--m-line); color: var(--m-dark); }
@media (max-width: 640px) {
	.tlm-tablewrap { border: 0; }
	.tlm-table thead { display: none; }
	.tlm-table, .tlm-table tbody, .tlm-table tr, .tlm-table td { display: block; width: 100%; }
	.tlm-table tr { border: 1px solid var(--m-line); border-radius: 16px; padding: 8px 4px; margin-bottom: 12px; }
	.tlm-table td { border: 0; padding: 6px 12px; display: flex; justify-content: space-between; gap: 12px; }
	.tlm-table td::before { content: attr(data-label); font-weight: 600; font-size: .8125rem; color: var(--m-text); }
}

.tlm-empty { max-width: 560px; margin: 0 auto; text-align: center; background: var(--m-soft); border-radius: 24px; padding: clamp(28px, 5vw, 48px); }
.tlm-empty__title { font-size: 1.375rem; font-weight: 700; color: var(--m-primary); margin: 0 0 8px; }
.tlm-empty .tlm-btn { margin-top: 12px; }

.tlm-security { margin-top: clamp(40px, 5vw, 56px); border: 1px solid var(--m-line); border-radius: 18px; padding: 4px 20px; max-width: 560px; }
.tlm-security summary { cursor: pointer; padding: 14px 0; font-weight: 600; color: var(--m-dark); }
.tlm-security[open] { padding-bottom: 20px; }
.tlm-security__form { margin-top: 8px; }
