:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --text: #172033;
  --muted: #647084;
  --line: #dfe4ec;
  --primary: #0e7c66;
  --primary-dark: #075847;
  --accent: #efb44b;
  --danger: #c24135;
  --ok: #16835f;
  --shadow: 0 14px 40px rgba(23, 32, 51, .08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: var(--primary);
  text-decoration: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 22px;
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 20px;
  font-weight: 800;
}

.brand img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 8px;
  padding: 6px;
  background: linear-gradient(135deg, #2563eb, #2dd4bf);
}

.topnav {
  display: flex;
  gap: 14px;
  align-items: center;
}

.shell {
  width: min(1160px, calc(100% - 32px));
  margin: 28px auto 96px;
}

.public-body {
  --bg: #0f172a;
  --surface: rgba(30, 41, 59, .72);
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: #243244;
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --accent: #2dd4bf;
  --shadow: 0 24px 70px rgba(0, 0, 0, .34);
  background:
    radial-gradient(circle at 50% -12%, rgba(59, 130, 246, .25), transparent 34%),
    radial-gradient(circle at 80% 18%, rgba(45, 212, 191, .12), transparent 28%),
    #0f172a;
  color: var(--text);
}

.home-body {
  background: #0f172a;
}

.public-body .topbar {
  position: fixed;
  right: 0;
  left: 0;
  min-height: 80px;
  padding: 0 max(24px, calc((100vw - 1180px) / 2));
  background: rgba(15, 23, 42, .96);
  border-bottom: 1px solid rgba(148, 163, 184, .18);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .22);
  backdrop-filter: blur(14px);
}

.home-body .topbar {
  background: rgba(15, 23, 42, .96);
  border-bottom: 1px solid rgba(148, 163, 184, .18);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .22);
  backdrop-filter: blur(14px);
}

.public-body .brand {
  color: #f8fafc;
  font-size: 24px;
}

.public-body .brand span {
  color: transparent;
  background: linear-gradient(90deg, #60a5fa, #2dd4bf);
  background-clip: text;
}

.public-body .topnav a {
  color: #cbd5e1;
}

.public-body .topnav a:hover {
  color: #ffffff;
}

.public-body .shell {
  width: min(1180px, calc(100% - 32px));
  margin-top: 0;
  padding-top: 112px;
}

.home-body .shell {
  padding-top: 96px;
}

.public-body .button {
  background: #2563eb;
  box-shadow: 0 18px 42px rgba(37, 99, 235, .25);
}

.public-body .button.ghost {
  background: #1e293b;
  color: #e2e8f0;
  border-color: #334155;
  box-shadow: none;
}

.public-body .button:hover {
  background: #3b82f6;
}

.public-body p {
  color: #94a3b8;
}

.public-body article,
.public-body .panel,
.public-body .auth-card,
.public-body .hero-panel,
.public-body .pricing-card {
  background: rgba(30, 41, 59, .62);
  border-color: #334155;
  box-shadow: none;
}

.public-body .eyebrow {
  color: #60a5fa;
}

.landing-hero {
  display: grid;
  gap: 28px;
  justify-items: center;
  padding: 28px 0 76px;
  text-align: center;
}

.marketplace-hero {
  min-height: 464px;
  align-content: start;
  padding: 58px 0 56px;
}

.landing-hero h1 {
  max-width: 1120px;
  margin: 22px auto 22px;
  color: #f8fafc;
  font-size: clamp(46px, 5.6vw, 64px);
  font-weight: 900;
  line-height: .94;
}

.landing-hero h1 span {
  color: transparent;
  background: linear-gradient(90deg, #5da9ff 0%, #58d7d2 100%);
  background-clip: text;
}

.landing-hero > div:first-of-type p {
  max-width: 760px;
  margin: 0 auto;
  color: #9db4d3;
  font-size: 22px;
  line-height: 1.28;
}

.hero-badge {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 5px 16px;
  border: 1px solid rgba(59, 130, 246, .38);
  border-radius: 999px;
  background: rgba(37, 99, 235, .16);
  color: #4f9dff;
  font-size: 12px;
  font-weight: 800;
}

.hero-actions {
  justify-content: center;
  margin-top: 42px;
}

.hero-actions .button {
  min-width: 204px;
  min-height: 54px;
  border-radius: 10px;
  background: #2563eb;
  font-size: 16px;
  box-shadow: 0 18px 34px rgba(37, 99, 235, .28);
}

.blocked-page {
  display: grid;
  gap: 18px;
  width: min(760px, 100%);
  margin: 34px auto 72px;
  padding: 42px;
  border: 1px solid rgba(96, 165, 250, .24);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(30, 41, 59, .86), rgba(15, 23, 42, .88));
  box-shadow: 0 28px 80px rgba(0, 0, 0, .28);
  text-align: center;
}

.blocked-logo {
  display: inline-flex;
  width: 76px;
  height: 76px;
  align-items: center;
  justify-content: center;
  margin: 0 auto 4px;
  border-radius: 18px;
  background: linear-gradient(135deg, #2563eb, #2dd4bf);
}

.blocked-logo img {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.blocked-page h1 {
  max-width: 620px;
  margin: 0 auto;
  color: #f8fafc;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1;
}

.blocked-page > p:not(.eyebrow) {
  max-width: 620px;
  margin: 0 auto;
  color: #b7c6dc;
  font-size: 18px;
}

.blocked-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 2px;
  text-align: left;
}

.blocked-meta span {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 10px;
  background: rgba(15, 23, 42, .48);
}

.blocked-meta small {
  color: #93a7c4;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.blocked-meta strong {
  color: #f8fafc;
  overflow-wrap: anywhere;
}

.blocked-actions {
  justify-content: center;
  margin-top: 8px;
}

.blocked-page > small {
  color: #7f93b1;
}

.hero-actions .button.ghost {
  min-width: 152px;
  background: #1e293b;
  border: 1px solid #334155;
  color: #f8fafc;
  box-shadow: none;
}

.terminal-card {
  width: min(850px, 100%);
  margin-top: 28px;
  padding: 18px;
  border: 1px solid #1f2a3a;
  border-radius: 18px;
  background: rgba(30, 41, 59, .5);
  box-shadow: 0 34px 90px rgba(0, 0, 0, .34);
  backdrop-filter: blur(12px);
  text-align: left;
}

.terminal-card p {
  margin: 9px 0;
  padding: 0 12px;
  color: #cbd5e1;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.terminal-card b,
.terminal-card strong {
  color: #2dd4bf;
}

.terminal-card em {
  color: #60a5fa;
  font-style: normal;
}

.terminal-dots {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 12px 18px;
  border-bottom: 1px solid #1f2a3a;
}

.terminal-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-dots span:nth-child(1) { background: #ef4444; }
.terminal-dots span:nth-child(2) { background: #eab308; }
.terminal-dots span:nth-child(3) { background: #22c55e; }

.terminal-dots small {
  margin-left: 8px;
  color: #64748b;
}

.hero {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 28px;
  align-items: stretch;
  min-height: 470px;
}

.public-hero {
  align-items: center;
  padding: 34px 0 18px;
}

.hero h1,
.page-head h1,
h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 6vw, 68px);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

p {
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--primary);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.section-head {
  width: min(760px, 100%);
  margin: 72px auto 8px;
  text-align: center;
}

.section-head h2 {
  margin-bottom: 8px;
  font-size: 34px;
}

.public-footer {
  display: flex;
  width: min(1160px, calc(100% - 32px));
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 30px auto 34px;
  padding: 18px 20px;
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 14px;
  background: rgba(15, 23, 42, .62);
  color: var(--muted);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 10px;
  padding: 7px;
  background: linear-gradient(135deg, #2563eb, #2dd4bf);
}

.footer-brand div {
  display: grid;
  gap: 2px;
}

.footer-brand strong {
  color: #f8fafc;
  line-height: 1;
}

.footer-brand span {
  color: var(--muted);
  font-size: 13px;
}

.public-footer nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.public-footer nav a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 6px 10px;
  border-radius: 8px;
  color: #cbd5e1;
  font-weight: 800;
}

.public-footer nav a:hover {
  background: rgba(59, 130, 246, .12);
  color: #ffffff;
}

.hero-panel,
.panel,
article,
.auth-card,
.list-card,
.usage-card,
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-panel {
  align-self: center;
  padding: 28px;
}

.grid {
  display: grid;
  gap: 18px;
  margin: 22px 0;
}

.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.compact {
  gap: 12px;
  margin: 0;
}

.grid > article,
.panel,
.auth-card,
.list-card,
.usage-card,
.stat {
  padding: 18px;
}

.panel.wide {
  grid-column: 1 / -1;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  align-items: start;
}

.stack {
  display: grid;
  gap: 12px;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.button,
button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: white;
  font-weight: 800;
  cursor: pointer;
}

.button:hover,
button:hover {
  background: var(--primary-dark);
}

.button.ghost {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.button.danger {
  background: #fbe9e7;
  color: var(--danger);
  border: 1px solid #f2b8b1;
}

.button.danger:hover {
  background: #f8d5d1;
}

.button.small {
  min-height: 36px;
  padding: 7px 12px;
  font-size: 14px;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

form {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.checkline {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
}

.checkline input {
  width: auto;
  min-height: 0;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--text);
  font: inherit;
}

.public-body input,
.public-body select,
.public-body textarea {
  background: #ffffff;
  color: #172033;
  border-color: #334155;
}

.public-body input::placeholder,
.public-body textarea::placeholder {
  color: #647084;
}

.public-body option {
  color: #172033;
  background: #ffffff;
}

#fitur,
#paket {
  scroll-margin-top: 104px;
}

table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

td small {
  display: block;
  color: var(--muted);
}

th {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0;
}

pre {
  overflow: auto;
  padding: 14px;
  border-radius: 8px;
  background: #101828;
  color: #eef4ff;
}

.meter {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7edf4;
}

.meter span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.limit-list {
  display: grid;
  gap: 10px;
}

.limit-row {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) 160px 170px 120px;
  gap: 12px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.limit-row small {
  display: block;
  color: var(--muted);
}

.pricing-grid {
  align-items: stretch;
  padding: 28px 0 18px;
}

.pricing-card {
  position: relative;
  display: grid;
  gap: 14px;
  align-content: space-between;
  padding: 28px;
  border-radius: 18px;
  transition: border-color .2s ease, transform .2s ease;
}

.pricing-card:hover {
  border-color: #475569;
  transform: translateY(-2px);
}

.pricing-card.featured {
  border: 2px solid #3b82f6;
  background: rgba(30, 41, 59, .9);
  box-shadow: 0 28px 90px rgba(37, 99, 235, .12);
}

.popular-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 12px;
  border-radius: 999px;
  background: #3b82f6;
  color: white;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.pricing-card .eyebrow {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 12px;
}

.pricing-card h3 {
  color: #f8fafc;
  font-size: 24px;
}

.price {
  color: #f8fafc;
  font-size: 34px;
  font-weight: 900;
}

.price small {
  color: var(--muted);
  font-size: 14px;
}

.limit-summary {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.limit-summary li {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.public-body .limit-summary li::before {
  content: "✓";
  flex: 0 0 auto;
  color: #2dd4bf;
  font-weight: 900;
}

.public-body .limit-summary li span {
  flex: 1;
}

.limit-summary strong {
  color: #e2e8f0;
}

.admin-body {
  background: #eef3f8;
}

.admin-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  gap: 26px;
  padding: 26px 18px;
  background: #ffffff;
  border-right: 1px solid var(--line);
}

.admin-brand {
  display: grid;
  grid-template-columns: 42px 1fr;
  column-gap: 12px;
  align-items: center;
  color: var(--text);
}

.admin-brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 8px;
  padding: 7px;
  background: linear-gradient(135deg, #2563eb, #2dd4bf);
}

.admin-brand strong {
  font-size: 18px;
  line-height: 1;
}

.admin-brand small {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
}

.admin-menu {
  display: grid;
  gap: 6px;
}

.admin-menu a,
.quick-links a {
  display: flex;
  min-height: 42px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  color: #526071;
  font-weight: 800;
}

.admin-menu a:hover,
.quick-links a:hover {
  background: #eef5ff;
  color: #2458c9;
}

.admin-sidebar-foot {
  margin-top: auto;
  padding: 14px;
  border-radius: 8px;
  background: #f1f6fb;
}

.admin-sidebar-foot small {
  color: var(--muted);
}

.admin-sidebar-foot strong {
  display: block;
  font-size: 14px;
}

.admin-main {
  min-width: 0;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 28px;
  background: rgba(238,243,248,.84);
  backdrop-filter: blur(14px);
}

.admin-search {
  width: min(420px, 100%);
}

.admin-search input {
  min-height: 46px;
  border-color: transparent;
  box-shadow: 0 10px 30px rgba(18, 38, 63, .07);
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.admin-content {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto 48px;
}

.admin-page-head h1 {
  font-size: 34px;
}

.admin-stats .stat {
  border-color: transparent;
}

.admin-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(220px, .55fr);
  gap: 18px;
  align-items: start;
}

.admin-dashboard-grid .panel {
  box-shadow: 0 18px 50px rgba(18, 38, 63, .08);
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.card-head p {
  margin: 0;
}

.chart-panel {
  min-height: 320px;
}

.line-chart {
  position: relative;
  height: 180px;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(#edf2f7 1px, transparent 1px) 0 0 / 100% 45px,
    linear-gradient(90deg, #edf2f7 1px, transparent 1px) 0 0 / 25% 100%,
    #fbfdff;
}

.line-chart i,
.line-chart b {
  position: absolute;
  right: 6%;
  left: 6%;
  display: block;
  height: 82px;
  border: solid;
  border-width: 0 0 4px 0;
  border-radius: 50%;
  transform: rotate(-4deg);
}

.line-chart i {
  top: 52px;
  border-color: #2f67d8;
}

.line-chart b {
  top: 76px;
  border-color: #17a77a;
  transform: rotate(6deg);
}

.chart-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.vertical-card {
  min-height: 320px;
}

.vertical-card strong {
  display: block;
  margin-top: 20px;
  font-size: 30px;
}

.pill-meter {
  display: grid;
  height: 150px;
  place-items: center;
}

.pill-meter span {
  width: 54px;
  height: 132px;
  border-radius: 999px;
  background: linear-gradient(180deg, #2f67d8 0%, #2f67d8 72%, #17a77a 72%, #17a77a 100%);
  box-shadow: 0 16px 35px rgba(47, 103, 216, .28);
}

.quick-links {
  display: grid;
  gap: 8px;
}

.invoice-card {
  display: grid;
  gap: 8px;
}

.invoice-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.claim-card {
  text-align: left;
}

.access-box {
  display: grid;
  gap: 8px;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid #b8d8ce;
  border-radius: 8px;
  background: #ecf8f4;
}

.access-box small {
  color: #0f766e;
  font-weight: 800;
  text-transform: uppercase;
}

.access-box strong {
  color: #0f172a;
  font-size: 24px;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.access-box p {
  color: #24524a;
}

.public-body .access-box {
  border-color: rgba(45, 212, 191, .34);
  background: rgba(13, 148, 136, .18);
}

.public-body .access-box small {
  color: #5eead4;
}

.public-body .access-box strong {
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .24);
}

.public-body .access-box p {
  color: #cbd5e1;
}

.legal-page {
  width: min(850px, 100%);
  margin: 0 auto;
  padding: 34px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 18px;
  background: rgba(15, 23, 42, .52);
}

.legal-page h1 {
  color: #f8fafc;
  font-size: 48px;
}

.legal-page h2 {
  color: #f8fafc;
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid rgba(148, 163, 184, .14);
}

.customer-form {
  margin-bottom: 18px;
}

.data-table td {
  vertical-align: middle;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.filter-tab {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fafd;
  color: #526071;
  font-size: 14px;
  font-weight: 800;
}

.filter-tab.active,
.filter-tab:hover {
  border-color: #2f67d8;
  background: #eef5ff;
  color: #2458c9;
}

.subscription-card {
  display: grid;
  gap: 18px;
}

.subscription-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.subscription-meta span {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .04);
}

.subscription-meta small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.subscription-meta strong {
  overflow-wrap: anywhere;
}

.inline-usage-form {
  display: grid;
  grid-template-columns: minmax(90px, 120px) minmax(180px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.inline-usage-form input {
  min-height: 38px;
  padding: 8px 10px;
}

.portal-page {
  display: grid;
  gap: 22px;
  max-width: 1080px;
  margin: 0 auto;
}

.portal-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 0 10px;
}

.portal-hero h1 {
  margin-bottom: 10px;
  font-size: clamp(42px, 5vw, 58px);
}

.portal-hero p:not(.eyebrow) {
  max-width: 620px;
  margin: 0;
  font-size: 16px;
}

.portal-card {
  display: grid;
  gap: 22px;
  padding: 26px;
  border: 1px solid rgba(96, 165, 250, .22);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(30, 41, 59, .88), rgba(15, 23, 42, .82));
  box-shadow: 0 22px 70px rgba(0, 0, 0, .22);
}

.portal-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.portal-card-top h2 {
  margin-bottom: 6px;
  color: #f8fafc;
  font-size: 30px;
}

.portal-card-top p:not(.eyebrow) {
  margin: 0;
}

.portal-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.portal-meta span {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 10px;
  background: rgba(15, 23, 42, .5);
}

.portal-meta small {
  color: #93a7c4;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.portal-meta strong {
  color: #f8fafc;
  overflow-wrap: anywhere;
}

.portal-meta em.status {
  margin: -2px 0;
  font-style: normal;
}

.portal-access {
  margin: 0;
  border-color: rgba(45, 212, 191, .35);
  background: rgba(20, 184, 166, .12);
}

.portal-access strong {
  color: #ccfbf1;
}

.portal-actions {
  margin-top: 0;
}

.portal-actions form {
  display: inline-flex;
}

.portal-actions form .button {
  width: auto;
}

.portal-history {
  overflow: hidden;
  padding: 22px;
}

.portal-history .panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.portal-history h2 {
  margin: 0;
  color: #f8fafc;
}

.portal-history table {
  width: 100%;
  border-collapse: collapse;
}

.portal-history th {
  color: #93a7c4;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.portal-history th,
.portal-history td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, .16);
  text-align: left;
}

.portal-history td strong,
.portal-history td small {
  display: block;
}

.portal-history td strong {
  color: #f8fafc;
}

.portal-history td small {
  margin-top: 4px;
  color: #93a7c4;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.row-actions form {
  display: inline-flex;
}

.stat span,
.list-card span,
.muted,
.empty {
  color: var(--muted);
}

.stat strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
}

.status {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: 26px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #edf3f8;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.status.ok {
  background: #e7f7f1;
  color: var(--ok);
}

.notice {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid #f2dc9b;
  border-radius: 8px;
  background: #fff7df;
  color: #765313;
}

.auth-card {
  width: min(460px, 100%);
  margin: 8vh auto;
}

.panel > a {
  display: block;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

@media (max-width: 820px) {
  .topnav a:not(.button) {
    display: none;
  }

  .shell {
    width: min(100% - 24px, 680px);
    margin-top: 18px;
  }

  .hero,
  .split,
  .blocked-meta,
  .portal-meta,
  .subscription-meta,
  .grid.two,
  .grid.three,
  .grid.four {
    grid-template-columns: 1fr;
  }

  .admin-layout {
    display: block;
  }

  .admin-sidebar {
    position: static;
    height: auto;
    padding: 14px 12px;
  }

  .admin-menu {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .admin-menu a {
    white-space: nowrap;
  }

  .admin-sidebar-foot {
    display: none;
  }

  .admin-topbar {
    position: static;
    flex-direction: column;
    align-items: stretch;
    padding: 14px 12px;
  }

  .admin-actions {
    justify-content: space-between;
  }

  .admin-content {
    width: min(100% - 24px, 680px);
  }

  .admin-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .limit-row {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
  }

  .hero h1,
  .page-head h1,
  h1 {
    font-size: 38px;
  }

  .page-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .portal-hero,
  .portal-card-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .public-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  table,
  thead,
  tbody,
  th,
  td,
  tr {
    display: block;
  }

  thead {
    display: none;
  }

  tr {
    margin-bottom: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
  }

  td {
    border-bottom: 1px solid var(--line);
  }

  .portal-history tr {
    background: rgba(15, 23, 42, .5);
    border-color: rgba(148, 163, 184, .18);
  }

  .portal-history td {
    border-bottom-color: rgba(148, 163, 184, .14);
  }

}


/* Public static pages & checkout */
.legal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.checkout-head {
  margin-top: 18px;
}

.checkout-head h1 {
  margin: 0 0 10px;
  color: #f8fafc;
  font-size: clamp(36px, 5vw, 52px);
}

.checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(290px, .7fr);
  gap: 22px;
  align-items: start;
  width: min(980px, 100%);
  margin: 12px auto 40px;
}

.checkout-form-card,
.checkout-summary {
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 18px;
  background: rgba(30, 41, 59, .62);
}

.checkout-form-card {
  padding: 28px;
}

.checkout-title h1 {
  margin: 0 0 8px;
  color: #f8fafc;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.05;
}

.checkout-form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.checkout-form label {
  display: grid;
  gap: 7px;
  color: #dbeafe;
  font-size: 13px;
  font-weight: 800;
}

.checkout-form input,
.checkout-form select {
  width: 100%;
}

.terms-check {
  grid-template-columns: 20px 1fr !important;
  align-items: start;
  gap: 10px !important;
  padding: 13px 14px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 10px;
  background: rgba(15, 23, 42, .52);
  color: #cbd5e1 !important;
  font-weight: 600 !important;
}

.terms-check input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.checkout-submit {
  width: 100%;
  justify-content: center;
}

.checkout-security {
  margin: -2px 0 0;
  text-align: center;
  font-size: 12px;
}

.checkout-summary {
  position: sticky;
  top: 106px;
  padding: 24px;
}

.checkout-summary h2 {
  margin: 0;
  color: #f8fafc;
  font-size: 28px;
}

.checkout-price {
  display: grid;
  gap: 4px;
  margin: 20px 0;
  padding: 18px 0;
  border-top: 1px solid rgba(148, 163, 184, .14);
  border-bottom: 1px solid rgba(148, 163, 184, .14);
}

.checkout-price span,
.checkout-price small {
  color: #94a3b8;
}

.checkout-price strong {
  color: #f8fafc;
  font-size: 28px;
}

.checkout-change {
  display: inline-flex;
  margin-top: 16px;
  font-weight: 800;
}

@media (max-width: 820px) {
  .checkout-layout {
    grid-template-columns: 1fr;
  }

  .checkout-summary {
    position: static;
    order: -1;
  }

  .checkout-form-card,
  .checkout-summary,
  .legal-page {
    padding: 22px;
  }

  .legal-page h1 {
    font-size: 38px;
  }
}

/* Local payment page */
.local-payment-page {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(290px, .75fr);
  gap: 22px;
  align-items: start;
  max-width: 1120px;
  margin: 34px auto 64px;
}

.local-payment-main,
.local-payment-summary,
.payment-success-card {
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 18px;
  background: rgba(30, 41, 59, .62);
  box-shadow: 0 18px 45px rgba(2, 6, 23, .18);
}

.local-payment-main {
  padding: 28px;
}

.payment-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.payment-heading h1,
.payment-success-card h1 {
  margin: 0 0 8px;
  color: #f8fafc;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.05;
}

.payment-heading p {
  margin-bottom: 0;
}

.payment-status {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .02em;
}

.payment-status.pending {
  color: #fef3c7;
  background: rgba(245, 158, 11, .16);
  border: 1px solid rgba(245, 158, 11, .30);
}

.payment-status.paid {
  color: #d1fae5;
  background: rgba(16, 185, 129, .16);
  border: 1px solid rgba(16, 185, 129, .30);
}

.payment-status.failed {
  color: #fee2e2;
  background: rgba(239, 68, 68, .14);
  border: 1px solid rgba(239, 68, 68, .28);
}

.payment-sync-note,
.payment-error-detail {
  margin: 0 0 18px;
  padding: 13px 15px;
  border-radius: 12px;
  background: rgba(14, 165, 233, .10);
  border: 1px solid rgba(56, 189, 248, .22);
  color: #bae6fd;
}

.payment-error-detail {
  background: rgba(239, 68, 68, .10);
  border-color: rgba(248, 113, 113, .24);
  color: #fecaca;
}

.payment-method-card {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin: 0 0 18px;
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(15, 23, 42, .58);
  border: 1px solid rgba(148, 163, 184, .15);
}

.payment-method-card small,
.payment-code-box small,
.payment-summary-rows span {
  color: #94a3b8;
}

.payment-method-card h2 {
  margin: 3px 0 0;
  color: #f8fafc;
  font-size: 20px;
}

.payment-method-card > span {
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(59, 130, 246, .13);
  color: #bfdbfe;
  font-size: 12px;
  font-weight: 900;
}

.payment-code-box,
.payment-qr {
  margin: 18px 0;
  padding: 22px;
  border-radius: 16px;
  background: rgba(15, 23, 42, .72);
  border: 1px solid rgba(96, 165, 250, .20);
  text-align: center;
}

.payment-code-box strong {
  display: block;
  margin: 9px 0 6px;
  color: #f8fafc;
  font-size: clamp(25px, 5vw, 36px);
  line-height: 1.15;
  letter-spacing: .045em;
  word-break: break-all;
}

.payment-code-box p,
.payment-qr p {
  margin-bottom: 0;
  color: #94a3b8;
}

.payment-qr img {
  display: block;
  width: min(280px, 100%);
  aspect-ratio: 1 / 1;
  object-fit: contain;
  margin: 0 auto 14px;
  padding: 10px;
  border-radius: 14px;
  background: #fff;
}

.payment-qr a {
  display: inline-flex;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 800;
}

.payment-instructions {
  margin-top: 26px;
}

.payment-instructions > h2 {
  margin-bottom: 13px;
  color: #f8fafc;
  font-size: 20px;
}

.payment-instruction {
  margin-bottom: 10px;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 12px;
  background: rgba(15, 23, 42, .45);
  overflow: hidden;
}

.payment-instruction summary {
  cursor: pointer;
  padding: 14px 16px;
  color: #e2e8f0;
  font-weight: 850;
}

.payment-instruction ol {
  margin: 0;
  padding: 0 34px 17px 42px;
  color: #cbd5e1;
}

.payment-instruction li + li {
  margin-top: 8px;
}

.payment-actions {
  margin-top: 24px;
}

.local-payment-summary {
  position: sticky;
  top: 106px;
  padding: 24px;
}

.local-payment-summary h2 {
  margin: 0;
  color: #f8fafc;
  font-size: 27px;
}

.payment-summary-rows {
  display: grid;
  gap: 0;
  margin: 22px 0;
  border-top: 1px solid rgba(148, 163, 184, .14);
}

.payment-summary-rows > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(148, 163, 184, .14);
}

.payment-summary-rows strong {
  max-width: 210px;
  color: #e2e8f0;
  text-align: right;
  overflow-wrap: anywhere;
}

.payment-summary-rows .payment-total-row {
  padding: 17px 0;
}

.payment-summary-rows .payment-total-row strong {
  color: #f8fafc;
  font-size: 24px;
}

.payment-success-card {
  max-width: 720px;
  margin: 56px auto;
  padding: 34px;
  text-align: center;
}

.payment-success-icon {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: rgba(16, 185, 129, .18);
  border: 1px solid rgba(52, 211, 153, .35);
  color: #6ee7b7;
  font-size: 30px;
  font-weight: 900;
}

.payment-success-card .actions {
  justify-content: center;
  margin-top: 24px;
}

@media (max-width: 820px) {
  .local-payment-page {
    grid-template-columns: 1fr;
    margin-top: 18px;
  }

  .local-payment-summary {
    position: static;
    order: -1;
  }

  .local-payment-main,
  .local-payment-summary,
  .payment-success-card {
    padding: 20px;
  }

  .payment-heading {
    display: grid;
  }

  .payment-status {
    justify-self: start;
  }

  .payment-method-card {
    align-items: flex-start;
  }

  .payment-summary-rows > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .payment-summary-rows strong {
    max-width: none;
    text-align: left;
  }

  .payment-code-box strong {
    font-size: 24px;
  }
}
