:root {
  --ink: #12213a;
  --muted: #56667b;
  --line: #dbe5f2;
  --surface: #ffffff;
  --bg: #f4f7fb;
  --blue: #245cff;
  --green: #138a4c;
  --amber: #a45b00;
  --red: #b42318;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, system-ui, sans-serif; color: var(--ink); background: var(--bg); }
a { color: inherit; text-decoration: none; }
.admin-impersonation-banner { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; padding: 10px 16px; background: #fff7ed; border-bottom: 1px solid #fed7aa; color: #7c2d12; font-size: 14px; font-weight: 700; }
.admin-impersonation-banner a { color: #0f62fe; font-weight: 900; text-decoration: underline; }
.portal-public-header { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px min(48px, 5vw); background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); }
.portal-public-brand img { height: 38px; display: block; }
.portal-public-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 18px; color: #334155; font-weight: 800; font-size: 14px; }
.portal-public-nav a:hover { color: var(--blue); }
.portal-public-main { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 42px 0 56px; }
.portal-public-footer { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 18px; padding: 24px; color: var(--muted); border-top: 1px solid var(--line); background: #fff; font-size: 14px; }
.portal-shell { min-height: 100vh; display: grid; grid-template-columns: 272px minmax(0, 1fr); background: #f4f7fb; }
.portal-sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 24px; padding: 24px 20px; background: #0b1b31; color: #fff; box-shadow: 12px 0 36px rgba(11,27,49,.12); z-index: 60; }
.portal-sidebar__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.portal-sidebar__close { display: none; width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.16); border-radius: 8px; background: rgba(255,255,255,.08); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
.portal-brand { display: grid; gap: 9px; font-weight: 800; }
.portal-brand img { width: 156px; height: auto; filter: brightness(0) invert(1); }
.portal-brand span { color: #9fb1c9; font-size: 12px; text-transform: uppercase; }
.portal-nav { display: grid; gap: 8px; }
.portal-nav a { display: flex; align-items: center; min-height: 42px; padding: 10px 12px; border-radius: 8px; color: #dce7f7; font-weight: 700; font-size: 14px; border: 1px solid transparent; }
.portal-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.portal-nav a.is-active { background: #fff; color: #0b4fb5; border-color: #fff; box-shadow: 0 10px 24px rgba(0,0,0,.16); }
.portal-account { margin-top: auto; padding: 15px; border: 1px solid rgba(255,255,255,.12); border-radius: 8px; background: rgba(255,255,255,.06); display: grid; gap: 7px; }
.portal-account span { color: #b8c7dc; font-size: 13px; overflow-wrap: anywhere; }
.portal-account__links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.portal-account a { padding: 7px 8px; border-radius: 6px; background: rgba(255,255,255,.07); color: #cce0ff; font-weight: 800; font-size: 12px; text-align: center; }
.portal-account a:hover { background: rgba(255,255,255,.13); color: #fff; }
.portal-account .portal-account__logout { grid-column: 1 / -1; color: #ffd7dd; }
.portal-workspace { min-width: 0; min-height: 100vh; display: flex; flex-direction: column; }
.portal-mobile-header { display: none; }
.portal-main { min-width: 0; flex: 1 0 auto; padding: 0; }
.portal-content-wrap { width: min(1240px, calc(100% - 56px)); margin: 0 auto; padding: 36px 0 56px; }
.portal-app-footer { display: flex; justify-content: flex-end; gap: 16px; padding: 20px 28px; border-top: 1px solid var(--line); color: var(--muted); background: #fff; font-size: 13px; }
.portal-topbar { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; margin-bottom: 24px; }
.eyebrow { display: block; color: var(--blue); font-size: 12px; text-transform: uppercase; font-weight: 800; margin-bottom: 8px; }
h1 { margin: 0; font-size: 32px; line-height: 1.08; letter-spacing: 0; }
h2 { margin: 0 0 12px; font-size: 22px; line-height: 1.2; letter-spacing: 0; }
h3 { margin: 0 0 8px; font-size: 17px; line-height: 1.25; }
p { color: var(--muted); line-height: 1.65; }
.muted { color: var(--muted); }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.panel, .device-card, .plan-card, .stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 12px 28px rgba(18,33,58,.055); }
.panel { padding: 22px; }
.device-card, .plan-card, .stat-card { padding: 18px; }
.stat-card strong { display: block; font-size: 30px; line-height: 1; margin-top: 8px; }
.button { appearance: none; border: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 10px 16px; border-radius: 8px; background: var(--blue); color: #fff; font-weight: 800; font-family: inherit; font-size: 14px; }
.button:hover { filter: brightness(.96); }
.button-outline { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.button-danger { background: var(--red); }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.form-grid { display: grid; gap: 16px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
label { display: grid; gap: 8px; font-weight: 800; font-size: 14px; }
input, select { width: 100%; min-height: 44px; border: 1px solid #cad7e8; border-radius: 10px; padding: 10px 12px; font: inherit; color: var(--ink); background: #fff; }
.checkbox-line { display: flex; align-items: flex-start; gap: 10px; font-weight: 700; line-height: 1.5; }
.checkbox-line input { width: 20px; height: 20px; min-height: 20px; margin-top: 2px; padding: 0; flex: 0 0 auto; cursor: pointer; accent-color: var(--blue); }
.checkbox-line:focus-within { outline: 3px solid rgba(36, 92, 255, .2); outline-offset: 4px; border-radius: 4px; }
.link-button { appearance: none; border: 0; background: transparent; padding: 0; color: var(--blue); font: inherit; font-weight: 800; text-decoration: underline; cursor: pointer; }
.terms-modal-open { overflow: hidden; }
.terms-modal[hidden] { display: none; }
.terms-modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 18px; }
.terms-modal-backdrop { position: absolute; inset: 0; background: rgba(8, 18, 34, .58); }
.terms-modal-panel { position: relative; width: min(760px, 100%); max-height: min(760px, 92vh); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: #fff; border-radius: 16px; box-shadow: 0 28px 80px rgba(3, 10, 25, .32); overflow: hidden; }
.terms-modal-panel header, .terms-modal-panel footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.terms-modal-panel footer { border-top: 1px solid var(--line); border-bottom: 0; justify-content: flex-end; }
.terms-modal-body { padding: 18px; overflow: auto; }
.terms-modal-body h3 { margin-top: 18px; }
.terms-close { border: 0; background: #eef3fa; color: var(--ink); width: 36px; height: 36px; border-radius: 10px; font-size: 24px; line-height: 1; cursor: pointer; }
.terms-content { display: grid; gap: 18px; }
.terms-content h2 { margin-top: 12px; }
.terms-content ul { margin: 0; padding-left: 22px; color: var(--muted); line-height: 1.7; }
.portal-benefits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 18px 0; padding: 0; list-style: none; }
.portal-benefits li { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #f8fbff; color: #334155; font-weight: 700; }
.fleetalyse-turnstile-wrap { display: flex; align-items: center; min-height: 65px; margin: 2px 0; }
.notice { margin: 0 0 18px; padding: 13px 15px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--ink); }
.notice-success { background: #effaf3; border-color: #b7e5c8; color: #14532d; }
.notice-error { background: #fff1f1; border-color: #ffd1d1; color: var(--red); }
.notice-warning { background: #fff8e7; border-color: #f6d99b; color: var(--amber); }
.status-badge { display: inline-flex; align-items: center; min-height: 28px; padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; border: 1px solid transparent; }
.status-success { background: #eaf8ef; color: var(--green); border-color: #bde6cd; }
.status-info { background: #edf5ff; color: #1451b5; border-color: #c9ddff; }
.status-warning { background: #fff7e8; color: var(--amber); border-color: #f3d79b; }
.status-danger { background: #fff1f1; color: var(--red); border-color: #ffcaca; }
.status-neutral { background: #f1f5f9; color: #475569; border-color: #dbe5f2; }
.device-card { display: grid; gap: 14px; }
.device-card__head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.device-card__imei { font-size: 19px; font-weight: 900; overflow-wrap: anywhere; }
.device-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; color: var(--muted); font-size: 14px; }
.device-meta strong { display: block; color: var(--ink); font-size: 13px; }
.plan-card { display: grid; gap: 12px; align-content: start; }
.price { font-size: 30px; font-weight: 900; }
.price small { color: var(--muted); font-size: 14px; font-weight: 700; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #eef3fa; font-size: 13px; }
.empty-state { padding: 34px; border: 1px dashed #b9c8dc; border-radius: 14px; background: #fff; text-align: center; }
.timeline { display: grid; gap: 10px; }
.timeline-item { padding: 12px 14px; border-left: 3px solid var(--blue); background: #f8fbff; border-radius: 10px; }
.auth-shell { min-height: calc(100vh - 60px); display: grid; place-items: center; }
.auth-card { width: min(520px, 100%); }
.activation-strip { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 16px; border-radius: 14px; background: #10233f; color: #fff; }
.activation-strip p { color: #d2def0; margin: 4px 0 0; }
.activation-strip--sim { background: #0e6249; }
.check-list { display: grid; gap: 10px; margin: 0; padding-left: 22px; color: var(--muted); line-height: 1.55; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
.usage-total { display: flex; align-items: baseline; gap: 10px; margin: 24px 0 10px; }
.usage-total strong { color: var(--ink); font-size: 34px; line-height: 1; }
.usage-total span { color: var(--muted); font-weight: 800; }
.usage-progress { width: 100%; height: 12px; overflow: hidden; border-radius: 6px; background: #e5edf7; }
.usage-progress span { display: block; height: 100%; border-radius: inherit; background: #16a36d; }

.container { width: min(1180px, calc(100% - 34px)); margin: 0 auto; }
.btn { display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; padding: 9px 14px; font-weight: 800; border: 1px solid transparent; font-size: 13px; }
.btn-small { padding: 7px 12px; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 8px 22px rgba(31,111,255,.24); }
.btn-secondary { background: #fff; border-color: #cfd9e7; color: var(--ink); }
.portal-public-main .page-hero { padding: 28px 32px; border: 1px solid #d8e4f2; border-radius: 8px; background: #eef5ff; }
.portal-public-main .page-hero .container, .portal-public-main .section .container { width: 100%; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; color: #56667b; font-size: 13px; font-weight: 700; }
.page-hero .lead { max-width: 780px; margin-bottom: 0; }
.section { padding: 24px 0 0; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); gap: 22px; align-items: start; }
.form-shell, .summary-card { padding: 26px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 12px 28px rgba(18,33,58,.055); }
.form-shell form { display: grid; gap: 16px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.tick-list { display: grid; gap: 12px; margin: 18px 0; padding: 0; list-style: none; }
.tick-list li { position: relative; padding-left: 26px; color: #42526a; line-height: 1.55; }
.tick-list li::before { content: '\2713'; position: absolute; left: 0; color: #138a4c; font-weight: 900; }

@media (max-width: 980px) {
  .portal-shell { grid-template-columns: 1fr; }
  .portal-sidebar { position: fixed; inset: 0 auto 0 0; width: min(320px, 88vw); height: 100vh; transform: translateX(-105%); transition: transform .2s ease; }
  .portal-shell.is-menu-open .portal-sidebar { transform: translateX(0); }
  .portal-sidebar__close { display: inline-grid; place-items: center; }
  .portal-mobile-header { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 20px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(12px); }
  .portal-mobile-header img { display: block; width: 156px; height: auto; }
  .portal-mobile-header button { min-height: 40px; padding: 8px 14px; border: 1px solid #cad7e8; border-radius: 8px; background: #fff; color: var(--ink); font: inherit; font-weight: 800; cursor: pointer; }
  .portal-content-wrap { width: min(100% - 36px, 1240px); padding-top: 28px; }
  .grid-2, .grid-3, .grid-4, .grid-5, .form-grid.two, .portal-benefits { grid-template-columns: 1fr; }
  .portal-topbar, .activation-strip { flex-direction: column; align-items: stretch; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .portal-public-header { align-items: flex-start; flex-direction: column; padding: 14px 18px; }
  .portal-public-nav { justify-content: flex-start; gap: 12px; }
  .portal-public-main { width: min(100% - 24px, 1120px); padding-top: 24px; }
  .portal-public-main .page-hero, .form-shell, .summary-card { padding: 20px; }
  .form-row { grid-template-columns: 1fr; }
  .portal-content-wrap { width: min(100% - 24px, 1240px); }
  .portal-topbar h1, h1 { font-size: 27px; }
  .portal-app-footer { justify-content: flex-start; flex-wrap: wrap; padding: 18px; }
}

.offer-scarcity {
  display: inline-flex;
  max-width: 100%;
  align-items: flex-start;
  gap: 10px;
  margin: 12px 0;
  padding: 10px 12px;
  border: 1px solid #9ad7b4;
  border-radius: 6px;
  background: #f0fbf5;
  color: #115b38;
  line-height: 1.35;
}
.offer-scarcity__dot { flex: 0 0 auto; width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: #14945a; box-shadow: 0 0 0 4px rgba(20,148,90,.13); }
.offer-scarcity strong, .offer-scarcity small { display: block; }
.offer-scarcity strong { font-size: 13px; font-weight: 900; }
.offer-scarcity small { margin-top: 2px; color: #456757; font-size: 11px; font-weight: 700; }
.offer-scarcity--compact { width: 100%; margin: 9px 0 10px; padding: 9px 10px; }
