/* ─── SOCIOS EREYS — Design System v1.0 ─────────────────────────── */
:root {
  --bg:          #f7f5f2;
  --surface:     #ffffff;
  --surface-alt: #f0ece7;
  --surface-2:   #faf7f4;
  --surface-3:   #f0e8df;
  --footer-bg:   #e9e3dd;
  --text:        #1e1e1e;
  --muted:       #57524d;
  --muted-2:     #b0a090;
  --dark:        #2d2b29;
  --eyebrow:     #8d5a28;
  --primary:     #e47c26;
  --primary-dark:#c96312;
  --primary-deep:#c4601a;
  --line:        #d8d2cb;
  --border-input:#e2d5c8;
  --border-card: #f0e8df;
  --verde:       #10b981;
  --rojo:        #ef4444;
  --amarillo:    #f59e0b;
  --azul:        #2980b9;
  --topbar-h:    56px;
  --bottom-h:    64px;
  --radius:      12px;
  --radius-sm:   8px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100dvh;
  padding-top: var(--topbar-h);
  padding-bottom: calc(var(--bottom-h) + env(safe-area-inset-bottom));
}

/* ─── Topbar ────────────────────────────────────────────────────── */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  background: var(--dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 100;
  gap: 12px;
}
.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.topbar-logo {
  height: 34px;
  width: auto;
  background: #fff;
  border-radius: 8px;
  padding: 3px;
}
.topbar-title {
  font-family: 'Syne', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}
.topbar-title span {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 400;
  color: rgba(255,255,255,.55);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.topbar-socio {
  font-size: 13px;
  color: rgba(255,255,255,.75);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}
.topbar-socio strong {
  display: block;
  color: #fff;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── Bottom nav ────────────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bottom-h);
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface);
  border-top: 1px solid var(--line);
  display: flex;
  z-index: 100;
}
.bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-decoration: none;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  transition: color .15s;
  padding: 0 4px;
}
.bottom-nav a svg {
  width: 22px; height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.bottom-nav a.active,
.bottom-nav a:hover {
  color: var(--primary);
}
.bottom-nav a.active svg {
  stroke-width: 2.2;
}

/* ─── Contenido principal ───────────────────────────────────────── */
.main {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px 16px 12px;
}

/* ─── Cards ─────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border-card);
  padding: 20px;
  margin-bottom: 14px;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 8px;
}
.card-title {
  font-family: 'Syne', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--dark);
}
.card-eyebrow {
  font-size: 11px;
  font-weight: 600;
  color: var(--eyebrow);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 6px;
}

/* ─── Badge estado de membresía ─────────────────────────────────── */
.membresia-card {
  background: linear-gradient(135deg, var(--dark) 0%, #3d3a37 100%);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}
.membresia-card::before {
  content: '';
  position: absolute;
  right: -20px; top: -20px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: rgba(228,124,38,.15);
}
.membresia-card .plan-nombre {
  font-family: 'Syne', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}
.membresia-card .plan-sub {
  font-size: 12px;
  color: rgba(255,255,255,.55);
  margin-bottom: 14px;
}
.membresia-card .membresia-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.membresia-card .membresia-dato {
  flex: 1;
  min-width: 100px;
}
.membresia-card .membresia-dato .label {
  font-size: 10px;
  color: rgba(255,255,255,.45);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 2px;
}
.membresia-card .membresia-dato .value {
  font-size: 14px;
  color: #fff;
  font-weight: 600;
}
.membresia-card .badge-estado {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(16,185,129,.2);
  color: #34d399;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid rgba(16,185,129,.35);
  margin-bottom: 14px;
}
.membresia-card .badge-estado.suspendido {
  background: rgba(239,68,68,.2);
  color: #f87171;
  border-color: rgba(239,68,68,.35);
}
.membresia-card .badge-estado.pendiente,
.membresia-card .badge-estado.carencia {
  background: rgba(245,158,11,.2);
  color: #fbbf24;
  border-color: rgba(245,158,11,.35);
}

/* ─── Grid accesos rápidos ──────────────────────────────────────── */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}
.quick-btn {
  background: var(--surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  transition: border-color .15s, transform .15s;
  cursor: pointer;
}
.quick-btn:active { transform: scale(.97); }
.quick-btn:hover  { border-color: var(--primary); }
.quick-btn .icon-wrap {
  width: 40px; height: 40px;
  background: var(--surface-3);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.quick-btn .icon-wrap svg {
  width: 20px; height: 20px;
  stroke: var(--primary);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.quick-btn .btn-label {
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--dark);
}
.quick-btn .btn-sub {
  font-size: 12px;
  color: var(--muted);
}

/* ─── Badges genéricos ──────────────────────────────────────────── */
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
}
.badge-verde    { background: #d1fae5; color: #065f46; }
.badge-rojo     { background: #fee2e2; color: #991b1b; }
.badge-amarillo { background: #fef3c7; color: #92400e; }
.badge-azul     { background: #dbeafe; color: #1e40af; }
.badge-gris     { background: var(--surface-alt); color: var(--muted); }
.badge-naranja  { background: #fde8d0; color: #92400e; }

/* ─── Alert banner ──────────────────────────────────────────────── */
.alert {
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 14px;
  margin-bottom: 14px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.alert svg { width:18px; height:18px; flex-shrink:0; margin-top:1px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.alert-warn { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.alert-danger { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-info  { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }
.alert-ok    { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }

/* ─── Inputs y formularios ──────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-family: 'Inter', sans-serif;
  background: var(--surface-2);
  color: var(--text);
  transition: border-color .15s;
  -webkit-appearance: none;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--surface);
}
.form-control::placeholder { color: var(--muted-2); }
textarea.form-control { resize: vertical; min-height: 100px; }

/* ─── Botones ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-family: 'Syne', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background .15s, transform .1s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-outline:hover { background: var(--surface-3); }
.btn-block { width: 100%; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ─── Lista de ítems ────────────────────────────────────────────── */
.item-list { list-style: none; }
.item-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.item-list li:last-child { border-bottom: none; padding-bottom: 0; }
.item-list li:first-child { padding-top: 0; }
.item-meta { flex: 1; min-width: 0; }
.item-meta .titulo {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.item-meta .sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* ─── Section title ─────────────────────────────────────────────── */
.section-title {
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--eyebrow);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 10px;
  margin-top: 6px;
}

/* ─── Credencial digital ────────────────────────────────────────── */
.credencial-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}
.credencial {
  background: linear-gradient(135deg, #2d2b29 0%, #3d3a37 100%);
  border-radius: 16px;
  width: 100%;
  max-width: 380px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
}
.credencial::before {
  content: '';
  position: absolute;
  right: -30px; bottom: -30px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: rgba(228,124,38,.12);
}
.credencial::after {
  content: '';
  position: absolute;
  left: -20px; top: -20px;
  width: 100px; height: 100px;
  border-radius: 50%;
  background: rgba(228,124,38,.07);
}
.cred-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.cred-org {
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: .04em;
  line-height: 1.2;
}
.cred-org span {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 400;
  color: rgba(255,255,255,.4);
  letter-spacing: .06em;
}
.cred-body {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}
.cred-info { flex: 1; }
.cred-nombre {
  font-family: 'Syne', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 6px;
}
.cred-numero {
  font-size: 12px;
  color: rgba(255,255,255,.5);
  font-weight: 500;
  letter-spacing: .08em;
  margin-bottom: 10px;
}
.cred-plan {
  display: inline-block;
  background: rgba(228,124,38,.25);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid rgba(228,124,38,.4);
  margin-bottom: 10px;
}
.cred-vto {
  font-size: 11px;
  color: rgba(255,255,255,.45);
}
.cred-vto strong { color: rgba(255,255,255,.8); }
.cred-qr {
  flex-shrink: 0;
  width: 88px;
  height: 88px;
  background: #fff;
  border-radius: 8px;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cred-qr canvas, .cred-qr img { width: 100%; height: 100%; }

/* ─── Página de login ───────────────────────────────────────────── */
.login-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: var(--bg);
}
.login-logo {
  height: 56px;
  margin-bottom: 8px;
}
.login-subtitle {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 32px;
  text-align: center;
}
.login-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border-card);
  padding: 28px 24px;
  width: 100%;
  max-width: 380px;
}
.login-title {
  font-family: 'Syne', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 6px;
}
.login-desc {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
}
.login-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 12px;
  color: var(--muted);
}

/* ─── Verificar QR (página pública) ────────────────────────────── */
.verify-page {
  padding-top: 0;
  padding-bottom: 0;
}
.verify-card {
  max-width: 400px;
  margin: 40px auto;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border-card);
  overflow: hidden;
}
.verify-header {
  background: var(--dark);
  padding: 20px;
  text-align: center;
}
.verify-body {
  padding: 24px;
}
.verify-estado {
  text-align: center;
  padding: 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}
.verify-estado.ok    { background: #d1fae5; }
.verify-estado.error { background: #fee2e2; }
.verify-estado .icono { font-size: 40px; margin-bottom: 8px; }
.verify-estado .estado-txt {
  font-family: 'Syne', sans-serif;
  font-size: 18px;
  font-weight: 800;
}
.verify-estado.ok    .estado-txt { color: #065f46; }
.verify-estado.error .estado-txt { color: #991b1b; }
.dato-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-card);
  font-size: 14px;
  gap: 8px;
}
.dato-row:last-child { border-bottom: none; }
.dato-row .key { color: var(--muted); font-weight: 500; }
.dato-row .val { font-weight: 600; text-align: right; }

/* ─── Mensajes ──────────────────────────────────────────────────── */
.msg-item {
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 10px;
  background: var(--surface);
}
.msg-item.no-leido { border-left: 3px solid var(--primary); }
.msg-asunto {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}
.msg-meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ─── Novedades ─────────────────────────────────────────────────── */
.novedad-item {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-card);
  text-decoration: none;
  color: var(--text);
}
.novedad-item:last-child { border-bottom: none; }
.novedad-img {
  width: 70px;
  height: 70px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface-3);
}
.novedad-img-placeholder {
  width: 70px;
  height: 70px;
  border-radius: 8px;
  background: var(--surface-3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 28px;
}
.novedad-info .titulo {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.35;
  margin-bottom: 4px;
}
.novedad-info .resumen {
  font-size: 12px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.novedad-info .fecha {
  font-size: 11px;
  color: var(--muted-2);
  margin-top: 4px;
}

/* ─── Estado vacío ──────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 40px 20px;
}
.empty-state .icono {
  font-size: 42px;
  margin-bottom: 12px;
  opacity: .5;
}
.empty-state p {
  color: var(--muted);
  font-size: 14px;
}

/* ─── Resultado de pago ─────────────────────────────────────────── */
.pago-result {
  text-align: center;
  padding: 40px 20px;
}
.pago-result .icono { font-size: 60px; margin-bottom: 16px; }
.pago-result h2 {
  font-family: 'Syne', sans-serif;
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 10px;
}
.pago-result p { font-size: 15px; color: var(--muted); margin-bottom: 24px; }

/* ─── Print: credencial ─────────────────────────────────────────── */
@media print {
  body { padding: 0; background: #fff; }
  .topbar, .bottom-nav, .btn, .section-title { display: none !important; }
  .main { padding: 0; max-width: 100%; }
  .credencial-wrap { margin: 0; }
  .credencial { box-shadow: none; border: 1px solid #ddd; }
}
/* ─── AGREGAR a /public_html/socios/assets/css/socios.css ─────────────── */

.bottom-nav a.mas-btn { cursor: pointer; }

.mas-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 1999;
}
.mas-overlay.open { display: block; }

.mas-sheet {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  padding: 8px 8px calc(16px + env(safe-area-inset-bottom));
  z-index: 2000;
  transform: translateY(100%);
  transition: transform .25s ease;
  max-height: 70vh;
  overflow-y: auto;
}
.mas-sheet.open { transform: translateY(0); }

.mas-sheet-handle {
  width: 36px; height: 4px;
  background: var(--border-card);
  border-radius: 4px;
  margin: 8px auto 12px;
}

.mas-sheet a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  transition: background .15s;
}
.mas-sheet a:active,
.mas-sheet a:hover {
  background: var(--surface-2);
}
.mas-sheet a svg {
  width: 20px; height: 20px;
  stroke: var(--primary);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.mas-sheet a .badge {
  margin-left: auto;
}

