@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/admin/Inter-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Phosphor";
  font-style: normal;
  font-weight: normal;
  font-display: block;
  src: url("/fonts/admin/Phosphor.woff2") format("woff2");
}

.ph {
  font-family: "Phosphor" !important;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.ph.ph-caret-left:before {
  content: "\e138";
}

.ph.ph-caret-right:before {
  content: "\e13a";
}

.ph.ph-chart-line-up:before {
  content: "\e156";
}

.ph.ph-clock-counter-clockwise:before {
  content: "\e1a0";
}

.ph.ph-credit-card:before {
  content: "\e1d2";
}

.ph.ph-currency-circle-dollar:before {
  content: "\e54c";
}

.ph.ph-eye:before {
  content: "\e220";
}

.ph.ph-funnel:before {
  content: "\e266";
}

.ph.ph-list-magnifying-glass:before {
  content: "\ebe0";
}

.ph.ph-pencil-simple:before {
  content: "\e3b4";
}

.ph.ph-toggle-left:before {
  content: "\e674";
}

.ph.ph-users:before {
  content: "\e4d6";
}

.ph.ph-x:before {
  content: "\e4f6";
}

.ph.ph-check-circle:before {
  content: "\e184";
}

.ph.ph-plus:before {
  content: "\e3d4";
}

.ph.ph-trash:before {
  content: "\e4a6";
}

:root {
  --primary-color: #2563eb;
  --primary-hover-color: #1d4ed8;
  --danger-color: #dc2626;
  --success-color: #059669;
  --warning-color: #b45309;
  --secondary-color: #6c757d;
  --dark-color: #212529;
  --light-color: #f8f9fa;
  --white-color: #ffffff;
  --text-color: #495057;
  --border-color: #dee2e6;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  --font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --landing-dark-color: #263340;
  --page-max-width: 1400px;
  --page-inline-gutter: clamp(1rem, 3vw, 2rem);
  --control-height: 48px;
}

html.dark-mode {
  --primary-color: #60a5fa;
  --primary-hover-color: #93c5fd;
  --danger-color: #f87171;
  --success-color: #34d399;
  --warning-color: #fbbf24;
  --secondary-color: #a0a7b0;
  --dark-color: #f0f2f5;
  --light-color: #252a32;
  --white-color: #191e25;
  --text-color: #c9ced3;
  --border-color: #38404b;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
  font-size: 16px;
  scrollbar-gutter: stable;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--white-color);
  color: var(--text-color);
  font-family: var(--font-family);
  line-height: 1.6;
}

main {
  flex: 1;
}

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

a:where(:not(.button)):hover {
  color: var(--primary-hover-color);
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

img {
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  color: var(--dark-color);
  line-height: 1.2;
  font-weight: 700;
}

h1 {
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  letter-spacing: -0.035em;
}

h2 {
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

h3 {
  font-size: 1.05rem;
}

p {
  overflow-wrap: anywhere;
}

code,
pre,
.mono {
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}

code {
  font-size: 0.85em;
  overflow-wrap: anywhere;
}

fieldset {
  min-width: 0;
  border: 0;
}

:focus-visible {
  outline: 3px solid var(--primary-color);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.container {
  width: 100%;
  max-width: calc(var(--page-max-width) + var(--page-inline-gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--page-inline-gutter);
}

.page-wrapper {
  padding-block: 2.7rem 4rem;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 100;
  transform: translateY(-200%);
  background: var(--primary-color);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 8px;
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.muted,
small {
  color: var(--secondary-color);
}

small {
  font-size: 0.8rem;
}

.full-width {
  width: 100%;
}

.text-danger {
  color: var(--danger-color) !important;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: var(--control-height);
  padding: 0.65rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1.3;
  text-decoration: none;
  transition:
    background-color 0.15s,
    border-color 0.15s;
}

.button:hover {
  text-decoration: none;
}

.button--primary {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.button--primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

.button--outline {
  background: var(--white-color);
  border-color: var(--border-color);
  color: var(--dark-color);
}

.button--outline:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.button--small {
  min-height: 38px;
  padding: 0.45rem 0.85rem;
  font-size: 0.8rem;
}

.button--icon {
  width: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--secondary-color);
  font-size: 1.05rem;
  line-height: 1;
}

.button--icon:hover {
  background: var(--light-color);
  border-color: var(--border-color);
  color: var(--primary-color);
}

.button--icon.text-danger:hover {
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.24);
}

.text-button {
  background: none;
  border: 0;
  color: var(--text-color);
  padding: 0.5rem 0;
  font-size: 0.82rem;
  font-weight: 600;
}

.text-button:hover {
  color: var(--primary-hover-color);
}

.header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--white-color);
  transition: box-shadow 0.3s;
}

.header.scroll-header {
  box-shadow: 0 1px 4px hsla(210, 40%, 15%, 0.1);
}

html.dark-mode .header.scroll-header {
  box-shadow: 0 1px 4px hsla(210, 40%, 15%, 0.4);
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  min-height: 78px;
}

.nav__logo,
.auth-brand__logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
  text-decoration: none;
}

.nav__logo img {
  width: 120px;
  height: 40px;
  object-fit: contain;
}

.brand-tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid currentColor;
  border-radius: 5px;
  font-size: 0.65rem;
  font-weight: 750;
  line-height: 1;
  padding: 0.3rem 0.35rem;
  letter-spacing: 0.07em;
  color: var(--primary-color);
}

.logo-dark {
  display: none;
}

.dark-mode .logo-light {
  display: none;
}

.dark-mode .logo-dark {
  display: block;
}

.nav__menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2.5rem;
  flex: 1;
}

.nav__list,
.nav__actions {
  display: flex;
  align-items: center;
}

.nav__list {
  gap: 2rem;
  list-style: none;
}

.nav__actions {
  gap: 1rem;
}

.nav__link {
  color: var(--dark-color);
  font-size: 1rem;
  font-weight: 500;
  white-space: nowrap;
}

.nav__link[aria-current="page"] {
  color: var(--primary-color);
}

.nav__link:hover {
  color: var(--primary-hover-color);
}

.nav__balance-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
  transition:
    background-color 0.3s,
    border-color 0.3s,
    color 0.3s;
}

.nav__balance-pill:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
  text-decoration: none;
}

.nav__balance-plus {
  font-size: 0.85rem;
  opacity: 0.75;
}

.nav__toggle {
  display: none;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-color);
  background: transparent;
  padding: 0.5rem 0.75rem;
}

.nav__account {
  position: relative;
}

.nav__account:has(.nav__account-trigger[aria-expanded="true"]) {
  z-index: 2;
}

.nav__account-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 44px;
  padding: 0.25rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-color);
}

.nav__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.18);
  color: var(--dark-color);
  font-size: 0.8125rem;
  font-weight: 600;
}

.nav__account-trigger:hover .nav__avatar,
.nav__account-trigger[aria-expanded="true"] .nav__avatar {
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary-color);
}

.nav__account-caret {
  width: 0.8rem;
  height: 0.8rem;
  transition: transform 0.2s;
}

.nav__account-trigger[aria-expanded="true"] .nav__account-caret {
  transform: rotate(180deg);
}

body.has-header-menu-open .header::after {
  content: "";
  position: fixed;
  inset: 0;
  height: 100vh;
  height: 100dvh;
  background: rgba(15, 23, 42, 0.25);
  z-index: 1;
}

.nav__account-menu {
  position: absolute;
  top: calc(100% + 0.65rem);
  right: 0;
  width: 15rem;
  max-width: calc(100vw - var(--page-inline-gutter) * 2);
  max-height: calc(100dvh - 6rem);
  overflow-y: auto;
  padding: 0.4rem;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--white-color);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.nav__account-identity {
  padding: 0.5rem 0.75rem 0.65rem;
}

.nav__account-name,
.nav__account-email {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav__account-name {
  color: var(--dark-color);
  font-size: 0.875rem;
  font-weight: 600;
}

.nav__account-email {
  color: var(--secondary-color);
  font-size: 0.8125rem;
}

.nav__account-balance {
  display: none;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: 44px;
  margin: 0 0.35rem 0.35rem;
  padding: 0.6rem 0.75rem;
  border-radius: 6px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary-color);
  font-size: 0.8125rem;
}

.nav__account-balance strong {
  font-size: 0.875rem;
  white-space: nowrap;
}

.nav__account-primary {
  display: none;
}

.nav__account-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  min-height: 40px;
  padding: 0.55rem 0.75rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--dark-color);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.5;
  text-align: left;
}

.nav__account-item svg {
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
  color: var(--secondary-color);
}

.nav__account-item:hover {
  background: rgba(148, 163, 184, 0.16);
  color: var(--primary-color);
}

.nav__account-item:hover svg {
  color: inherit;
}

.nav__account-item--danger,
.nav__account-item--danger:hover {
  color: var(--danger-color);
}

.nav__account-item--danger:hover {
  background: rgba(220, 38, 38, 0.1);
}

.nav__account-divider {
  height: 1px;
  margin: 0.35rem 0.4rem;
  background: var(--border-color);
}

.footer {
  margin-top: auto;
  background: var(--light-color);
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-bottom: 2rem;
}

.footer__brand {
  color: var(--dark-color);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer__inner p {
  font-size: 0.83rem;
  margin-top: 0.25rem;
  color: var(--secondary-color);
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.3rem;
}

.footer__links a {
  font-size: 0.82rem;
  color: var(--text-color);
}

.footer__links a:hover {
  color: var(--primary-hover-color);
}

.footer__copy {
  border-top: 1px solid var(--border-color);
  padding-block: 1.1rem;
  color: var(--secondary-color);
  font-size: 0.75rem;
  text-align: center;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.dashboard-header p {
  margin-top: 0.5rem;
  color: var(--secondary-color);
}

.card {
  min-width: 0;
  padding: 1.65rem;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--white-color);
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}

.card > h2 + p,
.card-description {
  margin-top: 0.6rem;
  margin-bottom: 1.2rem;
  color: var(--secondary-color);
  font-size: 0.9rem;
}

.card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1.35rem;
}

.card-heading > a {
  font-size: 0.83rem;
  font-weight: 600;
}

.card-heading p {
  font-size: 0.88rem;
  margin-top: 0.5rem;
  color: var(--secondary-color);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
  margin-bottom: 1.7rem;
}

.stat-card {
  display: grid;
  gap: 0.3rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--white-color);
  box-shadow: var(--shadow);
}

.stat-card > span {
  color: var(--secondary-color);
  font-size: 0.82rem;
  font-weight: 600;
}

.stat-card > strong {
  font-size: clamp(1.5rem, 2.3vw, 2rem);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--dark-color);
}

.stat-card > a,
.stat-card > small {
  font-size: 0.78rem;
  margin-top: 0.15rem;
}

.stat-card--accent {
  border-color: rgba(37, 99, 235, 0.3);
  background: rgba(37, 99, 235, 0.035);
}

.stat-card--accent > strong {
  color: var(--primary-color);
}

.alert {
  padding: 0.9rem 1.1rem;
  border: 1px solid;
  border-radius: 8px;
  margin-bottom: 1.35rem;
  font-size: 0.87rem;
}

.alert a {
  color: inherit;
  font-weight: 650;
}

.alert a:hover {
  color: var(--primary-hover-color);
}

.alert--info {
  background: rgba(37, 99, 235, 0.055);
  border-color: rgba(37, 99, 235, 0.2);
  color: var(--primary-color);
}

.alert--success {
  background: rgba(5, 150, 105, 0.06);
  border-color: rgba(5, 150, 105, 0.22);
  color: var(--success-color);
}

.alert--danger {
  background: rgba(220, 38, 38, 0.05);
  border-color: rgba(220, 38, 38, 0.22);
  color: var(--danger-color);
}

.alert--warning {
  background: rgba(180, 83, 9, 0.06);
  border-color: rgba(180, 83, 9, 0.2);
  color: var(--warning-color);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.55rem;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.5;
  white-space: nowrap;
}

.badge--success {
  background: rgba(5, 150, 105, 0.09);
  color: var(--success-color);
}

.badge--danger {
  background: rgba(220, 38, 38, 0.08);
  color: var(--danger-color);
}

.badge--neutral {
  background: var(--light-color);
  color: var(--secondary-color);
  border: 1px solid var(--border-color);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
  text-align: left;
}

th {
  padding: 0.7rem 0.75rem;
  color: var(--secondary-color);
  font-weight: 600;
  font-size: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--light-color);
  white-space: nowrap;
}

td {
  padding: 1rem 0.75rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: 0;
}

.id-value {
  display: block;
  font-size: 0.72rem;
  white-space: nowrap;
  overflow-wrap: normal;
}

.table-action-cell {
  width: 1%;
  text-align: center;
  white-space: nowrap;
}

.table-wrap time {
  white-space: nowrap;
}

.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--secondary-color);
}

.empty-state__symbol {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  margin: 0 auto 1rem;
  background: var(--light-color);
  border-radius: 12px;
  font-size: 1.5rem;
}

.empty-state h3,
.empty-state h2 {
  margin-bottom: 0.5rem;
}

.empty-state p {
  font-size: 0.88rem;
  margin: 0 auto 1.4rem;
  max-width: 38rem;
}

.empty-state .badge {
  margin-bottom: 1.2rem;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.85rem;
}

.form-grid,
.auth-form {
  display: grid;
  gap: 1.1rem;
}

.form-grid {
  margin-top: 1.3rem;
}

.form-grid > .button {
  justify-self: start;
}

.form-grid--inline {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.ash-form-row {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}

.ash-form-row label {
  color: var(--dark-color);
  font-size: 0.85rem;
  font-weight: 600;
}

input:not([type="checkbox"]):not([type="radio"]),
textarea,
select {
  width: 100%;
  min-height: var(--control-height);
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: 7px;
  background: var(--white-color);
  color: var(--dark-color);
  font-size: 0.88rem;
}

input[readonly],
textarea[readonly] {
  background: var(--light-color) !important;
}

input::placeholder,
textarea::placeholder {
  color: var(--secondary-color);
  opacity: 0.8;
}

input:focus,
textarea:focus,
select:focus {
  outline: 0;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

textarea {
  resize: vertical;
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: #2563eb;
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.checkbox-row {
  display: flex;
  align-items: start;
  gap: 0.7rem;
  font-size: 0.85rem;
  line-height: 1.5;
}

.checkbox-row input {
  margin-top: 0.15rem;
}

.copy-field {
  display: flex;
  gap: 0.7rem;
  margin-top: 1.2rem;
}

.copy-field input {
  flex: 1;
  min-width: 0;
}

.copy-field button {
  flex-shrink: 0;
}

.secret-card {
  border-color: var(--success-color);
}

.secret-card h2 {
  margin-top: 1rem;
}

.profile-header {
  text-align: center;
  margin-bottom: 3rem;
}

.profile-header p {
  margin-top: 0.75rem;
  color: var(--secondary-color);
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  align-items: start;
  gap: 1.5rem;
}

.profile-column {
  display: grid;
  gap: 1.5rem;
  min-width: 0;
}

.profile-column > .card {
  margin-bottom: 0;
  border-radius: 12px;
  padding: 1.5rem;
}

.profile-section-title {
  padding-bottom: 0.6rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 1.2rem;
}

.profile-form {
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.profile-form > .button {
  justify-self: stretch;
}

.profile-form .ash-form-row {
  position: relative;
}

.profile-form .ash-form-row > label {
  position: absolute;
  top: -0.65rem;
  left: 0.75rem;
  padding-inline: 0.3rem;
  background: var(--white-color);
  color: var(--secondary-color);
  font-size: 0.75rem;
}

.profile-form input {
  background: var(--light-color);
}

.profile-access .card-heading {
  flex-direction: column;
  gap: 0.75rem;
  text-align: center;
}

.profile-access__icon {
  font-size: 3rem;
  color: var(--warning-color);
}

.profile-access__icon--approved {
  color: var(--success-color);
}

.profile-access > p {
  color: var(--secondary-color);
  text-align: center;
}

.profile-access .form-grid > .button {
  width: 100%;
}

.profile-terms > p {
  margin-bottom: 1rem;
}

.preference-switcher {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: var(--light-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--dark-color);
  font-weight: 600;
  cursor: pointer;
}

.switch {
  position: relative;
  display: inline-block;
  flex: 0 0 60px;
  height: 34px;
}

.switch input[type="checkbox"] {
  position: absolute;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  z-index: 1;
  cursor: pointer;
}

.slider {
  position: absolute;
  inset: 0;
  border-radius: 34px;
  background: #ccc;
  transition: background-color 0.2s;
}

.slider::before {
  content: "";
  position: absolute;
  width: 26px;
  height: 26px;
  left: 4px;
  bottom: 4px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
}

.switch input:checked + .slider {
  background: var(--primary-color);
}

.switch input:checked + .slider::before {
  transform: translateX(26px);
}

.switch input:focus-visible + .slider {
  outline: 3px solid var(--primary-color);
  outline-offset: 3px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 1.5rem;
}

.detail-grid dt {
  font-size: 0.77rem;
  color: var(--secondary-color);
  margin-bottom: 0.4rem;
}

.detail-grid dd {
  font-size: 0.85rem;
  color: var(--dark-color);
  overflow-wrap: anywhere;
}

.json-result {
  background: #202d3b;
  color: #e2e8f0;
  border-radius: 8px;
  padding: 1.5rem;
  overflow: auto;
  max-height: 700px;
  font-size: 0.9rem;
  line-height: 1.75;
  tab-size: 2;
}

.json-result code {
  white-space: pre;
  overflow-wrap: normal;
}

.balance-page {
  max-width: 1150px;
}

.balance-current {
  display: grid;
  text-align: right;
}

.balance-current span {
  font-size: 0.8rem;
  color: var(--secondary-color);
}

.balance-current strong {
  font-size: 1.7rem;
  color: var(--primary-color);
}

.balance-selector-card {
  border-top: 3px solid #2563eb;
}

.packages-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.9rem;
}

.package-option {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  position: relative;
  padding: 1.25rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
}

.package-option:has(input:checked) {
  background: rgba(37, 99, 235, 0.04);
  border-color: var(--primary-color);
  box-shadow: 0 0 0 1px var(--primary-color);
}

.package-option strong {
  font-size: 1.25rem;
  color: var(--dark-color);
  white-space: nowrap;
}

.package-option small {
  display: block;
  font-size: 0.7rem;
}

.balance-checkout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 0.7rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.balance-checkout p {
  font-size: 0.8rem;
  max-width: 26rem;
  color: var(--secondary-color);
}

.error-page {
  display: grid;
  align-items: center;
  min-height: 60vh;
}

.error-card {
  text-align: center;
  max-width: 650px;
  margin: 2rem auto;
}

.error-code {
  font-size: clamp(5rem, 13vw, 8rem);
  font-weight: 750;
  color: var(--primary-color);
  letter-spacing: -0.08em;
  line-height: 1;
  margin-bottom: 1.5rem;
}

.error-card p:not(.error-code) {
  margin: 1.2rem auto;
}

.error-card .button {
  margin-top: 0.5rem;
}

body.modal-open {
  overflow: hidden;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1260;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 1rem;
  border: 0;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  color: var(--text-color);
  font-family: var(--font-family);
  font-size: 1rem;
}

.modal:not([open]) {
  display: none;
}

.modal::backdrop {
  background: transparent;
}

.modal-content {
  position: relative;
  width: min(92vw, 32rem);
  max-width: 500px;
  max-height: calc(100dvh - 2rem);
  padding: 2rem;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  background: var(--white-color);
  box-shadow: 0 4px 12px rgba(23, 38, 54, 0.12);
  text-align: center;
  animation: modal-fade-in 0.3s ease-out;
}

.modal-content--form {
  width: min(92vw, 680px);
  max-width: 680px;
}

.modal-content--wide {
  width: min(92vw, 980px);
  max-width: 980px;
}

.modal-content h3 {
  margin: 0 0 1rem;
  padding-inline: 1.5rem;
  color: var(--dark-color);
  font-size: 1.5rem;
  line-height: 1.3;
}

.modal-content > p {
  margin-bottom: 1.5rem;
}

.modal-header {
  margin-bottom: 1.5rem;
}

.modal-header h3 {
  margin-bottom: 0.25rem;
}

.modal-subtitle {
  color: var(--secondary-color);
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}

.modal-body {
  min-height: 0;
  text-align: left;
}

.modal-body > :last-child {
  margin-bottom: 0;
}

.close-modal {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--secondary-color);
  font-size: 1.5rem;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.close-modal:hover {
  background: var(--light-color);
  color: var(--dark-color);
  text-decoration: none;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 2rem;
}

.modal-actions > .button {
  flex: 1 1 auto;
}

.modal-actions .button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

@keyframes modal-fade-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  background: var(--dark-color);
  color: var(--white-color);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 0.9rem 1.25rem;
  font-size: 0.85rem;
  width: max-content;
  max-width: calc(100vw - 2rem);
}

@media (max-width: 1200px) {
  .nav {
    gap: 1.25rem;
  }

  .nav__list,
  .nav__actions {
    gap: 0.85rem;
  }

  .nav__menu {
    gap: 1rem;
  }

  .packages-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1000px) {
  .nav {
    justify-content: space-between;
    min-height: 70px;
  }

  .nav__toggle {
    display: inline-flex;
  }

  .nav__menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--white-color);
    box-shadow: var(--shadow);
  }

  .nav__menu.is-open,
  .nav__list,
  .nav__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .nav__menu.is-open {
    display: flex;
  }

  .nav__actions {
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
  }

  .nav__balance-pill {
    align-self: start;
  }

  .nav__link {
    display: inline-block;
    padding-block: 0.35rem;
  }

  .nav__menu--account {
    display: flex;
    position: static;
    margin-left: auto;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .nav__menu--account > .nav__list,
  .nav__menu--account .nav__balance-pill,
  .nav__account-item--desktop {
    display: none;
  }

  .nav__menu--account > .nav__actions {
    flex-direction: row;
    align-items: center;
    padding-top: 0;
    border-top: 0;
  }

  .nav__account-menu {
    width: 16rem;
  }

  .nav__account-balance {
    display: flex;
  }

  .nav__account-primary {
    display: block;
  }

  .nav__account-item {
    min-height: 44px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 904px) {
  .modal {
    padding: max(0.75rem, env(safe-area-inset-top)) 0.75rem max(0.75rem, env(safe-area-inset-bottom));
  }

  .modal-content {
    width: 100%;
    max-height: calc(100dvh - 1.5rem - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    padding: 1.1rem 1rem calc(1rem + env(safe-area-inset-bottom));
    border-radius: 1.25rem;
  }

  .modal-content h3 {
    margin-bottom: 0.65rem;
    padding-inline: 2.25rem;
    font-size: clamp(1.25rem, 6vw, 1.65rem);
    line-height: 1.2;
  }

  .modal-content > p {
    margin-bottom: 0.95rem;
    font-size: 0.98rem;
    line-height: 1.45;
  }

  .close-modal {
    top: 0.45rem;
    right: 0.45rem;
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.45rem;
  }

  .modal-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.625rem;
    margin-top: 1rem;
  }

  .modal-actions .button {
    width: 100%;
    min-height: 2.85rem;
  }
}

@media (max-width: 720px) {
  .page-wrapper {
    padding-top: 1.75rem;
  }

  .dashboard-header {
    align-items: start;
    margin-bottom: 1.5rem;
  }

  .profile-layout,
  .form-grid--inline {
    grid-template-columns: 1fr;
  }

  .form-grid--inline > .button {
    justify-self: stretch;
  }

  .profile-header {
    margin-bottom: 2rem;
  }

  .profile-column > .card {
    padding: 1.2rem;
  }

  .preference-switcher {
    padding: 1rem;
  }

  .card {
    padding: 1.2rem;
  }

  .stats-grid {
    gap: 0.8rem;
  }

  .stat-card {
    padding: 0.9rem 1rem;
  }

  .stat-card > span {
    font-size: 0.75rem;
  }

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

  .footer__links {
    gap: 0.75rem 1rem;
  }

  .detail-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .copy-field {
    flex-direction: column;
  }

  .packages-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem;
  }

  .package-option {
    padding: 1rem 0.75rem;
    gap: 0.5rem;
  }

  .package-option strong {
    font-size: 1.1rem;
  }

  .balance-checkout {
    align-items: stretch;
    flex-direction: column;
    gap: 1rem;
  }

  .balance-current {
    text-align: left;
  }

  .json-result {
    padding: 1rem;
    font-size: 0.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }

  .modal-content {
    animation: none;
  }
}
