:root {
  --pv2-ink: #161616;
  --pv2-muted: #666;
  --pv2-line: #222;
  --pv2-soft-line: #cfcfcf;
  --pv2-paper: #f3f3f3;
  --pv2-panel: #fff;
  --pv2-wash: #e8e8e8;
  --pv2-success: #eef7ee;
  --pv2-warning: #fff8dd;
  --pv2-danger: #fff0f0;
  --pv2-info: #eef3f7;
  --pv2-max-width: 1180px;
  --pv2-shadow: 0 18px 48px rgba(0, 0, 0, .08);
}

body.portal-v2 {
  margin: 0;
  min-height: 100vh;
  overflow: auto;
  color: var(--pv2-ink);
  background: var(--pv2-paper);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body.portal-v2 *,
body.portal-v2 *::before,
body.portal-v2 *::after { box-sizing: border-box; }
body.portal-v2 a { color: inherit; }
body.portal-v2 button,
body.portal-v2 input,
body.portal-v2 select { font: inherit; }
body.portal-v2 :focus-visible { outline: 3px solid var(--portal-accent, var(--pv2-line)); outline-offset: 3px; }
fff;
  background: var(--pv2-ink);
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
}
#fff;
  background: var(--pv2-ink);
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
}

body.portal-v2 header {
  padding: 0;
  background: var(--pv2-panel);
  border: 0;
  border-bottom: 2px solid var(--pv2-line);
  text-align: left;
}

.pv2-header-main {
  max-width: var(--pv2-max-width);
  min-height: 78px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

body.portal-v2 header .logo {
  width: auto;
  max-width: 240px;
  margin: 0;
  object-fit: contain;
}

body.portal-v2 #login_link {
  margin-left: auto;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--pv2-ink);
  background: transparent;
  font-size: 13px;
  font-weight: 800;
}

body.portal-v2 #login_link a {
  margin: 0;
  padding: 10px 13px;
  color: var(--pv2-ink);
  background: #fff;
  border: 2px solid var(--pv2-line);
  border-radius: 0;
  text-decoration: none;
}
body.portal-v2 #login_link a:hover { background: var(--pv2-wash); }

.pv2-section-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  border-top: 1px solid var(--pv2-soft-line);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(10px);
}
.pv2-section-nav-inner {
  max-width: var(--pv2-max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  overflow-x: auto;
  scrollbar-width: thin;
}
.pv2-section-nav a {
  flex: 0 0 auto;
  padding: 13px 16px;
  border-bottom: 3px solid transparent;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}
.pv2-section-nav a:hover,
.pv2-section-nav a[aria-current="page"] {
  border-color: var(--portal-accent, var(--pv2-line));
  background: var(--pv2-paper);
}

body.portal-v2 main {
  width: min(100% - 48px, var(--pv2-max-width));
  min-height: auto;
  margin: 0 auto;
  padding: 52px 0 72px;
  display: block;
  overflow: visible;
}

.pv2-eyebrow {
  display: block;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* Login */
body.portal-v2.portal-login-page main {
  min-height: calc(100vh - 170px);
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, .72fr);
  gap: clamp(36px, 7vw, 92px);
  align-items: center;
}
.pv2-login-copy h1,
.pv2-overview h1 {
  max-width: 780px;
  margin: 0 0 20px;
  font-size: clamp(42px, 6vw, 68px);
  line-height: .98;
  letter-spacing: -.04em;
}
.pv2-login-copy > p,
.pv2-overview > div > p {
  max-width: 650px;
  margin: 0;
  color: #3d3d3d;
  font-size: 19px;
}
.pv2-feature-list {
  margin: 34px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  list-style: none;
}
.pv2-feature-list li {
  min-height: 132px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  border: 2px solid var(--pv2-line);
  background: #fff;
}
.pv2-feature-list strong,
.pv2-feature-list span { display: block; }
.pv2-feature-list strong { margin-bottom: 8px; }
.pv2-feature-list span { color: var(--pv2-muted); font-size: 13px; }

body.portal-v2.portal-login-page form {
  width: 100%;
  margin: 0;
  padding: clamp(26px, 4vw, 42px);
  border: 3px solid var(--pv2-line);
  border-radius: 0;
  background: #fff;
  box-shadow: var(--pv2-shadow);
}
body.portal-v2.portal-login-page form h2 {
  margin: 0 0 26px;
  padding: 0;
  color: var(--pv2-ink);
  background: transparent;
  font-size: 30px;
  line-height: 1.1;
}
body.portal-v2.portal-login-page form label {
  min-width: 0;
  margin: 0 0 7px !important;
  display: block;
  color: var(--pv2-ink);
  font-size: 13px;
  font-weight: 800;
}
body.portal-v2.portal-login-page form input {
  width: 100%;
  min-height: 50px;
  margin: 0 0 20px;
  padding: 12px 14px;
  border: 2px solid var(--pv2-line);
  border-radius: 0;
  background: #fff;
}
body.portal-v2.portal-login-page form input[type="submit"] {
  margin: 6px 0 0;
  border-color: var(--pv2-line);
  color: #fff;
  background: var(--pv2-ink);
  font-weight: 900;
  letter-spacing: .02em;
}
body.portal-v2.portal-login-page form input[type="submit"]:hover { background: var(--portal-accent, #333); }
body.portal-v2 .tooltip {
  top: calc(100% + 6px);
  left: 0;
  max-width: 240px;
  padding: 9px 11px;
  color: var(--pv2-ink);
  background: #fff;
  border: 2px solid var(--pv2-line);
  border-radius: 0;
  box-shadow: var(--pv2-shadow);
  font-size: 12px;
}
body.portal-v2 #pinTip { left: 0; }
body.portal-v2 .error-msg {
  width: min(100% - 48px, var(--pv2-max-width));
  margin: 24px auto 0;
  padding: 14px 16px;
  border: 2px solid var(--pv2-line);
  border-left-width: 6px;
  color: #7d1a1a;
  background: var(--pv2-danger);
  text-align: left;
  font-weight: 700;
}
.pv2-login-footer-note {
  width: min(100% - 48px, var(--pv2-max-width));
  margin: -34px auto 40px;
  color: var(--pv2-muted);
  font-size: 13px;
}

/* Dashboard */
.pv2-overview {
  padding: clamp(28px, 5vw, 54px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, .34fr);
  gap: 32px;
  align-items: end;
  border: 3px solid var(--pv2-line);
  background: #fff;
}
.pv2-overview h1 { font-size: clamp(38px, 5vw, 60px); }
.pv2-overview-note {
  padding: 20px;
  border: 2px solid var(--pv2-line);
  background: var(--pv2-paper);
}
.pv2-overview-note span,
.pv2-overview-note strong,
.pv2-overview-note small { display: block; }
.pv2-overview-note span { font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.pv2-overview-note strong { margin: 7px 0; font-size: 28px; }
.pv2-overview-note small { color: var(--pv2-muted); }
.pv2-summary-grid {
  margin: 18px 0 48px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.pv2-summary-grid.has-internet-services { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pv2-summary-grid a {
  min-width: 0;
  min-height: 144px;
  padding: 21px;
  display: flex;
  flex-direction: column;
  border: 2px solid var(--pv2-line);
  background: #fff;
  text-decoration: none;
}
.pv2-summary-grid a:hover { background: var(--pv2-wash); }
.pv2-summary-grid span,
.pv2-summary-grid strong,
.pv2-summary-grid small { display: block; min-width: 0; }
.pv2-summary-grid span { margin-bottom: 10px; font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.pv2-summary-grid strong { overflow-wrap: anywhere; font-size: 18px; }
.pv2-summary-grid small { margin-top: auto; padding-top: 14px; color: var(--pv2-muted); font-weight: 700; }

body.portal-v2 .portal-panel {
  max-width: none;
  margin: 0 0 24px;
  overflow: hidden;
  border: 2px solid var(--pv2-line);
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  scroll-margin-top: 72px;
}
body.portal-v2 .portal-panel > h2,
body.portal-v2 .portal-panel > form > h2 {
  margin: 0;
  padding: 18px 22px;
  color: var(--pv2-ink);
  background: var(--pv2-wash);
  border-bottom: 2px solid var(--pv2-line);
  font-size: 25px;
}
body.portal-v2 .portal-panel > div,
body.portal-v2 .portal-panel > form > div { padding: 24px !important; }

body.portal-v2 .account-panel form > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
body.portal-v2 .account-panel .form-row {
  min-width: 0;
  margin: 0;
  display: block;
}
body.portal-v2 .account-panel .form-row:nth-last-child(1) { grid-column: 1 / -1; }
body.portal-v2 .form-row label {
  min-width: 0;
  margin-bottom: 6px;
  display: block;
  color: var(--pv2-ink);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}
body.portal-v2 .form-row input[type="text"] {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 2px solid var(--pv2-soft-line);
  background: #fff;
}
body.portal-v2 .form-row input[type="text"]:disabled { color: #555; background: var(--pv2-paper); }
body.portal-v2 .form-row input[type="submit"] {
  width: auto;
  min-width: 180px;
  min-height: 46px;
  margin: 4px 0 0;
  padding: 10px 18px;
  border: 2px solid var(--pv2-line);
  border-radius: 0;
  color: #fff;
  background: var(--pv2-ink);
  font-weight: 900;
}
body.portal-v2 .form-row input[type="submit"]:hover { background: var(--portal-accent, #333); }

body.portal-v2 .internet-services-panel { max-width: none; }
body.portal-v2 .internet-services-table-wrap { overflow-x: auto; }
body.portal-v2 .internet-services-table {
  min-width: 760px;
  border-spacing: 0;
  border-collapse: collapse;
  text-align: left;
}
body.portal-v2 .internet-services-table th,
body.portal-v2 .internet-services-table td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--pv2-soft-line);
}
body.portal-v2 .internet-services-table th {
  background: var(--pv2-paper);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
body.portal-v2 .internet-services-table tr:last-child td { border-bottom: 0; }
body.portal-v2 .internet-service-status {
  display: inline-flex;
  padding: 3px 8px;
  border: 1px solid currentColor;
  font-size: 12px;
  font-weight: 900;
  text-transform: capitalize;
}
body.portal-v2 .internet-service-status.is-online { color: #126b42; background: var(--pv2-success); }
body.portal-v2 .internet-service-status.is-offline { color: #a1261d; background: var(--pv2-danger); }
body.portal-v2 .internet-services-empty { margin: 0; color: var(--pv2-muted); }

body.portal-v2 .payment-panel h3 { margin: 24px 0 12px !important; font-size: 19px; }
body.portal-v2 .payment-panel ul { display: grid; gap: 10px; }
body.portal-v2 .payment-panel li {
  margin: 0 !important;
  padding: 13px !important;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  border: 2px solid var(--pv2-soft-line);
}
body.portal-v2 .payment-panel li label { min-width: 0; margin-right: auto; font-weight: 800; }
body.portal-v2 .payment-panel button,
body.portal-v2 .invoice-panel button {
  min-height: 36px;
  padding: 7px 10px;
  float: none !important;
  border: 2px solid var(--pv2-line);
  border-radius: 0;
  color: var(--pv2-ink);
  background: #fff;
  font-weight: 800;
  cursor: pointer;
}
body.portal-v2 .payment-panel button:hover,
body.portal-v2 .invoice-panel button:hover { background: var(--pv2-wash); }
body.portal-v2 #payment-form {
  line-height: 1.5 !important;
  display: grid;
  gap: 13px;
}
body.portal-v2 #payment-form > label {
  min-width: 0;
  padding: 12px;
  border: 2px solid var(--pv2-soft-line);
  cursor: pointer;
}
body.portal-v2 #payment-form input[type="radio"] { accent-color: var(--portal-accent, #222); }
body.portal-v2 #account-holder-name {
  width: min(100%, 520px);
  min-height: 46px;
  margin: 0;
  padding: 10px 12px;
  border: 2px solid var(--pv2-line);
  background: #fff;
}
body.portal-v2 #card-element,
body.portal-v2 #becs-element {
  width: min(100%, 520px) !important;
  min-height: 48px;
  padding: 13px;
  border: 2px solid var(--pv2-line);
  background: #fff;
}
body.portal-v2 #mandate-acceptance p { width: min(100%, 520px) !important; line-height: 1.45 !important; }

body.portal-v2 .invoice-panel > div { overflow-x: auto; }
body.portal-v2 .invoice-panel table {
  min-width: 700px;
  border-spacing: 0 !important;
  border-collapse: collapse;
  text-align: left;
}
body.portal-v2 .invoice-panel th,
body.portal-v2 .invoice-panel td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--pv2-soft-line);
}
body.portal-v2 .invoice-panel th {
  background: var(--pv2-paper);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
body.portal-v2 .invoice-panel tr:last-child td { border-bottom: 0; }
body.portal-v2 .invoice-panel a { font-weight: 800; text-underline-offset: 3px; }

body.portal-v2 #loading-overlay {
  padding: 0;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.9);
  color: var(--pv2-ink);
  font-size: 18px;
  font-weight: 900;
  backdrop-filter: blur(4px);
}
body.portal-v2 #loading-overlay[hidden] { display: none !important; }
body.portal-v2 .loading-feedback {
  min-width: min(300px, calc(100vw - 40px));
  padding: 28px 32px;
  gap: 14px;
  border: 2px solid var(--pv2-line);
  border-radius: 0;
  box-shadow: var(--pv2-shadow);
}
body.portal-v2 .loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--pv2-soft-line);
  border-top-color: var(--portal-accent, #222);
  border-radius: 50%;
}
body.portal-v2 .loading-success-icon {
  width: 56px;
  height: 56px;
  color: #126b42;
  background: var(--pv2-success);
  border: 2px solid currentColor;
}
body.portal-v2 .loading-error-icon {
  width: 56px;
  height: 56px;
  color: #a1261d;
  background: var(--pv2-danger);
  border: 2px solid currentColor;
}
body.portal-v2 .loading-dismiss {
  min-height: 42px;
  padding: 8px 18px;
  border: 2px solid var(--pv2-line);
  border-radius: 0;
  color: var(--pv2-ink);
  background: #fff;
  font-weight: 900;
}
body.portal-v2 .loading-confirm-actions { gap: 8px; }
body.portal-v2 .loading-confirm-actions button {
  min-height: 42px;
  padding: 8px 18px;
  border: 2px solid var(--pv2-line);
  border-radius: 0;
  font-weight: 900;
}
body.portal-v2 .loading-confirm-cancel { color: var(--pv2-ink); background: #fff; }
body.portal-v2 .loading-confirm-submit { color: #fff; background: var(--pv2-ink); }
body.portal-v2 #loading-overlay[data-state="confirm"][data-tone="danger"] .loading-confirm-submit { background: #a1261d; border-color: #a1261d; }

.pv2-footer {
  max-width: var(--pv2-max-width);
  margin: 24px auto 0;
  padding: 34px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  border-top: 2px solid var(--pv2-line);
}
.pv2-footer p { margin: 6px 0 0; color: var(--pv2-muted); }
.pv2-footer-help { text-align: right; }

@media (max-width: 860px) {
  body.portal-v2.portal-login-page main { grid-template-columns: 1fr; padding-top: 38px; }
  .pv2-feature-list { grid-template-columns: 1fr; }
  .pv2-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pv2-feature-list li { min-height: 0; }
  .pv2-overview { grid-template-columns: 1fr; align-items: start; }
}

@media (max-width: 640px) {
  .pv2-header-main { min-height: 68px; padding: 12px 16px; gap: 12px; }
  body.portal-v2 header .logo { max-width: 150px; max-height: 40px; }
  body.portal-v2 #login_link { gap: 8px; font-size: 11px; }
  body.portal-v2 #login_link a { padding: 8px 9px; }
  .pv2-section-nav-inner { padding: 0 8px; }
  body.portal-v2 main { width: min(100% - 28px, var(--pv2-max-width)); padding: 30px 0 54px; }
  .pv2-login-copy h1,
  .pv2-overview h1 { font-size: 40px; }
  .pv2-overview { padding: 24px; }
  body.portal-v2 .account-panel form > div { grid-template-columns: 1fr; }
  .pv2-summary-grid { grid-template-columns: 1fr; }
  body.portal-v2 .portal-panel > div,
  body.portal-v2 .portal-panel > form > div { padding: 18px !important; }
  .pv2-footer { margin: 12px 14px 0; padding: 28px 0; grid-template-columns: 1fr; }
  .pv2-footer-help { text-align: left; }
  .pv2-login-footer-note { width: calc(100% - 28px); }
}

/* Shared Places API (New) autocomplete */
body.portal-v2 .pv2-address-wrap {
  position: relative;
  width: 100%;
}
body.portal-v2 .pv2-address-wrap > #address { width: 100%; }
body.portal-v2 .pv2-address-results {
  position: absolute;
  z-index: 60;
  top: calc(100% + 3px);
  right: 0;
  left: 0;
  max-height: 320px;
  overflow-y: auto;
  border: 2px solid var(--pv2-line);
  background: #fff;
  box-shadow: var(--pv2-shadow);
}
body.portal-v2 .pv2-address-results[hidden] { display: none; }
body.portal-v2 .pv2-address-option {
  width: 100%;
  min-height: 44px;
  padding: 11px 13px;
  display: block;
  border: 0;
  border-bottom: 1px solid var(--pv2-soft-line);
  background: #fff;
  color: var(--pv2-ink);
  text-align: left;
  font-size: 14px;
  line-height: 1.4;
  cursor: pointer;
}
body.portal-v2 .pv2-address-option:hover,
body.portal-v2 .pv2-address-option.is-active { background: var(--pv2-wash); }
body.portal-v2 .pv2-address-option:focus-visible {
  position: relative;
  z-index: 1;
  outline-offset: -3px;
}
body.portal-v2 .pv2-google-attribution {
  padding: 7px 12px;
  color: var(--pv2-muted);
  background: #fafafa;
  text-align: right;
  font-size: 10px;
}
body.portal-v2 #address[aria-busy="true"] { background: var(--pv2-info); }
