/* ==========================================================================================
   NXTL UI kit — My eSIMs + line (Manage) drawer + network tier quick switch.
   Owner-approved 13 Nov 2026 (canvas "NXTL Account UI kit": Esims and Main artboards).
   Loaded after kit.css on every account page; the drawer and the tier switch also appear on the dashboard, so their
   rules are scoped to the component (#nxtl-line-drawer, .nxtl-tier-quick), page rules to #nxtl-v2-esims-root.
   Motion lives in motion.css (lead-owned): no keyframes here.
   ========================================================================================== */

/* ---------------------------------------------------------------- Page rhythm */
html body.nxtl-account #nxtl-v2-esims-root { display: flex; flex-direction: column; gap: var(--kit-gap, 20px); }
html body.nxtl-account #nxtl-v2-esims-root .screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ---------------------------------------------------------------- Page head: eyebrow + H1 left, purchase actions right */
html body.nxtl-account #nxtl-v2-esims-root .esim-page-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin: 0;
}
html body.nxtl-account #nxtl-v2-esims-root .esim-page-head__title { display: flex; flex-direction: column; gap: 4px; min-inline-size: 0; }
html body.nxtl-account #nxtl-v2-esims-root .esim-page-head .account-card__kicker {
  margin: 0; font: 600 13px/1.3 var(--font-body, Inter, 'NXTL Inter Fallback', sans-serif); letter-spacing: 0; color: var(--accent, #FF2E4C);
}
html body.nxtl-account #nxtl-v2-esims-root .esim-page-head h1 {
  margin: 0; font: 700 28px/1.15 var(--font-heading, "Plus Jakarta Sans", 'NXTL Jakarta Fallback', sans-serif); letter-spacing: -0.01em; color: var(--text, #F5F6F8);
}
html body.nxtl-account #nxtl-v2-esims-root .esim-page-head__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
html body.nxtl-account #nxtl-v2-esims-root .esim-page-head__actions .btn { min-height: 36px; padding: 0 14px; font-size: 14px; border-radius: 10px; white-space: nowrap; }

/* ---------------------------------------------------------------- Toolbar: search 320px left; filter, archived, view right */
html body.nxtl-account #nxtl-v2-esims-root .esim-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  box-sizing: border-box; width: 100%; min-inline-size: 0; max-inline-size: 100%;
  padding: 0; margin: 0; background: none; border: 0; border-radius: 0; box-shadow: none;
}
/* r2: no toolbar part may grow past the content edge (its min-content never widens the row) */
html body.nxtl-account #nxtl-v2-esims-root .esim-toolbar > * { min-inline-size: 0; max-inline-size: 100%; }
html body.nxtl-account #nxtl-v2-esims-root .esim-toolbar__search { flex: 0 1 320px; min-inline-size: 0; }
html body.nxtl-account #nxtl-v2-esims-root #esimSearchInput { box-sizing: border-box; width: 100%; max-width: 320px; min-height: 40px; height: 40px; margin: 0; }
html body.nxtl-account #nxtl-v2-esims-root .esim-toolbar__controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; min-inline-size: 0; }
html body.nxtl-account #nxtl-v2-esims-root .esim-toolbar__controls > .btn { min-height: 40px; padding: 0 14px; font-size: 13.5px; border-radius: 10px; white-space: nowrap; }
/* r2: one control height in the toolbar (search 40 = segmented 3 + 32 + 3 + 2 border) */
@media (min-width: 681px) {
  html body.nxtl-account #nxtl-v2-esims-root .esim-toolbar .segmented-control__btn { min-height: 32px !important; }
}
html body.nxtl-account #nxtl-v2-esims-root #esimArchivedToggleBtn[aria-pressed="true"] { background: var(--kit-thumb, #262D3D); border-color: var(--kit-line-strong, rgba(255,255,255,.14)); color: #F5F6F8; }

/* ---------------------------------------------------------------- Grid: cards in a row share one height and their action rows
   line up (actions pinned to the bottom); the hero min-height keeps the content itself close in height, so no void opens */
html body.nxtl-account #nxtl-v2-esims-root #esimsContainer.account-grid {
  display: grid !important; grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr)) !important;
  align-items: stretch !important; gap: var(--kit-gap, 20px) !important;
}
html body.nxtl-account #nxtl-v2-esims-root #esimsContainer.account-stack { display: flex; flex-direction: column; gap: 12px; }

/* ---------------------------------------------------------------- ONE card anatomy (Unlimited and PAYG) */
html body.nxtl-account #nxtl-v2-esims-root .esim-card {
  display: flex; flex-direction: column; justify-content: flex-start; gap: 18px; height: auto !important;
  padding: var(--kit-pad, 24px); background: var(--surface-card, #121620); border: 1px solid var(--kit-line, rgba(255,255,255,.08));
  border-radius: var(--kit-radius-card, 16px); min-inline-size: 0;
}

/* 1 · Identity: name + mono last digits, plan line as text, one status chip right */
html body.nxtl-account #nxtl-v2-esims-root .esim-card__top { display: flex; align-items: flex-start; justify-content: flex-start; gap: 12px; min-inline-size: 0; margin: 0; }
html body.nxtl-account #nxtl-v2-esims-root .esim-card__id,
html body.nxtl-account #nxtl-v2-esims-root .esim-list-row__id { display: flex; flex-direction: column; gap: 4px; flex: 1 1 auto; min-inline-size: 0; }
html body.nxtl-account #nxtl-v2-esims-root .esim-card__name {
  margin: 0; font: 700 18px/1.3 var(--font-heading, "Plus Jakarta Sans", 'NXTL Jakarta Fallback', sans-serif); color: var(--text, #F5F6F8);
  /* r2: one line, so cards in a row are designed to the same height; the full name is in title and in the Manage drawer */
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; overflow-wrap: normal;
}
html body.nxtl-account #nxtl-v2-esims-root .esim-card__mask {
  display: inline; padding: 0; margin: 0; background: none; border: 0; white-space: nowrap;
  font: 500 12.5px/1 var(--font-mono, "JetBrains Mono", monospace); color: var(--text-muted, #9BA3B8);
}
html body.nxtl-account #nxtl-v2-esims-root .esim-card__plan { margin: 0; font-size: 13px; line-height: 1.45; color: var(--text-muted, #9BA3B8); }
html body.nxtl-account #nxtl-v2-esims-root .esim-card__status { flex: none; margin-left: auto; min-height: 24px; height: 24px; padding: 0 10px; font-size: 12px; gap: 6px; }

/* Bulk select (only when there is more than one PAYG eSIM): a 20px box with a 44px hit area */
html body.nxtl-account #nxtl-v2-esims-root .esim-card__top .nxtl-v2-esim-select-wrap {
  position: relative; flex: none; display: inline-flex; width: 20px; height: 20px; margin-top: 3px; opacity: 1; cursor: pointer;
}
html body.nxtl-account #nxtl-v2-esims-root .esim-card__top .nxtl-v2-esim-select {
  position: absolute; inset: -12px; width: 44px; height: 44px; margin: 0; padding: 0; opacity: 0; cursor: pointer; z-index: 1;
}
html body.nxtl-account #nxtl-v2-esims-root .esim-card__top .nxtl-v2-esim-select-box {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none;
  border: 1.5px solid rgba(255,255,255,.4); border-radius: 6px; background: var(--kit-track, #0E1118); box-shadow: none; backdrop-filter: none;
}
html body.nxtl-account #nxtl-v2-esims-root .esim-card__top .nxtl-v2-esim-select-box::after {
  content: ""; width: 10px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px); opacity: 0;
}
html body.nxtl-account #nxtl-v2-esims-root .esim-card__top .nxtl-v2-esim-select-wrap:hover .nxtl-v2-esim-select-box { border-color: rgba(255,255,255,.7); transform: none; }
html body.nxtl-account #nxtl-v2-esims-root .esim-card__top .nxtl-v2-esim-select-wrap:has(.nxtl-v2-esim-select:checked) .nxtl-v2-esim-select-box { background: #DD1C46; border-color: #DD1C46; }
html body.nxtl-account #nxtl-v2-esims-root .esim-card__top .nxtl-v2-esim-select-wrap:has(.nxtl-v2-esim-select:checked) .nxtl-v2-esim-select-box::after { opacity: 1; }
html body.nxtl-account #nxtl-v2-esims-root .esim-card__top .nxtl-v2-esim-select-wrap:has(.nxtl-v2-esim-select:focus-visible) .nxtl-v2-esim-select-box { box-shadow: 0 0 0 2px #0A0C12, 0 0 0 4px #FF2E4C; }

/* 2 · Hero: the figure leads; one min-height so both variants match */
html body.nxtl-account #nxtl-v2-esims-root .esim-card__hero {
  display: flex; flex-direction: column; justify-content: flex-start; gap: 8px; min-height: 84px;
  padding: 0; margin: 0; background: none; border: 0; border-radius: 0;
}
html body.nxtl-account #nxtl-v2-esims-root .esim-card__figure { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 0; min-inline-size: 0; }
html body.nxtl-account #nxtl-v2-esims-root .esim-card__figure .kit-figure { font-size: 32px; }
html body.nxtl-account #nxtl-v2-esims-root .esim-card__figure-unit { font-size: 13.5px; line-height: 1.4; color: var(--text-muted, #9BA3B8); }
html body.nxtl-account #nxtl-v2-esims-root .esim-card__figure-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; min-inline-size: 0; }
html body.nxtl-account #nxtl-v2-esims-root .esim-card__charge { display: flex; flex-direction: column; align-items: flex-end; flex: none; margin: 0; }
html body.nxtl-account #nxtl-v2-esims-root .esim-card__charge-value {
  font: 700 18px/1.2 var(--font-heading, "Plus Jakarta Sans", 'NXTL Jakarta Fallback', sans-serif); font-variant-numeric: tabular-nums; color: var(--text, #F5F6F8); white-space: nowrap;
}
html body.nxtl-account #nxtl-v2-esims-root .esim-card__charge-label { font-size: 13px; line-height: 1.45; color: var(--text-muted, #9BA3B8); }
html body.nxtl-account #nxtl-v2-esims-root .esim-card__caption { margin: 0; font-size: 13px; line-height: 1.45; color: var(--text-muted, #9BA3B8); }
html body.nxtl-account #nxtl-v2-esims-root .esim-card__meter.is-warning > span { background: var(--warning, #F5A623); }
html body.nxtl-account #nxtl-v2-esims-root .esim-card__meter.is-danger > span { background: var(--danger, #FF4D4D); }
html body.nxtl-account #nxtl-v2-esims-root .esim-card.is-archived .kit-figure { color: var(--text-secondary, #D5D9E4); }

/* 3 · Facts: hairline rows, label left, value right */
html body.nxtl-account #nxtl-v2-esims-root .esim-card__facts { display: flex; flex-direction: column; gap: 0; margin: 0; font-size: 13.5px; }
html body.nxtl-account #nxtl-v2-esims-root .esim-card__facts:not(:has(*)) { display: none; }
html body.nxtl-account #nxtl-v2-esims-root .esim-card__fact-row {
  display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 16px;
  box-sizing: border-box; min-height: 44px; padding: 8px 0; border-top: 1px solid var(--kit-line, rgba(255,255,255,.08)); min-inline-size: 0;
}
html body.nxtl-account #nxtl-v2-esims-root .esim-card__fact-row:last-child { padding-bottom: 0; min-height: 36px; grid-column: auto; }
html body.nxtl-account #nxtl-v2-esims-root .esim-card__fact-row > span:first-child { font-size: 13.5px; color: var(--text-muted, #9BA3B8); }
html body.nxtl-account #nxtl-v2-esims-root .esim-card__fact-row > strong { font-size: 14px; font-weight: 600; color: var(--text, #F5F6F8); text-align: right; font-variant-numeric: tabular-nums; }
html body.nxtl-account #nxtl-v2-esims-root .esim-card__fact-value { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 2px; }
html body.nxtl-account #nxtl-v2-esims-root .esim-card__fact-hint { font-size: 12px; font-weight: 400; color: var(--text-muted, #9BA3B8); }
html body.nxtl-account #nxtl-v2-esims-root .esim-card__fact-row--control { display: block; }
html body.nxtl-account #nxtl-v2-esims-root .esim-card__fact-row--control > .nxtl-tier-quick { margin: 0; padding: 0; border: 0; }
/* In the card, the tier hint shows while unset or while a change waits for Apply; a saved choice is already visible in the switch */
html body.nxtl-account #nxtl-v2-esims-root .esim-card .nxtl-tier-quick:not([data-current=""]):not(:has(.nxtl-tier-quick__apply:not([hidden]))) .nxtl-tier-quick__desc { display: none; }

/* 4 · Actions: Manage (the one red) · Usage · Install help … Plan / Add plan, separated by one hairline */
html body.nxtl-account #nxtl-v2-esims-root .esim-card__actions {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
  margin: auto 0 0 !important; padding-top: 14px; border-top: 1px solid var(--kit-line, rgba(255,255,255,.08));
}
html body.nxtl-account #nxtl-v2-esims-root .esim-card__actions-main { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-inline-size: 0; }
html body.nxtl-account #nxtl-v2-esims-root :is(.esim-card__actions, .esim-list-row__actions) .btn {
  min-height: 32px; padding: 0 12px; font-size: 13.5px; border-radius: 8px; white-space: nowrap;
}
html body.nxtl-account #nxtl-v2-esims-root .esim-card__end-action { margin-left: auto; }

/* ---------------------------------------------------------------- List view: one row per eSIM, same facts */
html body.nxtl-account #nxtl-v2-esims-root .esim-list-row {
  display: grid; grid-template-columns: minmax(0, 1.4fr) auto minmax(0, 1.2fr) minmax(0, 1fr) auto;
  align-items: center; gap: 12px 20px; padding: 16px 20px; border-radius: var(--kit-radius-card, 16px);
  background: var(--surface-card, #121620); border: 1px solid var(--kit-line, rgba(255,255,255,.08));
}
html body.nxtl-account #nxtl-v2-esims-root .esim-list-row .esim-card__name { font-size: 16px; }
html body.nxtl-account #nxtl-v2-esims-root .esim-list-row__usage,
html body.nxtl-account #nxtl-v2-esims-root .esim-list-row__network { display: flex; flex-direction: column; gap: 4px; min-inline-size: 0; }
html body.nxtl-account #nxtl-v2-esims-root .esim-list-row__value { margin: 0; font-size: 14px; font-weight: 600; color: var(--text, #F5F6F8); font-variant-numeric: tabular-nums; }
html body.nxtl-account #nxtl-v2-esims-root :is(.esim-list-row__label, .esim-list-row__hint) { margin: 0; font-size: 13px; line-height: 1.45; color: var(--text-muted, #9BA3B8); }
html body.nxtl-account #nxtl-v2-esims-root .esim-list-row__usage .kit-meter { margin: 2px 0; }
html body.nxtl-account #nxtl-v2-esims-root .esim-list-row__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
html body.nxtl-account #nxtl-v2-esims-root .esim-list-row__actions .esim-card__end-action { margin-left: 0; }
@media (max-width: 1180px) {
  html body.nxtl-account #nxtl-v2-esims-root .esim-list-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
  html body.nxtl-account #nxtl-v2-esims-root .esim-list-row__id { grid-column: 1 / 3; }
  html body.nxtl-account #nxtl-v2-esims-root .esim-list-row__status { grid-column: 3; justify-self: end; }
  html body.nxtl-account #nxtl-v2-esims-root .esim-list-row__actions { grid-column: 1 / -1; justify-content: flex-start; padding-top: 12px; border-top: 1px solid var(--kit-line, rgba(255,255,255,.08)); }
}

/* Owner 14 Nov: list rows share one column rhythm and one weight. Every row's usage and network blocks hold three lines, so a
   PAYG row is as tall as an Unlimited row, and both end actions share one width, so columns and buttons line up row to row. */
@media (min-width: 641px) {
  html body.nxtl-account #nxtl-v2-esims-root :is(.esim-list-row__usage, .esim-list-row__network) { min-block-size: 68px; }
  html body.nxtl-account #nxtl-v2-esims-root .esim-list-row__actions .esim-card__end-action { min-inline-size: 104px; }
}
/* Wide screens: one line per eSIM. The status pill sits under the name (no column of its own) so each fact stays on one line. */
@media (min-width: 1360px) {
  html body.nxtl-account #nxtl-v2-esims-root .esim-list-row {
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr) minmax(0, 1.1fr) auto; grid-template-rows: auto auto; row-gap: 8px;
  }
  html body.nxtl-account #nxtl-v2-esims-root .esim-list-row__id { grid-column: 1; grid-row: 1; align-self: end; }
  html body.nxtl-account #nxtl-v2-esims-root .esim-list-row__status { grid-column: 1; grid-row: 2; align-self: start; justify-self: start; }
  html body.nxtl-account #nxtl-v2-esims-root :is(.esim-list-row__usage, .esim-list-row__network, .esim-list-row__actions) { grid-row: 1 / 3; }
  html body.nxtl-account #nxtl-v2-esims-root :is(.esim-list-row__value, .esim-list-row__hint, .esim-list-row__label) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
/* Laptops between the two layouts: the two-tier row (identity, then facts, then actions) instead of squeezed columns */
@media (min-width: 1181px) and (max-width: 1359px) {
  html body.nxtl-account #nxtl-v2-esims-root .esim-list-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
  html body.nxtl-account #nxtl-v2-esims-root .esim-list-row__id { grid-column: 1 / 3; }
  html body.nxtl-account #nxtl-v2-esims-root .esim-list-row__status { grid-column: 3; justify-self: end; }
  html body.nxtl-account #nxtl-v2-esims-root .esim-list-row__actions { grid-column: 1 / -1; justify-content: flex-start; padding-top: 12px; border-top: 1px solid var(--kit-line, rgba(255,255,255,.08)); }
}

/* ---------------------------------------------------------------- Empty states */
html body.nxtl-account #nxtl-v2-esims-root .esim-empty {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 40px 24px;
}
html body.nxtl-account #nxtl-v2-esims-root .esim-empty__spot { line-height: 0; }
html body.nxtl-account #nxtl-v2-esims-root .esim-empty__spot svg { display: block; width: 160px; height: 120px; }
html body.nxtl-account #nxtl-v2-esims-root .esim-empty__title { margin: 4px 0 0; font: 700 19px/1.3 var(--font-heading, "Plus Jakarta Sans", 'NXTL Jakarta Fallback', sans-serif); color: var(--text, #F5F6F8); }
html body.nxtl-account #nxtl-v2-esims-root .esim-empty__text { margin: 0; max-width: 46ch; font-size: 14px; line-height: 1.5; color: var(--text-secondary, #D5D9E4); }
html body.nxtl-account #nxtl-v2-esims-root .esim-empty__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 8px; }
html body.nxtl-account #nxtl-v2-esims-root .esim-empty__actions form { margin: 0; }
html body.nxtl-account #nxtl-v2-esims-root .esim-empty__actions .btn { min-height: 36px; padding: 0 16px; font-size: 14px; border-radius: 10px; }
html body.nxtl-account #nxtl-v2-esims-root .esim-no-match { margin: 0; padding: 32px 16px; text-align: center; font-size: 14px; color: var(--text-muted, #9BA3B8); }
/* With no eSIMs at all, the designed empty state speaks; the "no match" line is only for searches and filters */
html body.nxtl-account #nxtl-v2-esims-root:has(.esim-empty):not(:has(#esimArchivedToggleBtn[aria-pressed="true"])) #esimEmpty { display: none !important; }

/* ---------------------------------------------------------------- Network tier quick switch (shared partial: My eSIMs cards + dashboard) */
html body.nxtl-account .nxtl-tier-quick { margin: 0; min-inline-size: 0; }
html body.nxtl-account .nxtl-tier-quick__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; min-height: 36px; min-inline-size: 0; }
html body.nxtl-account .nxtl-tier-quick__label { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; line-height: 1.4; color: var(--text-muted, #9BA3B8); }
html body.nxtl-account .nxtl-tier-quick__unset {
  display: inline-flex; align-items: center; min-height: 20px; height: 20px; margin: 0 !important; padding: 0 8px;
  font: 600 11px/1 var(--font-body, Inter, 'NXTL Inter Fallback', sans-serif) !important; border-radius: 999px;
  background: #1B202E !important; border: 1px solid rgba(255,255,255,.12) !important; color: #D5D9E4 !important;
}
html body.nxtl-account .nxtl-tier-quick__unset::before { display: none; }
html body.nxtl-account .nxtl-tier-quick__seg { flex: none; }
html body.nxtl-account .nxtl-tier-quick__desc,
html body.nxtl-account .account-card p.nxtl-tier-quick__desc { margin: 6px 0 0 !important; font-size: 13px !important; line-height: 1.45 !important; color: var(--text-muted, #9BA3B8) !important; }
html body.nxtl-account .nxtl-tier-quick__apply:not([hidden]) {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 12px;
  margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: #141822; border: 1px solid rgba(255,255,255,.14);
}
html body.nxtl-account .nxtl-tier-quick__note { font-size: 12.5px !important; line-height: 1.45; color: #D5D9E4 !important; }
html body.nxtl-account .nxtl-tier-quick__btns { display: inline-flex; gap: 6px; }
html body.nxtl-account .nxtl-tier-quick__btns .btn { min-height: 28px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
/* The save result is one line of text beside the control, not a box */
html body.nxtl-account .nxtl-tier-quick__status { margin-top: 6px; font-size: 13px; line-height: 1.45; color: var(--text-muted, #9BA3B8); }
html body.nxtl-account .nxtl-tier-quick__status.account-notice { display: block; padding: 0 !important; background: none !important; border: 0 !important; border-radius: 0 !important; font-size: 13px; }
html body.nxtl-account .nxtl-tier-quick__status.is-success { color: var(--success, #00D68F); }
html body.nxtl-account .nxtl-tier-quick__status.is-error { color: #FF8A8A; }
html body.nxtl-account .nxtl-tier-quick__status:empty { display: none; }

/* ---------------------------------------------------------------- Line drawer (shared with the dashboard) */
html body.nxtl-account #nxtl-line-drawer .manage-drawer__id { min-inline-size: 0; }
html body.nxtl-account #nxtl-line-drawer .manage-drawer__head-end { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
html body.nxtl-account #nxtl-line-drawer .drawer__title { margin: 0; font: 700 19px/1.3 var(--font-heading, "Plus Jakarta Sans", 'NXTL Jakarta Fallback', sans-serif); }
html body.nxtl-account #nxtl-line-drawer #nxtl-line-drawer-sub { margin: 2px 0 0; font-size: 13px; color: var(--text-muted, #9BA3B8); }
html body.nxtl-account #nxtl-line-drawer #nxtl-line-drawer-badge { min-height: 24px; height: 24px; padding: 0 10px; font-size: 12px; }
html body.nxtl-account #nxtl-line-drawer #nxtl-line-drawer-badge:empty { display: none; }
html body.nxtl-account #nxtl-line-drawer .drawer__body { padding: var(--kit-pad, 24px); }
html body.nxtl-account #nxtl-line-drawer .manage-tab-pane:not([hidden]) { gap: var(--kit-gap, 20px); }
html body.nxtl-account #nxtl-line-drawer .drawer__body .account-card { padding: var(--kit-pad, 24px); border-radius: var(--kit-radius-card, 16px); }

/* Section titles 16px (also the ones the script paints, some with inline sizes) */
html body.nxtl-account #nxtl-line-drawer .drawer__body .account-card__title {
  margin: 0; font: 700 16px/1.35 var(--font-heading, "Plus Jakarta Sans", 'NXTL Jakarta Fallback', sans-serif) !important; color: var(--text, #F5F6F8);
}
html body.nxtl-account #nxtl-line-drawer .drawer__body .account-card__kicker { margin: 0 0 2px; font-size: 12.5px; letter-spacing: 0; }
html body.nxtl-account #nxtl-line-drawer .drawer__body .account-card__subtitle { margin-top: 4px; font-size: 13px; line-height: 1.45; color: var(--text-muted, #9BA3B8); }

/* Settings sections */
html body.nxtl-account #nxtl-line-drawer .manage-section { display: flex; flex-direction: column; gap: 12px; }
html body.nxtl-account #nxtl-line-drawer .manage-section--row { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; }
html body.nxtl-account #nxtl-line-drawer .manage-section__copy { display: flex; flex-direction: column; gap: 4px; flex: 1 1 240px; min-inline-size: 0; }
html body.nxtl-account #nxtl-line-drawer .manage-section__copy .form-hint { margin: 0; }
html body.nxtl-account #nxtl-line-drawer .manage-section__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
html body.nxtl-account #nxtl-line-drawer .manage-section .btn { min-height: 36px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
html body.nxtl-account #nxtl-line-drawer .nxtl-nick-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
html body.nxtl-account #nxtl-line-drawer #nxtl-line-nickname { flex: 1 1 12rem; min-height: 40px; }

/* Network selection: the same compact segmented look as the card switch */
html body.nxtl-account #nxtl-line-drawer .manage-tier-form { display: flex; flex-direction: column; gap: 10px; margin: 0; }
html body.nxtl-account #nxtl-line-drawer .manage-tier-form[hidden] { display: none; }
html body.nxtl-account #nxtl-line-drawer .manage-tier-form__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; min-height: 40px; }
html body.nxtl-account #nxtl-line-drawer .manage-tier-form__label { font-size: 13.5px; color: var(--text-muted, #9BA3B8); }
html body.nxtl-account #nxtl-line-drawer .manage-tier-form__hint { margin: 0; }
html body.nxtl-account #nxtl-line-drawer [data-nxtl-tier-status]:empty,
html body.nxtl-account #nxtl-line-drawer [data-nxtl-nickname-status]:empty { display: none; }

/* Spending controls (painted by the script): nested raised cards become hairline sections; the limit form is compact */
html body.nxtl-account #nxtl-line-drawer #nxtl-line-spend { gap: var(--kit-gap, 20px); margin-top: var(--kit-gap, 20px); }
/* Owner 14 Nov: inside the drawer pane (a flex column with its own 20px gap) the extra top margin doubled the space under Usage */
html body.nxtl-account #nxtl-line-drawer .manage-tab-pane > #nxtl-line-spend { margin-top: 0; }
html body.nxtl-account #nxtl-line-drawer #nxtl-line-spend .account-card__head { margin-bottom: 12px !important; gap: 8px 12px; }
html body.nxtl-account #nxtl-line-drawer #nxtl-line-spend .account-card .account-card--raised {
  padding: 16px 0 0 !important; background: transparent; border: 0; border-top: 1px solid var(--kit-line, rgba(255,255,255,.08)); border-radius: 0;
}
html body.nxtl-account #nxtl-line-drawer #nxtl-line-spend .account-card .account-card--raised strong:first-child { font-size: 14.5px; font-weight: 600; }
html body.nxtl-account #nxtl-line-drawer .esim-limit-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: end; margin-bottom: 16px !important; }
html body.nxtl-account #nxtl-line-drawer .esim-limit-fields > .form-group { gap: 8px; }
html body.nxtl-account #nxtl-line-drawer .esim-limit-fields > .form-group:last-child { grid-column: auto; }
/* When the amount carries a currency note, On/Off and Period share a row and the amount takes the next one */
html body.nxtl-account #nxtl-line-drawer .esim-limit-fields:has(> .form-group:last-child > .form-hint) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
html body.nxtl-account #nxtl-line-drawer .esim-limit-fields:has(> .form-group:last-child > .form-hint) > .form-group:last-child { grid-column: 1 / -1; }
html body.nxtl-account #nxtl-line-drawer #nxtl-line-spend :is(.form-input, .form-select) { width: 100%; min-width: 0; }

/* Overview (painted by the script): one card surface, plan/cadence as text, the figure leads */
html body.nxtl-account #nxtl-line-drawer #nxtl-overview-body { gap: var(--kit-gap, 20px); }
html body.nxtl-account #nxtl-line-drawer #nxtl-overview-body > p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--text-secondary, #D5D9E4); }
html body.nxtl-account #nxtl-line-drawer #nxtl-overview-body > p.form-hint { font-size: 13px; color: var(--text-muted, #9BA3B8); }
html body.nxtl-account #nxtl-line-drawer #nxtl-overview-body .account-card--featured { background: var(--surface-card, #121620); border-color: var(--kit-line, rgba(255,255,255,.08)); }
html body.nxtl-account #nxtl-line-drawer .esim-card__pills { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; margin: 0 0 4px; }
html body.nxtl-account #nxtl-line-drawer .esim-card__pills .badge {
  min-height: 0; height: auto; padding: 0 !important; background: none !important; border: 0 !important;
  font: 500 13px/1.45 var(--font-body, Inter, 'NXTL Inter Fallback', sans-serif); color: var(--text-muted, #9BA3B8) !important;
}
html body.nxtl-account #nxtl-line-drawer .esim-card__pills .badge + .badge::before {
  content: "·"; display: inline; width: auto; height: auto; margin-right: 6px; background: none; border-radius: 0;
}
html body.nxtl-account #nxtl-line-drawer #nxtl-overview-body .hero-metric-val {
  margin: 0 0 4px !important; font: 800 32px/1.1 var(--font-heading, "Plus Jakarta Sans", 'NXTL Jakarta Fallback', sans-serif) !important; letter-spacing: -0.02em;
}
html body.nxtl-account #nxtl-line-drawer #nxtl-overview-body .account-grid--2col > div:nth-child(2) .hero-metric-val { font-size: 18px !important; font-weight: 700 !important; letter-spacing: 0; }
/* Text-styled actions painted by the script use the outline button the owner approved */
html body.nxtl-account #nxtl-line-drawer :is(.overview-spending-action, [data-goto-settings]) {
  display: inline-flex !important; align-items: center; min-height: 32px !important; height: auto; margin: 8px 0 0 !important; padding: 0 12px !important;
  border: 1px solid var(--hairline-strong, rgba(255,255,255,.14)) !important; border-radius: 8px !important; background: transparent !important;
  font: 600 13.5px/1 var(--font-body, Inter, 'NXTL Inter Fallback', sans-serif) !important; color: var(--text, #F5F6F8) !important; text-decoration: none !important; opacity: 1;
}
html body.nxtl-account #nxtl-line-drawer [data-goto-settings] { margin: 0 0 0 6px !important; min-height: 28px !important; font-size: 13px !important; }
html body.nxtl-account #nxtl-line-drawer :is(.overview-spending-action, [data-goto-settings]):hover { background: var(--surface-raised, #141822) !important; }
html body.nxtl-account #nxtl-line-drawer :is(.overview-spending-action, [data-goto-settings]):focus-visible { outline: none; box-shadow: 0 0 0 2px #0A0C12, 0 0 0 4px #FF2E4C !important; }
html body.nxtl-account #nxtl-line-drawer .overview-actions-row { gap: 8px; margin-top: 16px; padding-top: 14px; }
html body.nxtl-account #nxtl-line-drawer details.account-card > summary { min-height: 32px; }

/* Usage tools */
html body.nxtl-account #nxtl-line-drawer .manage-drawer__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
html body.nxtl-account #nxtl-line-drawer .manage-drawer__tools .btn { min-height: 32px; padding: 0 12px; font-size: 13.5px; border-radius: 8px; }

/* Plan renewal (painted by the script) */
html body.nxtl-account #nxtl-line-drawer #nxtl-plan-controls:empty { display: none; }
html body.nxtl-account #nxtl-line-drawer #nxtl-plan-controls .account-card { display: flex; flex-direction: column; gap: 12px; }
html body.nxtl-account #nxtl-line-drawer #nxtl-plan-controls form.account-stack { gap: 12px; margin-top: 0 !important; }

/* Danger zone: pause / exchange / terminate grouped last, destructive tone on the group */
html body.nxtl-account #nxtl-line-drawer #nxtl-line-actions { gap: 0; border-color: rgba(255,77,77,.24); }
html body.nxtl-account #nxtl-line-drawer #nxtl-line-actions:not(:has(*)) { display: none; }
html body.nxtl-account #nxtl-line-drawer #nxtl-line-actions > .account-card__title { margin-bottom: 4px; }
html body.nxtl-account #nxtl-line-drawer #nxtl-line-actions .nxtl-life-row,
html body.nxtl-account #nxtl-line-drawer #nxtl-line-actions .nxtl-life-row:first-of-type {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
  padding: 14px 0; border-top: 1px solid var(--kit-line, rgba(255,255,255,.08)); border-bottom: 0 !important;
}
html body.nxtl-account #nxtl-line-drawer #nxtl-line-actions .nxtl-life-row:last-child { padding-bottom: 0; }
html body.nxtl-account #nxtl-line-drawer #nxtl-line-actions .nxtl-life-row strong { display: block; font-size: 14.5px; font-weight: 600; }
html body.nxtl-account #nxtl-line-drawer #nxtl-line-actions .nxtl-life-row .form-hint { margin: 2px 0 0; font-size: 13px; line-height: 1.45; }
html body.nxtl-account #nxtl-line-drawer #nxtl-line-actions .nxtl-life-row .btn { min-height: 32px; padding: 0 12px; font-size: 13.5px; border-radius: 8px; }
html body.nxtl-account #nxtl-line-drawer #nxtl-line-actions > .btn { align-self: flex-start; }

/* Loading placeholders painted by the script take the kit skeleton tone (motion stays in motion.css / the base rule) */
html body.nxtl-account #nxtl-line-drawer .nxtl-pane-loading { display: flex; flex-direction: column; gap: 12px; }
html body.nxtl-account #nxtl-line-drawer .nxtl-skel {
  border-radius: 8px; background: linear-gradient(90deg, #1B202E 0%, #232938 40%, #1B202E 80%) no-repeat #1B202E; background-size: 200% 100%;
}

/* ---------------------------------------------------------------- Touch widths: the existing 44px button target (account-stage1-fix.css,
   ≤1024px) stays above the compact 32/36px desktop sizes set in this file */
@media (max-width: 1024px) {
  html body.nxtl-account :is(#nxtl-v2-esims-root, #nxtl-line-drawer) .btn { min-height: 44px !important; }
}

/* ---------------------------------------------------------------- Phones (390): one column, 16px padding, 44px targets */
@media (max-width: 680px) {
  html body.nxtl-account #nxtl-v2-esims-root { gap: 16px; }
  html body.nxtl-account #nxtl-v2-esims-root .esim-page-head { align-items: flex-start; }
  html body.nxtl-account #nxtl-v2-esims-root .esim-page-head h1 { font-size: 24px; }
  /* r2: the two purchase buttons share a row while both labels fit (390) and stack full width when they do not (320) */
  html body.nxtl-account #nxtl-v2-esims-root .esim-page-head__actions { display: flex; flex-wrap: wrap; width: 100%; min-inline-size: 0; }
  html body.nxtl-account #nxtl-v2-esims-root .esim-page-head__actions .btn { flex: 1 1 auto; min-height: 44px; max-width: 100%; padding: 0 12px; }

  /* r2 (P1 390 clip): search full width; the filter is a chip row that scrolls sideways inside the content edge, with
     its fade drawn inside the column (the strip itself is never wider than the page) */
  html body.nxtl-account #nxtl-v2-esims-root .esim-toolbar { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
  html body.nxtl-account #nxtl-v2-esims-root .esim-toolbar__search { flex: none; width: 100%; }
  html body.nxtl-account #nxtl-v2-esims-root #esimSearchInput { width: 100%; max-width: 100%; min-height: 44px; height: 44px; }
  html body.nxtl-account #nxtl-v2-esims-root .esim-toolbar__controls { justify-content: flex-start; width: 100%; }
  html body.nxtl-account #nxtl-v2-esims-root .esim-toolbar__controls > .segmented-control:not(.esim-toolbar__view) {
    display: flex !important; flex: 1 1 100%; flex-wrap: nowrap !important; gap: 8px !important;
    box-sizing: border-box; width: calc(100% + 4px); min-inline-size: 0; max-inline-size: calc(100% + 4px);
    /* 4px room top, bottom and left so the focus ring is not clipped; the left room is pulled back so chips start on the edge */
    margin: -4px 0 -4px -4px; padding: 4px 32px 4px 4px !important;
    overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    background: none !important; border: 0 !important; border-radius: 0 !important;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
  }
  html body.nxtl-account #nxtl-v2-esims-root .esim-toolbar__controls > .segmented-control:not(.esim-toolbar__view)::-webkit-scrollbar { display: none; }
  html body.nxtl-account #nxtl-v2-esims-root .esim-toolbar__controls > .segmented-control:not(.esim-toolbar__view) > .segmented-control__btn {
    flex: 0 0 auto; white-space: nowrap; padding: 0 16px !important; border-radius: 999px !important;
    background: var(--kit-track, #0E1118) !important; box-shadow: inset 0 0 0 1px var(--kit-line-strong, rgba(255,255,255,.14)) !important;
  }
  html body.nxtl-account #nxtl-v2-esims-root .esim-toolbar__controls > .segmented-control:not(.esim-toolbar__view) > .segmented-control__btn:is(.is-active, [aria-pressed="true"]) {
    background: var(--kit-thumb, #262D3D) !important; color: #F5F6F8 !important; box-shadow: inset 0 0 0 1px rgba(255,255,255,.28) !important;
  }
  html body.nxtl-account #nxtl-v2-esims-root .esim-toolbar__controls > .segmented-control:not(.esim-toolbar__view) > .segmented-control__btn:focus-visible {
    box-shadow: 0 0 0 2px #0A0C12, 0 0 0 4px #FF2E4C !important;
  }
  html body.nxtl-account #nxtl-v2-esims-root .esim-toolbar__controls > #esimArchivedToggleBtn { width: 100%; }
  /* Grid/List is a desktop choice; phones stack either view in one column */
  html body.nxtl-account #nxtl-v2-esims-root .esim-toolbar__view { display: none !important; }
  html body.nxtl-account #nxtl-v2-esims-root .esim-toolbar__controls > .btn { min-height: 44px; }

  html body.nxtl-account #nxtl-v2-esims-root #esimsContainer.account-grid { grid-template-columns: minmax(0, 1fr) !important; gap: 16px !important; }
  html body.nxtl-account #nxtl-v2-esims-root :is(.esim-card, .esim-list-row) { padding: 16px; }
  html body.nxtl-account #nxtl-v2-esims-root .esim-card__figure .kit-figure { font-size: 30px; }

  /* Actions: Manage full width, then a 2-column grid */
  html body.nxtl-account #nxtl-v2-esims-root :is(.esim-card__actions, .esim-list-row__actions) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  html body.nxtl-account #nxtl-v2-esims-root .esim-card__actions-main { display: contents; }
  html body.nxtl-account #nxtl-v2-esims-root :is(.esim-card__actions, .esim-list-row__actions) .btn { width: 100%; min-height: 44px; padding: 0 10px; }
  html body.nxtl-account #nxtl-v2-esims-root :is(.esim-card__manage, .esim-card__end-action) { grid-column: 1 / -1; margin-left: 0; }

  html body.nxtl-account #nxtl-v2-esims-root .esim-list-row { grid-template-columns: minmax(0, 1fr) auto; }
  html body.nxtl-account #nxtl-v2-esims-root .esim-list-row__id { grid-column: 1; }
  html body.nxtl-account #nxtl-v2-esims-root .esim-list-row__status { grid-column: 2; }
  html body.nxtl-account #nxtl-v2-esims-root :is(.esim-list-row__usage, .esim-list-row__network, .esim-list-row__actions) { grid-column: 1 / -1; }

  html body.nxtl-account #nxtl-v2-esims-root .esim-empty { padding: 32px 16px; }
  html body.nxtl-account #nxtl-v2-esims-root .esim-empty__actions { flex-direction: column; align-items: stretch; width: 100%; }
  html body.nxtl-account #nxtl-v2-esims-root .esim-empty__actions .btn { width: 100%; min-height: 44px; }

  /* Tier switch: the segmented control takes the full row, options share it, 44px targets */
  html body.nxtl-account :is(#nxtl-v2-esims-root, #nxtl-line-drawer, .home-line-tier) .nxtl-tier-quick__seg[role="radiogroup"] { display: flex !important; flex: 1 1 100%; width: 100%; }
  /* one id in :is() so this outranks the legacy id-weighted 40px phone rule in account-stage1-fix.css */
  html body.nxtl-account :is(#nxtl-v2-esims-root, #nxtl-line-drawer, .home-line-tier) .nxtl-tier-quick__seg[role="radiogroup"] > label.nxtl-tier-quick__opt { flex: 1 1 0; min-height: 44px !important; }
  html body.nxtl-account .nxtl-tier-quick__apply:not([hidden]) { grid-template-columns: minmax(0, 1fr); }
  html body.nxtl-account .nxtl-tier-quick__btns { display: grid; grid-template-columns: 1fr 1fr; }
  html body.nxtl-account .nxtl-tier-quick__btns .btn { min-height: 44px; }

  /* Drawer */
  html body.nxtl-account #nxtl-line-drawer .drawer__body { padding: 16px; }
  html body.nxtl-account #nxtl-line-drawer .manage-tab-pane:not([hidden]) { gap: 16px; }
  html body.nxtl-account #nxtl-line-drawer .drawer__body .account-card { padding: 16px; }
  html body.nxtl-account #nxtl-line-drawer :is(.manage-section, .manage-drawer__tools, #nxtl-line-actions) .btn { min-height: 44px; }
  html body.nxtl-account #nxtl-line-drawer .manage-section--row > .btn,
  html body.nxtl-account #nxtl-line-drawer .nxtl-nick-row > .btn { width: 100%; }
  html body.nxtl-account #nxtl-line-drawer .manage-tier-form__seg { width: 100%; }
  html body.nxtl-account #nxtl-line-drawer .esim-limit-fields,
  html body.nxtl-account #nxtl-line-drawer .esim-limit-fields:has(> .form-group:last-child > .form-hint) { grid-template-columns: minmax(0, 1fr); }
  html body.nxtl-account #nxtl-line-drawer #nxtl-line-actions .nxtl-life-row .btn { width: 100%; min-height: 44px; }
  html body.nxtl-account #nxtl-line-drawer :is(.overview-spending-action, [data-goto-settings]) { min-height: 44px !important; }
}

/* Lead: bulk action bar (mounted above the grid when 2+ PAYG eSIMs are selected) — sticky kit action bar */
html body.nxtl-account #nxtl-v2-bulk-bar:not([hidden]) { position: sticky; top: 72px; z-index: 5; margin: 0 0 16px; padding: 10px 14px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: #141822; border: 1px solid rgba(255, 255, 255, .14); border-radius: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
html body.nxtl-account #nxtl-v2-bulk-bar .nxtl-v2-bulk-actions { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; width: 100%; }
html body.nxtl-account #nxtl-v2-bulk-bar .nxtl-v2-bulk-label { font-size: 14px; font-weight: 600; color: #F5F6F8; margin-right: auto; }
html body.nxtl-account #nxtl-v2-bulk-bar .nxtl-v2-bulk-group { display: inline-flex; align-items: center; gap: 8px; }
html body.nxtl-account #nxtl-v2-bulk-bar .form-select { min-height: 32px; height: 32px; }

/* ---------------------------------------------------------------- Round 3 (13 Nov 2026, Modals / My eSIMs lane) */
/* R3-P3-09: head buttons that repeat the empty-state card's buttons are hidden (attribute set in esims.php) */
html body.nxtl-account #nxtl-v2-esims-root .esim-page-head__actions[hidden],
html body.nxtl-account #nxtl-v2-esims-root .esim-page-head__actions > .btn[hidden] { display: none !important; }
/* R3-P2-05: the Usage tab's spending section has no placeholder of its own; it stays out of the layout until painted */
html body.nxtl-account #nxtl-line-drawer #nxtl-line-spend:empty { display: none; }
/* R3-P3-06: the phone chip strip bleeds to the screen edge (the page gutter: 16px, 14px at <=480px) and scrolls under it,
   ending with 16px of room; a short fade at the screen edge, so no chip is cut square inside the page */
@media (max-width: 680px) {
  html body.nxtl-account #nxtl-v2-esims-root { --esim-strip-bleed: 16px; }
  html body.nxtl-account #nxtl-v2-esims-root .esim-toolbar__controls > .segmented-control:not(.esim-toolbar__view) {
    width: calc(100% + 4px + var(--esim-strip-bleed)); max-inline-size: calc(100% + 4px + var(--esim-strip-bleed));
    margin: -4px calc(-1 * var(--esim-strip-bleed)) -4px -4px;
    padding: 4px 16px 4px 4px !important; padding-inline-end: 16px !important;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 16px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 16px), transparent);
  }
}
@media (max-width: 480px) {
  html body.nxtl-account #nxtl-v2-esims-root { --esim-strip-bleed: 14px; }
}
