/* ============================================================
   CLUB CRM — Design System Premium Sport
   Dark base · Emerald accent · Geometric details
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;500;600;700;800&family=Barlow:wght@300;400;500;600&display=swap');

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

:root {
  --em:      #059669;
  --em-d:    #047857;
  --em-dd:   #065F46;
  --em-l:    rgba(5,150,105,.12);
  --em-ll:   rgba(5,150,105,.06);
  --bg:      #F0F2F5;
  --bg2:     #FFFFFF;
  --bg3:     #F7F8FA;
  --bg4:     #EEF0F3;
  --bg5:     #E4E6EA;
  --border:  rgba(0,0,0,.07);
  --border2: rgba(0,0,0,.12);
  --tx:      #1A1D23;
  --tx2:     #52576B;
  --tx3:     #8B91A5;
  --red:     #DC2626;
  --red-l:   rgba(220,38,38,.1);
  --amber:   #D97706;
  --amber-l: rgba(217,119,6,.1);
  --blue:    #2563EB;
  --blue-l:  rgba(37,99,235,.1);
  --sidebar: 240px;
  --hdr:     58px;
  --r:       10px;
  --r-sm:    6px;
  --r-lg:    14px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Barlow', sans-serif;
  font-size: 14px;
  color: var(--tx);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  color: var(--tx);
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg5); border-radius: 4px; border: 1px solid var(--bg4); }

/* ============================================================
   LAYOUT
   ============================================================ */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar);
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 200;
  overflow-y: auto;
}

.main-content {
  margin-left: var(--sidebar);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  height: var(--hdr);
  background: rgba(10,10,11,.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.page-content { padding: 24px; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar-logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}

.logo-mark {
  width: 36px; height: 36px;
  background: var(--em);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 10px;
}
.logo-mark i { font-size: 20px; color: #fff; }

.logo-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--tx);
  letter-spacing: .5px;
  text-transform: uppercase;
}
.logo-sub { font-size: 11px; color: var(--tx3); margin-top: 1px; }

.nav-section { padding: 8px 0; }
.nav-lbl {
  font-size: 10px;
  color: var(--tx3);
  padding: 6px 20px 4px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  font-size: 13px;
  color: var(--tx2);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: all .15s;
  position: relative;
}
.nav-item:hover { background: var(--bg3); color: var(--tx); }
.nav-item.active {
  background: var(--em-l);
  color: var(--em);
  border-left-color: var(--em);
  font-weight: 500;
}
.nav-item i { font-size: 16px; flex-shrink: 0; }

.nav-badge {
  margin-left: auto;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 20px;
  font-family: 'Barlow Condensed', sans-serif;
}
.nav-badge.green { background: var(--em); color: #000; }

.sidebar-footer {
  margin-top: auto;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ============================================================
   TOPBAR
   ============================================================ */
.page-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  flex: 1;
  color: var(--tx);
}
.page-title span {
  font-size: 13px;
  color: var(--tx3);
  font-weight: 400;
  margin-left: 8px;
  text-transform: none;
  font-family: 'Barlow', sans-serif;
  letter-spacing: 0;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(5,150,105,.15), transparent);
}

.card-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--tx);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-title i { font-size: 16px; color: var(--em); }

/* ============================================================
   STAT CARDS
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px,1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
  transition: border-color .2s, transform .2s;
}
.stat-card:hover { border-color: var(--border2); transform: translateY(-1px); }
.stat-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--em);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s;
}
.stat-card:hover::after { transform: scaleX(1); }

.stat-lbl {
  font-size: 11px;
  color: var(--tx3);
  text-transform: uppercase;
  letter-spacing: .5px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  margin-bottom: 6px;
}
.stat-val {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: var(--tx);
  line-height: 1;
}
.stat-sub { font-size: 11px; color: var(--tx3); margin-top: 4px; }
.stat-sub.up   { color: var(--em); }
.stat-sub.down { color: var(--red); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border2);
  background: var(--bg4);
  color: var(--tx);
  text-decoration: none;
  transition: all .15s;
  font-family: 'Barlow', sans-serif;
  white-space: nowrap;
}
.btn:hover { background: var(--bg5); border-color: var(--border2); }
.btn:active { transform: scale(.98); }

.btn-primary {
  background: var(--em);
  color: #000;
  border-color: var(--em);
  font-weight: 600;
}
.btn-primary:hover { background: var(--em-d); border-color: var(--em-d); }

.btn-danger { background: var(--red-l); color: var(--red); border-color: rgba(255,71,87,.3); }
.btn-danger:hover { background: var(--red); color: #fff; }

.btn-sm { padding: 5px 11px; font-size: 12px; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--tx2); }
.btn-ghost:hover { background: var(--bg4); color: var(--tx); }

.btn-wsp {
  background: #25D366;
  color: #fff;
  border-color: #25D366;
  font-weight: 600;
  width: 100%;
  justify-content: center;
}
.btn-wsp:hover { background: #128C7E; border-color: #128C7E; }

.icon-btn {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--bg4);
  cursor: pointer;
  color: var(--tx3);
  font-size: 14px;
  transition: all .15s;
  text-decoration: none;
  flex-shrink: 0;
}
.icon-btn:hover { background: var(--bg5); color: var(--tx); border-color: var(--border2); }

/* ============================================================
   PILLS / BADGES
   ============================================================ */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  font-family: 'Barlow Condensed', sans-serif;
  letter-spacing: .3px;
  text-transform: uppercase;
}
.pill.green  { background: var(--em-l); color: var(--em); }
.pill.red    { background: var(--red-l); color: var(--red); }
.pill.amber  { background: var(--amber-l); color: var(--amber); }
.pill.blue   { background: var(--blue-l); color: var(--blue); }
.pill.gray   { background: rgba(255,255,255,.06); color: var(--tx3); }
.pill.purple { background: rgba(139,92,246,.12); color: #A78BFA; }

/* ============================================================
   AVATAR
   ============================================================ */
.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--em-l);
  color: var(--em);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  letter-spacing: .5px;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 14px; }
.form-label {
  display: block;
  font-size: 11px;
  color: var(--tx3);
  margin-bottom: 6px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  font-family: 'Barlow Condensed', sans-serif;
}
.form-control {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border2);
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--tx);
  background: var(--bg3);
  transition: border-color .15s, box-shadow .15s;
  font-family: 'Barlow', sans-serif;
}
.form-control:focus {
  outline: none;
  border-color: var(--em);
  box-shadow: 0 0 0 3px var(--em-l);
}
.form-control option { background: var(--bg3); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ============================================================
   TABLE
   ============================================================ */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.table th {
  text-align: left;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px;
  color: var(--tx3);
  font-weight: 700;
  padding: 0 10px 10px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
table.table td {
  padding: 10px;
  border-top: 1px solid var(--border);
  vertical-align: middle;
  color: var(--tx);
}
table.table tbody tr { transition: background .1s; }
table.table tbody tr:hover td { background: var(--bg3); }

/* ============================================================
   SEARCH
   ============================================================ */
.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--r-sm);
  padding: 9px 12px;
  margin-bottom: 14px;
  transition: border-color .15s;
}
.search-bar:focus-within { border-color: var(--em); }
.search-bar i { font-size: 15px; color: var(--tx3); }
.search-bar input {
  background: none; border: none; outline: none;
  font-size: 13px; flex: 1; color: var(--tx);
  font-family: 'Barlow', sans-serif;
}
.search-bar input::placeholder { color: var(--tx3); }

/* ============================================================
   FILTERS
   ============================================================ */
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.filter-btn {
  padding: 5px 13px;
  border-radius: 20px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .3px;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--tx3);
  text-decoration: none;
  transition: all .15s;
}
.filter-btn:hover { background: var(--bg4); color: var(--tx); }
.filter-btn.active {
  background: var(--em-l);
  color: var(--em);
  border-color: rgba(0,208,132,.3);
}

/* ============================================================
   FLASH
   ============================================================ */
.flash {
  padding: 11px 16px;
  border-radius: var(--r-sm);
  margin-bottom: 16px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.flash.success { background: var(--em-l); color: var(--em); border: 1px solid rgba(0,208,132,.2); }
.flash.error   { background: var(--red-l); color: var(--red); border: 1px solid rgba(255,71,87,.2); }
.flash.info    { background: var(--blue-l); color: var(--blue); border: 1px solid rgba(61,142,255,.2); }

/* ============================================================
   UPLOAD AREA
   ============================================================ */
.upload-area {
  background: var(--bg3);
  border: 2px dashed var(--border2);
  border-radius: var(--r);
  padding: 28px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
}
.upload-area:hover { border-color: var(--em); background: var(--em-ll); }
.upload-area i { font-size: 36px; color: var(--tx3); display: block; margin-bottom: 8px; }
.upload-area:hover i { color: var(--em); }

/* ============================================================
   CARNET
   ============================================================ */
.carnet {
  background: linear-gradient(135deg, #064E3B 0%, #065F46 50%, #047857 100%);
  border-radius: 16px;
  padding: 22px;
  color: #fff;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(5,150,105,.3);
}
.carnet::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23059669' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.carnet::after {
  content: '';
  position: absolute;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.12) 0%, transparent 70%);
  top: -60px; right: -40px;
}
.qr-box {
  width: 124px; height: 124px;
  background: #fff;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  padding: 4px;
}
.qr-box img { display:block; width:112px; height:112px; object-fit:contain; }

/* ============================================================
   RESULT ESTADO
   ============================================================ */
.result-ok {
  background: var(--em-l);
  border: 1px solid rgba(0,208,132,.25);
  border-radius: var(--r-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.result-mal {
  background: var(--red-l);
  border: 1px solid rgba(255,71,87,.25);
  border-radius: var(--r-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.result-icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.result-icon.ok  { background: var(--em); }
.result-icon.mal { background: var(--red); }
.result-icon i { font-size: 26px; color: #fff; }
.result-icon.ok i { color: #fff; }

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.prog-bar-wrap { height: 4px; background: var(--bg5); border-radius: 2px; overflow: hidden; }
.prog-bar-fill { height: 100%; border-radius: 2px; background: var(--em); transition: width .5s; }

/* ============================================================
   LOGIN
   ============================================================ */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
.login-wrap::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(5,150,105,.08) 0%, transparent 70%);
  top: -200px; right: -200px;
}
.login-wrap::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(5,150,105,.06) 0%, transparent 70%);
  bottom: -150px; left: -100px;
}
.login-card {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--r-lg);
  padding: 40px 36px;
  width: 380px;
  position: relative;
  z-index: 1;
}
.login-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--em), transparent);
}

/* ============================================================
   TWO / THREE COL
   ============================================================ */
.two-col   { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.three-col { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }

/* ============================================================
   ACTIVITY CARDS
   ============================================================ */
.act-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
  transition: border-color .2s, transform .2s;
}
.act-card:hover { border-color: var(--border2); transform: translateY(-2px); }

/* ============================================================
   AVISO ITEM
   ============================================================ */
.aviso-item { padding: 12px 0; border-bottom: 1px solid var(--border); }
.aviso-item:last-child { border-bottom: none; }
.aviso-unread { width: 6px; height: 6px; border-radius: 50%; background: var(--em); flex-shrink: 0; margin-top: 5px; }

/* ============================================================
   GEOMETRIC DECORATIONS
   ============================================================ */
.geo-corner {
  position: absolute;
  bottom: 0; right: 0;
  width: 80px; height: 80px;
  background: conic-gradient(from 45deg, var(--em) 0deg 90deg, transparent 90deg 360deg);
  opacity: .06;
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); transition: transform .3s; }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .two-col, .three-col { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes scanline {
  0%   { top: 10%; }
  100% { top: 90%; }
}
@keyframes pulse-em {
  0%, 100% { box-shadow: 0 0 0 0 rgba(5,150,105,.3); }
  50%       { box-shadow: 0 0 0 8px rgba(5,150,105,0); }
}

.fade-in { animation: fadeInUp .4s ease both; }
.fade-in-2 { animation: fadeInUp .4s .08s ease both; }
.fade-in-3 { animation: fadeInUp .4s .16s ease both; }
.fade-in-4 { animation: fadeInUp .4s .24s ease both; }
.fade-in-5 { animation: fadeInUp .4s .32s ease both; }

/* ============================================================
   PWA INSTALL BANNER
   ============================================================ */
.pwa-banner {
  display: none !important;
  position: fixed;
  right: 18px;
  bottom: 18px;
  left: auto;
  transform: none;
  background: var(--bg2);
  border: 1px solid rgba(5,150,105,.3);
  border-radius: var(--r-lg);
  padding: 12px 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,.12), 0 0 0 1px rgba(5,150,105,.08);
  align-items: center;
  gap: 12px;
  z-index: 9999;
  width: min(360px, calc(100% - 28px));
  max-width: 360px;
  animation: fadeInUp .4s ease both;
}
.pwa-banner.show { display: flex !important; }
@media (max-width: 520px) {
  .pwa-banner {
    right: 12px;
    bottom: calc(76px + env(safe-area-inset-bottom));
    width: calc(100% - 24px);
    max-width: none;
  }
}

/* ============================================================
   LIGHT-SLATE OVERRIDES
   ============================================================ */

/* Sidebar — blanco con borde sutil */
.sidebar {
  background: #FFFFFF;
  border-right: 1px solid rgba(0,0,0,.08);
  box-shadow: 2px 0 12px rgba(0,0,0,.04);
}
.nav-item:hover { background: #F0F7F4; color: var(--tx); }
.nav-item.active { background: rgba(5,150,105,.1); color: var(--em-d); border-left-color: var(--em); }
.nav-lbl { color: #B0B8C8; }
.logo-sub { color: #A0A8B8; }

/* Topbar */
.topbar {
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,0,0,.07);
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}

/* Cards */
.card { background: #FFFFFF; border-color: rgba(0,0,0,.07); box-shadow: 0 1px 4px rgba(0,0,0,.04); }
.card::before { background: linear-gradient(90deg, transparent, rgba(5,150,105,.1), transparent); }

/* Stat card */
.stat-card { background: #F7F9FC; border-color: rgba(0,0,0,.07); }
.stat-card:hover { border-color: rgba(5,150,105,.3); }

/* Table rows */
table.table tbody tr:hover td { background: #F7FCF9; }

/* Search bar */
.search-bar { background: #F7F8FA; border-color: rgba(0,0,0,.1); }

/* Form control */
.form-control { background: #FFFFFF; border-color: rgba(0,0,0,.15); color: var(--tx); }
.form-control:focus { border-color: var(--em); box-shadow: 0 0 0 3px rgba(5,150,105,.1); }

/* Buttons */
.btn { background: #FFFFFF; border-color: rgba(0,0,0,.12); color: var(--tx); }
.btn:hover { background: #F5F5F5; }
.icon-btn { background: #FFFFFF; border-color: rgba(0,0,0,.1); color: var(--tx2); }
.icon-btn:hover { background: #F5F5F5; color: var(--tx); }

/* Nav badge */
.nav-badge { background: var(--red); }
.nav-badge.green { background: var(--em); color: #fff; }

/* Login card */
.login-wrap { background: linear-gradient(135deg, #EEF2F7 0%, #E8F5EF 100%); }
.login-wrap::before { background: radial-gradient(circle, rgba(5,150,105,.1) 0%, transparent 70%); }
.login-wrap::after  { background: radial-gradient(circle, rgba(5,150,105,.07) 0%, transparent 70%); }
.login-card { background: #FFFFFF; border-color: rgba(0,0,0,.1); box-shadow: 0 8px 40px rgba(0,0,0,.1); }
.login-card::before { background: linear-gradient(90deg, transparent, var(--em), transparent); opacity: .4; }

/* Logo mark */
.logo-mark { background: var(--em); }

/* Geo corner */
.geo-corner { opacity: .05; }

/* Result ok/mal */
.result-ok  { background: rgba(5,150,105,.08); border-color: rgba(5,150,105,.2); }
.result-mal { background: rgba(220,38,38,.08); border-color: rgba(220,38,38,.2); }

/* PWA Banner */
.pwa-banner { background: #FFFFFF; box-shadow: 0 8px 32px rgba(0,0,0,.15); }

/* Sidebar footer */
.sidebar-footer { border-top-color: rgba(0,0,0,.07); }

/* Bottom nav mobile */
.bottom-nav { background: rgba(255,255,255,.97); border-top-color: rgba(0,0,0,.08); }
.bn-item { color: #A0A8B8; }
.bn-item.active { color: var(--em); }

/* Socio header card */
.socio-header-card {
  background: linear-gradient(135deg, #064E3B 0%, #065F46 60%, #047857 100%);
}

/* Upload area */
.upload-area { background: #F7F8FA; border-color: rgba(0,0,0,.12); }
.upload-area:hover { border-color: var(--em); background: rgba(5,150,105,.05); }
.upload-area i { color: #A0A8B8; }
.upload-area:hover i { color: var(--em); }

/* Activity cards */
.act-card { background: #F7F9FC; border-color: rgba(0,0,0,.07); }
.act-card:hover { border-color: rgba(5,150,105,.25); }

/* Filter btn */
.filter-btn { background: #FFFFFF; border-color: rgba(0,0,0,.1); color: var(--tx2); }
.filter-btn:hover { background: #F5F5F5; color: var(--tx); }
.filter-btn.active { background: rgba(5,150,105,.1); color: var(--em-d); border-color: rgba(5,150,105,.25); }

/* Progress bar track */
.prog-bar-wrap { background: #E8EBF0; }

/* Scrollbar */
::-webkit-scrollbar-thumb { background: #C8CEDA; }

/* ============================================================
   SOCIO - CUOTAS Y PAGOS RESPONSIVE FIX
   ============================================================ */
.socio-cuotas-page {
  max-width: 1180px;
  width: 100%;
}

.cuota-status-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  margin-bottom: 16px;
  border: 1px solid rgba(0,0,0,.08);
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.cuota-status-card.ok {
  border-color: #5DCAA5;
  background: #E1F5EE;
}
.cuota-status-card.pendiente {
  border-color: #F09595;
  background: #FCEBEB;
}
.cuota-status-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(255,255,255,.55);
}
.cuota-status-icon i { font-size: 26px; }
.cuota-status-card.ok .cuota-status-icon i,
.cuota-status-card.ok .cuota-status-title,
.cuota-status-card.ok .cuota-status-sub { color: #085041; }
.cuota-status-card.pendiente .cuota-status-icon i,
.cuota-status-card.pendiente .cuota-status-title,
.cuota-status-card.pendiente .cuota-status-sub { color: #791F1F; }
.cuota-status-info { flex: 1; min-width: 0; }
.cuota-status-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 18px;
  line-height: 1.1;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.cuota-status-sub { font-size: 13px; margin-top: 2px; font-weight: 600; }
.cuota-status-btn { flex-shrink: 0; white-space: nowrap; }

.cuotas-card { overflow: visible; }
.cuotas-table { min-width: 720px; }
.cuotas-table .muted-cell { color: var(--tx3); white-space: nowrap; }
.cuotas-mobile-list { display: none; }
.empty-state-sm {
  text-align: center;
  color: var(--tx3);
  padding: 28px 12px;
}
.empty-state-sm i {
  display: block;
  font-size: 34px;
  margin-bottom: 8px;
  color: var(--tx3);
}

@media (max-width: 768px) {
  .socio-cuotas-page { padding: 14px 12px 92px; }
  .cuota-status-card {
    align-items: flex-start;
    padding: 12px;
    gap: 10px;
  }
  .cuota-status-title { font-size: 16px; }
  .cuota-status-sub { font-size: 12px; }
  .cuota-status-btn {
    width: 100%;
    justify-content: center;
    margin-top: 10px;
  }
  .cuota-status-card { flex-wrap: wrap; }
  .cuota-status-info { width: calc(100% - 56px); }

  .cuotas-card {
    padding: 14px;
    border-radius: 14px;
  }
  .cuotas-desktop { display: none; }
  .cuotas-mobile-list {
    display: grid;
    gap: 10px;
  }
  .cuota-mini-card {
    background: #F7F9FC;
    border: 1px solid rgba(0,0,0,.07);
    border-radius: 12px;
    padding: 12px;
  }
  .cuota-mini-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
  }
  .cuota-mini-mes {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 17px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--tx);
  }
  .cuota-mini-monto {
    color: var(--em-d);
    font-weight: 800;
    font-size: 16px;
    margin-top: 2px;
  }
  .cuota-mini-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(0,0,0,.07);
  }
  .cuota-mini-grid span {
    display: block;
    font-size: 10px;
    color: var(--tx3);
    text-transform: uppercase;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    letter-spacing: .4px;
  }
  .cuota-mini-grid strong {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: var(--tx2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 420px) {
  .cuota-mini-grid { grid-template-columns: 1fr 1fr; }
}


/* ============================================================
   SOCIO - LIMPIEZA DE NAVEGACIÓN Y HISTORIAL RESPONSIVE
   ============================================================ */
.quick-access-grid { display: none; }

.socio-historial-page {
  max-width: 1180px;
  width: 100%;
}

.historial-card { overflow: visible; }
.historial-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.historial-total {
  font-size: 13px;
  color: var(--tx3);
  white-space: nowrap;
}
.historial-total strong { color: var(--em-d); }
.historial-table { min-width: 680px; }
.historial-table .muted-cell { color: var(--tx3); white-space: nowrap; }
.historial-mobile-list { display: none; }

@media (max-width: 768px) {
  .topbar {
    min-height: 58px;
    padding: 12px 16px;
  }
  .topbar .btn {
    max-width: 48%;
    white-space: nowrap;
  }
  .socio-historial-page { padding: 14px 12px 92px; }
  .historial-card {
    padding: 14px;
    border-radius: 14px;
  }
  .historial-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
  .historial-total {
    white-space: normal;
    font-size: 12px;
  }
  .historial-desktop { display: none; }
  .historial-mobile-list {
    display: grid;
    gap: 10px;
  }
  .historial-mini-card {
    background: #F7F9FC;
    border: 1px solid rgba(0,0,0,.07);
    border-radius: 12px;
    padding: 12px;
  }
  .historial-mini-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
  }
  .historial-mini-mes {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 17px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--tx);
  }
  .historial-mini-monto {
    color: var(--em-d);
    font-weight: 800;
    font-size: 16px;
    margin-top: 2px;
  }
  .historial-mini-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(0,0,0,.07);
  }
  .historial-mini-grid span {
    display: block;
    font-size: 10px;
    color: var(--tx3);
    text-transform: uppercase;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    letter-spacing: .4px;
  }
  .historial-mini-grid strong {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: var(--tx2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}


/* ============================================================
   SOCIO V11 — volver al diseño limpio con navegación inferior
   ============================================================ */
@media (max-width: 768px) {
  .sidebar { display: none !important; }
  .main-content { margin-left: 0 !important; padding-bottom: 78px !important; }
  .topbar { min-height: 56px; padding: 12px 16px; }
  .bottom-nav { display: block !important; }
  .bottom-nav-inner {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 0;
  }
  .bn-item {
    flex: 1;
    min-width: 0;
    padding: 5px 2px 6px;
    font-size: 9px;
    line-height: 1.05;
    text-align: center;
  }
  .bn-item i { font-size: 19px; }
}

/* Evita que quede el banner de instalación fijo si Chrome no habilitó instalar */
.pwa-banner { display: none !important; }
.pwa-banner.show { display: flex !important; }
