:root {
  color-scheme: dark;
  --ink: #f7fbff;
  --muted: #aebfca;
  --line: rgba(48, 181, 212, .28);
  --bg: #001c29;
  --bg-deep: #00121d;
  --panel: #07384d;
  --panel-2: #063147;
  --panel-3: #0b4259;
  --blue: #075b95;
  --cyan: #04c5d8;
  --teal: #029f98;
  --green: #52c66b;
  --green-soft: #69d87b;
  --danger: #ffb3b3;
  --shadow: 0 22px 54px rgba(0, 0, 0, .42);
  --soft-shadow: 0 14px 28px rgba(0, 0, 0, .26);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 0, rgba(0, 197, 216, .16), transparent 28rem),
    radial-gradient(circle at 82% 16rem, rgba(82, 198, 107, .1), transparent 24rem),
    linear-gradient(180deg, var(--bg-deep) 0, var(--bg) 44%, #001622 100%);
}
a { color: inherit; text-decoration: none; }

.customer-shell { min-height: 100vh; }
.customer-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px max(18px, calc((100vw - 1120px) / 2));
  background: rgba(0, 18, 29, .9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
.customer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 950;
  letter-spacing: 0;
}
.brand-wordmark {
  display: grid;
  gap: 0;
  line-height: .9;
  text-transform: uppercase;
}
.brand-wordmark strong {
  font-size: 20px;
  letter-spacing: 0;
  text-transform: none;
}
.brand-wordmark small {
  color: var(--green);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .42em;
}
.customer-brand img,
.auth-panel img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  object-position: center 44%;
  border-radius: 8px;
  background: rgba(255, 255, 255, .1);
}
.customer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.customer-nav a,
.link-button {
  border: 1px solid rgba(4, 197, 216, .28);
  border-radius: 8px;
  padding: 10px 13px;
  color: var(--muted);
  background: rgba(7, 56, 77, .72);
  font-weight: 900;
  cursor: pointer;
}
.customer-nav a.active {
  color: var(--ink);
  border-color: rgba(4, 197, 216, .82);
  background: linear-gradient(90deg, rgba(82, 198, 107, .82), rgba(4, 197, 216, .72));
  box-shadow: 0 8px 22px rgba(4, 197, 216, .14);
}
.link-button { font: inherit; }
.customer-main {
  width: min(1120px, calc(100% - 28px));
  margin: 0 auto;
  padding: 26px 0 64px;
}

.home-hero {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin: 0 auto 18px;
  padding: 28px 22px 24px;
  border: 1px solid rgba(4, 197, 216, .16);
  border-radius: 8px;
  background:
    radial-gradient(circle at 52% 48%, rgba(4, 197, 216, .11), transparent 18rem),
    radial-gradient(circle at 55% 52%, rgba(82, 198, 107, .08), transparent 22rem),
    linear-gradient(180deg, rgba(0, 24, 37, .96), rgba(0, 31, 47, .95));
  box-shadow: var(--shadow);
  text-align: center;
}
.home-lockup {
  display: grid;
  justify-items: center;
  line-height: .9;
}
.home-lockup span {
  font-size: clamp(46px, 8vw, 76px);
  font-weight: 950;
  letter-spacing: 0;
}
.home-lockup strong {
  color: var(--green);
  font-size: clamp(19px, 3.2vw, 33px);
  font-weight: 950;
  letter-spacing: .48em;
  text-transform: uppercase;
  transform: translateX(.22em);
}
.home-welcome {
  margin: 14px 0 0;
  font-size: clamp(24px, 4vw, 39px);
  font-weight: 950;
}
.home-hero h1 {
  margin: 0;
  color: var(--green);
  font-size: clamp(28px, 4.8vw, 48px);
  line-height: 1.04;
}
.home-usage-ring {
  --usage-pct: 0;
  display: grid;
  place-items: center;
  width: min(52vw, 360px);
  aspect-ratio: 1;
  margin: 14px 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--bg) 0 58%, transparent 59%),
    conic-gradient(#0c609b calc(var(--usage-pct) * 1%), #0b5a91 0);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .04),
    0 0 0 1px rgba(4, 197, 216, .08);
}
.home-usage-ring > div {
  display: grid;
  gap: 6px;
  justify-items: center;
}
.home-usage-ring strong {
  font-size: clamp(56px, 10vw, 96px);
  line-height: .9;
  font-weight: 950;
}
.home-usage-ring small {
  font-size: .42em;
}
.home-usage-ring span {
  font-size: clamp(25px, 4vw, 42px);
  font-weight: 950;
}
.home-usage-ring em {
  color: var(--muted);
  font-size: clamp(22px, 3.6vw, 37px);
  font-style: normal;
  font-weight: 950;
}
.home-cta {
  width: min(520px, 100%);
  min-height: 72px;
  font-size: clamp(22px, 3.5vw, 34px);
}

.app-hero,
.hero-band,
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  padding: 24px;
  border: 1px solid rgba(4, 197, 216, .24);
  border-radius: 8px;
  background:
    radial-gradient(circle at 86% 30%, rgba(82, 198, 107, .16), transparent 18rem),
    linear-gradient(135deg, #06364d 0, #075b95 48%, #039896 100%);
  box-shadow: var(--shadow);
}
.app-hero h1,
.hero-band h1,
.page-heading h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 58px);
  letter-spacing: 0;
  line-height: 1.02;
}
.app-hero p,
.hero-band p,
.page-heading p {
  margin: 7px 0 0;
  color: rgba(255, 255, 255, .82);
  font-weight: 750;
}
.eyebrow {
  margin: 0 0 5px;
  color: var(--green-soft);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.hero-pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 6px 10px;
  color: #062031;
  background: var(--green-soft);
  font-weight: 950;
  white-space: nowrap;
}

.metric-grid,
.quick-grid,
.line-grid,
.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.metric-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.quick-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.plan-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.metric-card,
.quick-tile,
.content-section,
.line-card,
.plan-tile {
  min-width: 0;
  border: 1px solid rgba(4, 197, 216, .16);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(8, 61, 86, .98), rgba(5, 46, 67, .98));
  box-shadow: var(--soft-shadow);
}
.metric-card {
  padding: 18px;
  border-top: 4px solid var(--cyan);
}
.metric-card:nth-child(2) { border-top-color: var(--green); }
.metric-card:nth-child(3) { border-top-color: var(--teal); }
.metric-card span,
.detail-grid article span,
.line-card dt,
.quick-tile span,
.plan-tile span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}
.metric-card strong {
  display: block;
  margin-top: 7px;
  color: var(--ink);
  font-size: 29px;
  font-weight: 950;
}
.metric-card small { color: var(--muted); font-weight: 850; }
.quick-tile,
.plan-tile {
  display: grid;
  gap: 8px;
  padding: 18px;
}
.quick-tile strong,
.plan-tile h3 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.18;
}
.quick-tile {
  min-height: 116px;
  align-content: center;
  border-color: rgba(4, 197, 216, .24);
}
.quick-grid .quick-tile:first-child {
  background: linear-gradient(90deg, rgba(82, 198, 107, .9), rgba(4, 197, 216, .78));
}
.quick-grid .quick-tile:first-child span,
.quick-grid .quick-tile:first-child strong {
  color: var(--ink);
}
.quick-tile:hover,
.text-action:hover { color: var(--green-soft); }

.content-section {
  padding: 20px;
  margin-bottom: 16px;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.section-title h2,
.line-card h2,
.line-card h3,
.usage-panel h3 {
  margin: 0;
  color: var(--ink);
}
.text-action {
  color: var(--cyan);
  font-weight: 950;
}
.line-stack { display: grid; gap: 16px; }
.line-stack.compact { gap: 12px; }
.line-card,
.line-card.wide { padding: 18px; }
.line-card.mini { padding: 14px; }
.line-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.line-top p { margin: 5px 0 0; color: var(--muted); font-weight: 850; }
.line-card dl {
  display: grid;
  gap: 10px;
  margin: 0 0 12px;
}
.line-card dd {
  margin: 3px 0 0;
  font-weight: 950;
  overflow-wrap: anywhere;
}
.line-mini-usage {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 92px;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid rgba(4, 197, 216, .18);
  border-radius: 8px;
  background: rgba(0, 18, 29, .32);
}
.line-number-usage {
  display: grid;
  justify-items: center;
  gap: 7px;
  margin-bottom: 13px;
  padding: 14px 10px;
  border: 1px solid rgba(4, 197, 216, .2);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 14%, rgba(4, 197, 216, .13), transparent 8rem),
    rgba(0, 18, 29, .32);
  text-align: center;
}
.line-number-usage .number-label {
  display: block;
  color: var(--ink);
  font-size: 18px;
  font-weight: 950;
  overflow-wrap: anywhere;
}
.line-number-usage strong {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.2;
}
.line-mini-usage span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}
.line-mini-usage strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
  line-height: 1.18;
  overflow-wrap: anywhere;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.detail-grid article {
  min-width: 0;
  padding: 12px;
  border-top: 1px solid rgba(4, 197, 216, .18);
  background: rgba(0, 18, 29, .28);
}
.detail-grid article strong {
  display: block;
  margin-top: 6px;
  overflow-wrap: anywhere;
}
.usage-panel {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.line-app-grid {
  display: grid;
  grid-template-columns: minmax(260px, .9fr) minmax(320px, 1.1fr);
  gap: 14px;
  align-items: stretch;
  margin-bottom: 14px;
}
.usage-ring-card,
.line-edit-form,
.shop-hero-panel {
  border: 1px solid rgba(4, 197, 216, .18);
  border-radius: 8px;
  background: rgba(0, 18, 29, .3);
}
.usage-ring-card {
  display: grid;
  grid-template-columns: 124px 1fr;
  align-items: center;
  gap: 16px;
  padding: 16px;
}
.usage-ring-card h3,
.usage-ring-card p { margin: 0; }
.usage-ring-card p {
  margin-top: 6px;
  color: var(--muted);
  font-weight: 850;
}
.usage-ring {
  --usage-pct: 0;
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #052d42 0 58%, transparent 59%),
    conic-gradient(var(--green) calc(var(--usage-pct) * 1%), rgba(12, 96, 155, .64) 0);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.usage-ring span {
  display: block;
  font-size: 28px;
  font-weight: 950;
  line-height: 1;
}
.usage-ring small {
  margin-top: -26px;
  color: var(--muted);
  font-weight: 850;
}
.usage-ring.small {
  width: 72px;
  height: 72px;
}
.usage-ring.small span { font-size: 18px; }
.usage-ring.small small {
  margin-top: -18px;
  font-size: 10px;
}
.line-edit-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: end;
  padding: 16px;
}
.action-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}
th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
th {
  color: var(--cyan);
  font-size: 12px;
  text-transform: uppercase;
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
  align-items: end;
  gap: 12px;
  margin-top: 16px;
}
label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}
input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(4, 197, 216, .32);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background: #052839;
  font: inherit;
}
.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  padding: 10px 15px;
  font-weight: 950;
  cursor: pointer;
}
.primary-button {
  color: var(--ink);
  background: linear-gradient(90deg, var(--green), var(--cyan));
  box-shadow: 0 12px 24px rgba(4, 197, 216, .18);
}
.primary-button.compact { min-width: 176px; }
.secondary-button {
  color: var(--ink);
  border: 1px solid rgba(4, 197, 216, .42);
  background: rgba(0, 18, 29, .24);
}
.alert,
.success,
.empty-state {
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-weight: 850;
}
.alert { color: var(--danger); background: rgba(127, 29, 29, .26); }
.success { color: #c6ffd1; background: rgba(20, 83, 45, .36); }
.empty-state { color: var(--muted); background: rgba(255, 255, 255, .04); }
.muted { color: var(--muted); }

.plan-tile strong {
  color: var(--green-soft);
  font-size: 25px;
  font-weight: 950;
}
.plan-tile p { margin: 0; color: var(--muted); font-weight: 750; }
.flow-modal[hidden] { display: none; }
.flow-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  padding: clamp(18px, 6vh, 56px) 16px 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.flow-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 12, 20, .76);
  backdrop-filter: blur(14px);
}
.flow-panel {
  position: relative;
  width: min(720px, 100%);
  max-height: calc(100dvh - 36px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(4, 197, 216, .32);
  border-radius: 8px;
  background:
    radial-gradient(circle at 88% 12%, rgba(82, 198, 107, .16), transparent 18rem),
    linear-gradient(180deg, #07384d, #021f30);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .56);
  padding: 22px;
  margin: 0 auto;
}
.flow-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(0, 18, 29, .54);
  font-size: 24px;
  font-weight: 900;
  cursor: pointer;
}
.flow-step { display: none; gap: 16px; }
.flow-step.active { display: grid; }
.flow-step h2 {
  margin: 0;
  padding-right: 42px;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1;
}
.flow-summary-card,
.review-list {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(4, 197, 216, .2);
  border-radius: 8px;
  padding: 16px;
  background: rgba(0, 18, 29, .34);
}
.flow-summary-card span,
.review-list span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}
.flow-summary-card strong {
  color: var(--green-soft);
  font-size: 30px;
  line-height: 1.05;
}
.flow-summary-card small { color: var(--ink); font-weight: 950; }
.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.choice-card {
  min-height: 118px;
  border: 1px solid rgba(4, 197, 216, .22);
  border-radius: 8px;
  padding: 16px;
  color: var(--ink);
  background: rgba(0, 18, 29, .28);
  text-align: left;
  cursor: pointer;
}
.choice-card.selected {
  border-color: var(--green);
  box-shadow: inset 0 0 0 2px rgba(82, 198, 107, .28);
}
.choice-card strong,
.choice-card span { display: block; }
.choice-card strong { font-size: 20px; }
.choice-card span { margin-top: 8px; color: var(--muted); font-weight: 850; }
.number-panel {
  border: 1px solid rgba(4, 197, 216, .16);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, .04);
}
.form-grid.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.review-list div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid rgba(4, 197, 216, .12);
  padding-bottom: 10px;
}
.review-list div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.review-list strong {
  text-align: right;
  overflow-wrap: anywhere;
}
.flow-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 4px;
}
.shop-hero-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 18px;
  margin-bottom: 16px;
}
.shop-hero-panel span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}
.shop-hero-panel strong {
  display: block;
  margin-top: 5px;
  font-size: 26px;
  font-weight: 950;
}
.shop-hero-panel p {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 800;
}
.shop-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.auth-body {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at 50% -10%, rgba(4, 197, 216, .24), transparent 34rem),
    var(--bg);
}
.auth-panel {
  width: min(440px, 100%);
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(8, 61, 86, .98), rgba(5, 46, 67, .98));
  box-shadow: var(--shadow);
}
.auth-lockup {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin: 0 0 18px;
  padding: 8px 0 4px;
}
.home-lockup.compact span {
  font-size: clamp(42px, 10vw, 62px);
}
.home-lockup.compact strong {
  font-size: clamp(17px, 4vw, 25px);
}
.auth-lockup img {
  width: 96px;
  height: 96px;
}
.auth-panel h1 {
  margin: 14px 0 6px;
  color: var(--ink);
  font-size: 34px;
}
.auth-panel p { margin: 0 0 18px; color: var(--muted); font-weight: 750; }
.auth-panel form { display: grid; gap: 14px; }
.auth-link {
  display: inline-block;
  margin-top: 14px;
  color: var(--cyan);
  font-weight: 950;
}

.esim-install-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 18px;
  align-items: center;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(4, 197, 216, .32);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(0, 197, 216, .12), rgba(85, 216, 122, .1));
}
.esim-install-card h4 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 20px;
}
.esim-install-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}
.esim-install-card img {
  width: 180px;
  height: 180px;
  justify-self: end;
  padding: 10px;
  border-radius: 8px;
  background: #fff;
}
.esim-install-card .muted {
  grid-column: 1 / -1;
  overflow-wrap: anywhere;
  font-size: 13px;
}

@media (max-width: 900px) {
  .customer-topbar {
    position: static;
    grid-template-columns: 1fr auto;
  }
  .customer-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }
  .app-hero,
  .hero-band,
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .metric-grid,
  .line-grid,
  .detail-grid,
  .inline-form,
  .line-app-grid,
  .line-edit-form,
  .action-row,
  .choice-grid,
  .form-grid.two,
  .shop-hero-panel,
  .plan-grid { grid-template-columns: 1fr; }
  .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .esim-install-card { grid-template-columns: 1fr; }
  .esim-install-card img { justify-self: start; }
  table { min-width: 640px; }
}

@media (max-width: 520px) {
  .flow-modal {
    align-items: flex-start;
    padding: max(14px, env(safe-area-inset-top)) 10px max(14px, env(safe-area-inset-bottom));
  }
  .flow-panel {
    width: min(430px, 100%);
    max-height: calc(100dvh - 28px);
    border-radius: 8px;
  }
  .flow-step h2 { font-size: 30px; }
  .flow-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .flow-actions .primary-button,
  .flow-actions .secondary-button {
    width: 100%;
  }
  .customer-main { width: min(100% - 18px, 1160px); padding-top: 14px; }
  .customer-topbar { padding: 10px; }
  .customer-nav a,
  .link-button { padding: 8px 10px; }
  .quick-grid { grid-template-columns: 1fr; }
  .app-hero,
  .hero-band,
  .page-heading,
  .content-section,
  .line-card,
  .plan-tile,
  .flow-panel,
  .metric-card,
  .quick-tile { padding: 14px; }
  .review-list div { display: grid; }
  .review-list strong { text-align: left; }
}
