:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #111827;
  background: #f5f7fb;
  --black: #090b10;
  --navy: #0b1425;
  --blue: #167fcf;
  --blue-dark: #0b5d9d;
  --blue-soft: #eaf4ff;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e9f0;
  --surface: #ffffff;
  --danger: #b42318;
  --success: #087443;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { min-width: 320px; margin: 0; background: #f5f7fb; }
button, input, select { font: inherit; }
button { cursor: pointer; }
svg { display: block; }

/* Acceso */
.login-layout { display: grid; min-height: 100vh; grid-template-columns: minmax(520px, 1.1fr) minmax(400px, .9fr); }
.login-brand { position: relative; isolation: isolate; overflow: hidden; color: white; background: linear-gradient(140deg, #05070b 0%, #08182b 58%, #0c3155 100%); }
.login-brand::after { position: absolute; z-index: -1; inset: 0; content: ""; background-image: linear-gradient(#ffffff08 1px, transparent 1px), linear-gradient(90deg, #ffffff08 1px, transparent 1px); background-size: 48px 48px; mask-image: linear-gradient(to bottom, black, transparent 75%); }
.ambient-orb { position: absolute; z-index: -1; border-radius: 999px; filter: blur(7px); opacity: .6; }
.orb-one { top: -14rem; right: -10rem; width: 37rem; height: 37rem; background: #146eb7; }
.orb-two { bottom: -14rem; left: -8rem; width: 28rem; height: 28rem; border: 1px solid #2d98e8; background: #0b2f54; }
.brand-content { display: flex; flex-direction: column; justify-content: space-between; min-height: 100vh; padding: 3rem clamp(3rem, 7vw, 7.5rem); }
.brand-lockup { display: flex; align-items: center; gap: .8rem; letter-spacing: .1em; }
.brand-logo-image { width: 52px; height: 52px; border-radius: 15px; object-fit: cover; box-shadow: 0 10px 30px #0008; }
.brand-monogram { display: grid; width: 52px; height: 52px; place-items: center; border: 1px solid #449fe3; border-radius: 15px; color: #fff; background: #0c3861; font-size: .78rem; font-weight: 900; }
.brand-logo-image + .brand-monogram { display: none; }
.brand-lockup strong, .brand-lockup span { display: block; font-size: .74rem; font-weight: 900; }
.brand-lockup span:not(.brand-monogram) { margin-top: .1rem; color: #5eb4f3; }
.brand-message { max-width: 660px; margin: auto 0; padding: 4.5rem 0; }
.eyebrow { margin: 0; font-size: .68rem; font-weight: 900; letter-spacing: .15em; }
.blue-text, .accent { color: var(--blue); }
.brand-message h1 { max-width: 650px; margin: .8rem 0 1.3rem; font-size: clamp(2.8rem, 4.7vw, 5.1rem); line-height: .98; letter-spacing: -.055em; }
.brand-message > p:last-child { max-width: 520px; color: #bccce0; font-size: 1.08rem; line-height: 1.75; }
.brand-footer { display: flex; align-items: center; gap: .75rem; color: #91a7bf; font-size: .65rem; font-weight: 800; letter-spacing: .14em; }
.brand-footer span { display: block; width: 36px; height: 2px; background: var(--blue); }
.login-panel { display: grid; place-items: center; padding: 2rem; background: #fff; }
.login-card { width: min(100%, 410px); }
.login-card-top { margin-bottom: 2.25rem; }
.security-indicator { display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .6rem; border-radius: 999px; color: #436078; background: #f2f7fb; font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.security-indicator span { width: 6px; height: 6px; border-radius: 50%; background: #18a76b; box-shadow: 0 0 0 3px #18a76b24; }
.login-card h2 { margin: 1rem 0 .55rem; color: var(--ink); font-size: 2.05rem; letter-spacing: -.045em; }
.login-card-top > p:last-child, .login-help { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.6; }
.input-group { display: grid; gap: .5rem; margin: 1.1rem 0; }
label { color: #293241; font-size: .84rem; font-weight: 800; }
input, select { width: 100%; border: 1px solid #dce3ec; border-radius: 10px; padding: .85rem .95rem; color: var(--ink); background: #fff; outline: none; transition: border-color .18s, box-shadow .18s; }
input::placeholder { color: #a4afbc; }
input:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 4px #167fcf1c; }
.primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 1.4rem; min-height: 48px; border: 0; border-radius: 10px; color: #fff; background: linear-gradient(135deg, #167fcf, #0c5f9f); box-shadow: 0 10px 20px #0c5f9f2c; font-weight: 800; transition: transform .18s, box-shadow .18s; }
.primary-button:hover { box-shadow: 0 14px 26px #0c5f9f3e; transform: translateY(-1px); }
.primary-button:disabled { cursor: wait; opacity: .7; transform: none; }
.login-card .primary-button { width: 100%; margin-top: 1.1rem; }
.login-help { margin-top: 1.4rem; text-align: center; font-size: .76rem; }
.form-message { margin: .75rem 0 0; font-size: .88rem; }
.muted { color: var(--muted); }
.error { color: var(--danger); }
.success-message { padding: .75rem .9rem; border: 1px solid #ccecd8; border-radius: 9px; color: var(--success); background: #eefbf3; }

/* Panel */
.app-layout { display: grid; min-height: 100vh; grid-template-columns: 264px minmax(0, 1fr); }
.sidebar { display: flex; position: relative; flex-direction: column; padding: 1.35rem 1rem; color: #d9e3ee; background: var(--navy); }
.sidebar::after { position: absolute; top: 0; right: 0; bottom: 0; width: 1px; content: ""; background: #ffffff12; }
.sidebar-brand { display: flex; align-items: center; gap: .7rem; padding: .65rem .7rem 2.2rem; color: #fff; text-decoration: none; }
.sidebar-brand img, .sidebar-monogram { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 11px; object-fit: cover; }
.sidebar-monogram { display: grid; place-items: center; color: #fff; background: #0d5e9e; font-size: .65rem; font-weight: 900; }
.sidebar-brand img + .sidebar-monogram { display: none; }
.sidebar-brand-text { display: grid; line-height: 1.05; letter-spacing: .1em; }
.sidebar-brand-text strong { font-size: .67rem; }.sidebar-brand-text small { margin-top: .2rem; color: #55abe6; font-size: .62rem; font-weight: 900; }
.nav-caption { margin: 0 0 .65rem; padding: 0 .7rem; color: #6f849c; font-size: .62rem; font-weight: 900; letter-spacing: .13em; }
.sidebar nav { display: grid; gap: .25rem; }
.nav-item { display: flex; align-items: center; gap: .75rem; width: 100%; border: 0; border-radius: 9px; padding: .76rem .72rem; color: #9cafc4; background: transparent; text-align: left; font-size: .87rem; font-weight: 700; transition: background .18s, color .18s; }
.nav-item svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.nav-item:hover { color: #e7eff7; background: #ffffff08; }.nav-item.active { color: #fff; background: linear-gradient(90deg, #167fcf30, #167fcf14); box-shadow: inset 2px 0 var(--blue); }
.sidebar-support { display: flex; align-items: center; gap: .65rem; margin-top: auto; padding: 1rem .7rem; border-top: 1px solid #ffffff12; }
.support-dot { width: 8px; height: 8px; border-radius: 50%; background: #21ba76; box-shadow: 0 0 0 4px #21ba761c; }.sidebar-support strong, .sidebar-support small { display: block; }.sidebar-support strong { font-size: .72rem; }.sidebar-support small { margin-top: .12rem; color: #72869d; font-size: .67rem; }
.logout-button { display: flex; align-items: center; justify-content: center; gap: .5rem; width: 100%; border: 1px solid #ffffff18; border-radius: 8px; padding: .67rem; color: #b8c7d7; background: transparent; font-size: .78rem; font-weight: 800; }.logout-button:hover { color: #fff; background: #ffffff0a; }
.dashboard { min-width: 0; padding: 2rem clamp(1.5rem, 3.6vw, 4rem) 3.5rem; background: #f6f8fb; }
.dashboard-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; max-width: 1320px; margin: 0 auto 2rem; }.header-title-row { display: flex; align-items: center; gap: .8rem; }.header-title h1 { margin: .25rem 0 0; font-size: 1.8rem; letter-spacing: -.04em; }.header-actions { display: flex; align-items: center; gap: .9rem; }
.mobile-menu-button { display: none; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; padding: 0; background: #fff; }.mobile-menu-button span { display: block; width: 17px; height: 1.7px; margin: 3.5px auto; border-radius: 9px; background: #344254; }
.mobile-menu-backdrop { display: none; }
.app-dialog { position: fixed; z-index: 70; inset: 0; display: grid; place-items: center; padding: 1.25rem; background: #07111d9c; backdrop-filter: blur(3px); }.app-dialog-card { width: min(100%, 405px); padding: 2rem; border: 1px solid #ffffff38; border-radius: 16px; background: #fff; box-shadow: 0 22px 65px #0005; text-align: center; }.dialog-icon { display: grid; width: 45px; height: 45px; place-items: center; margin: 0 auto 1rem; border-radius: 50%; color: var(--blue-dark); background: var(--blue-soft); font-size: 1.15rem; font-weight: 900; }.app-dialog[data-variant="danger"] .dialog-icon { color: #b42318; background: #fff0ef; }.app-dialog[data-variant="success"] .dialog-icon { color: #087443; background: #e5f9ee; }.app-dialog-card h2 { margin: 0; color: var(--ink); font-size: 1.23rem; letter-spacing: -.025em; }.app-dialog-card p { margin: .75rem 0 1.5rem; color: var(--muted); font-size: .88rem; line-height: 1.6; }.dialog-actions { display: flex; justify-content: center; gap: .65rem; }.dialog-confirm-button { min-height: 38px; border: 0; border-radius: 8px; padding: 0 .85rem; color: white; background: var(--blue-dark); font-size: .78rem; font-weight: 900; }.app-dialog[data-variant="danger"] .dialog-confirm-button { background: #b42318; }.app-dialog[data-variant="success"] .dialog-confirm-button { background: #087443; }
.notification-button { display: grid; width: 39px; height: 39px; place-items: center; border: 1px solid var(--line); border-radius: 10px; color: #526170; background: #fff; }.notification-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.user-chip { display: flex; align-items: center; gap: .65rem; padding: .4rem .7rem .4rem .4rem; border: 1px solid var(--line); border-radius: 11px; background: #fff; }.user-chip > span { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 8px; color: var(--blue-dark); background: var(--blue-soft); font-size: .68rem; font-weight: 900; }.user-chip strong, .user-chip small { display: block; }.user-chip strong { max-width: 150px; overflow: hidden; font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }.user-chip small { margin-top: .12rem; color: var(--muted); font-size: .62rem; font-weight: 700; }
.content-card { max-width: 1320px; margin: 0 auto; border: 1px solid var(--line); border-radius: 15px; padding: clamp(1.25rem, 2.3vw, 2.25rem); background: var(--surface); box-shadow: 0 14px 36px #1e293b08; }.content-card h2 { margin: 0; font-size: 1.35rem; letter-spacing: -.03em; }.content-card p { color: var(--muted); line-height: 1.65; }

/* Módulo Socios */
.module-header { display: flex; align-items: start; justify-content: space-between; gap: 1rem; margin-bottom: 1.75rem; }.module-header h2 { margin-bottom: .4rem; }.module-header p { margin: 0; }.module-header .primary-button { padding: 0 1rem; white-space: nowrap; }
.search-row { position: relative; margin-bottom: 1.1rem; }.search-row::before { position: absolute; top: 50%; left: .95rem; width: 13px; height: 13px; border: 1.8px solid #8494a5; border-radius: 50%; content: ""; transform: translateY(-58%); }.search-row::after { position: absolute; top: calc(50% + 4px); left: 1.68rem; width: 6px; height: 1.8px; border-radius: 99px; content: ""; background: #8494a5; transform: rotate(45deg); }.search-row input { max-width: 540px; padding-left: 2.65rem; }
.results-summary { margin: 0 0 .75rem; color: var(--muted); font-size: .78rem; font-weight: 700; }.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 11px; }table { width: 100%; min-width: 700px; border-collapse: collapse; text-align: left; }th, td { padding: .9rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }th { color: #758294; background: #fafbfd; font-size: .64rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }tbody tr { transition: background .15s; }tbody tr:hover { background: #f9fbfd; }tbody tr:last-child td { border-bottom: 0; }td { font-size: .84rem; }td small { display: block; margin-top: .17rem; color: var(--muted); font-size: .73rem; }.status-pill { display: inline-block; border-radius: 999px; padding: .25rem .55rem; font-size: .67rem; font-weight: 900; letter-spacing: .02em; }.status-pill.active { color: #087443; background: #e5f9ee; }.status-pill.inactive, .status-pill.suspended { color: #a54812; background: #fff1df; }.table-action, .text-button { border: 0; padding: .3rem .15rem; color: var(--blue-dark); background: transparent; font-size: .78rem; font-weight: 900; }.table-action:hover, .text-button:hover { color: var(--blue); text-decoration: underline; }.pagination { display: flex; align-items: center; justify-content: end; gap: .75rem; margin-top: 1rem; color: var(--muted); font-size: .78rem; font-weight: 700; }.secondary-button { min-height: 38px; border: 1px solid #dce3ec; border-radius: 8px; padding: .45rem .75rem; color: #344254; background: #fff; font-size: .78rem; font-weight: 800; }.secondary-button:hover { border-color: #aec5da; background: #f8fbfe; }.secondary-button:disabled { cursor: not-allowed; opacity: .45; }
.member-detail-backdrop { position: fixed; z-index: 40; inset: 0; opacity: 0; pointer-events: none; background: #08132180; transition: opacity .22s ease; }.member-detail-backdrop.is-visible { opacity: 1; pointer-events: auto; }
.member-detail { position: fixed; z-index: 41; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); margin: 0; padding: 2rem; overflow-y: auto; border-left: 1px solid #d5e1ec; background: linear-gradient(135deg, #f6fbff, #fff); box-shadow: -18px 0 45px #10182825; transform: translateX(105%); transition: transform .25s ease; }.member-detail.is-open { transform: translateX(0); }.detail-header { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }.detail-header h3 { margin: .28rem 0 1.15rem; font-size: 1.2rem; }.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }.detail-grid div { display: grid; gap: .23rem; }.detail-grid span:first-child { color: var(--muted); font-size: .69rem; font-weight: 800; letter-spacing: .03em; }.detail-grid strong { font-size: .84rem; }.detail-actions { display: flex; justify-content: end; margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid #dce5ee; }.danger-button, .reactivate-button { min-height: 40px; border-radius: 8px; padding: .55rem .85rem; font-size: .78rem; font-weight: 900; }.danger-button { border: 1px solid #f2c8c4; color: #b42318; background: #fff7f6; }.danger-button:hover { background: #fff0ee; }.reactivate-button { border: 1px solid #bee8d0; color: #087443; background: #f0fbf5; }.reactivate-button:hover { background: #e3f7ec; }.danger-button:disabled, .reactivate-button:disabled { cursor: wait; opacity: .65; }.empty-state { padding: 2.4rem 1rem; border: 1px dashed #d2dbe6; border-radius: 11px; text-align: center; }.empty-state h3 { margin: 0; }
.member-form { display: grid; gap: 1.25rem; }.member-form section { padding: 1.25rem; border: 1px solid var(--line); border-radius: 11px; background: #fcfdff; }.member-form h3 { margin: 0 0 1.1rem; font-size: .9rem; }.member-form h3 span { color: var(--muted); font-size: .74rem; font-weight: 500; }.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }.member-form label { display: grid; gap: .45rem; }.member-form small { color: var(--muted); font-size: .72rem; font-weight: 500; line-height: 1.45; }.form-actions { display: flex; justify-content: end; gap: .7rem; }.form-actions .primary-button { padding: 0 1rem; }

/* Módulo Membresías y pagos */
.membership-layout { display: grid; grid-template-columns: minmax(280px, .72fr) minmax(0, 1.28fr); gap: 1.25rem; align-items: start; }.membership-search-panel, .membership-detail-panel { min-height: 220px; border: 1px solid var(--line); border-radius: 12px; padding: 1.25rem; background: #fcfdff; }.membership-search-panel > label { display: block; margin-bottom: .65rem; }.membership-search-panel .search-row { margin-bottom: .8rem; }.membership-search-panel .search-row input { max-width: none; }.membership-member-results { display: grid; gap: .45rem; }.member-choice { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .7rem; width: 100%; border: 1px solid transparent; border-radius: 10px; padding: .7rem; color: var(--ink); background: transparent; text-align: left; }.member-choice:hover { border-color: #cfe2f4; background: var(--blue-soft); }.member-choice-avatar { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 9px; color: var(--blue-dark); background: #dceefd; font-size: .66rem; font-weight: 900; }.member-choice-avatar.large { width: 43px; height: 43px; border-radius: 12px; font-size: .8rem; }.member-choice strong, .member-choice small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.member-choice strong { font-size: .8rem; }.member-choice small { margin-top: .12rem; color: var(--muted); font-size: .69rem; }.membership-member-heading { display: flex; align-items: center; gap: .8rem; padding-bottom: 1.1rem; border-bottom: 1px solid var(--line); }.membership-member-heading > div:nth-child(2) { min-width: 0; }.membership-member-heading h3 { margin: .23rem 0; font-size: 1.08rem; }.membership-member-heading p:not(.eyebrow) { overflow: hidden; margin: 0; color: var(--muted); font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }.membership-member-heading .text-button { margin-left: auto; }.membership-summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 1.1rem 0; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--line); }.membership-summary-grid > div { min-height: 74px; padding: .78rem; background: #fff; }.membership-summary-grid span:first-child { display: block; margin-bottom: .3rem; color: var(--muted); font-size: .66rem; font-weight: 800; letter-spacing: .03em; }.membership-summary-grid strong { font-size: .8rem; }.payment-form { padding-top: 1.15rem; border-top: 1px solid var(--line); }.payment-form h3 { margin: 0 0 1rem; font-size: .95rem; }.payment-form label { display: grid; gap: .45rem; }.payment-form label span { color: var(--muted); font-size: .68rem; font-weight: 500; }.payment-plan-description { min-height: 1.4rem; margin: .7rem 0 0; color: var(--muted); font-size: .74rem; line-height: 1.45; }
.payment-history-section { margin-top: 1.6rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }.section-heading h3 { margin: 0; font-size: .95rem; }.section-heading p { margin: .3rem 0 1rem; color: var(--muted); font-size: .76rem; }.payment-history-table table { min-width: 760px; }.payment-history-empty { display: grid; gap: .3rem; padding: 1.1rem; border: 1px dashed #d4dee9; border-radius: 9px; color: var(--muted); background: #fff; font-size: .78rem; }.payment-history-empty strong { color: #445363; }

@media (max-width: 900px) {
  .login-layout { grid-template-columns: 1fr; }.login-brand { min-height: 420px; }.brand-content { min-height: 420px; padding: 2.5rem; }.brand-message { margin: auto 0; padding: 2rem 0; }
  .app-layout { display: block; }.sidebar { position: fixed; z-index: 30; top: 0; bottom: 0; left: 0; width: min(82vw, 300px); min-height: 100dvh; transform: translateX(-105%); transition: transform .24s ease; box-shadow: 18px 0 45px #0004; }.app-layout.mobile-menu-open .sidebar { transform: translateX(0); }.sidebar nav { grid-template-columns: 1fr; }.sidebar-support { margin-top: auto; }.logout-button { margin-top: 1rem; }
  .mobile-menu-button { display: block; }.mobile-menu-backdrop { display: block; position: fixed; z-index: 20; inset: 0; opacity: 0; pointer-events: none; background: #07111ddb; transition: opacity .24s ease; }.app-layout.mobile-menu-open + .mobile-menu-backdrop { opacity: 1; pointer-events: auto; }
  .dashboard { min-height: 100vh; padding: 1.5rem; }.membership-layout { grid-template-columns: 1fr; }
}
@media (max-width: 600px) { .login-panel { padding: 1.5rem; }.login-brand { min-height: 370px; }.brand-content { min-height: 370px; padding: 1.75rem; }.brand-message h1 { font-size: 2.55rem; }.brand-message > p:last-child { font-size: .95rem; }.sidebar nav { grid-template-columns: 1fr; }.dashboard-header, .module-header, .detail-header { align-items: stretch; flex-direction: column; }.header-actions { justify-content: space-between; }.module-header .primary-button { width: 100%; }.member-detail { padding: 1.5rem; }.detail-grid, .form-grid, .membership-summary-grid { grid-template-columns: 1fr; }.form-actions { flex-direction: column-reverse; }.form-actions button { width: 100%; }.notification-button { display: none; } }
