/* Portal CSS overrides/additions — scoped */

/*
  Portal pages are often shorter than the viewport (few rows in tables).
  Use a flex column layout so the footer is pushed to the bottom and
  you don't get a big empty gap under the footer.
*/
body.portal-page{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body.portal-page .footer{ margin-top: auto; }

/* Tighter spacing than the marketing site */
body.portal-page .section{ padding: 28px 0 44px; }
.portal-page .link{
  color: var(--primary);
  font-weight: 800;
  text-decoration: none;
}
.portal-page .link:hover{ text-decoration: underline; }

.portal-page .split{
  gap: 18px; /* tighter than home sections */
}

/* Utilities used in panel.php */
.portal-page .card-pad{ padding: 22px; }
.portal-page .grid{ display: grid; }
.portal-page .divider{ height: 1px; background: var(--line); margin: 18px 0; }
.portal-page .pill{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(30,136,255,0.10);
  color: var(--navy);
  border: 1px solid rgba(30,136,255,0.18);
  font-size: 13px;
  font-weight: 800;
}
.portal-page .card-header{
  padding: 22px;
}
.portal-page .card-header h1,
.portal-page .card-header h2,
.portal-page .card-header h3{ margin: 10px 0 6px; }
.portal-page .card-header .muted{ color: var(--muted); }

.portal-page .form{
  padding: 22px;
}
.portal-page .form .row{
  display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap;
}

.portal-page .pw-wrap{ position:relative; }
.portal-page .pw-toggle{
  position:absolute; right:10px; top:50%; transform:translateY(-50%);
  height:34px; padding:0 12px;
}

.portal-page .status{
  display:inline-flex; align-items:center; gap:8px;
  padding:6px 10px; border-radius:999px;
  font-weight:800; font-size:12px;
  border:1px solid rgba(11,30,58,0.14);
  background: rgba(30,136,255,0.08);
  color: var(--navy);
}
.portal-page .status.ok{ border-color: rgba(20,184,166,0.28); background: rgba(20,184,166,0.10); color:#065f56; }
.portal-page .status.warn{ border-color: rgba(245,158,11,0.28); background: rgba(245,158,11,0.10); color:#92400e; }

.portal-page .tabs{
  display:flex; gap:8px; flex-wrap:wrap; margin: 12px 0 0;
}
.portal-page .tab{
  height:38px; padding:0 14px; border-radius:999px;
  border:1px solid rgba(11,30,58,0.14);
  background:#fff; color:var(--navy);
  font-weight:800; cursor:pointer;
}
.portal-page .tab[aria-selected="true"]{ border-color: rgba(30,136,255,0.35); box-shadow: 0 10px 18px rgba(30,136,255,0.12); }

.portal-page .table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
}
.portal-page .table th,.portal-page .table td{
  padding:12px 12px;
  text-align:left;
  border-bottom:1px solid var(--line);
  font-size:13px;
  vertical-align:middle;
}
.portal-page .table th{
  color: rgba(11,30,58,0.72);
  font-weight:800;
  background: rgba(246,249,255,0.9);
}
.portal-page .table tr:last-child td{ border-bottom:none; }

.portal-page .toast{
  position:fixed; right:16px; bottom:16px; z-index:50;
  background:#fff; border:1px solid rgba(11,30,58,0.12);
  box-shadow: 0 18px 40px rgba(11,30,58,.10);
  border-radius:14px; padding:12px 14px; min-width:220px;
  display:none;
}
.portal-page .toast strong{ display:block; font-size:13px; }
.portal-page .toast span{ display:block; color: rgba(11,30,58,0.70); font-size:12px; margin-top:2px; }

@media (max-width: 980px){
  .portal-page .split{ grid-template-columns: 1fr; }
}


.pdf-modal{position:fixed; inset:0; display:none; z-index:9999;}
.pdf-modal.is-open{display:block;}
.pdf-backdrop{position:absolute; inset:0; background:rgba(0,0,0,.55);}

.pdf-dialog{
  position:relative;
  width:min(1100px, calc(100% - 32px));
  height:min(90vh, 900px);
  margin:5vh auto 0;
  background:#fff;
  border-radius:14px;
  overflow:hidden;
  box-shadow:0 30px 80px rgba(0,0,0,.35);
  display:flex;
  flex-direction:column;
}

.pdf-head{
  padding:10px 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  border-bottom:1px solid rgba(0,0,0,.08);
}

.pdf-body{flex:1; background:#0b0b0b;}
#pdfFrame{width:100%; height:100%; border:0; background:#fff;}
