:root {
  color-scheme: dark;
  --ui-bg: #111111;
  --ui-sidebar: #111111;
  --ui-surface: #111111;
  --ui-hover: #111111;
  --ui-text: #eceef0;
  --ui-muted: #969ba2;
  --ui-border: #2b2f34;
  --ui-accent: #e3e6e9;
  --ui-accent-ink: #141618;
  --ui-disabled: #73777d;
}

:root[data-theme="light"] {
  color-scheme: light;
  --ui-bg: #f4f5f6;
  --ui-sidebar: #ffffff;
  --ui-surface: #ffffff;
  --ui-hover: #e9ecef;
  --ui-text: #1a1c1f;
  --ui-muted: #696f76;
  --ui-border: #d9dde1;
  --ui-accent: #222529;
  --ui-accent-ink: #ffffff;
  --ui-disabled: #92979d;
}

.dashboard-page {
  min-width: 320px;
  min-height: 100svh;
  overflow-x: hidden;
  background: var(--ui-bg);
  color: var(--ui-text);
  font-family: "Plus Jakarta Sans", "Manrope", sans-serif;
  transition: background-color 280ms ease, color 280ms ease;
  animation: page-enter 420ms ease both;
}

@keyframes page-enter { from { opacity: 0; } to { opacity: 1; } }

.dashboard-layout {
  display: grid;
  min-height: 100svh;
  grid-template-columns: 244px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100svh;
  flex-direction: column;
  padding: 23px 14px 18px;
  border-right: 1px solid var(--ui-border);
  background: var(--ui-sidebar);
  transition: background-color 280ms ease, border-color 280ms ease;
}

.sidebar-brand {
  display: flex;
  min-height: 62px;
  align-items: center;
  gap: 11px;
  padding: 0 10px;
  color: var(--ui-text);
}

.brand-logo {
  display: block;
  width: 42px;
  height: 30px;
  flex: 0 0 auto;
  object-fit: contain;
  object-position: center;
  transform: scale(1.35);
  filter: drop-shadow(0 3px 8px rgb(0 0 0 / 35%));
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--ui-border);
  border-radius: 5px;
  font-size: 12px;
  font-weight: 800;
}

.brand-name {
  font-size: 14px;
  font-weight: 800;
}

.brand-name b {
  color: var(--ui-muted);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 27px;
}

.nav-link {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  gap: 14px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--ui-muted);
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  text-align: left;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.nav-link svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.nav-link:hover:not(:disabled),
.nav-link:focus-visible:not(:disabled) {
  background: var(--ui-hover);
  color: var(--ui-text);
}

.nav-link:focus-visible,
.sidebar-brand:focus-visible,
.sidebar-discord:focus-visible,
.workspace-header button:focus-visible,
.server-hero a:focus-visible,
.server-controls button:focus-visible,
.connect-button:focus-visible {
  outline: 2px solid var(--ui-muted);
  outline-offset: 3px;
}

.nav-link.is-active {
  border-color: var(--ui-border);
  background: var(--ui-hover);
  color: var(--ui-text);
}

.nav-link.is-active svg {
  color: var(--ui-text);
}

.nav-link.is-unavailable {
  color: var(--ui-disabled);
  cursor: not-allowed;
  opacity: 0.56;
}

.nav-section-label {
  margin: 24px 14px 7px;
  color: var(--ui-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.sidebar-discord {
  display: flex;
  min-height: 58px;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 0 10px;
  border-top: 1px solid var(--ui-border);
  color: var(--ui-muted);
  font-size: 13px;
  font-weight: 700;
}

.discord-mark {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid var(--ui-border);
  border-radius: 6px;
  color: var(--ui-text);
  font-size: 11px;
  font-weight: 800;
}

.sidebar-discord > svg {
  width: 14px;
  height: 14px;
  margin-left: auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.dashboard-workspace {
  min-width: 0;
}

.workspace-header {
  display: flex;
  height: 68px;
  align-items: center;
  justify-content: space-between;
  padding: 0 34px;
  border-bottom: 1px solid var(--ui-border);
  transition: border-color 280ms ease;
}

.header-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-balance, .language-toggle, .notification-toggle { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--ui-border); border-radius: 7px; background: var(--ui-surface); color: var(--ui-text); cursor: pointer; font: inherit; font-size: 12px; font-weight: 800; transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease; }
.header-balance { display: none; padding: 0 6px 0 12px; border-color: #ef8d2c; color: #ef8d2c; }.header-balance.is-authenticated { display: inline-flex; }.header-balance b { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 6px; background: #ef8d2c; color: #111; font-size: 20px; line-height: 1; }.header-balance:hover, .language-toggle:hover, .notification-toggle:hover { transform: translateY(-2px); border-color: var(--ui-muted); background: var(--ui-hover); }
.test-login { display: inline-flex; min-height: 38px; align-items: center; padding: 0 11px; border: 1px solid var(--ui-border); border-radius: 6px; color: var(--ui-muted); font-size: 11px; font-weight: 700; white-space: nowrap; transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease; }.test-login:hover { border-color: var(--ui-muted); background: var(--ui-hover); color: var(--ui-text); }
.language-toggle { padding: 0 12px 0 8px; }.language-toggle img { width: 19px; height: 19px; border-radius: 50%; object-fit: cover; }.notification-toggle { width: 40px; padding: 0; color: var(--ui-muted); font-size: 16px; }
.language-menu { position: absolute; z-index: 40; top: 52px; right: 50px; display: grid; width: 225px; gap: 6px; padding: 14px; border: 1px solid var(--ui-border); border-radius: 10px; background: var(--ui-bg); box-shadow: 0 18px 60px rgb(0 0 0 / 45%); opacity: 0; pointer-events: none; transform: translateY(-8px) scale(.98); transition: opacity 180ms ease, transform 220ms cubic-bezier(.16,1,.3,1); }.language-menu.is-open { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }.language-menu strong { padding: 4px; color: var(--ui-muted); font-size: 11px; }.language-menu button { display: flex; min-height: 40px; align-items: center; gap: 9px; padding: 0 10px; border: 0; border-radius: 6px; background: var(--ui-surface); color: var(--ui-text); cursor: pointer; font: inherit; font-size: 12px; font-weight: 700; text-align: left; }.language-menu button:hover { background: var(--ui-hover); }.language-menu button img { width: 20px; height: 20px; border-radius: 50%; }

.auth-slot {
  position: relative;
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 10px;
}

.steam-login,
.auth-profile,
.auth-logout {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 0 13px;
  border: 1px solid var(--ui-border);
  border-radius: 5px;
  color: var(--ui-text);
  font-size: 12px;
  font-weight: 800;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.steam-login:hover,
.auth-profile:hover,
.auth-logout:hover {
  border-color: var(--ui-muted);
  background: var(--ui-hover);
}

.auth-user {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  max-width: 190px;
  color: var(--ui-text);
  font-size: 12px;
  font-weight: 800;
}

.auth-user img {
  width: 30px;
  height: 30px;
  border-radius: 5px;
  object-fit: cover;
}

.auth-user span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breadcrumb {
  margin: 0;
  color: var(--ui-muted);
  font-size: 11px;
  font-weight: 800;
}

.breadcrumb span {
  margin: 0 8px;
  color: var(--ui-disabled);
}

.theme-toggle {
  position: relative;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--ui-border);
  border-radius: 6px;
  background: var(--ui-surface);
  color: var(--ui-text);
  cursor: pointer;
  transition: background-color 280ms ease, border-color 280ms ease, color 280ms ease;
}

.theme-icon {
  position: absolute;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
  transition: opacity 240ms ease, transform 360ms ease;
}

.theme-icon-sun {
  opacity: 1;
  transform: rotate(0) scale(1);
}

.theme-icon-moon {
  opacity: 0;
  transform: rotate(-45deg) scale(0.5);
}

:root[data-theme="light"] .theme-icon-sun {
  opacity: 0;
  transform: rotate(45deg) scale(0.5);
}

:root[data-theme="light"] .theme-icon-moon {
  opacity: 1;
  transform: rotate(0) scale(1);
}

.dashboard-main {
  display: flex;
  min-height: calc(100svh - 68px);
  width: 100%;
  flex-direction: column;
  margin: 0 auto;
  padding: clamp(32px, 4vw, 64px) clamp(34px, 4.5vw, 88px) 28px;
}

.server-hero {
  position: relative;
  display: flex;
  min-height: clamp(340px, 30vw, 500px);
  align-items: flex-end;
  overflow: hidden;
  border: 1px solid var(--ui-border);
  border-radius: 7px;
  background: #111111;
}

.server-cover,
.server-cover-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.server-cover {
  object-fit: cover;
  object-position: center 52%;
}

.server-cover-shade {
  background: linear-gradient(90deg, rgb(10 11 12 / 90%) 0%, rgb(10 11 12 / 68%) 48%, rgb(10 11 12 / 25%) 100%), linear-gradient(0deg, rgb(10 11 12 / 65%), transparent 80%);
}

.server-hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: clamp(32px, 4vw, 64px);
  color: #f1f2f3;
}

.server-kicker {
  margin: 0;
  color: rgb(241 242 243 / 75%);
  font-size: clamp(11px, 0.78vw, 15px);
  font-weight: 800;
}

.server-title {
  margin: 12px 0 0;
  color: #f1f2f3;
  font-family: "Plus Jakarta Sans", "Manrope", sans-serif;
  font-size: clamp(36px, 3.6vw, 68px);
  font-weight: 800;
  line-height: 1.2;
}

.server-modes {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 12px 0 0;
  color: rgb(241 242 243 / 84%);
  font-size: clamp(11px, 0.78vw, 15px);
  font-weight: 700;
}

.server-modes i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #f1f2f3;
  opacity: 0.72;
}

.discord-invite {
  display: inline-block;
  margin-top: 15px;
  color: #f1f2f3;
  font-size: clamp(13px, 0.86vw, 17px);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgb(241 242 243 / 50%);
  text-underline-offset: 3px;
}

.server-controls {
  display: flex;
  min-height: clamp(96px, 8vw, 124px);
  align-items: center;
  gap: 22px;
  padding: 18px 0;
  border-bottom: 1px solid var(--ui-border);
  transition: border-color 280ms ease;
}

.live-status {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  padding-left: 22px;
  border-left: 1px solid var(--ui-border);
}

.live-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--ui-muted);
  box-shadow: 0 0 0 4px rgb(150 155 162 / 10%);
  transition: background-color 180ms ease, box-shadow 180ms ease;
}

.live-dot.is-online {
  background: #75d69b;
  box-shadow: 0 0 0 4px rgb(117 214 155 / 12%);
}

.live-dot.is-offline {
  background: #d67878;
  box-shadow: 0 0 0 4px rgb(214 120 120 / 12%);
}

.live-status-copy {
  display: flex;
  min-width: 80px;
  flex-direction: column;
  gap: 3px;
}

.live-status-copy strong {
  color: var(--ui-text);
  font-size: 14px;
  font-weight: 800;
}

.live-status-data {
  color: var(--ui-muted);
  font-family: "Plus Jakarta Sans", "Manrope", sans-serif;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.connect-button {
  display: inline-flex;
  min-height: 48px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 20px;
  border: 1px solid var(--ui-accent);
  border-radius: 5px;
  background: var(--ui-accent);
  color: var(--ui-accent-ink);
  font-size: 14px;
  font-weight: 800;
  transition: background-color 280ms ease, border-color 280ms ease, color 280ms ease, transform 150ms ease;
}

.connect-button:hover {
  transform: translateY(-1px);
}

.connect-button svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.connect-button svg circle {
  fill: var(--ui-accent);
  stroke: var(--ui-accent-ink);
  stroke-width: 1.4;
}

.server-address {
  position: relative;
  display: grid;
  min-width: 0;
  grid-template-columns: auto auto auto;
  align-items: center;
  column-gap: 12px;
}

.data-label {
  color: var(--ui-muted);
  font-size: 11px;
  font-weight: 800;
}

.server-address .data-label {
  grid-column: 1 / -1;
  margin-bottom: 5px;
}

.server-address code,
.data-value {
  color: var(--ui-text);
  font-family: "Plus Jakarta Sans", "Manrope", sans-serif;
  font-size: 16px;
  font-weight: 800;
}

.copy-button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--ui-border);
  border-radius: 4px;
  background: var(--ui-surface);
  color: var(--ui-muted);
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.copy-button:hover {
  background: var(--ui-hover);
  color: var(--ui-text);
}

.copy-button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.copy-feedback {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  color: var(--ui-muted);
  font-size: 10px;
}

.server-data {
  border-bottom: 1px solid var(--ui-border);
  transition: border-color 280ms ease;
}

.data-row {
  display: grid;
  min-height: clamp(68px, 5vw, 86px);
  grid-template-columns: minmax(190px, 20%) minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--ui-border);
  transition: border-color 280ms ease;
}

.data-row:last-child {
  border-bottom: 0;
}

.map-value {
  justify-self: start;
}

.site-footer {
  display: flex;
  min-height: 142px;
  margin-top: auto;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0;
  margin-top: auto;
  padding: 22px 24px 0;
  border-top: 1px solid var(--ui-border);
  color: var(--ui-muted);
  font-size: 12px;
  transition: color 280ms ease, border-color 280ms ease;
}

.footer-main {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(220px, 1fr) auto minmax(150px, 1fr);
  align-items: center;
  gap: 24px;
  min-height: 92px;
  padding: 20px 24px;
  border: 1px solid var(--ui-border);
  border-radius: 7px 7px 0 0;
  background: var(--ui-surface);
}

.footer-identity {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ui-text);
}

.footer-identity img {
  width: 66px;
  height: 44px;
  object-fit: contain;
  transform: scale(1.25);
  filter: drop-shadow(0 4px 10px rgb(0 0 0 / 35%));
}

.footer-identity span {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-identity strong {
  font-size: 14px;
  letter-spacing: 0.04em;
}

.footer-identity small {
  color: var(--ui-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.footer-links a {
  color: var(--ui-muted);
  font-size: 12px;
  font-weight: 700;
  transition: color 160ms ease;
}

.footer-links a:hover {
  color: var(--ui-text);
}

.footer-socials {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.social-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--ui-border);
  border-radius: 5px;
  background: var(--ui-bg);
  color: var(--ui-muted);
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.social-button:hover {
  transform: translateY(-2px);
  border-color: var(--ui-muted);
  background: var(--ui-hover);
  color: var(--ui-text);
}

.social-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.footer-bottom {
  display: flex;
  width: 100%;
  min-height: 49px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-inline: 4px;
}

.footer-credit b {
  margin-left: 3px;
  color: var(--ui-text);
  font-weight: 700;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

.legal-links a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--ui-border);
  border-radius: 5px;
  color: var(--ui-muted);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.legal-links a:hover {
  border-color: var(--ui-muted);
  background: var(--ui-hover);
  color: var(--ui-text);
}

@media (max-width: 760px) {
  .dashboard-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: relative;
    height: auto;
    padding: 12px 12px 8px;
    border-right: 0;
    border-bottom: 1px solid var(--ui-border);
  }

  .sidebar-brand {
    min-height: 48px;
  }

  .sidebar-nav {
    flex-direction: row;
    gap: 4px;
    overflow-x: auto;
    margin-top: 10px;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  .nav-link {
    width: auto;
    min-height: 42px;
    flex: 0 0 auto;
    gap: 8px;
    padding-inline: 10px;
    font-size: 12px;
  }

  .nav-link svg {
    width: 17px;
    height: 17px;
  }

  .nav-section-label {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    margin: 0 4px 0 10px;
  }

  .sidebar-discord {
    display: none;
  }

  .workspace-header {
    height: 56px;
    padding-inline: 16px;
  }

  .header-actions {
    gap: 7px;
  }

  .header-balance, .language-toggle, .notification-toggle { min-height: 34px; font-size: 10px; }.header-balance { padding-left: 8px; }.header-balance b { width: 22px; height: 22px; }.notification-toggle { width: 34px; }.language-toggle { padding-inline: 7px; }.language-menu { right: 34px; }.test-login { min-height: 34px; padding-inline: 8px; font-size: 9px; }

  .steam-login,
  .auth-logout {
    min-height: 34px;
    padding-inline: 9px;
    font-size: 10px;
  }

  .auth-user {
    max-width: 120px;
    font-size: 10px;
  }

  .theme-toggle {
    width: 36px;
    height: 36px;
  }

  .dashboard-main {
    padding: 18px 16px 12px;
  }

  .server-hero {
    min-height: 260px;
  }

  .server-hero-content {
    padding: 22px 18px;
  }

  .server-title {
    font-size: 25px;
  }

  .server-controls {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
    padding-block: 16px;
  }

  .live-status {
    width: 100%;
    min-height: 42px;
    margin-left: 0;
    padding-top: 14px;
    padding-left: 0;
    border-top: 1px solid var(--ui-border);
    border-left: 0;
  }

  .connect-button {
    width: 100%;
  }

  .server-address {
    min-height: 39px;
  }

  .data-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px 12px;
    padding-block: 13px;
  }

  .data-row .data-label {
    grid-column: 1 / -1;
  }

  .site-footer {
    min-height: 0;
    align-items: stretch;
    padding: 18px 0 0;
  }

  .footer-main {
    grid-template-columns: 1fr auto;
    gap: 15px;
    padding: 15px;
  }

  .footer-links {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    gap: 16px;
  }

  .footer-socials {
    grid-column: 2;
    grid-row: 1;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 12px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-page,
  .sidebar,
  .workspace-header,
  .theme-toggle,
  .theme-icon,
  .connect-button,
  .server-controls,
  .server-data,
  .data-row,
  .site-footer {
    scroll-behavior: auto;
    transition-duration: 0.01ms;
  }
}

.auth-balance {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 0 13px;
  border: 1px solid var(--ui-text);
  border-radius: 5px;
  background: var(--ui-text);
  color: var(--ui-bg);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  transition: transform 180ms ease, background-color 180ms ease;
}

.auth-balance:hover { transform: translateY(-1px); background: var(--ui-muted); }
.modal-is-open { overflow: hidden; }

.balance-modal { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; visibility: hidden; opacity: 0; transition: opacity 220ms ease, visibility 220ms ease; }
.balance-modal.is-open { visibility: visible; opacity: 1; }
.balance-modal-backdrop { position: absolute; inset: 0; background: rgb(0 0 0 / 76%); backdrop-filter: blur(8px); }
.balance-dialog { position: relative; width: min(840px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; padding: 30px; border: 1px solid var(--ui-border); border-radius: 12px; background: var(--ui-bg); color: var(--ui-text); box-shadow: 0 28px 100px rgb(0 0 0 / 55%); transform: translateY(16px) scale(0.97); transition: transform 260ms cubic-bezier(.16,1,.3,1); will-change: transform, opacity; }
.balance-modal.is-open .balance-dialog { transform: translateY(0) scale(1); }
.balance-close { position: absolute; top: 14px; right: 16px; width: 32px; height: 32px; border: 0; background: transparent; color: var(--ui-muted); cursor: pointer; font-size: 27px; line-height: 1; }
.balance-header { padding-right: 36px; }
.balance-eyebrow, .balance-label { margin: 0 0 8px; color: var(--ui-muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.balance-eyebrow span { margin: 0 6px; color: var(--ui-disabled); }
.balance-header h2 { margin: 0; font-family: "Plus Jakarta Sans", sans-serif; font-size: clamp(24px, 3vw, 34px); font-weight: 800; }
.balance-header p:last-child { margin: 8px 0 24px; color: var(--ui-muted); font-size: 13px; }
.balance-layout { display: grid; grid-template-columns: minmax(230px, .8fr) minmax(0, 1.2fr); gap: 24px; }
.payment-methods { display: grid; align-content: start; gap: 10px; padding-right: 24px; border-right: 1px solid var(--ui-border); }
.payment-method { position: relative; display: grid; min-height: 104px; grid-template-columns: 78px 1fr 22px; align-items: center; gap: 12px; padding: 16px; border: 1px solid var(--ui-border); border-radius: 9px; background: var(--ui-surface); color: var(--ui-text); cursor: pointer; text-align: left; transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease; }
.payment-method:hover, .payment-method.is-selected { border-color: var(--ui-muted); background: var(--ui-hover); transform: translateY(-2px); }
.payment-method img { width: 70px; max-height: 42px; object-fit: contain; }
.payment-method span { display: flex; flex-direction: column; gap: 4px; }
.payment-method strong { font-size: 16px; font-weight: 800; }
.payment-method small { color: var(--ui-muted); font-size: 10px; }
.payment-method i { display: grid; width: 20px; height: 20px; place-items: center; border: 1px solid var(--ui-border); border-radius: 50%; color: transparent; font-style: normal; }
.payment-method.is-selected i { border-color: var(--ui-accent); background: var(--ui-accent); color: var(--ui-accent-ink); }
.payment-selected { display: flex; min-height: 58px; align-items: center; justify-content: space-between; margin-bottom: 18px; padding: 0 15px; border: 1px solid var(--ui-border); border-radius: 7px; background: var(--ui-surface); }
.payment-selected .balance-label { margin: 0; }
.payment-selected strong { font-size: 16px; }
.amount-presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 18px; }
.amount-presets button { min-height: 40px; border: 1px solid var(--ui-border); border-radius: 5px; background: var(--ui-surface); color: var(--ui-text); cursor: pointer; font: inherit; font-size: 12px; font-weight: 700; transition: border-color 180ms ease, background-color 180ms ease; }
.amount-presets button:hover, .amount-presets button.is-selected { border-color: var(--ui-text); background: var(--ui-hover); }
.amount-input-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.amount-input-wrap { display: flex; min-width: 170px; align-items: center; border: 1px solid var(--ui-border); border-radius: 5px; background: var(--ui-surface); }
.amount-input-wrap input { width: 100%; min-height: 40px; padding: 0 12px; border: 0; outline: 0; background: transparent; color: var(--ui-text); font: inherit; font-size: 13px; }
.amount-input-wrap b { padding-right: 12px; color: var(--ui-muted); }
.agreement { display: flex; align-items: center; gap: 9px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--ui-border); color: var(--ui-muted); font-size: 12px; }
.agreement input { appearance: none; display: grid; width: 20px; height: 20px; flex: 0 0 auto; place-items: center; border: 1px solid var(--ui-border); border-radius: 5px; background: var(--ui-surface); cursor: pointer; transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease; }
.agreement input::before { content: "✓"; color: var(--ui-accent-ink); font-size: 14px; font-weight: 900; transform: scale(0); transition: transform 180ms cubic-bezier(.16,1,.3,1); }
.agreement input:checked { transform: scale(1.04); border-color: var(--ui-accent); background: var(--ui-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ui-accent) 13%, transparent); }
.agreement input:checked::before { transform: scale(1); }
.agreement input:focus-visible { outline: 2px solid var(--ui-muted); outline-offset: 3px; }
.agreement a { color: var(--ui-text); text-decoration: underline; }
.balance-submit { width: 100%; min-height: 44px; margin-top: 16px; border: 0; border-radius: 5px; background: var(--ui-accent); color: var(--ui-accent-ink); cursor: pointer; font: inherit; font-size: 13px; font-weight: 800; transition: opacity 180ms ease, transform 180ms ease; }
.balance-submit:hover:not(:disabled) { transform: translateY(-1px); }
.balance-submit:disabled { cursor: not-allowed; opacity: .35; }
.payment-hint { margin: 12px 0 0; color: var(--ui-muted); font-size: 10px; line-height: 1.5; text-align: center; }

@media (max-width: 700px) {
  .auth-balance { padding-inline: 9px; font-size: 10px; }
  .balance-dialog { padding: 22px 18px; }
  .balance-layout { grid-template-columns: 1fr; gap: 20px; }
  .payment-methods { padding-right: 0; border-right: 0; }
  .payment-method { min-height: 76px; }
  .amount-presets { grid-template-columns: repeat(4, 1fr); }
}

.auth-avatar-button { display: grid; width: 42px; height: 42px; padding: 3px; place-items: center; border: 1px solid var(--ui-border); border-radius: 8px; background: var(--ui-surface); cursor: pointer; transition: transform 180ms ease, border-color 180ms ease; }
.auth-avatar-button:hover { transform: translateY(-2px); border-color: var(--ui-muted); }
.auth-avatar-button img { width: 34px; height: 34px; border-radius: 5px; object-fit: cover; }
.profile-menu { position: absolute; z-index: 30; top: 52px; right: 0; display: grid; width: 245px; gap: 5px; padding: 15px; border: 1px solid var(--ui-border); border-radius: 9px; background: var(--ui-bg); box-shadow: 0 18px 60px rgb(0 0 0 / 45%); opacity: 0; pointer-events: none; transform: translateY(-8px) scale(.98); transition: opacity 180ms ease, transform 220ms cubic-bezier(.16,1,.3,1); }
.profile-menu.is-open { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }
.profile-menu-head { display: grid; gap: 5px; padding: 3px 4px 12px; border-bottom: 1px solid var(--ui-border); }.profile-menu-head strong { overflow: hidden; color: var(--ui-text); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }.profile-menu-head span { color: var(--ui-muted); font-size: 11px; }
.profile-menu a, .profile-menu button { min-height: 38px; padding: 0 10px; border: 0; border-radius: 5px; background: transparent; color: var(--ui-muted); cursor: pointer; font: inherit; font-size: 12px; font-weight: 700; text-align: left; }.profile-menu a:hover, .profile-menu button:hover { background: var(--ui-hover); color: var(--ui-text); }.profile-menu button[data-open-balance] { background: var(--ui-accent); color: var(--ui-accent-ink); text-align: center; }