:root{
  --bg1:#061425;
  --bg2:#0b2a4a;
  --glass: rgba(255,255,255,.08);
  --glass2: rgba(255,255,255,.06);
  --stroke: rgba(255,255,255,.14);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.70);
  --shadow: 0 20px 60px rgba(0,0,0,.40);
  --radius: 18px;
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color:var(--text);
  background: radial-gradient(1200px 800px at 20% 10%, #123e74 0%, transparent 60%),
              radial-gradient(1000px 700px at 90% 30%, #0b4f84 0%, transparent 55%),
              linear-gradient(160deg, var(--bg1), var(--bg2));
  min-height:100vh;
}

.bg{
  position:fixed; inset:0;
  background: radial-gradient(800px 500px at 40% 80%, rgba(255,255,255,.08), transparent 60%);
  pointer-events:none;
}

/* TOPBAR */
.topbar{
  position:sticky; top:0;
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 22px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.04));
  border-bottom:1px solid var(--stroke);
  z-index: 10;
}

.brand{display:flex; gap:12px; align-items:center}
.logo-dot{
  width:14px; height:14px; border-radius:50%;
  background: rgba(255,255,255,.7);
  box-shadow: 0 0 0 6px rgba(255,255,255,.08);
}
.t1{font-size:12px; color:var(--muted)}
.t2{font-size:16px; font-weight:700}

.right{display:flex; gap:10px; align-items:center; flex-wrap:wrap; justify-content:flex-end}
.pill{
  padding:6px 10px; border-radius:999px;
  background: rgba(255,255,255,.10);
  border:1px solid var(--stroke);
  font-size:12px;
}

/* LAYOUT */
.container{
  max-width:1100px;
  margin:22px auto;
  padding:0 18px 40px;
}

.grid{
  display:grid;
  grid-template-columns: 1fr;
  gap:16px;
}
@media (min-width: 950px){
  .grid{ grid-template-columns: 1.2fr .8fr; }
}

.card{
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--glass), var(--glass2));
  border:1px solid var(--stroke);
  box-shadow: var(--shadow);
  padding:18px;
}

.card.center{max-width:520px; margin:6vh auto;}

h1,h2,h3{margin:0 0 10px 0}
h1{font-size:26px}
h2{font-size:20px}
h3{font-size:16px; color:var(--muted); margin-top:6px}

.muted{color:var(--muted); margin:8px 0 0 0; line-height:1.4}

/* FORMS */
.form{display:flex; flex-direction:column; gap:10px; margin-top:14px}
label{font-size:12px; color:var(--muted)}

input, select, textarea{
  width:100%;
  padding:12px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.16);
  background: rgba(10,18,30,.35);
  color:var(--text);
  outline:none;
}
textarea{min-height: 110px; resize: vertical;}
input::placeholder, textarea::placeholder{color: rgba(255,255,255,.45)}

.row{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}
.row input{flex:1}
.row select{flex:1}

/* BUTTONS */
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:10px 14px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.18);
  text-decoration:none;
  color:var(--text);
  cursor:pointer;
  background: rgba(255,255,255,.08);
  transition: transform .08s ease, background .12s ease, border-color .12s ease;
  user-select:none;
}
.btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.24);
}
.btn:active{transform: translateY(0px)}
.btn.primary{
  background: linear-gradient(180deg, rgba(120,190,255,.26), rgba(40,120,210,.18));
  border-color: rgba(160,220,255,.24);
}
.btn.ghost{
  background: rgba(255,255,255,.06);
}
.btn.danger{
  background: rgba(255,90,120,.12);
  border-color: rgba(255,160,180,.20);
}
.btn.danger:hover{
  background: rgba(255,90,120,.18);
  border-color: rgba(255,160,180,.28);
}

/* TABS */
.tabs{display:flex; gap:8px; margin-right:10px}
.tab{
  padding:8px 10px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.05);
  color: rgba(255,255,255,.82);
  text-decoration:none;
  font-size:12px;
}
.tab:hover{
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.20);
}
.tab.active{
  background: linear-gradient(180deg, rgba(120,190,255,.20), rgba(40,120,210,.12));
  border-color: rgba(160,220,255,.22);
}

/* TABLES */
.table{
  margin-top:12px;
  border-radius:14px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.12)
}
.tr{
  display:grid;
  grid-template-columns: 90px 1.8fr 1fr 160px 120px;
  gap:10px;
  padding:10px 12px;
  align-items:center;
  background: rgba(255,255,255,.04);
  border-bottom:1px solid rgba(255,255,255,.08)
}
.tr.th{
  font-size:12px;
  color:var(--muted);
  background: rgba(255,255,255,.06)
}
.tr:last-child{border-bottom:none}
.name{font-weight:650}
@media (max-width: 720px){
  .tr{grid-template-columns: 80px 1fr; grid-auto-rows:auto}
  .tr > div:nth-child(3),
  .tr > div:nth-child(4),
  .tr > div:nth-child(5){grid-column: 2 / -1}
}

/* BADGES */
.badge{
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  border:1px solid rgba(255,255,255,.16);
  display:inline-block;
}
.badge.al_dia{background: rgba(80,220,160,.12)}
.badge.con_deuda{background: rgba(255,90,90,.14)}
.badge.sin_especificar{background: rgba(255,255,255,.08)}

/* FLASH */
.flash-wrap{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-bottom:12px
}
.flash{
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
}
.flash.ok{background: rgba(80,220,160,.10)}
.flash.error{background: rgba(255,90,90,.12)}

/* PROFILE KV */
.kv{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px;
}
.kv .wide{grid-column:1 / -1}
.kv span{display:block; font-size:12px; color:var(--muted)}
.kv b{font-size:16px}

.sep{
  border:none;
  border-top:1px solid rgba(255,255,255,.12);
  margin:14px 0
}

/* CHIPS */
.todo{
  display:flex;
  gap:10px;
  margin-top:12px;
  flex-wrap:wrap
}
.chip{
  padding:8px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  font-size:12px;
  color:var(--muted);
}

/* EMPTY */
.empty{
  display:flex;
  flex-direction:column;
  gap:6px;
  padding:18px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.75);
}

/* SEGMENTED */
.seg{
  display:flex;
  gap:10px;
  flex-wrap:wrap
}
.segbtn{
  flex:1;
  min-width: 180px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.05);
  padding:10px 12px;
  cursor:pointer;
  transition: background .12s ease, border-color .12s ease, transform .08s ease;
}
.segbtn input{display:none}
.segbtn span{display:block; font-weight:650}
.segbtn:hover{transform: translateY(-1px)}
.segbtn:has(input:checked){
  background: linear-gradient(180deg, rgba(120,190,255,.20), rgba(40,120,210,.12));
  border-color: rgba(160,220,255,.22);
}

/* RESULT PANELS (premium green/red) */
.panel{
  margin-top:14px;
  padding:16px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.05);
}
.panel.ok{
  background: radial-gradient(800px 300px at 20% 30%, rgba(60,255,170,.22), transparent 60%),
              rgba(80,220,160,.10);
  border-color: rgba(120,255,200,.22);
}
.panel.bad{
  background: radial-gradient(800px 300px at 20% 30%, rgba(255,80,110,.22), transparent 60%),
              rgba(255,90,90,.12);
  border-color: rgba(255,140,160,.20);
}
.big{
  font-size:34px;
  font-weight:800;
  letter-spacing:.5px;
  text-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.why{
  margin-top:4px;
  font-size:14px;
  color: rgba(255,255,255,.82)
}
.mini{
  margin-top:10px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  color: rgba(255,255,255,.70);
  font-size:12px
}
.mini2{
  margin-top:6px;
  color: rgba(255,255,255,.72);
  font-size:12px
}

/* RULE CARD */
.rule{
  display:flex;
  gap:12px;
  align-items:flex-start;
  padding:14px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
}
.rule .dot{
  width:10px;
  height:10px;
  border-radius:50%;
  background: rgba(255,255,255,.65);
  box-shadow: 0 0 0 6px rgba(255,255,255,.08);
  margin-top:4px;
}
.rule span{
  display:block;
  margin-top:4px;
  color: rgba(255,255,255,.72);
  font-size:13px
}

/* USERS ROLE CHIP */
.rolechip{
  display:inline-block;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
  font-size:12px;
}
.rolechip.admin{
  background: rgba(120,190,255,.12);
  border-color: rgba(160,220,255,.20);
}
.rolechip.medico{
  background: rgba(255,255,255,.08);
}
.rolechip.pileta{
  background: rgba(80,220,160,.10);
  border-color: rgba(120,255,200,.18);
}

.mono{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  color: rgba(255,255,255,.75);
}

a{color:inherit}
hr{border:0}

/* =========================
   STATUS CENTERED (SOCIO)
========================= */
.center-status{
  text-align:center;
  padding:26px 20px;
}

.center-status .big{
  font-size:42px;
  letter-spacing:1px;
}

.status-sub{
  margin-top:6px;
  font-size:15px;
  color: rgba(255,255,255,.85);
}

/* Estado pendiente (neutral elegante) */
.panel.warn{
  background: radial-gradient(700px 280px at 20% 30%, rgba(255,220,120,.22), transparent 60%),
              rgba(255,210,120,.10);
  border-color: rgba(255,220,150,.22);
}

/* Historial más aire */
.table .tr{
  line-height:1.35;
}

/* Evitar ruido visual en fechas */
.mini2{
  margin-top:8px;
  font-size:12px;
  color: rgba(255,255,255,.6);
}
/* =========================
   Human-friendly chips & meta
========================= */
.chip2{
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  font-size:13px;
  color: rgba(255,255,255,.86);
  display:inline-flex;
  gap:6px;
  align-items:center;
}

.chip2.ok{
  background: rgba(80,220,160,.12);
  border-color: rgba(120,255,200,.18);
}
.chip2.bad{
  background: rgba(255,90,90,.14);
  border-color: rgba(255,160,180,.18);
}
.chip2.warn{
  background: rgba(255,210,120,.10);
  border-color: rgba(255,220,150,.20);
}
.chip2.neutral{
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.12);
}

.statusline{
  display:flex;
  gap:12px;
  align-items:center;
  flex-wrap:wrap;
}

.soft{
  color: rgba(255,255,255,.55);
  font-size:12px;
}

/* Panel meta: Vence / Restan */
.status-meta{
  margin-top:10px;
  display:flex;
  gap:18px;
  justify-content:center;
  flex-wrap:wrap;
}

.status-meta .meta{
  min-width: 160px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
}

.status-meta .meta span{
  display:block;
  font-size:12px;
  color: rgba(255,255,255,.65);
  margin-bottom:4px;
}

.status-meta .meta b{
  font-size:16px;
}


