/* ============================================
   LIVE PORTAL — login & dashboard
   Reuses tokens.css; this file is portal-specific.
   ============================================ */

.portal-live-body {
  background: var(--c-paper);
  color: var(--c-ink);
  min-height: 100vh;
}

.live-login__mark {
  display: inline-flex;
  align-items: center;
}
.live-login__mark img {
  height: 34px;
  width: auto;
}

/* ---------- LOGIN ---------- */
.live-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.live-login__card {
  max-width: 380px;
  width: 100%;
  background: #fff;
  border: 1px solid rgba(10,22,40,0.1);
  border-radius: 10px;
  padding: 44px 36px;
  box-shadow: 0 30px 60px -30px rgba(10,22,40,0.2);
}
.live-login__card h1 {
  font-size: 1.35rem;
  font-family: var(--f-body);
  font-weight: 600;
  margin: 28px 0 6px;
  color: var(--c-ink);
}
.live-login__sub { color: rgba(10,22,40,0.55); font-size: 0.9rem; margin-bottom: 28px; }

.field { margin-bottom: 18px; text-align: left; }
.field label { display: block; color: rgba(10,22,40,0.45); margin-bottom: 7px; }
.field input {
  width: 100%;
  border: 1px solid rgba(10,22,40,0.15);
  border-radius: 4px;
  padding: 12px 14px;
  font-size: 0.92rem;
  font-family: var(--f-body);
  color: var(--c-ink);
  background: #fff;
}
.field input:focus { outline: none; border-color: var(--c-accent); }

#loginForm .btn--primary { width: 100%; justify-content: center; margin-top: 6px; }

#loginStatus { margin-top: 16px; font-size: 0.86rem; }
#loginStatus.error { color: #A8472F; }
#loginStatus.ok { color: #163A63; }

.live-login__help { margin-top: 22px; font-size: 0.84rem; color: rgba(10,22,40,0.5); }
.live-login__help a { color: var(--c-accent); }

/* ---------- AUTH GATE ---------- */
.auth-gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(10,22,40,0.4);
}

/* ---------- DASHBOARD SHELL ---------- */
.live-dash__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
  border-bottom: 1px solid rgba(10,22,40,0.08);
  background: #fff;
}

.live-dash__body { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 65px); }

.portal-dash__nav {
  background: #F2EDE0;
  border-right: 1px solid rgba(10,22,40,0.08);
  padding: 28px 20px;
}
.portal-dash__account { display: flex; flex-direction: column; gap: 4px; margin-bottom: 32px; padding-bottom: 20px; border-bottom: 1px solid rgba(10,22,40,0.1); }
.portal-dash__account .mono { color: var(--c-accent); }
.portal-dash__account strong { color: var(--c-ink); font-size: 0.98rem; }
.portal-dash__loc { color: rgba(10,22,40,0.5); font-size: 0.82rem; }

.portal-dash__nav nav { display: flex; flex-direction: column; gap: 4px; }
.portal-dash__nav nav a { padding: 10px 12px; border-radius: 4px; color: rgba(10,22,40,0.6); font-size: 0.9rem; transition: background 0.2s, color 0.2s; text-decoration: none; }
.portal-dash__nav nav a:hover { background: rgba(10,22,40,0.05); }
.portal-dash__nav nav a.is-active { background: var(--c-ink); color: var(--c-paper); }

.portal-dash__main { padding: 36px 44px; }

.dash-tab { display: none; }
.dash-tab.is-active { display: block; }

.dash-tab__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 28px; flex-wrap: wrap; gap: 8px; }
.dash-tab__head h4 { color: var(--c-ink); font-family: var(--f-body); font-size: 1.2rem; font-weight: 600; }
.dash-tab__period { color: rgba(10,22,40,0.4); }

.dash-tab__head-right { display: flex; align-items: center; gap: 16px; }

.btn-export {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid rgba(10,22,40,0.18);
  border-radius: 4px;
  color: rgba(10,22,40,0.6);
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: #fff;
  transition: border-color 0.2s, color 0.2s;
}
.btn-export:hover {
  border-color: var(--c-accent);
  color: var(--c-ink);
}
.btn-export:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.hint { color: rgba(10,22,40,0.45); font-size: 0.9rem; }

/* usage chart */
.usage-chart { display: flex; align-items: flex-end; gap: 8px; height: 200px; padding: 0 4px 24px; border-bottom: 1px solid rgba(10,22,40,0.1); margin-bottom: 18px; }
.usage-bar { flex: 1; background: linear-gradient(180deg, #163A63, #0F2A4A); border-radius: 3px 3px 0 0; position: relative; min-height: 4px; }
.usage-bar--peak { background: linear-gradient(180deg, var(--c-accent), #A8472F); }
.usage-bar__label { position: absolute; bottom: -22px; left: 0; right: 0; text-align: center; font-family: var(--f-mono); font-size: 0.62rem; color: rgba(10,22,40,0.4); }

.usage-stats { display: flex; gap: 36px; margin-top: 26px; flex-wrap: wrap; }
.usage-stat { display: flex; flex-direction: column; gap: 6px; }
.usage-stat__label { color: rgba(10,22,40,0.4); }
.usage-stat__val { color: var(--c-ink); font-weight: 600; font-size: 1.05rem; }
.usage-stat__val--up { color: #A8472F; }

/* bill estimate */
.bill-estimate__total { display: flex; justify-content: space-between; align-items: baseline; background: var(--c-ink); color: var(--c-paper); padding: 22px 26px; border-radius: 6px; margin-bottom: 24px; }
.bill-estimate__total .mono { color: rgba(245,241,232,0.6); }
.bill-estimate__total strong { font-size: 1.8rem; font-family: var(--f-display); }
.bill-estimate__lines { display: flex; flex-direction: column; gap: 12px; }
.bill-estimate__lines li { display: flex; justify-content: space-between; padding-bottom: 12px; border-bottom: 1px solid rgba(10,22,40,0.08); color: rgba(10,22,40,0.7); font-size: 0.92rem; list-style: none; }
.bill-estimate__lines .mono { color: var(--c-ink); }
.bill-estimate__note { margin-top: 18px; font-size: 0.82rem; color: rgba(10,22,40,0.4); }

/* quote card */
.quote-card { background: linear-gradient(160deg, var(--c-steel), var(--c-ink)); border-radius: 8px; padding: 32px; color: var(--c-paper); max-width: 460px; }
.quote-card__rate { margin-bottom: 22px; }
.quote-card__rate .mono { color: rgba(245,241,232,0.5); display: block; margin-bottom: 6px; }
.quote-card__rate strong { font-family: var(--f-display); font-size: 2.6rem; color: var(--c-accent); }
.quote-card__rate strong span { font-size: 1.1rem; color: rgba(245,241,232,0.5); font-family: var(--f-body); }
.quote-card__term, .quote-card__compare { margin-bottom: 18px; }
.quote-card__term .mono, .quote-card__compare .mono { color: rgba(245,241,232,0.5); display: block; margin-bottom: 5px; }
.quote-card__compare-val { color: #7FC4A0; font-size: 0.95rem; font-weight: 600; }

/* compare bars */
.compare-bars { display: flex; flex-direction: column; gap: 20px; max-width: 560px; }
.compare-bar { display: grid; grid-template-columns: 150px 1fr 90px; align-items: center; gap: 14px; }
.compare-bar__label { font-size: 0.86rem; color: var(--c-ink); }
.compare-bar__track { height: 10px; background: rgba(10,22,40,0.08); border-radius: 5px; overflow: hidden; }
.compare-bar__fill { height: 100%; background: rgba(10,22,40,0.25); border-radius: 5px; }
.compare-bar__fill--you { background: var(--c-brass); }
.compare-bar__fill--us { background: var(--c-accent); }
.compare-bar__val { color: rgba(10,22,40,0.5); text-align: right; }

@media (max-width: 760px) {
  .live-dash__body { grid-template-columns: 1fr; }
  .portal-dash__nav { border-right: none; border-bottom: 1px solid rgba(10,22,40,0.08); }
  .portal-dash__nav nav { flex-direction: row; flex-wrap: wrap; }
  .portal-dash__main { padding: 26px 22px; }
  .compare-bar { grid-template-columns: 1fr; gap: 6px; }
}
