/* ============================================================================
   Fuerte y Claro — Portal de clientes (login + panel)
   Usa los tokens de site.css. Aquí van solo las piezas del portal.
   ========================================================================== */

/* ---------------- LOGIN / REGISTRO ---------------- */
.login {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr 1.05fr;
}
@media (max-width: 900px) { .login { grid-template-columns: 1fr; } }

.login__brand {
  background: linear-gradient(160deg, var(--navy), var(--navy-soft));
  color: #cbc7d6; padding: clamp(2rem, 5vw, 4rem); display: flex; flex-direction: column; gap: 1.4rem;
  position: relative; overflow: hidden;
}
.login__brand::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(50% 50% at 90% 0%, color-mix(in srgb, var(--cyan) 32%, transparent), transparent 60%);
}
.login__brand > * { position: relative; }
.login__brand .brand__name { color: #fff; }
.login__brandbody { margin-top: auto; }
.login__brandbody h1 { color: #fff; font-size: clamp(1.9rem, 3.4vw, 2.7rem); }
.login__brandbody p { margin-top: .9rem; max-width: 42ch; }
.login__points { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; gap: .8rem; }
.login__points li { position: relative; padding-left: 1.9rem; color: #e7e4ee; }
.login__points li::before {
  content: ""; position: absolute; left: 0; top: .2em; width: 20px; height: 20px; border-radius: 50%;
  background: color-mix(in srgb, var(--cyan) 32%, transparent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/12px no-repeat;
}
.login__foot { color: #948fa3; font-size: .95rem; }
.login__foot a { color: #fff; font-weight: 600; }

.login__panel { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: clamp(1.6rem, 4vw, 3rem); background: var(--paper); }
.login__card { width: 100%; max-width: 400px; background: var(--surface); border: 1.6px solid var(--line); border-radius: var(--r-lg); padding: clamp(1.5rem, 3vw, 2.2rem); box-shadow: var(--shadow); }
.login__card--wide { max-width: 480px; }
.login__logo { width: 46px; height: 46px; border-radius: 12px; margin-bottom: 1rem; }
.login__card h2 { margin-bottom: .3rem; }
.login__alt { margin-top: 1.3rem; text-align: center; color: var(--muted); font-size: .95rem; }
.login__alt a, .login__foot a { color: var(--brand-strong); font-weight: 700; }
.login__back { margin-top: 1.2rem; }
.login__back a { color: var(--muted); font-weight: 600; }

.portal-form .field { margin-bottom: 1rem; }
.field__pass { position: relative; }
.field__pass input { padding-right: 3rem; }
.field__eye { position: absolute; right: .4rem; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; display: grid; place-items: center; background: none; border: none; color: var(--muted); cursor: pointer; border-radius: 10px; }
.field__eye:hover { color: var(--ink); }
.field__eye svg { width: 22px; height: 22px; }
.field__eye.is-on { color: var(--brand-strong); }
.field__hint { font-size: .82rem; color: var(--muted); margin-top: .2rem; }

.consent { display: flex; gap: .7rem; align-items: flex-start; font-size: .88rem; color: var(--muted); margin: .4rem 0 1.2rem; line-height: 1.5; }
.consent input { margin-top: .2rem; width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.consent b { color: var(--ink); }

.cred-hint { margin-top: 1.4rem; border: 1px dashed var(--line-2); border-radius: var(--r-sm); padding: .4rem .9rem; font-size: .88rem; }
.cred-hint summary { cursor: pointer; font-family: var(--display); font-weight: 600; color: var(--ink); padding: .5rem 0; }
.cred-hint p { margin: .3rem 0 .6rem; color: var(--ink-soft); }

/* ---------------- PANEL ---------------- */
.ptop { position: sticky; top: 0; z-index: 40; background: var(--surface); border-bottom: 1px solid var(--line); }
.ptop__inner { max-width: 1080px; margin-inline: auto; display: flex; align-items: center; gap: .7rem; height: 66px; padding-inline: clamp(16px, 4vw, 28px); }
.brand--sm .logo-mark { width: 32px; height: 32px; }
.brand--sm .brand__name { font-size: 1.1rem; }
.ptop__sep { color: var(--line-2); }
.ptop__portal { font-family: var(--display); font-weight: 600; color: var(--muted); font-size: .95rem; }
.ptop__right { margin-left: auto; display: flex; align-items: center; gap: 1rem; }
.ptop__who { display: inline-flex; align-items: center; gap: .55rem; font-weight: 600; color: var(--ink); font-size: .95rem; }
.ptop__av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-family: var(--display); font-weight: 800; font-size: .9rem; }
@media (max-width: 620px) { .ptop__portal, .ptop__sep { display: none; } .ptop__who span, .ptop__who { font-size: 0; } .ptop__who .ptop__av { font-size: .9rem; } }

.portal { padding: clamp(1.6rem, 4vw, 2.6rem) 0 4rem; }
.portal__wrap { max-width: 1080px; margin-inline: auto; padding-inline: clamp(16px, 4vw, 28px); }

.phead { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.8rem; }
.phead h1 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin: .2rem 0; }
.phead__meta { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; color: var(--muted); font-size: .95rem; }
.phead__meta a { color: var(--brand-strong); font-weight: 600; }

.tabs { display: flex; gap: .3rem; border-bottom: 1.6px solid var(--line); margin-bottom: 1.8rem; overflow-x: auto; }
.tab { font-family: var(--display); font-weight: 700; font-size: .98rem; color: var(--muted); background: none; border: none; padding: .8rem 1rem; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1.6px; white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--ink); border-bottom-color: var(--brand); }

.tabpanel__h { font-size: 1.3rem; margin-bottom: 1.2rem; }
.tabpanel[hidden] { display: none; }

.statgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.6rem; }
@media (max-width: 820px) { .statgrid { grid-template-columns: 1fr 1fr; } }
.stat { background: var(--surface); border: 1.6px solid var(--line); border-radius: var(--r); padding: 1.1rem 1.2rem; }
.stat__label { display: block; font-size: .84rem; color: var(--muted); }
.stat__value { display: block; font-family: var(--display); font-weight: 800; font-size: 1.7rem; color: var(--ink); letter-spacing: -.02em; margin: .2rem 0; }
.stat__delta { font-size: .8rem; font-weight: 700; color: #0f7a3d; }

.pcols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
@media (max-width: 820px) { .pcols { grid-template-columns: 1fr; } }
.panel-card { background: var(--surface); border: 1.6px solid var(--line); border-radius: var(--r-lg); padding: 1.5rem; box-shadow: var(--shadow-sm); }
.panel-card h3 { margin-bottom: 1rem; }

.kv { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.kv:last-of-type { border-bottom: none; }
.kv span { color: var(--muted); }
.kv b { color: var(--ink); font-family: var(--display); font-weight: 600; text-align: right; }

.timeline { list-style: none; padding: 0; margin: 0; }
.tl { position: relative; display: flex; gap: .9rem; padding: 0 0 1.1rem 0; }
.tl:not(:last-child)::before { content: ""; position: absolute; left: 8px; top: 20px; bottom: 0; width: 2px; background: var(--line); }
.tl__dot { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--line-2); background: var(--surface); margin-top: 2px; }
.tl--done .tl__dot { border-color: var(--ok); background: var(--ok); }
.tl--next .tl__dot { border-color: var(--brand); }
.tl b { font-family: var(--display); font-weight: 600; color: var(--ink); display: block; }
.tl__date { font-size: .84rem; color: var(--muted); }

.onboard { margin: 0 0 1.2rem; padding: 0; list-style: none; counter-reset: ob; display: grid; gap: .9rem; }
.onboard li { position: relative; padding-left: 2.4rem; }
.onboard li::before { counter-increment: ob; content: counter(ob); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 9px; background: var(--navy); color: #fff; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: .85rem; }
.onboard b { display: block; font-family: var(--display); color: var(--ink); }
.onboard span { font-size: .9rem; color: var(--muted); }

.site-actions { display: grid; gap: .7rem; margin-top: 1.2rem; }
.site-head { border-radius: var(--r); padding: 1.4rem; display: flex; align-items: center; gap: 1rem; margin-bottom: 1.2rem; position: relative; }
.site-head__img { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; background: #fff; box-shadow: var(--shadow-sm); }
.site-head__logo { font-family: var(--display); font-weight: 800; font-size: 1.3rem; color: var(--ink); }

.files { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.file { display: flex; align-items: center; gap: .8rem; padding: .7rem .8rem; border: 1.6px solid var(--line); border-radius: var(--r-sm); }
.file__ic { flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--brand-strong); }
.file__ic svg { width: 20px; height: 20px; }
.file__meta { flex: 1; min-width: 0; }
.file__meta b { display: block; font-family: var(--display); font-weight: 600; color: var(--ink); font-size: .94rem; }
.file__meta span { font-size: .8rem; color: var(--muted); }
.file__dl { font-family: var(--display); font-weight: 700; font-size: .86rem; color: var(--brand-strong); }

.table-wrap { overflow-x: auto; }
.itable { width: 100%; border-collapse: collapse; font-size: .94rem; }
.itable th { text-align: left; font-family: var(--display); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: .6rem .7rem; border-bottom: 1.6px solid var(--line); }
.itable td { padding: .8rem .7rem; border-bottom: 1px solid var(--line); }
.itable__link { color: var(--brand-strong); font-weight: 700; }
.pill-status { font-family: var(--display); font-weight: 700; font-size: .78rem; padding: .2rem .6rem; border-radius: var(--pill); }
.pill-status.is-paid { background: var(--ok-soft); color: #0f7a3d; }
.pill-status.is-pend { background: #fff2e0; color: #a8630a; }
@media (max-width: 620px) {
  .itable thead { display: none; }
  .itable, .itable tbody, .itable tr, .itable td { display: block; width: 100%; }
  .itable tr { border: 1.6px solid var(--line); border-radius: var(--r-sm); margin-bottom: .8rem; padding: .4rem .2rem; }
  .itable td { border: none; display: flex; justify-content: space-between; gap: 1rem; padding: .4rem .8rem; }
  .itable td::before { content: attr(data-th); font-weight: 700; color: var(--muted); }
}

.contact-line { display: flex; align-items: center; gap: .8rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.contact-line:last-of-type { border-bottom: none; }
.contact-line__ic { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--brand-strong); }
.contact-line__ic svg { width: 22px; height: 22px; }
.contact-line b { display: block; font-family: var(--display); color: var(--ink); }
.contact-line small { color: var(--muted); }
