/* ==================================================================
   Customer portal in the website's clothes (ENH-220, Ricky 11/1)
   Loaded AFTER portal.css and the website's site.css (modules/portal/page.js). The
   website draws the header, footer and the textured navy band (page-hero); this file
   undoes the old dashboard shell (fixed sidebar + top bar) and dresses the portal's own
   cards, buttons and tables in the site's colors and type. Scoped to body.portal-site.
   ================================================================== */

/* ---------- the page: the website's background and type, not the dashboard's ---------- */
body.portal-site { font-family: Montserrat, Arial, sans-serif; font-size: 15px; color: var(--ink); background-color: var(--bg); }
.portal-site .app-container { display: block; min-height: 0; }
.portal-site .main-content { margin: 0; min-height: 0; display: block; }
.portal-site .page-content { max-width: 1160px; margin: 0 auto; padding: 8px 20px 56px; box-sizing: border-box; }
.portal-site .sidebar-overlay { display: none !important; }
.portal-site .main-content a, .portal-site .portal-card a { color: var(--blue-bright); }

/* ---------- the account band: website header, then navy with the tabs ---------- */
.portal-site .acct-band .wrap { padding-top: 26px; padding-bottom: 64px; }
.acct-band-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.acct-eyebrow { font: 800 .78rem/1.2 'Encode Sans Expanded', Montserrat, Arial, sans-serif; letter-spacing: .16em; text-transform: uppercase; color: #A8D4E8; margin: 0; }
.acct-who { display: flex; align-items: center; gap: 12px; color: #fff; font-weight: 700; font-size: .92rem; }
.portal-site .acct-who .portal-user-name { color: #fff; font-weight: 700; }
.acct-logout { background: transparent; color: #fff; border: 1.5px solid rgba(255, 255, 255, .6); border-radius: 8px; padding: 7px 14px; font: 800 .78rem Montserrat, Arial, sans-serif; letter-spacing: .04em; text-transform: uppercase; cursor: pointer; }
.acct-logout:hover { background: rgba(255, 255, 255, .12); border-color: #fff; }
/* the tabs: one row of pills, sideways scroll on a phone */
.portal-site .acct-tabs { position: static; width: auto; background: none; display: block; }
.portal-site .acct-tabs .sidebar-nav { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; flex: none; }
.portal-site .acct-tabs .sidebar-nav::-webkit-scrollbar { display: none; }
.portal-site .acct-tabs .nav-item {
  flex: none; display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 10px 16px;
  border: 1.5px solid rgba(255, 255, 255, .28); border-left-width: 1.5px; border-radius: 999px;
  background: rgba(255, 255, 255, .08); color: #fff; font: 700 .9rem Montserrat, Arial, sans-serif; white-space: nowrap; text-decoration: none;
}
.portal-site .acct-tabs .nav-item svg { width: 17px; height: 17px; flex: none; }
.portal-site .acct-tabs .nav-item:hover { background: rgba(255, 255, 255, .16); text-decoration: none; }
.portal-site .acct-tabs .nav-item.active { background: #fff; color: var(--navy); border-color: #fff; padding-left: 16px; border-radius: 999px; }
.portal-site .acct-tabs .nav-item.active svg { color: var(--blue-bright); }

/* ---------- the page's own headings and cards ---------- */
.portal-site .portal-welcome { margin: 4px 0 18px; }
.portal-site .portal-welcome h2, .portal-site .page-content > h2, .portal-site .page-header h1, .portal-site .page-header h2 {
  font-family: 'Encode Sans Expanded', Montserrat, Arial, sans-serif; color: var(--navy); font-size: clamp(1.5rem, 3.4vw, 2rem); letter-spacing: -.01em;
}
.portal-site .portal-welcome p { color: var(--muted); }
.portal-site .ph-card, .portal-site .portal-card, .portal-site .card, .portal-site .ph-tile, .portal-site .upcoming-card, .portal-site .history-card {
  background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-sm);
}
.portal-site .ph-card h3, .portal-site .portal-card h3, .portal-site .card h3 { font-family: 'Encode Sans Expanded', Montserrat, Arial, sans-serif; color: var(--navy); letter-spacing: -.01em; }
.portal-site .ph-tile { transition: transform .2s var(--ease), box-shadow .2s; }
.portal-site .ph-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.portal-site .ph-tile-title { color: var(--navy); font-weight: 800; }
.portal-site .ph-tile-icon { border-radius: 12px; background: var(--blue-soft) !important; color: var(--blue-bright) !important; }
.portal-site .ph-edit { color: var(--blue-bright); font-weight: 800; }
.portal-site .ph-foot { color: var(--muted); }

/* ---------- buttons: the website's four ---------- */
.portal-site .main-content .btn-primary, .portal-site .main-content button.primary, .portal-site .ph-cta, .portal-site .pw-primary, .portal-site .portal-btn-primary {
  background: #2C7BA3; color: #fff; border: 0; border-radius: 8px; font-family: 'Encode Sans Expanded', Montserrat, Arial, sans-serif; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
}

/* ---------- tables (invoices, history) ---------- */
.portal-site table { border-collapse: separate; border-spacing: 0; }
.portal-site table th { font: 800 .72rem/1.2 Montserrat, Arial, sans-serif; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: var(--bg); }
.portal-site table td { border-color: var(--line); }

/* ---------- the welcome walkthrough (sheet / dialog) ---------- */
.portal-site .pw-sheet h2, .portal-site .pw-sheet h3 { font-family: 'Encode Sans Expanded', Montserrat, Arial, sans-serif; color: var(--navy); }

/* ---------- the sign-in page: the website header, then the hero with the card ---------- */
/* the hero background is the website's .page-hero (textures, sunburst, bevel) -- only undo the old centered flex box */
.portal-login .login-page { min-height: 0; padding: 0; display: block; }
.portal-login .acct-login .login-container { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; max-width: 1200px; width: 100%; padding: 56px 16px 96px; box-sizing: border-box; }
.portal-login .acct-login-copy { text-align: left; margin: 0; color: #fff; }
.portal-login .acct-login-copy h1 { color: #fff; font-size: clamp(2rem, 4.6vw, 3rem); line-height: 1.1; margin: 10px 0 14px; max-width: 16ch; }
.portal-login .acct-login-copy h1 span { color: #469CC3; }
.portal-login .acct-lead { color: #D9E8F2; font-size: 1.05rem; line-height: 1.6; max-width: 46ch; margin: 0 0 18px; }
.acct-perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.acct-perks li { position: relative; padding-left: 30px; color: #fff; font-weight: 700; }
.acct-perks li::before { content: ''; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%; background: #469CC3 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat; }
.portal-login .login-card { width: 100%; max-width: 440px; justify-self: end; border-radius: 20px; padding: 30px 30px 26px; box-shadow: 0 24px 60px rgba(4, 22, 40, .45); box-sizing: border-box; }
.portal-login .login-card h3 { font-family: 'Encode Sans Expanded', Montserrat, Arial, sans-serif; color: var(--navy); font-size: 1.45rem; letter-spacing: -.01em; }
.portal-login .login-btn { background: #2C7BA3; border-radius: 8px; font-family: 'Encode Sans Expanded', Montserrat, Arial, sans-serif; text-transform: uppercase; letter-spacing: .04em; font-weight: 800; box-shadow: 0 6px 16px rgba(6, 73, 116, .25); }
.portal-login .login-btn:hover:not(:disabled) { background: #26739C; }
.portal-login .login-input-group input, .portal-login .code-digit { border-radius: 10px; border-color: var(--line); }
.portal-login .login-input-group input:focus, .portal-login .code-digit:focus { border-color: var(--blue-bright); box-shadow: 0 0 0 3px rgba(6, 73, 116, .14); outline: 0; }
.portal-login .login-toggle a { color: var(--blue-bright); font-weight: 800; cursor: pointer; }

/* ---------- phones ---------- */
@media (max-width: 860px) {
  .portal-login .acct-login .login-container { grid-template-columns: 1fr; gap: 24px; padding: 28px 16px 72px; }
  .portal-login .login-card { justify-self: stretch; max-width: none; padding: 24px 20px 22px; }
  .portal-login .acct-perks { display: none; }
  .portal-login .acct-lead { font-size: .98rem; margin-bottom: 0; }
}
@media (max-width: 640px) {
  .portal-site .acct-band .wrap { padding-top: 18px; padding-bottom: 54px; }
  .acct-band-top { margin-bottom: 12px; }
  .acct-who .portal-user-name { display: none; }
  .portal-site .page-content { padding: 4px 16px 40px; }
}
