/* =====================================================================
   NUTRENTRENA · Panel de Antonio y área de socio
   ===================================================================== */

:root {
	--gold: #c9a063;
	--gold-light: #e9cf98;
	--gold-dark: #8f6b36;
	--black: #000000;
	--ink: #15120f;
	--ok: #9fd8a8;
	--ok-dark: #2f7a3e;
	--bad: #f0a8a8;
	--bad-dark: #9b2c2c;
	--warn-bg: #2b2016;
	--radius: 14px;
	--radius-lg: 20px;
	--font: Montserrat, "Helvetica Neue", Arial, sans-serif;
	--display: "Bebas Neue", Impact, "Arial Narrow", sans-serif;
	--safe-b: env(safe-area-inset-bottom, 0px);
	--safe-t: env(safe-area-inset-top, 0px);
}

/* Panel: negro y oro */
.nts--panel {
	--bg: #000000;
	--bg-2: #0d0b09;
	--surface: #15120f;
	--surface-2: #1d1813;
	--line: #2a241d;
	--line-2: #3a332b;
	--text: #ffffff;
	--muted: #d6cfc3;
	--muted-2: #b5ada1;
	--faint: #8a8278;
	--accent-text: #e9cf98;
	--field-bg: #0d0b09;
	--overlay: rgba(0, 0, 0, .72);
	color-scheme: dark;
}

/* Socio: papel con cabecera negra */
.nts--socio {
	--bg: #f3eee4;
	--bg-2: #ebe4d6;
	--surface: #ffffff;
	--surface-2: #fbf7ef;
	--line: #e9e2d3;
	--line-2: #d8cfbf;
	--text: #15120f;
	--muted: #5c554b;
	--muted-2: #6b6358;
	--faint: #8a8278;
	--accent-text: #8f6b36;
	--field-bg: #ffffff;
	--overlay: rgba(21, 18, 15, .55);
	color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.nts {
	margin: 0;
	min-height: 100vh;
	min-height: 100dvh;
	background: var(--bg);
	color: var(--text);
	font: 400 15px/1.5 var(--font);
	-webkit-font-smoothing: antialiased;
	-webkit-tap-highlight-color: transparent;
}
:where(.nts) a { color: var(--accent-text); }
:where(.nts) button, :where(.nts) input, :where(.nts) select, :where(.nts) textarea { font: inherit; color: inherit; }
:where(.nts) button { cursor: pointer; }
:where(.nts) button:disabled { cursor: not-allowed; opacity: .5; }
.nts img { max-width: 100%; height: auto; }
.nts :focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.nts [hidden] { display: none !important; }
.nts-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Tipografía ---------- */
.nts-wordmark { font-family: var(--display); letter-spacing: .06em; font-size: 22px; line-height: 1; color: #fff; }
.nts-wordmark span { color: var(--gold); }
.nts-h1, input.nts-h1 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(38px, 6vw, 54px); line-height: .95; letter-spacing: .01em; }
.nts-h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 28px; line-height: 1; letter-spacing: .01em; }
.nts-h3 { margin: 0; font-size: 15px; font-weight: 700; }
.nts-kicker { font-size: 13px; font-weight: 600; color: var(--gold); }
.nts-muted { color: var(--muted); }
.nts-small { font-size: 13px; }
.nts-tiny { font-size: 12px; color: var(--muted-2); }
.nts-big-num { font-family: var(--display); font-size: 30px; line-height: 1; }
.nts-pre { white-space: pre-line; }

/* ---------- Botones ---------- */
.nts-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 46px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent;
	font-weight: 700; font-size: 14px; text-decoration: none; line-height: 1.2; text-align: center;
	background: var(--surface-2); color: var(--text); transition: background .15s, border-color .15s, transform .05s;
}
.nts-btn:active { transform: translateY(1px); }
.nts-btn svg { flex: none; }
.nts-btn--gold { background: var(--gold); color: #000 !important; }
.nts-btn--gold:hover { background: var(--gold-light); }
.nts-btn--line { background: transparent; border-color: var(--gold-dark); color: var(--accent-text); font-weight: 600; }
.nts-btn--line:hover { border-color: var(--gold); }
.nts-btn--ghost { background: transparent; color: var(--accent-text); font-weight: 600; }
.nts-btn--dark { background: var(--ink); color: #fff !important; }
.nts-btn--danger { background: transparent; border-color: var(--line-2); color: var(--bad); font-weight: 600; }
.nts--socio .nts-btn--danger { color: var(--bad-dark); }
.nts-btn--sm { min-height: 38px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.nts-btn--block { display: flex; width: 100%; }
.nts-btn--icon { width: 44px; min-height: 44px; padding: 0; flex: none; }
.nts-btn--lg { min-height: 54px; font-size: 15px; border-radius: 14px; }
.nts-btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.nts-btn-row > .nts-btn { flex: 1 1 auto; }

/* ---------- Formularios ---------- */
.nts-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.nts-field > label, .nts-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.nts-field .nts-hint { font-size: 12px; color: var(--muted-2); }
.nts-input, .nts-select, .nts-textarea {
	width: 100%; min-height: 48px; padding: 0 14px; border-radius: 12px;
	border: 1px solid var(--line-2); background: var(--field-bg); color: var(--text); font-size: 16px;
}
.nts-textarea { padding: 12px 14px; min-height: 90px; resize: vertical; line-height: 1.45; }
.nts-select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.nts-input:focus, .nts-select:focus, .nts-textarea:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(201, 160, 99, .25); }
.nts-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.nts-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.nts-form { display: flex; flex-direction: column; gap: 14px; }
.nts-check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; font-weight: 600; }
.nts-check input { width: 22px; height: 22px; accent-color: var(--gold); flex: none; margin: 0; }
.nts-error { color: var(--bad); font-size: 13px; font-weight: 600; }
.nts--socio .nts-error { color: var(--bad-dark); }

/* Control segmentado */
.nts-seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding: 4px; background: var(--bg-2); border-radius: 14px; }
.nts--panel .nts-seg { background: var(--surface); }
.nts-seg button { min-height: 42px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-weight: 600; font-size: 13px; padding: 0 6px; }
.nts-seg button[aria-checked="true"], .nts-seg button[aria-pressed="true"] { background: var(--gold); color: #000; font-weight: 700; }

/* ---------- Tarjetas y filas ---------- */
.nts-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; }
.nts--panel .nts-card { border-color: var(--line); }
.nts-card--dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.nts-card--gold { border: 1px solid var(--gold); background: var(--surface-2); }
.nts-card--flat { padding: 0; overflow: hidden; }
.nts-stack { display: flex; flex-direction: column; gap: 12px; }
.nts-stack-sm { display: flex; flex-direction: column; gap: 8px; }
.nts-stack-lg { display: flex; flex-direction: column; gap: 22px; }
.nts-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.nts-between--top { align-items: flex-start; }
.nts-inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nts-row {
	display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 14px;
	background: var(--surface); border: 1px solid var(--line); border-radius: 16px; color: var(--text); text-decoration: none; width: 100%; text-align: left;
}
button.nts-row { font: inherit; }
.nts-row:hover { border-color: var(--line-2); }
.nts-row__main { flex: 1; min-width: 0; }
.nts-row__title { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nts-row__sub { font-size: 12px; color: var(--muted-2); overflow: hidden; text-overflow: ellipsis; }
.nts-avatar { width: 40px; height: 40px; border-radius: 999px; background: var(--gold); color: #000; display: inline-flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 18px; flex: none; }
.nts-avatar--lg { width: 64px; height: 64px; font-size: 28px; }
.nts-chev { color: var(--faint); flex: none; }
.nts-divider { height: 1px; background: var(--line); border: 0; margin: 4px 0; }

/* Etiquetas */
.nts-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 4px 9px; white-space: nowrap; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line-2); }
.nts-tag--gold { background: var(--gold); color: #000; border-color: var(--gold); }
.nts-tag--ok { background: var(--ok); color: #000; border-color: var(--ok); }
.nts-tag--bad { background: var(--bad); color: #000; border-color: var(--bad); }
.nts-tag--soft { background: var(--gold-light); color: #000; border-color: var(--gold-light); }
.nts-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--gold); color: #000; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

/* Avisos */
.nts-note { border-radius: 12px; padding: 10px 12px; font-size: 13px; line-height: 1.45; background: var(--surface-2); color: var(--muted); }
.nts-note--gold { border-left: 3px solid var(--gold); border-radius: 0 12px 12px 0; background: var(--surface-2); color: var(--text); }
.nts--socio .nts-note--gold { background: #fbf5e8; }
.nts-note--warn { background: var(--warn-bg); color: #f3d9a4; }
.nts--socio .nts-note--warn { background: #fbefd9; color: #6b4a14; }
.nts-note--ok { background: #142117; color: #b9e4c0; }
.nts--socio .nts-note--ok { background: #e6f3e8; color: #22552d; }
.nts-note--bad { background: #2a1414; color: #f6c4c4; }
.nts--socio .nts-note--bad { background: #f9e3e3; color: #7a1f1f; }

/* Estados vacíos y carga */
.nts-empty { text-align: center; padding: 34px 18px; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--radius-lg); }
.nts-empty strong { display: block; color: var(--text); font-size: 16px; margin-bottom: 4px; }
.nts-boot { min-height: 60vh; display: flex; align-items: center; justify-content: center; }
.nts-spinner { width: 34px; height: 34px; border-radius: 999px; border: 3px solid var(--line-2); border-top-color: var(--gold); animation: nts-spin .8s linear infinite; }
.nts-spinner--sm { width: 18px; height: 18px; border-width: 2px; }
@keyframes nts-spin { to { transform: rotate(360deg); } }
.nts-loading { display: flex; justify-content: center; padding: 40px 0; }

/* Barra de progreso y bolsa */
.nts-bar { height: 8px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.nts--socio .nts-card--dark .nts-bar, .nts--panel .nts-bar { background: #2a241d; }
.nts-bar > span { display: block; height: 100%; background: var(--gold); border-radius: inherit; transition: width .3s; }
.nts-pills { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 3px; }
.nts-pills span { height: 10px; border-radius: 3px; background: var(--gold); }
.nts-pills span.is-used { background: #4a4239; }
.nts-pills span.is-res { background: transparent; border: 2px solid var(--gold); }
.nts-pills span.is-over { background: var(--bad); }

/* ---------- Toast ---------- */
.nts-toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(96px + var(--safe-b)); z-index: 100; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.nts-toast { background: #fff; color: #15120f; border-radius: 14px; padding: 12px 16px; font-size: 14px; font-weight: 600; box-shadow: 0 16px 40px rgba(0, 0, 0, .35); animation: nts-up .2s ease-out; pointer-events: auto; }
.nts-toast--bad { background: #9b2c2c; color: #fff; }
.nts--socio .nts-toast { background: #15120f; color: #fff; }
.nts--socio .nts-toast--bad { background: #9b2c2c; }
@keyframes nts-up { from { transform: translateY(10px); opacity: 0; } }

/* ---------- Ventana (hoja inferior en móvil, diálogo en escritorio) ---------- */
.nts-modal { position: fixed; inset: 0; z-index: 90; display: flex; align-items: flex-end; justify-content: center; background: var(--overlay); animation: nts-fade .15s ease-out; }
@keyframes nts-fade { from { opacity: 0; } }
.nts-modal__box {
	width: 100%; max-height: 92vh; max-height: 92dvh; overflow: auto; overscroll-behavior: contain;
	background: var(--bg); color: var(--text); border-radius: 22px 22px 0 0; padding: 8px 18px calc(22px + var(--safe-b));
	animation: nts-sheet .22s ease-out; border: 1px solid var(--line);
}
.nts--panel .nts-modal__box { background: var(--bg-2); }
@keyframes nts-sheet { from { transform: translateY(40px); opacity: .4; } }
.nts-modal__grip { width: 44px; height: 5px; border-radius: 99px; background: var(--line-2); margin: 4px auto 10px; }
.nts-modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; position: sticky; top: -8px; background: inherit; padding-top: 4px; z-index: 2; }
.nts-modal__title { margin: 0; font-family: var(--display); font-weight: 400; font-size: 30px; line-height: 1; }
.nts-modal__foot { position: sticky; bottom: calc(-22px - var(--safe-b)); background: inherit; padding: 12px 0 calc(4px + var(--safe-b)); margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.nts-modal__foot > .nts-btn { flex: 1 1 auto; }
@media (min-width: 760px) {
	.nts-modal { align-items: center; padding: 24px; }
	.nts-modal__box { max-width: 560px; border-radius: 22px; padding: 18px 24px 24px; }
	.nts-modal__box--wide { max-width: 860px; }
	.nts-modal__grip { display: none; }
	.nts-modal__foot { bottom: -24px; padding-bottom: 6px; }
}

/* ---------- Pantalla de acceso ---------- */
.nts-login { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: radial-gradient(circle at 70% 0%, #2a2117, #000 60%); color: #fff; }
.nts-login__card { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 14px; }
.nts-login__brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-bottom: 10px; }
.nts-login__brand img { width: 56px; height: 56px; object-fit: contain; }
.nts-login__brand .nts-wordmark { font-size: 28px; }
.nts-login__title { margin: 0; font-family: var(--display); font-weight: 400; font-size: 48px; line-height: .95; }
.nts-login__sub { margin: 0; color: #d6cfc3; }
.nts-login__form { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.nts-login__form label { font-size: 13px; font-weight: 600; color: #d6cfc3; margin-top: 6px; }
.nts-login__form input[type=text], .nts-login__form input[type=password] { min-height: 52px; border-radius: 12px; border: 1px solid #3a332b; background: #0d0b09; color: #fff; padding: 0 14px; font-size: 16px; }
.nts-login__form input:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(201, 160, 99, .25); }
.nts-login__remember { display: flex !important; align-items: center; gap: 10px; margin: 8px 0 10px !important; }
.nts-login__remember input { width: 20px; height: 20px; accent-color: var(--gold); }
.nts-login__forgot { color: var(--gold-light); font-size: 14px; font-weight: 600; text-align: center; padding: 10px; }
.nts-login__error { background: #2a1414; color: #f6c4c4; border-radius: 12px; padding: 10px 12px; margin: 0; font-size: 14px; font-weight: 600; }
.nts-login__foot { margin: 8px 0 0; font-size: 14px; color: #b5ada1; text-align: center; }
.nts-login__foot a { color: var(--gold-light); font-weight: 700; }
.nts-login .nts-btn--gold { min-height: 54px; font-size: 16px; border-radius: 14px; border: 0; }

/* =====================================================================
   PANEL
   ===================================================================== */
.nts-shell { display: flex; min-height: 100vh; min-height: 100dvh; }
.nts-side { display: none; }
.nts-main { flex: 1; min-width: 0; padding: calc(14px + var(--safe-t)) 16px calc(110px + var(--safe-b)); }
.nts-main__inner { max-width: 1240px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.nts-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.nts-page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 14px; }
.nts-back { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; font-size: 13px; font-weight: 600; text-decoration: none; color: var(--accent-text); background: none; border: 0; padding: 0; }

.nts-tabbar {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
	display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
	background: var(--bg-2); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + var(--safe-b));
}
.nts--socio .nts-tabbar { background: #fff; border-top-color: var(--line); }
.nts-tabbar a, .nts-tabbar button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 54px; color: var(--muted-2); text-decoration: none; font-size: 11px; font-weight: 500; background: none; border: 0; }
.nts-tabbar [aria-current="page"] { color: var(--gold); font-weight: 700; }
.nts--socio .nts-tabbar [aria-current="page"] { color: var(--text); }
.nts--socio .nts-tabbar [aria-current="page"] svg { stroke: var(--gold-dark); }
.nts-tabbar .nts-badge { position: absolute; top: 4px; right: calc(50% - 22px); }

.nts-fab { position: fixed; right: 16px; bottom: calc(84px + var(--safe-b)); z-index: 45; height: 56px; padding: 0 20px; border-radius: 999px; box-shadow: 0 10px 30px rgba(0, 0, 0, .55); }

@media (min-width: 960px) {
	.nts-side {
		display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; width: 248px; flex: none;
		padding: 26px 16px; background: var(--bg-2); border-right: 1px solid var(--line); overflow-y: auto;
	}
	.nts-side__brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 22px; text-decoration: none; }
	.nts-side__brand img { width: 38px; height: 38px; object-fit: contain; }
	.nts-side a, .nts-side button.nts-side__link { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 12px; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; background: none; border: 0; width: 100%; text-align: left; }
	.nts-side a:hover { background: var(--surface); }
	.nts-side a[aria-current="page"] { background: var(--gold); color: #000; font-weight: 700; }
	.nts-side .nts-badge { margin-left: auto; }
	.nts-side a[aria-current="page"] .nts-badge { background: #000; color: var(--gold); }
	.nts-side__sep { height: 1px; background: var(--line); margin: 12px 4px; }
	.nts-side__foot { margin-top: auto; padding-top: 14px; }
	.nts-tabbar, .nts-mobile-only { display: none !important; }
	.nts-main { padding: 28px 32px 48px; }
	.nts-fab { display: none; }
}
@media (max-width: 959px) { .nts-desk-only { display: none !important; } }

/* Hoy: línea de tiempo */
.nts-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.nts-stat { background: var(--surface); border-radius: 14px; padding: 10px 12px; text-decoration: none; color: var(--text); border: 1px solid var(--line); }
.nts-stat b { display: block; font-family: var(--display); font-weight: 400; font-size: 28px; line-height: 1; }
.nts-stat span { font-size: 11px; color: var(--muted-2); }
.nts-stat--gold { background: var(--gold); color: #000; border-color: var(--gold); }
.nts-stat--gold span { color: #000; font-weight: 600; }
.nts-tl { display: flex; flex-direction: column; gap: 10px; }
.nts-tl__item { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; }
.nts-tl__time { font-size: 13px; font-weight: 600; padding-top: 14px; }
.nts-tl__item.is-past { opacity: .55; }
.nts-tl__item.is-next .nts-tl__time { color: var(--gold-light); font-weight: 700; }
.nts-tl__travel { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted-2); padding: 2px 4px; }
.nts-tl__travel.is-tight { color: var(--bad); font-weight: 600; }
.nts-tl__now { display: flex; align-items: center; gap: 8px; }
.nts-tl__now i { height: 2px; flex: 1; background: var(--gold); }
.nts-tl__now b { font-size: 11px; color: var(--gold); }
.nts-session { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; text-align: left; color: var(--text); width: 100%; }
.nts-session.is-next { background: var(--surface-2); border-color: var(--gold); }
.nts-session.is-pending { border-style: dashed; border-color: var(--gold); }
.nts-session.is-cancel { opacity: .55; text-decoration: line-through; }
.nts-session__who { font-weight: 700; font-size: 16px; }
.nts-session__where { font-size: 13px; color: var(--muted); }

/* Agenda semanal */
.nts-week { overflow-x: auto; border: 1px solid var(--line); border-radius: 18px; background: var(--bg-2); }
.nts-week__grid { min-width: 860px; display: grid; grid-template-columns: 52px repeat(7, minmax(0, 1fr)); }
.nts-week__head { height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); background: none; border-top: 0; border-right: 0; color: var(--text); }
.nts-week__head.is-today { background: var(--surface-2); color: var(--gold-light); box-shadow: inset 0 -3px 0 var(--gold); }
.nts-week__head small { font-size: 11px; font-weight: 600; color: var(--muted-2); }
.nts-week__head b { font-family: var(--display); font-weight: 400; font-size: 24px; line-height: 1; }
.nts-week__hours { position: relative; }
.nts-week__hours span { position: absolute; left: 0; right: 6px; text-align: right; font-size: 11px; color: var(--faint); transform: translateY(-6px); }
.nts-week__col { position: relative; border-left: 1px solid var(--line); cursor: copy; }
.nts-week__col.is-today { background-color: rgba(201, 160, 99, .04); }
.nts-ev { position: absolute; left: 3px; right: 3px; border-radius: 9px; padding: 4px 7px; overflow: hidden; font-size: 11px; line-height: 1.25; text-align: left; border: 1px solid var(--gold); background: var(--surface-2); color: var(--text); cursor: pointer; }
.nts-ev b { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nts-ev span { display: block; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nts-ev.is-done { background: var(--surface); border-color: var(--line-2); color: var(--muted-2); }
.nts-ev.is-pending { background: transparent; border-style: dashed; color: var(--gold-light); }
.nts-ev.is-cancel { background: transparent; border-color: var(--line-2); color: var(--faint); text-decoration: line-through; opacity: .7; }
.nts-ev.is-noshow { border-color: var(--bad); color: var(--bad); background: transparent; }
.nts-ev--travel { border: 0; background: repeating-linear-gradient(135deg, #2a241d 0 4px, #15120f 4px 8px); color: var(--muted); cursor: default; pointer-events: none; }
.nts-ev--travel.is-tight { background: repeating-linear-gradient(135deg, #4a1f1f 0 4px, #1f1111 4px 8px); color: var(--bad); }
.nts-ev--block { border: 0; background: #3a332b; color: #fff; }
.nts-ev--val { border: 1.5px dashed var(--gold-dark); background: transparent; color: var(--gold-dark); pointer-events: none; font-size: 10px; }
.nts-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); }
.nts-legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; vertical-align: -2px; margin-right: 6px; }

/* Tira de días */
.nts-days { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scroll-snap-type: x proximity; scrollbar-width: none; }
.nts-days::-webkit-scrollbar { display: none; }
.nts-day { flex: none; width: 60px; min-height: 76px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); scroll-snap-align: start; }
.nts-day small { font-size: 11px; font-weight: 600; }
.nts-day b { font-family: var(--display); font-weight: 400; font-size: 26px; line-height: 1; }
.nts-day em { font-size: 10px; font-style: normal; color: var(--muted-2); }
.nts-day[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: #000; }
.nts-day[aria-pressed="true"] em { color: #000; }
.nts-day:disabled { background: transparent; border-style: dashed; color: var(--faint); opacity: 1; }
.nts-day.is-today { border-color: var(--gold); }
.nts-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.nts-slot { min-height: 48px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font-weight: 600; font-size: 15px; }
.nts-slot[aria-pressed="true"] { background: var(--ink); border: 2px solid var(--ink); color: #fff; font-weight: 700; }
.nts--panel .nts-slot[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: #000; }

/* Ficha */
.nts-profile { display: flex; align-items: center; gap: 16px; }
.nts-cols { display: grid; gap: 18px; }
@media (min-width: 1100px) { .nts-cols { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; } }
.nts-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.nts-tabs::-webkit-scrollbar { display: none; }
.nts-tabs button { flex: none; min-height: 46px; padding: 0 14px; background: none; border: 0; border-bottom: 3px solid transparent; color: var(--muted); font-weight: 600; font-size: 14px; }
.nts-tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--gold); font-weight: 700; }
.nts-kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; font-size: 14px; margin: 0; }
.nts-kv dt { color: var(--muted-2); }
.nts-kv dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

/* Editor de rutinas */
.nts-editor { display: grid; gap: 18px; }
@media (min-width: 1180px) { .nts-editor { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; } .nts-editor__aside { position: sticky; top: 20px; max-height: calc(100vh - 40px); overflow: auto; } }
.nts-struct { display: flex; flex-direction: column; gap: 10px; padding: 14px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 18px; }
.nts-struct__row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.nts-struct__label { width: 64px; font-size: 12px; font-weight: 700; color: var(--muted-2); flex: none; }
.nts-pill { min-height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: transparent; color: var(--muted); font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.nts-pill[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: #000; font-weight: 700; }
.nts-pill--add { border-style: dashed; color: var(--accent-text); }
.nts-pill--draft { font-style: italic; }
.nts-block { display: flex; flex-direction: column; gap: 10px; }
.nts-block__head { display: flex; align-items: center; gap: 8px; padding-top: 6px; }
.nts-block__title { flex: 1; min-width: 0; background: transparent; border: 1px solid transparent; border-radius: 10px; color: var(--accent-text); font-family: var(--display); font-size: 26px; padding: 2px 6px; min-height: 40px; }
.nts-block__title:hover, .nts-block__title:focus { border-color: var(--line-2); outline: none; }
.nts-block__sub { width: 170px; background: transparent; border: 1px solid transparent; border-radius: 8px; color: var(--muted-2); font-size: 12px; padding: 4px 6px; }
.nts-block__sub:hover, .nts-block__sub:focus { border-color: var(--line-2); outline: none; }
.nts-ex { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.nts-ex.is-selected { border: 2px solid var(--gold); }
.nts-ex__top { display: flex; align-items: center; gap: 12px; }
.nts-thumb { width: 62px; height: 46px; border-radius: 10px; flex: none; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #2a241d, #4a3c28); color: var(--gold-light); overflow: hidden; }
.nts-thumb img { width: 100%; height: 100%; object-fit: cover; }
.nts-thumb--none { background: transparent; border: 1px dashed var(--line-2); color: var(--faint); }
.nts--socio .nts-thumb { background: linear-gradient(135deg, #e9e2d3, #d8cfbf); color: var(--gold-dark); }
.nts-ex__name { font-weight: 700; font-size: 15px; }
.nts-ex__fields { display: grid; grid-template-columns: 64px 96px 80px 96px minmax(120px, 1fr); gap: 8px; }
@media (max-width: 720px) { .nts-ex__fields { grid-template-columns: repeat(3, minmax(0, 1fr)); } .nts-ex__fields .nts-f-load { grid-column: span 3; } .nts-ex__fields .nts-f-weight { grid-column: span 1; } }
.nts-mini { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.nts-mini span { font-size: 11px; color: var(--muted-2); }
.nts-mini input { min-height: 38px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--field-bg); color: var(--text); padding: 0 10px; font-size: 14px; font-weight: 600; width: 100%; }
.nts-mini input:focus, .nts-mini textarea:focus { border-color: var(--gold); outline: none; }
.nts-mini textarea { border-radius: 10px; border: 1px solid var(--line-2); background: var(--field-bg); color: var(--text); padding: 8px 10px; font-size: 13px; min-height: 60px; resize: vertical; width: 100%; }
.nts-mini--note textarea { border-left: 3px solid var(--gold); }
.nts-ex__tools { display: flex; gap: 6px; flex-wrap: wrap; }
.nts-icon-btn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line-2); background: transparent; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.nts-icon-btn:hover { color: var(--gold-light); border-color: var(--gold-dark); }
.nts-icon-btn--bad:hover { color: var(--bad); border-color: var(--bad); }
.nts-lib { display: flex; flex-direction: column; gap: 6px; max-height: 420px; overflow: auto; }
.nts-lib__item { min-height: 50px; display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); text-align: left; width: 100%; }
.nts-lib__item:hover { border-color: var(--gold-dark); }
.nts-lib__item[aria-selected="true"] { background: var(--gold); color: #000; border-color: var(--gold); }
.nts-lib__item .nts-thumb { width: 44px; height: 34px; border-radius: 8px; }
.nts-savebar { position: sticky; bottom: calc(76px + var(--safe-b)); z-index: 30; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--gold); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
@media (min-width: 960px) { .nts-savebar { bottom: 16px; } }

/* Feedback */
.nts-stars { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.nts-stars button { min-height: 48px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--field-bg); color: var(--text); font-family: var(--display); font-size: 26px; }
.nts-stars button[aria-checked="true"] { background: var(--gold); border-color: var(--gold); color: #000; }

/* Ajustes: horario */
.nts-sched { display: flex; flex-direction: column; gap: 8px; }
.nts-sched__day { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.nts-sched__day:last-child { border-bottom: 0; }
.nts-sched__name { font-weight: 700; font-size: 14px; padding-top: 10px; }
.nts-sched__ranges { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.nts-range { display: inline-flex; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; padding: 4px 4px 4px 8px; }
.nts-range input { width: 112px; min-height: 36px; border: 0; background: transparent; color: var(--text); font-weight: 600; font-size: 14px; }
.nts-range input::-webkit-calendar-picker-indicator { filter: invert(.7); }

/* =====================================================================
   ÁREA DE SOCIO
   ===================================================================== */
.nts-socio { max-width: 620px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.nts-shead { background: #000; color: #fff; padding: calc(12px + var(--safe-t)) 20px 30px; display: flex; flex-direction: column; gap: 18px; }
.nts-shead__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; }
.nts-shead__me { width: 44px; height: 44px; border-radius: 999px; background: var(--gold); color: #000; display: inline-flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 20px; text-decoration: none; border: 0; }
.nts-shead .nts-back { color: var(--gold-light); }
.nts-shead .nts-kicker { color: var(--gold); }
.nts-sbody { flex: 1; padding: 0 16px calc(110px + var(--safe-b)); margin-top: -16px; display: flex; flex-direction: column; gap: 20px; }
.nts-sbody--flat { margin-top: 16px; }
@media (min-width: 620px) { .nts-socio { border-left: 1px solid var(--line); border-right: 1px solid var(--line); } .nts--socio .nts-tabbar { max-width: 620px; margin: 0 auto; border-left: 1px solid var(--line); border-right: 1px solid var(--line); } }
.nts-hero { background: var(--ink); color: #fff; border-radius: 22px; padding: 20px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 20px 40px -24px rgba(21, 18, 15, .7); }
.nts-hero .nts-kicker { color: var(--gold); }
.nts-hero__num { font-family: var(--display); font-size: 88px; line-height: .8; color: var(--gold-light); }
.nts-hero .nts-muted { color: #d6cfc3; }
.nts-hero a:not(.nts-btn) { color: var(--gold-light); }
.nts-lock { font-size: 13px; color: var(--muted); background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.nts-msg { display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.nts-msg .nts-avatar { width: 36px; height: 36px; background: var(--ink); color: var(--gold-light); font-size: 16px; }
.nts-letter { width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--bg); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 22px; color: var(--text); }
.nts-letter.is-next { background: var(--gold); }
.nts-done-dot { width: 28px; height: 28px; flex: none; border-radius: 999px; background: var(--ok-dark); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; }

/* Día de entreno */
.nts-wex { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 8px 12px; }
.nts-wex.is-open { border: 2px solid var(--ink); padding-bottom: 14px; }
.nts-wex__head { display: flex; align-items: center; gap: 12px; }
.nts-check-btn { width: 38px; height: 38px; flex: none; border-radius: 999px; border: 2px solid var(--line-2); background: #fff; color: transparent; font-weight: 700; font-size: 16px; display: inline-flex; align-items: center; justify-content: center; }
.nts-check-btn[aria-pressed="true"] { border: 0; background: var(--ok-dark); color: #fff; }
.nts-wex__toggle { flex: 1; min-width: 0; min-height: 52px; border: 0; background: transparent; padding: 0; display: flex; align-items: center; gap: 8px; text-align: left; color: var(--text); }
.nts-wex__name { display: block; font-size: 15px; font-weight: 700; }
.nts-wex.is-done:not(.is-open) .nts-wex__name { color: var(--muted); text-decoration: line-through; }
.nts-wex__sum { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.nts-wex__chev { font-size: 24px; line-height: 1; color: var(--faint); transition: transform .15s; flex: none; }
.nts-wex.is-open .nts-wex__chev { transform: rotate(90deg); }
.nts-wex__body { display: flex; flex-direction: column; gap: 14px; padding-top: 12px; }
.nts-figs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.nts-fig { background: var(--bg); border-radius: 10px; padding: 8px 4px; text-align: center; min-width: 0; }
.nts-fig small { display: block; font-size: 10px; color: var(--muted); }
.nts-fig b { display: block; font-family: var(--display); font-weight: 400; font-size: 22px; line-height: 1.05; overflow-wrap: anywhere; }
.nts-feel { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.nts-feel button { min-height: 44px; border-radius: 10px; border: 1px solid var(--line-2); background: #fff; color: var(--text); font-weight: 600; font-size: 12px; }
.nts-feel button[aria-checked="true"] { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 700; }
.nts-feel button[data-v="molestia"][aria-checked="true"] { background: var(--bad-dark); border-color: var(--bad-dark); }

/* Reproductor */
.nts-player { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: radial-gradient(circle at 70% 30%, #4a3c28, #15120f 70%); display: flex; align-items: center; justify-content: center; }
.nts-player video, .nts-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.nts-player__play { width: 66px; height: 66px; border-radius: 999px; border: 0; background: var(--gold); display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }
.nts-player__label { position: absolute; left: 12px; bottom: 10px; font-size: 11px; font-weight: 600; color: var(--gold-light); }
.nts-player__shield { position: absolute; top: 0; right: 0; width: 64px; height: 64px; z-index: 3; }
.nts-player--photo { aspect-ratio: auto; background: var(--bg); }
.nts-player--photo img { width: 100%; max-height: 420px; object-fit: contain; display: block; }

/* Nutrición */
.nts-doc { width: 70px; height: 92px; flex: none; border-radius: 8px; background: #f3eee4; padding: 10px 8px; display: flex; flex-direction: column; gap: 5px; }
.nts-doc i { height: 4px; background: #d8cfbf; border-radius: 2px; display: block; }
.nts-doc i:first-child { height: 6px; width: 70%; background: var(--gold); }
.nts-doc b { margin-top: auto; font-size: 9px; font-weight: 700; color: var(--bad-dark); }
.nts-viewer { position: fixed; inset: 0; z-index: 95; background: #000; display: flex; flex-direction: column; }
.nts-viewer__bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(10px + var(--safe-t)) 14px 10px; color: #fff; background: #000; }
.nts-viewer__bar b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nts-viewer__body { flex: 1; overflow: auto; display: flex; align-items: flex-start; justify-content: center; background: #1a1714; -webkit-overflow-scrolling: touch; }
.nts-viewer__body img { max-width: 100%; height: auto; display: block; }
.nts-viewer__body iframe { width: 100%; height: 100%; border: 0; background: #fff; }

/* Subidas */
.nts-drop { border: 1.5px dashed var(--line-2); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.nts-drop.is-over { border-color: var(--gold); background: rgba(201, 160, 99, .06); }
.nts-file { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--gold); }
.nts-progress { height: 6px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.nts-progress span { display: block; height: 100%; background: var(--gold); width: 0; transition: width .2s; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
}
