/* =========================================================
   ALYSE PRIVATE CLIENT PORTAL
   Estructura separada:
   - login.html
   - registro.html
   - recuperar.html
   - dashboard.html
   ========================================================= */

:root{
  --bg:#02050c;
  --bg2:#040b17;
  --panel:rgba(8,16,31,.88);
  --panel2:rgba(12,24,47,.74);
  --panel3:rgba(255,255,255,.035);

  --blue:#168bff;
  --blue2:#00c2ff;
  --blue3:#0354ff;
  --cyan:#8be9ff;

  --green:#00d084;
  --red:#ff5969;
  --yellow:#ffc94d;
  --purple:#9d7cff;

  --text:#f5f8fd;
  --muted:#90a0b6;
  --muted2:#607089;

  --line:rgba(255,255,255,.08);
  --lineBlue:rgba(22,139,255,.22);

  --radius:22px;
  --radiusLg:30px;

  --mono:"JetBrains Mono", ui-monospace, monospace;
  --sans:"Inter", system-ui, sans-serif;
}

*{box-sizing:border-box}
html,body{margin:0;min-height:100%;background:var(--bg);color:var(--text);font-family:var(--sans)}
body{
  background:
    radial-gradient(circle at 14% 0%, rgba(22,139,255,.18), transparent 28%),
    radial-gradient(circle at 84% 10%, rgba(0,194,255,.11), transparent 24%),
    radial-gradient(circle at 50% 100%, rgba(3,84,255,.12), transparent 32%),
    linear-gradient(180deg,#02050c 0%, #030712 40%, #02050c 100%);
  overflow-x:hidden;
}
body::before{
  content:"";
  position:fixed; inset:0; pointer-events:none;
  background-image:
    linear-gradient(rgba(255,255,255,.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.024) 1px, transparent 1px);
  background-size:52px 52px;
  mask-image:radial-gradient(circle at 50% 10%, rgba(0,0,0,.8), transparent 74%);
  z-index:-2;
}
body::after{
  content:"";
  position:fixed; inset:0; pointer-events:none;
  background:linear-gradient(90deg, transparent, rgba(22,139,255,.04), transparent);
  z-index:-1;
}
a{text-decoration:none;color:inherit}
button,input,select,textarea{font:inherit}
.hidden{display:none!important}

.green{color:var(--green)!important}
.red{color:var(--red)!important}
.blue{color:var(--blue2)!important}
.yellow{color:var(--yellow)!important}

/* =========================================================
   AUTH PAGES
   ========================================================= */

.auth-page{
  min-height:100vh;
  display:grid;
  grid-template-columns:minmax(0,1.1fr) minmax(420px,.72fr);
  padding:22px;
  gap:22px;
}

.auth-hero{
  position:relative;
  overflow:hidden;
  min-height:calc(100vh - 44px);
  border:1px solid var(--lineBlue);
  border-radius:34px;
  background:
    radial-gradient(circle at 86% 18%, rgba(0,194,255,.20), transparent 30%),
    radial-gradient(circle at 10% 90%, rgba(22,139,255,.16), transparent 32%),
    linear-gradient(145deg, rgba(10,21,42,.94), rgba(2,8,16,.88));
  box-shadow:0 34px 110px rgba(0,0,0,.36), 0 0 70px rgba(22,139,255,.10);
  padding:34px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}

.auth-hero::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size:44px 44px;
  mask-image:linear-gradient(120deg, rgba(0,0,0,.76), transparent 82%);
}

.auth-brand,
.auth-hero-content,
.auth-hero-footer{
  position:relative;
  z-index:1;
}

.auth-brand{
  display:flex;
  align-items:center;
  gap:14px;
}

.brand-mark{
  width:50px;
  height:50px;
  border-radius:18px;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg,var(--blue),var(--blue2));
  box-shadow:0 0 38px rgba(22,139,255,.46), inset 0 1px 0 rgba(255,255,255,.3);
  font-weight:900;
  letter-spacing:-.08em;
}

.auth-brand h1{
  margin:0;
  font-size:17px;
  font-weight:900;
  letter-spacing:.16em;
}

.auth-brand span{
  display:block;
  margin-top:4px;
  color:var(--muted);
  font-size:12px;
}

.eyebrow{
  display:block;
  color:var(--muted);
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.14em;
  font-weight:800;
  margin-bottom:10px;
}

.auth-hero-content h2{
  max-width:760px;
  margin:0 0 18px;
  font-size:clamp(42px,6vw,82px);
  letter-spacing:-.085em;
  line-height:.92;
}

.auth-hero-content p{
  max-width:620px;
  margin:0;
  color:var(--muted);
  font-size:16px;
  line-height:1.7;
}

.auth-hero-footer{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
}

.auth-point{
  padding:16px;
  border:1px solid var(--line);
  border-radius:20px;
  background:rgba(1,4,10,.38);
  backdrop-filter:blur(18px);
}

.auth-point strong{
  display:block;
  margin-bottom:7px;
  font-size:13px;
}

.auth-point span{
  color:var(--muted);
  font-size:12px;
  line-height:1.45;
}

.auth-panel-wrap{
  display:grid;
  place-items:center;
}

.auth-panel{
  width:100%;
  max-width:470px;
  border:1px solid var(--line);
  border-radius:34px;
  background:linear-gradient(180deg, rgba(8,16,31,.92), rgba(4,10,20,.86));
  box-shadow:0 30px 100px rgba(0,0,0,.30);
  padding:28px;
}

.auth-panel h3{
  margin:0 0 8px;
  font-size:30px;
  letter-spacing:-.055em;
}

.auth-panel > p{
  margin:0 0 24px;
  color:var(--muted);
  line-height:1.55;
  font-size:14px;
}

.form-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}

.field{
  display:grid;
  gap:8px;
}

.field.full{
  grid-column:1 / -1;
}

.field label{
  color:var(--muted);
  font-size:12px;
  font-weight:700;
}

.field input,
.field select,
.field textarea{
  width:100%;
  min-height:50px;
  padding:0 14px;
  border:1px solid var(--line);
  border-radius:16px;
  background:rgba(255,255,255,.035);
  color:#fff;
  outline:none;
}

/* Mantiene los select del formulario en modo oscuro, incluido el menú desplegable. */
.auth-panel .field select{
  background-color:#080b10;
  color:#fff;
  color-scheme:dark;
  cursor:pointer;
}

.auth-panel .field select option{
  background:#080b10;
  color:#fff;
}

.field textarea{
  min-height:110px;
  resize:vertical;
  padding:14px;
}

.field input:focus,
.field select:focus,
.field textarea:focus{
  border-color:rgba(22,139,255,.34);
  box-shadow:0 0 0 4px rgba(22,139,255,.08);
}

.auth-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:16px 0 22px;
  color:var(--muted);
  font-size:13px;
}

.checkbox-row{
  display:flex;
  align-items:center;
  gap:8px;
}

.checkbox-row input{
  accent-color:var(--blue);
}

.auth-meta a,
.auth-bottom a{
  color:var(--blue2);
  font-weight:800;
}

.auth-bottom{
  margin-top:22px;
  padding-top:18px;
  border-top:1px solid var(--line);
  color:var(--muted);
  font-size:13px;
  text-align:center;
}

/* =========================================================
   BUTTONS
   ========================================================= */

.btn{
  height:48px;
  padding:0 16px;
  border-radius:16px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.045);
  color:#fff;
  font-weight:800;
  cursor:pointer;
  transition:.2s ease;
}

.btn:hover{
  transform:translateY(-1px);
  border-color:rgba(22,139,255,.28);
}

.btn-primary{
  background:linear-gradient(135deg,var(--blue),var(--blue3));
  border-color:rgba(22,139,255,.44);
  box-shadow:0 16px 44px rgba(22,139,255,.26);
}

.btn-block{
  width:100%;
}

.btn-icon{
  width:48px;
  padding:0;
  display:grid;
  place-items:center;
}

.btn-icon svg{
  width:19px;
  height:19px;
}

/* =========================================================
   DASHBOARD
   ========================================================= */

.app{
  min-height:100vh;
  display:grid;
  grid-template-columns:290px minmax(0,1fr);
}

.sidebar{
  position:sticky;
  top:0;
  height:100vh;
  padding:24px;
  border-right:1px solid var(--line);
  background:rgba(2,5,12,.78);
  backdrop-filter:blur(24px);
  display:flex;
  flex-direction:column;
  gap:22px;
  overflow-y:auto;
  overflow-x:hidden;
  scrollbar-gutter:stable;
  scrollbar-width:thin;
  scrollbar-color:rgba(255,255,255,.26) transparent;
  overscroll-behavior:contain;
  z-index:30;
}

.sidebar::-webkit-scrollbar{width:8px}
.sidebar::-webkit-scrollbar-track{background:transparent}
.sidebar::-webkit-scrollbar-thumb{background:rgba(255,255,255,.26);border-radius:999px;border:2px solid transparent;background-clip:padding-box}
.sidebar::-webkit-scrollbar-thumb:hover{background:rgba(255,255,255,.28)}

.brand{
  display:flex;
  align-items:center;
  gap:14px;
  padding-bottom:4px;
}

.brand h1{
  margin:0;
  font-size:17px;
  font-weight:900;
  letter-spacing:.16em;
}

.brand span{
  display:block;
  margin-top:4px;
  color:var(--muted);
  font-size:12px;
}

.client-card{
  padding:18px;
  border-radius:24px;
  border:1px solid var(--line);
  background:
    radial-gradient(circle at top right, rgba(22,139,255,.17), transparent 40%),
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  box-shadow:0 22px 84px rgba(0,0,0,.26);
}

.client-card small{
  display:block;
  color:var(--muted);
  margin-bottom:8px;
  font-size:12px;
}

.client-card strong{
  display:block;
  font-size:16px;
  margin-bottom:13px;
}

.pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  height:32px;
  padding:0 12px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
  border:1px solid rgba(0,208,132,.18);
  color:var(--green);
  background:rgba(0,208,132,.1);
}

.pill::before{
  content:"";
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--green);
  box-shadow:0 0 12px var(--green);
}

.nav-label{
  margin:0 0 8px 4px;
  color:var(--muted2);
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.15em;
  font-weight:800;
}

.nav-group{
  display:grid;
  gap:8px;
}

.nav-link{
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:48px;
  padding:0 14px;
  border-radius:16px;
  color:var(--muted);
  transition:.2s ease;
  cursor:pointer;
}

.nav-link > span{
  display:flex;
  align-items:center;
  gap:11px;
  font-size:14px;
  font-weight:600;
}

.nav-link svg{
  width:19px;
  height:19px;
  stroke-width:1.8;
}

.nav-link i{
  width:7px;
  height:7px;
  border-radius:50%;
  background:transparent;
}

.nav-link:hover,
.nav-link.active{
  color:#fff;
  background:rgba(22,139,255,.11);
  box-shadow:inset 0 0 0 1px rgba(22,139,255,.17);
}

.nav-link.active i{
  background:var(--blue2);
  box-shadow:0 0 14px var(--blue2);
}

.advisor-box{
  margin-top:auto;
  padding:18px;
  border-radius:24px;
  border:1px solid var(--line);
  background:linear-gradient(180deg, rgba(12,24,47,.84), rgba(5,12,24,.72));
}

.advisor{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:14px;
}

.advisor-avatar{
  width:42px;
  height:42px;
  border-radius:15px;
  display:grid;
  place-items:center;
  background:rgba(22,139,255,.13);
  color:var(--blue2);
  border:1px solid rgba(22,139,255,.18);
  font-weight:800;
}

.advisor strong{
  display:block;
  font-size:14px;
}

.advisor small{
  color:var(--muted);
  font-size:12px;
}

.advisor-btn{
  width:100%;
  min-height:42px;
  padding:10px 14px;
  border:1px solid rgba(75,174,255,.24);
  border-radius:14px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  text-decoration:none;
  line-height:1.2;
  white-space:normal;
  cursor:pointer;
  background:linear-gradient(135deg,var(--blue),var(--blue3));
  color:#fff;
  font-size:13px;
  font-weight:800;
  box-shadow:0 12px 30px rgba(22,139,255,.22);
  transition:transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.advisor-btn:hover{
  color:#fff;
  text-decoration:none;
  transform:translateY(-1px);
  filter:brightness(1.08);
  box-shadow:0 16px 36px rgba(22,139,255,.3);
}

.advisor-btn:focus-visible{
  outline:2px solid rgba(75,174,255,.8);
  outline-offset:3px;
}

.main{
  min-width:0;
  padding:22px;
}

.topbar{
  min-height:76px;
  margin-bottom:18px;
  display:grid;
  grid-template-columns:1fr auto;
  gap:18px;
  align-items:center;
}

.welcome small{
  display:flex;
  align-items:center;
  gap:8px;
  color:var(--muted);
  margin-bottom:8px;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.11em;
  font-weight:800;
}

.welcome small::before{
  content:"";
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--green);
  box-shadow:0 0 12px var(--green);
}

.welcome h2{
  margin:0;
  font-size:clamp(28px,3.4vw,48px);
  letter-spacing:-.07em;
  line-height:.98;
}

.top-actions{
  display:flex;
  align-items:center;
  gap:10px;
}

.searchbox{
  width:340px;
  height:48px;
  border:1px solid var(--line);
  border-radius:16px;
  background:rgba(255,255,255,.04);
  color:var(--muted);
  display:flex;
  align-items:center;
  padding:0 15px;
  font-size:13px;
}

.hero-grid{
  display:grid;
  grid-template-columns:minmax(0,1.45fr) 420px;
  gap:18px;
  margin-bottom:18px;
}

.wealth-card{
  position:relative;
  overflow:hidden;
  min-height:360px;
  border:1px solid var(--lineBlue);
  border-radius:var(--radiusLg);
  background:
    radial-gradient(circle at 82% 8%, rgba(0,194,255,.20), transparent 30%),
    radial-gradient(circle at 10% 90%, rgba(22,139,255,.16), transparent 32%),
    linear-gradient(145deg, rgba(10,21,42,.94), rgba(2,8,16,.88));
  box-shadow:0 34px 110px rgba(0,0,0,.36), 0 0 70px rgba(22,139,255,.10);
  padding:28px;
}

.wealth-card::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size:44px 44px;
  mask-image:linear-gradient(120deg, rgba(0,0,0,.76), transparent 82%);
}

.wealth-top,
.wealth-balance,
.wealth-footer{
  position:relative;
  z-index:1;
}

.wealth-top{
  display:flex;
  justify-content:space-between;
  gap:18px;
  margin-bottom:34px;
}

.wealth-top h3{
  margin:0;
  font-size:22px;
  letter-spacing:-.04em;
}

.account-number{
  text-align:right;
  font-family:var(--mono);
  color:var(--muted);
  font-size:12px;
}

.account-number strong{
  display:block;
  margin-top:7px;
  color:#fff;
  font-size:14px;
  letter-spacing:-.03em;
}

.wealth-balance{
  margin-bottom:32px;
}

.wealth-balance span{
  display:block;
  color:var(--muted);
  margin-bottom:8px;
  font-size:14px;
}

.wealth-balance h1{
  margin:0;
  font-family:var(--mono);
  font-size:clamp(42px,6vw,76px);
  letter-spacing:-.08em;
  line-height:.92;
}

.wealth-balance small{
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin-top:16px;
  color:var(--green);
  font-family:var(--mono);
  font-size:13px;
  font-weight:700;
}

.wealth-balance small::before{
  content:"↗";
  width:24px;
  height:24px;
  border-radius:50%;
  display:grid;
  place-items:center;
  color:var(--green);
  background:rgba(0,208,132,.11);
  border:1px solid rgba(0,208,132,.16);
  font-family:var(--sans);
}

.wealth-footer{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}

.wealth-mini{
  min-height:86px;
  padding:14px;
  border:1px solid var(--line);
  border-radius:19px;
  background:rgba(1,4,10,.38);
  backdrop-filter:blur(18px);
}

.wealth-mini span{
  display:block;
  color:var(--muted);
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.08em;
  margin-bottom:9px;
}

.wealth-mini strong{
  display:block;
  font-family:var(--mono);
  font-size:16px;
  letter-spacing:-.04em;
}

.wealth-mini small{
  display:block;
  margin-top:6px;
  color:var(--muted2);
  font-size:11px;
}

.panel,
.actions-panel{
  min-width:0;
  border:1px solid var(--line);
  border-radius:var(--radiusLg);
  background:linear-gradient(180deg, rgba(8,16,31,.90), rgba(4,10,20,.82));
  box-shadow:0 30px 100px rgba(0,0,0,.28);
  overflow:hidden;
}

.panel-head{
  min-height:64px;
  padding:18px 20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  border-bottom:1px solid var(--line);
  background:rgba(255,255,255,.018);
}

.panel-head h3{
  margin:0;
  font-size:14px;
  text-transform:uppercase;
  letter-spacing:.11em;
}

.panel-head small{
  color:var(--muted);
  font-size:12px;
}

.quick-actions{
  padding:18px;
  display:grid;
  gap:12px;
}

.action-tile{
  min-height:74px;
  padding:16px;
  border:1px solid var(--line);
  border-radius:20px;
  background:rgba(255,255,255,.035);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  transition:.22s ease;
  cursor:pointer;
}

.action-tile:hover{
  transform:translateY(-1px);
  border-color:rgba(22,139,255,.28);
  background:rgba(22,139,255,.07);
}

.action-tile strong{
  display:block;
  margin-bottom:5px;
  font-size:14px;
}

.action-tile span{
  color:var(--muted);
  font-size:12px;
}

.action-icon{
  width:44px;
  height:44px;
  display:grid;
  place-items:center;
  border-radius:15px;
  background:rgba(22,139,255,.13);
  border:1px solid rgba(22,139,255,.18);
  color:var(--blue2);
  flex:0 0 auto;
}

.action-icon svg{
  width:20px;
  height:20px;
}

.content-grid{
  display:grid;
  grid-template-columns:minmax(0,1.4fr) minmax(360px,.85fr);
  gap:18px;
  margin-bottom:18px;
}

.chart-area{
  position:relative;
  height:345px;
  padding:22px;
}

.chart-grid{
  position:absolute;
  inset:22px;
  border-radius:24px;
  overflow:hidden;
  background:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
    radial-gradient(circle at center, rgba(22,139,255,.15), transparent 56%);
  background-size:42px 42px,42px 42px,cover;
}

.area-fill{
  position:absolute;
  left:7%;
  right:7%;
  bottom:14%;
  height:46%;
  clip-path:polygon(0 70%,12% 56%,22% 62%,34% 38%,45% 46%,58% 26%,70% 34%,82% 12%,100% 4%,100% 100%,0 100%);
  background:linear-gradient(180deg, rgba(0,194,255,.28), rgba(22,139,255,.02));
  filter:drop-shadow(0 0 34px rgba(0,194,255,.24));
}

.line-path{
  position:absolute;
  left:7%;
  right:7%;
  bottom:14%;
  height:46%;
}

.line-path svg{
  width:100%;
  height:100%;
  overflow:visible;
}

.line-path polyline{
  fill:none;
  stroke:url(#lineGradient);
  stroke-width:4;
  stroke-linecap:round;
  stroke-linejoin:round;
  filter:drop-shadow(0 0 14px rgba(0,194,255,.75));
}

.chart-badge{
  position:absolute;
  top:42px;
  right:42px;
  border:1px solid rgba(0,208,132,.18);
  background:rgba(0,208,132,.095);
  color:var(--green);
  border-radius:999px;
  padding:9px 12px;
  font-family:var(--mono);
  font-size:12px;
  font-weight:700;
}

.allocation{
  padding:20px;
}

.donut-wrap{
  display:grid;
  grid-template-columns:175px 1fr;
  gap:20px;
  align-items:center;
}

.donut{
  width:175px;
  height:175px;
  border-radius:50%;
  background:conic-gradient(var(--blue) 0 38%, var(--blue2) 38% 62%, var(--green) 62% 78%, var(--purple) 78% 91%, var(--yellow) 91% 100%);
  position:relative;
  box-shadow:0 0 48px rgba(22,139,255,.18);
}

.donut::before{
  content:"";
  position:absolute;
  inset:19px;
  border-radius:50%;
  background:#06101f;
  border:1px solid var(--line);
}

.donut::after{
  content:"100%";
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  font-family:var(--mono);
  font-weight:800;
  letter-spacing:-.05em;
}

.legend{
  display:grid;
  gap:13px;
}

.legend-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  color:var(--muted);
  font-size:13px;
}

.legend-left{
  display:flex;
  align-items:center;
  gap:10px;
}

.dot{
  width:10px;
  height:10px;
  border-radius:50%;
  box-shadow:0 0 12px currentColor;
}

.legend-item strong{
  color:#fff;
  font-family:var(--mono);
  font-size:13px;
}

.table-wrap{
  overflow-x:auto;
}

table{
  width:100%;
  border-collapse:collapse;
}

th,td{
  padding:15px 18px;
  border-bottom:1px solid var(--line);
  text-align:left;
  white-space:nowrap;
  font-size:13px;
}

th{
  color:var(--muted);
  background:rgba(255,255,255,.025);
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.09em;
  font-weight:800;
}

td{
  color:#e9f1ff;
}

td.num{
  font-family:var(--mono);
  letter-spacing:-.03em;
}

tbody tr:hover{
  background:rgba(22,139,255,.052);
}

.badge{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:0 10px;
  border-radius:999px;
  font-size:11px;
  font-weight:800;
}

.badge-ok{
  color:var(--green);
  background:rgba(0,208,132,.10);
  border:1px solid rgba(0,208,132,.15);
}

.badge-wait{
  color:var(--yellow);
  background:rgba(255,201,77,.10);
  border:1px solid rgba(255,201,77,.15);
}

.badge-blue{
  color:var(--blue2);
  background:rgba(0,194,255,.10);
  border:1px solid rgba(0,194,255,.15);
}

.document-list,
.insight-list{
  padding:16px 18px 18px;
}

.doc-row{
  min-height:54px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  border-bottom:1px solid var(--line);
  padding-bottom:10px;
  margin-bottom:10px;
}

.doc-row:last-child{
  border-bottom:0;
  padding-bottom:0;
  margin-bottom:0;
}

.doc-row strong{
  display:block;
  font-size:13px;
  margin-bottom:4px;
}

.doc-row span{
  color:var(--muted);
  font-size:12px;
}

.doc-row button{
  height:34px;
  border:1px solid var(--line);
  border-radius:12px;
  background:rgba(255,255,255,.04);
  color:#fff;
  cursor:pointer;
  font-size:12px;
  font-weight:800;
  padding:0 11px;
}

.bottom-grid{
  display:grid;
  grid-template-columns:1fr 1fr 1fr;
  gap:18px;
}

.insight-list{
  display:grid;
  gap:12px;
}

.insight{
  display:grid;
  grid-template-columns:44px 1fr;
  gap:12px;
  align-items:center;
  padding:13px;
  border-radius:18px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.032);
}

.insight-icon{
  width:44px;
  height:44px;
  display:grid;
  place-items:center;
  border-radius:15px;
  background:rgba(22,139,255,.12);
  color:var(--blue2);
  border:1px solid rgba(22,139,255,.18);
  font-weight:800;
}

.insight strong{
  display:block;
  font-size:13px;
  margin-bottom:4px;
}

.insight span{
  color:var(--muted);
  font-size:12px;
  line-height:1.35;
}

/* =========================================================
   MODALS
   ========================================================= */

.modal-backdrop{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.62);
  backdrop-filter:blur(10px);
  display:none;
  align-items:center;
  justify-content:center;
  padding:18px;
  z-index:100;
}

.modal-backdrop.show{
  display:flex;
}

.modal{
  width:min(520px,100%);
  border:1px solid var(--lineBlue);
  border-radius:28px;
  background:linear-gradient(180deg, rgba(9,18,35,.96), rgba(4,10,20,.94));
  box-shadow:0 30px 120px rgba(0,0,0,.46);
  overflow:hidden;
}

.modal-head{
  min-height:68px;
  padding:18px 22px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  border-bottom:1px solid var(--line);
}

.modal-head h4{
  margin:0;
  font-size:18px;
  letter-spacing:-.03em;
}

.modal-close{
  width:40px;
  height:40px;
  border-radius:14px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.04);
  color:#fff;
  cursor:pointer;
}

.modal-body{
  padding:22px;
}

.modal-actions{
  display:flex;
  gap:10px;
  justify-content:flex-end;
  margin-top:18px;
}

/* =========================================================
   MOBILE
   ========================================================= */

.mobile-bar{
  display:none;
}

@media (max-width:1320px){
  .hero-grid,
  .content-grid{
    grid-template-columns:1fr;
  }

  .bottom-grid{
    grid-template-columns:1fr 1fr;
  }
}

@media (max-width:1050px){
  .auth-page{
    grid-template-columns:1fr;
  }

  .auth-hero{
    min-height:auto;
    gap:80px;
  }

  .app{
    grid-template-columns:240px minmax(0,1fr);
  }

  .sidebar{
    display:flex;
    width:240px;
    min-width:240px;
    padding:18px 14px;
    gap:16px;
    z-index:40;
  }

  .sidebar .client-card,
  .sidebar .advisor-box{
    padding:14px;
  }

  .sidebar .nav-link{
    padding:11px 10px;
    font-size:12px;
  }

  .main{
    min-width:0;
    padding:18px 16px 40px;
  }

  .topbar{
    grid-template-columns:1fr;
  }

  .top-actions{
    width:100%;
    flex-wrap:wrap;
  }

  .searchbox{
    width:100%;
    flex-basis:100%;
  }

  .wealth-footer{
    grid-template-columns:repeat(2,1fr);
  }

  .mobile-bar{
    position:fixed;
    left:12px;
    right:12px;
    bottom:12px;
    z-index:60;
    display:grid;
    grid-template-columns:repeat(5,1fr);
    gap:4px;
    padding:8px;
    border-radius:24px;
    border:1px solid var(--line);
    background:rgba(2,5,12,.86);
    backdrop-filter:blur(22px);
    box-shadow:0 24px 80px rgba(0,0,0,.45);
  }

  .mobile-bar a{
    text-align:center;
    color:var(--muted);
    font-size:11px;
    font-weight:700;
    border-radius:16px;
    padding:10px 4px;
    cursor:pointer;
  }

  .mobile-bar a.active{
    color:#fff;
    background:rgba(22,139,255,.14);
  }
}

@media (max-width:760px){
  .app{
    grid-template-columns:1fr;
  }

  .sidebar{
    display:none;
  }

  .main{
    padding:16px 14px 92px;
  }

  .auth-page{
    padding:14px;
  }

  .auth-hero{
    padding:24px;
    border-radius:28px;
  }

  .auth-panel{
    padding:22px;
    border-radius:28px;
  }

  .auth-hero-footer,
  .form-grid,
  .wealth-footer,
  .bottom-grid,
  .donut-wrap{
    grid-template-columns:1fr;
  }

  .wealth-top{
    flex-direction:column;
  }

  .account-number{
    text-align:left;
  }

  .chart-area{
    height:300px;
  }

  .modal-actions{
    flex-direction:column;
  }

  .btn{
    width:100%;
  }
}

@media (max-width:520px){
  .auth-hero-content h2{
    font-size:42px;
  }

  .wealth-balance h1{
    font-size:40px;
  }

  .welcome h2{
    font-size:31px;
  }
}

/* =========================================================
   AUTH BACKEND MESSAGES
   ========================================================= */
.auth-alert{
  margin:0 0 16px;
  padding:13px 14px;
  border-radius:16px;
  border:1px solid var(--line);
  font-size:13px;
  line-height:1.45;
}
.auth-alert.ok{
  color:var(--green);
  background:rgba(0,208,132,.08);
  border-color:rgba(0,208,132,.22);
}
.auth-alert.error{
  color:var(--red);
  background:rgba(255,89,105,.08);
  border-color:rgba(255,89,105,.24);
}
.auth-alert small{
  display:block;
  margin-top:6px;
  color:var(--muted);
  word-break:break-all;
}
.muted-text{color:var(--muted);line-height:1.6}

/* =========================================================
   SELECT PERSONALIZADO OSCURO — REGISTRO
   Evita el menú nativo blanco de Windows/Chrome.
   ========================================================= */
.auth-panel .custom-select{
  position:relative;
  width:100%;
}

.auth-panel .custom-select__native{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:-1px!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;
  border:0!important;
  opacity:0!important;
  pointer-events:none!important;
}

.auth-panel .custom-select__trigger{
  width:100%;
  min-height:50px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:0 14px;
  border:1px solid var(--line);
  border-radius:16px;
  background:#080d17;
  color:#fff;
  text-align:left;
  cursor:pointer;
  outline:none;
  transition:border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.auth-panel .custom-select__trigger:hover{
  background:#0b1220;
}

.auth-panel .custom-select__trigger:focus,
.auth-panel .custom-select.is-open .custom-select__trigger{
  border-color:rgba(22,139,255,.55);
  box-shadow:0 0 0 4px rgba(22,139,255,.10);
}

.auth-panel .custom-select__arrow{
  width:9px;
  height:9px;
  flex:0 0 auto;
  border-right:2px solid #fff;
  border-bottom:2px solid #fff;
  transform:rotate(45deg) translateY(-2px);
  transition:transform .2s ease;
}

.auth-panel .custom-select.is-open .custom-select__arrow{
  transform:rotate(225deg) translate(-2px,-2px);
}

.auth-panel .custom-select__menu{
  position:absolute;
  z-index:1000;
  top:calc(100% + 8px);
  left:0;
  right:0;
  display:none;
  max-height:260px;
  overflow-y:auto;
  padding:6px;
  border:1px solid rgba(112,146,195,.28);
  border-radius:14px;
  background:#070c15;
  box-shadow:0 22px 55px rgba(0,0,0,.55);
  scrollbar-width:thin;
  scrollbar-color:#516078 #0b111d;
}

.auth-panel .custom-select.is-open .custom-select__menu{
  display:block;
}

.auth-panel .custom-select__menu::-webkit-scrollbar{width:8px}
.auth-panel .custom-select__menu::-webkit-scrollbar-track{background:#0b111d;border-radius:8px}
.auth-panel .custom-select__menu::-webkit-scrollbar-thumb{background:#516078;border-radius:8px}

.auth-panel .custom-select__option{
  width:100%;
  min-height:42px;
  display:flex;
  align-items:center;
  padding:9px 11px;
  border:0;
  border-radius:10px;
  background:transparent;
  color:#eaf2ff;
  text-align:left;
  cursor:pointer;
}

.auth-panel .custom-select__option:hover,
.auth-panel .custom-select__option:focus{
  background:#14233a;
  outline:none;
}

.auth-panel .custom-select__option.is-selected{
  background:#2164d8;
  color:#fff;
  font-weight:700;
}

.auth-panel .custom-select__option[disabled]{
  color:#78869a;
  cursor:not-allowed;
}

/* =========================================================
   AFH MOBILE NAVIGATION — UNIFIED
   ========================================================= */
.mobile-menu-trigger,.mobile-page-brand,.sidebar-overlay,.sidebar-mobile-head{display:none}
.mobile-bar:not(.afh-mobile-nav){display:none!important}
.afh-mobile-nav button{font:inherit}

@media (max-width:900px){
  body.sidebar-open{overflow:hidden}
  .app{display:block;min-height:100vh}
  .main{width:100%;padding:78px 14px 108px!important}

  .mobile-page-brand{
    position:fixed;top:0;left:0;right:0;height:64px;z-index:48;
    display:flex;align-items:center;justify-content:center;
    background:rgba(2,5,12,.9);border-bottom:1px solid var(--line);
    backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px)
  }
  .mobile-page-brand img{width:58px;height:auto;display:block}
  .mobile-menu-trigger{
    position:fixed;top:12px;left:14px;z-index:70;width:42px;height:40px;
    display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;
    border:1px solid rgba(255,255,255,.12);border-radius:13px;color:#fff;
    background:rgba(255,255,255,.055);box-shadow:0 10px 30px rgba(0,0,0,.22);cursor:pointer
  }
  .mobile-menu-trigger span{display:block;width:18px;height:2px;border-radius:10px;background:currentColor;transition:.2s ease}

  .sidebar{
    position:fixed!important;inset:0 auto 0 0!important;top:0!important;
    width:min(86vw,340px)!important;min-width:0!important;height:100dvh!important;
    display:flex!important;padding:18px 16px 32px!important;gap:17px!important;
    transform:translateX(-105%);transition:transform .28s cubic-bezier(.2,.8,.2,1);
    z-index:80!important;background:rgba(3,8,18,.98)!important;
    box-shadow:24px 0 80px rgba(0,0,0,.58);overscroll-behavior:contain
  }
  body.sidebar-open .sidebar{transform:translateX(0)}
  .sidebar-overlay{
    position:fixed;inset:0;z-index:75;display:block;opacity:0;visibility:hidden;
    background:rgba(0,0,0,.62);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);
    transition:opacity .22s ease,visibility .22s ease
  }
  body.sidebar-open .sidebar-overlay{opacity:1;visibility:visible}
  .sidebar-mobile-head{display:flex;align-items:center;justify-content:space-between;color:#fff;font-weight:800;font-size:18px;padding:0 2px 4px}
  .sidebar-close{width:38px;height:38px;border-radius:12px;border:1px solid var(--line);background:rgba(255,255,255,.05);color:#fff;font-size:25px;line-height:1;cursor:pointer}
  .sidebar>.auth-brand{justify-content:center;padding:2px 0 4px}
  .sidebar>.auth-brand img{width:68px!important}
  .sidebar .client-card,.sidebar .advisor-box{display:block!important}
  .sidebar .nav-link{min-height:46px;padding:12px 13px!important;font-size:13px!important;border-radius:14px}
  .sidebar .nav-link span{gap:12px}
  .sidebar .nav-link svg{width:19px;height:19px;flex:0 0 19px}
  .sidebar .nav-label{font-size:10px;margin:3px 0 7px}
  .sidebar .advisor-box{margin-top:auto}

  .mobile-bar.afh-mobile-nav{
    position:fixed;left:10px;right:10px;bottom:max(10px,env(safe-area-inset-bottom));z-index:65;
    display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr));align-items:end;gap:2px;
    height:72px;padding:7px 5px 6px;border-radius:22px;border:1px solid rgba(255,255,255,.1);
    background:rgba(3,8,18,.94);backdrop-filter:blur(22px);-webkit-backdrop-filter:blur(22px);
    box-shadow:0 20px 60px rgba(0,0,0,.48)
  }
  .mobile-bar.afh-mobile-nav a,.mobile-bar.afh-mobile-nav button{
    position:relative;min-width:0;height:58px;padding:7px 2px 5px;border:0;border-radius:15px;
    display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;
    color:var(--muted);background:transparent;cursor:pointer;font-size:9.5px;font-weight:700;line-height:1
  }
  .mobile-bar.afh-mobile-nav svg{width:21px;height:21px;stroke-width:1.8}
  .mobile-bar.afh-mobile-nav a.active{color:#fff;background:rgba(22,139,255,.14)}
  .mobile-bar.afh-mobile-nav a.active:after{content:"";position:absolute;bottom:2px;width:18px;height:2px;border-radius:99px;background:var(--blue2)}
  .mobile-bar.afh-mobile-nav .mobile-main-action{overflow:visible;color:#fff;background:transparent}
  .mobile-main-icon{
    width:43px;height:43px;margin-top:-24px;display:grid;place-items:center;border-radius:15px;
    background:linear-gradient(135deg,var(--blue),var(--blue3));border:4px solid #030812;
    color:#fff;font-size:27px;font-weight:400;box-shadow:0 10px 28px rgba(22,139,255,.42)
  }
  .mobile-main-action>span:last-child{margin-top:1px}
  .topbar{margin-top:0}
  .top-actions .btn{width:auto}
}

@media (max-width:420px){
  .main{padding-left:11px!important;padding-right:11px!important}
  .mobile-bar.afh-mobile-nav{left:6px;right:6px;border-radius:19px}
  .mobile-bar.afh-mobile-nav a,.mobile-bar.afh-mobile-nav button{font-size:8.8px}
}
