/* Appalachian Broadband customer portal — matches appalachianbb.com visual language */
:root {
  --cream: #f5f0e8;
  --cream-soft: #faf6ee;
  --brown: #2c1f0e;
  --brown-soft: #3a2a18;
  --brown-95: rgba(44, 31, 14, 0.95);
  --brown-10: rgba(44, 31, 14, 0.10);
  --gold: #c9a84c;
  --gold-bright: #ffd700;
  --gold-deep: #6b4c1e;
  --teal: #4a8fa3;
  --teal-dark: #3a7388;
  --teal-soft: rgba(74, 143, 163, 0.15);
  --red: #b22234;
  --red-soft: rgba(178, 34, 52, 0.12);
  --green: #3a6b4a;
  --green-soft: rgba(58, 107, 74, 0.15);
  --white: #ffffff;
  --white-90: rgba(255, 255, 255, 0.9);
  --white-70: rgba(255, 255, 255, 0.7);
  --ink: rgb(17, 24, 39);
  --ink-soft: rgb(107, 114, 128);
  --border: rgba(44, 31, 14, 0.10);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  min-height: 100vh;
  font-feature-settings: "ss01", "cv01";
}

/* ───────── Top ribbon ───────── */
.stars-stripe {
  height: 26px;
  background: linear-gradient(90deg, var(--red) 0%, var(--red) 30%, #6e2c5a 50%, #3c3b6e 70%, #3c3b6e 100%);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255, 255, 255, 0.85);
  font-size: 10px; letter-spacing: 0.4em; font-weight: 700; text-transform: uppercase;
}
.stars-stripe::before, .stars-stripe::after {
  content: "★ ★ ★ ★ ★";
  color: var(--gold-bright);
  margin: 0 18px;
  letter-spacing: 6px; font-size: 11px;
}

/* ───────── Header ───────── */
.topbar {
  background: var(--brown-95);
  padding: 12px 32px;
  display: flex; align-items: center; gap: 24px;
}
.logo-block { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo-mark {
  width: 48px; height: 48px; border-radius: 50%; overflow: hidden;
  flex-shrink: 0; background: rgba(255, 255, 255, 0.05);
}
.logo-mark img { width: 100%; height: 100%; object-fit: cover; }
.logo-text { line-height: 1.05; }
.logo-text .appalachian { color: var(--gold); font-weight: 700; font-size: 18px; }
.logo-text .broadband { color: var(--teal); font-weight: 600; font-size: 12px; letter-spacing: 0.15em; text-transform: uppercase; }
.nav { flex: 1; display: flex; align-items: center; gap: 28px; margin-left: 16px; }
.nav a {
  color: var(--white-90); text-decoration: none;
  font-size: 14px; font-weight: 500; transition: color 0.15s;
  cursor: pointer;
}
.nav a:hover { color: var(--gold); }
.nav a.active { color: var(--gold); font-weight: 600; }
.topbar-actions { display: flex; gap: 10px; align-items: center; margin-left: auto; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 8px;
  font-size: 13px; font-weight: 600; text-decoration: none;
  border: none; cursor: pointer; transition: all 0.15s;
  font-family: inherit;
}
.btn-ghost { background: var(--white); color: var(--brown); border: 1px solid var(--white); }
.btn-ghost:hover { background: var(--cream); }
.btn-teal { background: var(--teal); color: var(--white); border: 1px solid var(--teal); }
.btn-teal:hover { background: var(--teal-dark); }
.btn-teal-big {
  background: var(--teal); color: var(--white); border: 1px solid var(--teal);
  font-size: 15px; padding: 13px 24px; width: 100%;
  justify-content: center; margin-top: 12px;
}
.btn-teal-big:hover { background: var(--teal-dark); }
.btn-teal-big:disabled { opacity: 0.6; cursor: wait; }
.btn-gold {
  background: var(--gold); color: var(--brown); border: 1px solid var(--gold);
  font-weight: 700;
}
.btn-gold:hover { background: var(--gold-bright); }
.btn-outline { background: transparent; color: var(--white); border: 1px solid rgba(255, 255, 255, 0.3); }
.btn-outline:hover { background: rgba(255, 255, 255, 0.1); }

/* ───────── Hero ───────── */
.hero {
  background: linear-gradient(135deg, var(--brown) 0%, var(--brown-soft) 100%);
  color: var(--white);
  padding: 48px 32px 40px;
  position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; top: 0; right: -100px;
  width: 600px; height: 100%;
  background: radial-gradient(circle, rgba(74, 143, 163, 0.15), transparent 70%);
  pointer-events: none;
}
.container { max-width: 1180px; margin: 0 auto; position: relative; z-index: 1; }
.hero-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  background: var(--teal-soft); color: var(--teal);
  border: 1px solid var(--teal); border-radius: 999px;
  font-size: 12px; font-weight: 600;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: 40px; font-weight: 800; line-height: 1.1;
  margin: 0 0 14px; color: var(--white); letter-spacing: -0.02em;
}
.hero h1 .accent { color: var(--teal); }
.hero p {
  font-size: 16px; color: var(--white-70);
  margin: 0; max-width: 620px;
}

/* ───────── Main / cards ───────── */
.main { padding: 32px 32px 64px; }
.grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}
@media (max-width: 900px) {
  .grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 30px; }
  .topbar { flex-wrap: wrap; padding: 12px 16px; }
  .nav { width: 100%; order: 99; overflow-x: auto; padding-bottom: 4px; }
  .topbar-actions { margin-left: 0; }
  .main { padding: 24px 16px 48px; }
  .hero { padding: 36px 16px 32px; }
}

.balance-card {
  background: var(--teal); color: var(--white);
  border-radius: 14px; padding: 28px 32px;
  box-shadow: 0 8px 28px rgba(44, 31, 14, 0.18);
  position: relative; overflow: hidden;
}
.balance-card::after {
  content: ""; position: absolute; top: -40px; right: -40px;
  width: 220px; height: 220px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}
.balance-card > * { position: relative; z-index: 1; }
.balance-card .badge {
  display: inline-block; background: var(--brown); color: var(--gold);
  padding: 4px 12px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; margin-bottom: 18px;
}
.balance-card .label {
  font-size: 13px; font-weight: 600; color: var(--white-90);
  text-transform: uppercase; letter-spacing: 0.1em;
  margin: 0 0 8px;
}
.balance-card .amount {
  font-size: 56px; font-weight: 800; line-height: 1;
  color: var(--white); letter-spacing: -0.02em; margin: 0;
}
.balance-card .amount .cents { font-size: 32px; }
.balance-card .due-meta { color: var(--white-90); font-size: 14px; margin-top: 12px; }
.balance-card .btn-row { margin-top: 22px; display: flex; gap: 10px; flex-wrap: wrap; }

.card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 14px; padding: 24px 28px;
  box-shadow: 0 2px 6px rgba(44, 31, 14, 0.04);
}
.card-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 18px;
}
.card-title { font-size: 17px; font-weight: 700; color: var(--brown); margin: 0; }
.card-link {
  color: var(--teal); text-decoration: none;
  font-size: 13px; font-weight: 600; cursor: pointer;
}
.card-link:hover { color: var(--teal-dark); text-decoration: underline; }

.empty {
  padding: 14px 0; color: var(--ink-soft);
  font-size: 14px; text-align: center;
}

/* ───────── Services ───────── */
.service-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.service-row:last-child { border-bottom: none; }
.service-name { font-weight: 700; color: var(--brown); font-size: 15px; }
.service-meta { font-size: 13px; color: var(--ink-soft); margin-top: 2px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; padding: 4px 12px; border-radius: 999px;
  font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}
.pill-active { background: var(--green-soft); color: var(--green); }
.pill-suspended { background: var(--red-soft); color: var(--red); }
.pill-pending { background: rgba(201, 168, 76, 0.15); color: var(--gold-deep); }
.pill-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.pill-active .pill-dot { background: var(--green); }
.pill-suspended .pill-dot { background: var(--red); }
.pill-pending .pill-dot { background: var(--gold-deep); }
.anniv-row {
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border);
  font-size: 13px; color: var(--ink-soft);
  display: flex; justify-content: space-between; align-items: center;
}
.anniv-row strong { color: var(--brown); font-weight: 700; }

/* ───────── Promo banner ───────── */
.promo-banner {
  background: linear-gradient(90deg, var(--red), #8c1a28);
  color: var(--white); border-radius: 12px;
  padding: 14px 22px; margin-bottom: 24px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px;
  box-shadow: 0 4px 14px rgba(178, 34, 52, 0.2);
}
.promo-banner .left { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.promo-banner .bolt {
  width: 28px; height: 28px; background: var(--gold); color: var(--brown);
  border-radius: 50%; display: grid; place-items: center;
  font-size: 14px; flex-shrink: 0;
}
.promo-banner strong { color: var(--gold-bright); font-weight: 700; }
.save-pill {
  background: var(--gold); color: var(--brown);
  padding: 4px 12px; border-radius: 999px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.05em;
  text-transform: uppercase; white-space: nowrap;
}

/* ───────── Invoices ───────── */
.invoice-row {
  display: grid;
  grid-template-columns: 1.6fr 90px 100px 110px;
  gap: 14px; align-items: center;
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.invoice-row:last-child { border-bottom: none; }
.invoice-num { font-weight: 700; color: var(--brown); font-size: 14px; }
.invoice-date { font-size: 12.5px; color: var(--ink-soft); margin-top: 3px; }
.status {
  font-size: 11px; padding: 3px 10px; border-radius: 999px;
  font-weight: 700; text-align: center; letter-spacing: 0.05em;
  text-transform: uppercase;
}
.status-open { background: var(--red-soft); color: var(--red); }
.status-paid { background: var(--green-soft); color: var(--green); }
.status-overdue { background: rgba(255, 100, 0, 0.15); color: #b34000; }
.status-void { background: rgba(107, 114, 128, 0.15); color: var(--ink-soft); }
.invoice-amount {
  font-weight: 800; color: var(--brown);
  font-size: 16px; text-align: right;
}
.invoice-action {
  color: var(--teal); border: 1px solid var(--teal);
  background: var(--white); border-radius: 8px;
  padding: 7px 12px; font-size: 12px; font-weight: 600;
  text-align: center; text-decoration: none;
}
.invoice-action:hover { background: var(--teal-soft); }

@media (max-width: 700px) {
  .invoice-row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "title status"
      "amount action";
    row-gap: 8px;
  }
  .invoice-row > div:first-child { grid-area: title; }
  .invoice-row .status { grid-area: status; justify-self: end; }
  .invoice-row .invoice-amount { grid-area: amount; text-align: left; }
  .invoice-row .invoice-action { grid-area: action; }
}

/* ───────── Forms ───────── */
label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--brown); margin: 16px 0 6px;
}
input[type=email], input[type=text], input[type=tel] {
  width: 100%; padding: 11px 14px;
  border: 1px solid var(--border); border-radius: 8px;
  font-size: 15px; font-family: inherit;
  background: var(--white); color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus {
  outline: none; border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-soft);
}
.addr-set {
  border: 1px solid var(--border); border-radius: 10px;
  padding: 8px 18px 16px; margin-top: 18px;
}
.addr-set legend { padding: 0 8px; font-weight: 700; color: var(--brown); font-size: 14px; }
.row3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .row3 { grid-template-columns: 1fr; } }

.help-text {
  font-size: 12.5px; color: var(--ink-soft);
  margin: 14px 0 0; line-height: 1.5;
}
.result {
  margin-top: 20px; padding: 14px 18px; border-radius: 10px;
  font-size: 14px; line-height: 1.5;
}
.result.success { background: var(--green-soft); color: var(--green); border: 1px solid var(--green); }
.result.error { background: var(--red-soft); color: var(--red); border: 1px solid var(--red); }

.footer-note {
  text-align: center; font-size: 13px;
  color: var(--ink-soft); margin-top: 24px;
}
.footer-note a { color: var(--teal); text-decoration: none; font-weight: 600; }
.footer-note a:hover { text-decoration: underline; }

/* ───────── Footer ───────── */
.footer {
  background: var(--brown); color: var(--white-70);
  padding: 28px 32px; text-align: center; font-size: 13px;
}
.footer .strong { color: var(--white); font-weight: 600; }
.footer .stars-row { color: var(--gold); letter-spacing: 4px; margin-top: 8px; font-size: 12px; }
