/* ============================================================
   Área do Cliente — NUN FIBRA
   Depende de styles.css (tokens, fontes e botões do site)
   ============================================================ */

body.portal{
  background:#070B14;
  color:#EAF1FF;
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

.portal-bg{
  position:fixed;inset:0;z-index:-1;
  background:var(--grad-hero);
}
.portal-bg::after{
  content:"";position:absolute;inset:0;
  background:
    radial-gradient(760px 500px at 80% 8%,rgba(120,90,255,.42),transparent 62%),
    radial-gradient(560px 420px at 6% 96%,rgba(0,229,255,.14),transparent 68%);
}

.skip{
  position:absolute;left:-9999px;top:0;z-index:100;
  background:#fff;color:#0A0A0B;padding:10px 16px;border-radius:0 0 8px 0;
  font-size:13px;font-weight:600;
}
.skip:focus{left:0}

/* ---------- topo ---------- */
.portal-top{
  width:100%;max-width:1180px;margin:0 auto;
  padding:26px 24px 0;
  display:flex;align-items:center;justify-content:space-between;gap:16px;
}
.portal-brand img{width:118px;height:auto;display:block}
.portal-back{
  font-size:12px;font-weight:500;letter-spacing:.04em;
  color:rgba(255,255,255,.72);
  border:1px solid rgba(255,255,255,.22);border-radius:999px;
  padding:9px 16px;transition:background .2s ease,border-color .2s ease,color .2s ease;
}
.portal-back:hover{background:rgba(255,255,255,.1);border-color:rgba(255,255,255,.45);color:#fff}

/* ---------- estrutura ---------- */
.portal-shell{
  width:100%;max-width:1180px;margin:0 auto;flex:1;
  padding:clamp(32px,6vh,64px) 24px 40px;
  display:grid;
  grid-template-columns:minmax(0,1fr) 400px;
  gap:clamp(28px,4vw,56px);
  align-items:center;
}
.portal-shell.is-logged{grid-template-columns:1fr}
.portal-shell.is-logged .portal-intro{display:none}
.portal-shell.is-logged #login-panel{display:none}

.portal-intro{max-width:520px}
.portal-intro h1{color:#fff;margin-bottom:20px}
.portal-intro p{color:rgba(255,255,255,.68);font-size:14.5px;line-height:1.65;max-width:44ch}

.portal-perks{
  list-style:none;margin:26px 0 0;padding:0;display:grid;gap:10px;
}
.portal-perks li{
  position:relative;padding-left:22px;
  font-size:13px;color:rgba(255,255,255,.72);
}
.portal-perks li::before{
  content:"";position:absolute;left:0;top:7px;width:7px;height:7px;border-radius:50%;
  background:var(--cyan);box-shadow:0 0 8px rgba(0,229,255,.8);
}

/* ---------- cartões ---------- */
.portal-card{
  background:#fff;color:#0A0A0B;
  border-radius:16px;padding:26px;
  box-shadow:0 40px 80px -46px rgba(0,0,0,.85);
}
.portal-card h2{
  font-size:20px;text-transform:none;letter-spacing:-.01em;margin-bottom:6px;
}
.portal-hint{
  display:block;font-size:10px;font-weight:600;letter-spacing:.13em;
  text-transform:uppercase;color:#9A9AA6;
}
.portal-card > .portal-hint{text-transform:none;letter-spacing:0;font-size:13px;color:#6E6E7A;margin-bottom:4px}

/* ---------- formulário ---------- */
#login-form label{
  display:block;margin:18px 0 7px;
  font-size:10px;font-weight:600;letter-spacing:.13em;text-transform:uppercase;color:#6E6E7A;
}
#login-form input{
  width:100%;height:46px;border-radius:10px;border:1px solid #E3E3E7;
  padding:0 14px;font-family:inherit;font-size:14px;color:#0A0A0B;background:#fff;
  transition:border-color .2s ease,box-shadow .2s ease;
}
#login-form input::placeholder{color:#B6B6C0}
#login-form input:focus{outline:none;border-color:#3F2FDA;box-shadow:0 0 0 3px rgba(63,47,218,.12)}

.password-wrap{position:relative}
.password-wrap input{padding-right:88px}
.password-toggle{
  position:absolute;right:6px;top:50%;transform:translateY(-50%);
  height:34px;padding:0 12px;border:0;border-radius:8px;cursor:pointer;
  background:#F1F1F4;color:#3C3C46;
  font-family:inherit;font-size:10px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;
  transition:background .2s ease;
}
.password-toggle:hover{background:#E7E7EC}

.btn-block{
  width:100%;justify-content:space-between;margin-top:24px;
  display:flex;align-items:center;
}

.portal-message{
  margin:14px 0 0;min-height:18px;font-size:12.5px;line-height:1.5;color:#6E6E7A;
}
.portal-message.is-error{color:#B42318}
.portal-message.is-ok{color:#0E9F6E}

.portal-note,.portal-help{
  margin:14px 0 0;font-size:11.5px;line-height:1.6;color:#9A9AA6;
}
.portal-note a,.portal-help a{color:#3F2FDA;text-decoration:underline;text-underline-offset:2px}
.portal-note a[aria-disabled="true"]{color:#B6B6C0;pointer-events:none;text-decoration:none}

/* Preserve the native hidden state even when component styles set display. */
[hidden]{display:none!important}

/* ---------- painel ---------- */
.portal-dashboard{grid-column:1 / -1;display:grid;gap:16px;margin-top:8px}

.toolbar{
  display:flex;align-items:flex-end;justify-content:space-between;gap:18px;
  padding:18px 22px;
}
.toolbar-field{flex:1;min-width:0}
.toolbar-field select{
  width:100%;max-width:420px;height:44px;margin-top:6px;
  border-radius:10px;border:1px solid #E3E3E7;padding:0 12px;
  font-family:inherit;font-size:14px;color:#0A0A0B;background:#fff;
}
.toolbar-field select:focus{outline:none;border-color:#3F2FDA;box-shadow:0 0 0 3px rgba(63,47,218,.12)}

.summary-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
.summary strong{
  display:block;font-size:19px;font-weight:600;letter-spacing:-.02em;
  margin:8px 0 4px;color:#0A0A0B;
}
.muted{font-size:12px;color:#6E6E7A}

.invoices{padding:24px}
.section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;flex-wrap:wrap}
.section-head .kicker{color:#9A9AA6}
.section-head h2{font-size:20px;text-transform:none;letter-spacing:-.01em;margin-top:2px}

.invoice-list{display:grid;gap:10px;margin-top:18px}
.invoice{
  display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;
  border:1px solid #E3E3E7;border-radius:12px;padding:14px 16px;
  transition:border-color .2s ease,background .2s ease;
}
.invoice:hover{border-color:#CFCFD8;background:#FCFCFD}
.invoice h3{
  display:flex;align-items:center;gap:10px;flex-wrap:wrap;
  font-size:14px;font-weight:600;letter-spacing:0;color:#0A0A0B;
}
.invoice p{margin:4px 0 0;font-size:12px;color:#6E6E7A}
.invoice .actions{display:flex;gap:8px;flex-wrap:wrap}
.invoice .btn-outline{height:36px;font-size:10px;padding:0 14px}

.badge{
  font-size:9.5px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;
  padding:4px 9px;border-radius:999px;border:1px solid transparent;
}
.badge.pending{background:#FFF4E5;color:#8A5300;border-color:#FFE0B2}
.badge.closed{background:#E8F7F0;color:#0E6E4E;border-color:#BFE8D6}

.more{margin-top:16px}

.empty{
  padding:26px;text-align:center;color:#9A9AA6;font-size:13px;
  border:1px dashed #E3E3E7;border-radius:12px;
}

/* ---------- rodapé ---------- */
.portal-foot{
  grid-column:1 / -1;
  display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap;
  padding-top:34px;margin-top:12px;
  border-top:1px solid rgba(255,255,255,.12);
  font-size:11px;color:rgba(255,255,255,.5);
}
.portal-foot a{color:rgba(255,255,255,.75);text-decoration:underline;text-underline-offset:2px}

/* ---------- responsivo ---------- */
@media (max-width:960px){
  .portal-shell{grid-template-columns:1fr;align-items:start}
  .portal-intro{max-width:none}
  .summary-grid{grid-template-columns:1fr}
  .toolbar{flex-direction:column;align-items:stretch}
  .toolbar-field select{max-width:none}
}
@media (max-width:560px){
  .portal-card{padding:22px}
  .portal-top{padding-top:18px}
  .portal-brand img{width:96px}
  .invoice{flex-direction:column;align-items:flex-start}
}
