:root {
    color-scheme: light;
    --ink: #202437;
    --muted: #7b7d91;
    --violet: #8b35ff;
    --violet-deep: #5c25de;
    --pink: #f1a8ff;
    --blue: #82b7ff;
    --stroke: rgba(255,255,255,.86);
}

html[data-theme="dark"] {
    color-scheme: dark;
    --ink: #f5f1fa;
    --muted: rgba(245,241,250,.62);
    --violet: #b990ff;
    --violet-deep: #c6a7ff;
    --pink: #f19dff;
    --blue: #9fc5ff;
    --stroke: rgba(255,255,255,.13);
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    position: fixed;
    inset: 0;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 50% 7%, rgba(255,255,255,.98), rgba(255,255,255,.6) 28%, transparent 52%),
        radial-gradient(circle at 16% 86%, rgba(138,168,255,.12), transparent 32%),
        radial-gradient(circle at 88% 82%, rgba(231,139,255,.12), transparent 36%),
        linear-gradient(180deg, #fbfcff 0%, #f6f7fb 58%, #f2f3f8 100%);
}

html[data-theme="dark"] body {
    background:
        radial-gradient(circle at 50% 7%, rgba(94,69,138,.25), rgba(35,28,48,.36) 28%, transparent 52%),
        radial-gradient(circle at 16% 86%, rgba(123,77,244,.16), transparent 32%),
        radial-gradient(circle at 88% 82%, rgba(238,104,197,.13), transparent 36%),
        linear-gradient(180deg, #0d0b12 0%, #15111d 100%);
}

button,
input,
a {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
}

.login-shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-rows: auto auto auto;
    align-content: center;
    justify-items: center;
    height: 100%;
    width: min(100%, 760px);
    margin: 0 auto;
    padding: 24px 20px;
}

.brand {
    text-align: center;
    margin-bottom: 18px;
}

.brand-mark {
    display: block;
    width: 210px;
    height: 210px;
    object-fit: contain;
    margin: 0 auto 8px;
    filter: drop-shadow(0 18px 38px rgba(118,49,255,.24));
}

.brand h1 {
    margin: 0;
    font-size: 44px;
    letter-spacing: .22em;
    font-weight: 520;
}

.brand p {
    margin: 12px 0 0;
    color: var(--violet-deep);
    font-size: 25px;
}

html[data-theme="dark"] .brand-mark {
    filter: drop-shadow(0 18px 38px rgba(155,103,255,.30));
}

.glass-card {
    width: 100%;
    border: 1px solid var(--stroke);
    border-radius: 46px;
    background:
        linear-gradient(145deg, rgba(255,255,255,.76), rgba(255,255,255,.34)),
        radial-gradient(circle at 18% 0%, rgba(255,255,255,.72), transparent 38%);
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,.56),
        inset 0 -28px 70px rgba(147,92,255,.12),
        0 28px 80px rgba(85,46,160,.18);
    backdrop-filter: blur(30px) saturate(150%);
    -webkit-backdrop-filter: blur(30px) saturate(150%);
}

html[data-theme="dark"] .glass-card {
    background:
        linear-gradient(145deg, rgba(43,35,54,.76), rgba(34,28,43,.36)),
        radial-gradient(circle at 18% 0%, rgba(255,255,255,.12), transparent 38%);
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,.08),
        inset 0 -28px 70px rgba(147,92,255,.10),
        0 28px 80px rgba(0,0,0,.34);
}

.login-card {
    max-width: 620px;
    padding: 34px 44px;
    text-align: center;
}

.login-card h2 {
    margin: 0;
    font-size: 42px;
    letter-spacing: 0;
}

.login-card > p {
    margin: 10px 0 24px;
    color: var(--muted);
    font-size: 23px;
}

.telegram-button,
.email-button,
.register-toggle,
.email-panel button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    width: 100%;
    min-height: 70px;
    border-radius: 31px;
    text-decoration: none;
    font-size: 24px;
    font-weight: 740;
}

.telegram-button {
    position: relative;
    color: #fff;
    border: 1px solid rgba(255,255,255,.62);
    background:
        linear-gradient(135deg, rgba(255,255,255,.35), transparent 44%),
        linear-gradient(135deg, #d77bff 0%, #7a2fff 42%, #5d24dc 100%);
    box-shadow:
        inset 0 0 0 3px rgba(255,255,255,.18),
        inset 0 -16px 36px rgba(51,16,137,.38),
        0 18px 34px rgba(103,42,222,.32);
}

.telegram-icon {
    transform: rotate(-18deg);
    font-size: 31px;
}

.divider {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 22px;
    margin: 22px 6px;
    color: var(--muted);
    font-size: 20px;
}

.divider::before,
.divider::after {
    content: "";
    height: 1px;
    background: rgba(130,128,160,.34);
}

.email-button {
    color: var(--ink);
    border: 1px solid rgba(255,255,255,.86);
    background: rgba(255,255,255,.38);
    box-shadow:
        inset 0 0 0 2px rgba(255,255,255,.54),
        0 14px 36px rgba(84,68,150,.08);
}

html[data-theme="dark"] .email-button,
html[data-theme="dark"] .login-panel,
html[data-theme="dark"] .tabs,
html[data-theme="dark"] .button,
html[data-theme="dark"] .notice,
html[data-theme="dark"] .user-row,
html[data-theme="dark"] .vpn-item,
html[data-theme="dark"] .badge {
    border-color: var(--stroke);
    background: rgba(255,255,255,.06);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 14px 36px rgba(0,0,0,.14);
}

.register-toggle {
    min-height: 54px;
    margin-top: 16px;
    border: 0;
    color: var(--violet-deep);
    background: transparent;
    font-size: 20px;
    font-weight: 720;
}

.login-panel {
    margin-top: 16px;
    padding: 14px;
    border-radius: 24px;
    background: rgba(255,255,255,.34);
    border: 1px solid rgba(255,255,255,.68);
}

.email-panel {
    display: grid;
    gap: 10px;
    text-align: left;
}

.email-panel[hidden],
.login-panel[hidden] {
    display: none;
}

.email-panel label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 14px;
}

.email-panel input {
    width: 100%;
    height: 48px;
    border: 1px solid rgba(255,255,255,.76);
    border-radius: 17px;
    padding: 0 15px;
    color: var(--ink);
    background: rgba(255,255,255,.56);
    outline: none;
}

html[data-theme="dark"] .email-panel input,
html[data-theme="dark"] .field input,
html[data-theme="dark"] .field select,
html[data-theme="dark"] .field textarea {
    border-color: var(--stroke);
    color: var(--ink);
    background: rgba(255,255,255,.07);
}

html[data-theme="dark"] .email-panel input::placeholder,
html[data-theme="dark"] .field input::placeholder,
html[data-theme="dark"] .field textarea::placeholder {
    color: rgba(245,241,250,.38);
}

.email-panel button {
    min-height: 50px;
    border: 0;
    border-radius: 18px;
    color: #fff;
    font-size: 18px;
    background: linear-gradient(135deg, #d875ff, #7530ff);
}

.email-panel small {
    min-height: 18px;
    color: var(--violet-deep);
    text-align: center;
}

.email-panel small.error {
    color: #c42355;
}

.support-line {
    margin: 22px 0 0;
    color: var(--muted);
    font-size: 22px;
}

.support-line a {
    color: var(--violet);
    text-decoration: none;
}

.site-footer {
    display: grid;
    grid-template-columns: minmax(42px, 1fr) auto minmax(42px, 1fr);
    gap: 22px;
    align-items: center;
    width: min(100%, 420px);
    margin-top: 22px;
    color: #6f7188;
    letter-spacing: .28em;
}

html[data-theme="dark"] .site-footer {
    color: rgba(245,241,250,.48);
}

.site-footer span {
    height: 1px;
    background: rgba(141,137,170,.28);
}

html[data-theme="dark"] .site-footer span,
html[data-theme="dark"] .divider::before,
html[data-theme="dark"] .divider::after,
html[data-theme="dark"] .telegram-box,
html[data-theme="dark"] .admin-card hr {
    border-color: rgba(255,255,255,.10);
    background: rgba(255,255,255,.10);
}

.site-footer a {
    text-decoration: none;
}

.site-footer-links {
    display: grid;
    gap: 6px;
    text-align: center;
    letter-spacing: .08em;
}

.site-footer-links a:first-child {
    letter-spacing: .28em;
}

@media (max-width: 520px), (max-height: 760px) {
    .login-shell {
        padding: 16px;
    }

    .brand {
        margin-bottom: 14px;
    }

    .brand-mark {
        width: 150px;
        height: 150px;
        margin-bottom: 4px;
    }

    .brand h1 {
        font-size: 31px;
    }

    .brand p {
        font-size: 19px;
    }

    .glass-card {
        border-radius: 32px;
    }

    .login-card {
        padding: 26px 22px;
    }

    .login-card h2 {
        font-size: 32px;
    }

    .login-card > p,
    .support-line {
        font-size: 18px;
    }

    .telegram-button,
    .email-button {
        min-height: 62px;
        border-radius: 25px;
        gap: 12px;
        font-size: 20px;
    }

    .divider {
        margin: 20px 4px;
        font-size: 17px;
        gap: 16px;
    }

    .site-footer {
        width: min(100%, 360px);
        margin-top: 18px;
        font-size: 12px;
        gap: 14px;
    }

    .site-footer-links {
        letter-spacing: 0;
    }

    .site-footer-links a:first-child {
        letter-spacing: .16em;
    }
}
/* Site account/admin styles from the 3000 prototype. */
[hidden] {
  display: none !important;
}

.home-auth-panel {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
  padding: 18px;
  border-radius: 24px;
}

.home-auth-panel strong {
  color: #15131d;
  font-size: 20px;
  line-height: 1.1;
  letter-spacing: 0;
}

html[data-theme="dark"] .home-auth-panel strong {
  color: var(--ink);
}

.home-auth-panel span {
  color: #635e73;
  font-size: 14px;
  line-height: 1.3;
}

html[data-theme="dark"] .home-auth-panel span,
html[data-theme="dark"] .panel-subtitle,
html[data-theme="dark"] .field span,
html[data-theme="dark"] .field label,
html[data-theme="dark"] .telegram-box p,
html[data-theme="dark"] .meta-row,
html[data-theme="dark"] .user-row span,
html[data-theme="dark"] .vpn-item code {
  color: var(--muted);
}

.home-auth-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 6px;
}

.home-pill-button {
  display: grid;
  min-height: 44px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .82);
  border-radius: 999px;
  color: #332d46;
  text-decoration: none;
  font-size: 14px;
  font-weight: 650;
  background: linear-gradient(145deg, rgba(255, 255, 255, .46), rgba(255, 255, 255, .16));
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .88), 0 8px 18px rgba(69, 44, 111, .08);
}

html[data-theme="dark"] .home-pill-button {
  color: var(--ink);
  border-color: var(--stroke);
  background: rgba(255,255,255,.06);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 8px 18px rgba(0,0,0,.18);
}

.home-pill-button--primary {
  color: white;
  border-color: rgba(255, 255, 255, .66);
  background: linear-gradient(115deg, #ec72ea, #9a49ef 56%, #667af0);
}

.bottom-nav {
  grid-template-columns: repeat(2, 1fr);
}

.bottom-nav.has-admin {
  grid-template-columns: repeat(3, 1fr);
}

.nav-item {
  text-decoration: none;
}

.site-page {
  min-width: 320px;
  min-height: 100svh;
  margin: 0;
  color: #171422;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, "Helvetica Neue", Arial, sans-serif;
  background:
    radial-gradient(circle at 16% 12%, rgba(236, 107, 234, .18), transparent 28%),
    radial-gradient(circle at 84% 10%, rgba(117, 133, 251, .15), transparent 26%),
    linear-gradient(180deg, #f7f1ff 0%, #eee7fb 100%);
  -webkit-font-smoothing: antialiased;
}

html[data-theme="dark"] .site-page {
  color: var(--ink);
  background:
    radial-gradient(circle at 16% 12%, rgba(236, 107, 234, .16), transparent 28%),
    radial-gradient(circle at 84% 10%, rgba(117, 133, 251, .14), transparent 26%),
    linear-gradient(180deg, #0d0b12 0%, #15111d 100%);
}

.site-shell {
  width: min(100% - 32px, 440px);
  min-height: 100svh;
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) 0 max(26px, env(safe-area-inset-bottom));
}

.wide-shell {
  width: min(100% - 32px, 1120px);
}

.site-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.site-brand {
  color: #14111f;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: .08em;
}

html[data-theme="dark"] .site-brand,
html[data-theme="dark"] .panel-title,
html[data-theme="dark"] .settings-card h2,
html[data-theme="dark"] .admin-card h2,
html[data-theme="dark"] .meta-row strong,
html[data-theme="dark"] .user-row strong {
  color: var(--ink);
}

.site-topbar nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.text-link {
  color: #6b42d9;
  font-weight: 650;
  text-decoration: none;
}

.panel {
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .42), rgba(255, 255, 255, .15));
  -webkit-backdrop-filter: blur(28px) saturate(145%);
  backdrop-filter: blur(28px) saturate(145%);
  box-shadow:
    0 12px 32px rgba(82, 54, 132, .10),
    inset 0 1.5px 1px rgba(255, 255, 255, .90),
    inset 0 -1.5px 2px rgba(91, 61, 150, .08);
}

html[data-theme="dark"] .panel {
  border-color: var(--stroke);
  background: linear-gradient(145deg, rgba(43, 35, 54, .60), rgba(34, 28, 43, .28));
  box-shadow:
    0 12px 32px rgba(0, 0, 0, .24),
    inset 0 1.5px 1px rgba(255, 255, 255, .10),
    inset 0 -1.5px 2px rgba(143, 67, 236, .08);
}

.auth-panel {
  padding: 22px;
}

.panel-title {
  margin: 0;
  font-size: 30px;
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: 0;
}

.panel-subtitle {
  margin: 8px 0 0;
  color: #625d72;
  font-size: 15px;
  line-height: 1.4;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 18px 0;
  padding: 4px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .36);
}

.tab-button {
  min-height: 42px;
  border: 0;
  border-radius: 15px;
  color: #554f67;
  cursor: pointer;
  background: transparent;
  font: inherit;
  font-weight: 700;
}

.tab-button.active {
  color: #8c41e8;
  background: rgba(255, 255, 255, .74);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .9), 0 8px 16px rgba(75, 47, 122, .08);
}

html[data-theme="dark"] .tab-button {
  color: rgba(245,241,250,.62);
}

html[data-theme="dark"] .tab-button.active {
  color: var(--violet-deep);
  background: rgba(255,255,255,.10);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.10), 0 8px 16px rgba(0,0,0,.18);
}

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

.field {
  display: grid;
  gap: 6px;
}

.field span,
.field label {
  color: #565166;
  font-size: 13px;
  font-weight: 650;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, .82);
  border-radius: 16px;
  color: #171422;
  background: rgba(255, 255, 255, .60);
  padding: 0 14px;
  font: inherit;
  outline: none;
}

.field textarea {
  min-height: 92px;
  padding: 12px 14px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  box-shadow: 0 0 0 3px rgba(143, 67, 236, .18);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  display: inline-grid;
  min-height: 44px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .82);
  border-radius: 999px;
  padding: 0 16px;
  color: #312b44;
  text-decoration: none;
  cursor: pointer;
  background: rgba(255, 255, 255, .54);
  font: inherit;
  font-size: 14px;
  font-weight: 750;
}

.button.primary {
  color: white;
  border-color: rgba(255, 255, 255, .66);
  background: linear-gradient(115deg, #ec72ea, #9a49ef 56%, #667af0);
  box-shadow: 0 12px 22px rgba(117, 60, 226, .18);
}

.button.danger {
  color: #9d1f45;
  background: rgba(255, 238, 244, .72);
}

html[data-theme="dark"] .button.danger {
  color: #ff9eb9;
  background: rgba(216,75,101,.16);
}

.button:disabled {
  cursor: not-allowed;
  opacity: .58;
}

.notice {
  display: none;
  margin: 14px 0 0;
  border-radius: 16px;
  padding: 11px 13px;
  color: #4c355e;
  background: rgba(255, 255, 255, .55);
  font-size: 14px;
  line-height: 1.35;
}

.notice.show {
  display: block;
}

.notice.error {
  color: #8f1e41;
  background: rgba(255, 237, 244, .76);
}

html[data-theme="dark"] .notice.error,
html[data-theme="dark"] .badge.banned {
  color: #ff9eb9;
  background: rgba(216,75,101,.16);
}

.telegram-box {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, .54);
}

.telegram-box p {
  margin: 0;
  color: #625d72;
  font-size: 13px;
  line-height: 1.35;
  text-align: center;
}

.settings-grid,
.admin-grid {
  display: grid;
  gap: 14px;
}

.settings-card,
.admin-card {
  padding: 18px;
}

.settings-card h2,
.admin-card h2 {
  margin: 0 0 12px;
  font-size: 19px;
  line-height: 1.15;
  letter-spacing: 0;
}

.admin-card hr {
  height: 1px;
  margin: 16px 0;
  border: 0;
  background: rgba(255, 255, 255, .58);
}

.meta-list {
  display: grid;
  gap: 9px;
  margin: 0;
}

.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #625d72;
  font-size: 14px;
}

.meta-row strong {
  color: #171422;
  text-align: right;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(280px, .9fr) minmax(320px, 1.1fr);
  gap: 14px;
  align-items: start;
}

.user-list {
  display: grid;
  gap: 8px;
  max-height: calc(100svh - 230px);
  overflow: auto;
  padding-right: 2px;
}

.user-row {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 16px;
  padding: 12px;
  color: inherit;
  cursor: pointer;
  background: rgba(255, 255, 255, .45);
  text-align: left;
  font: inherit;
}

.user-row.active {
  border-color: rgba(145, 69, 239, .45);
  box-shadow: 0 0 0 3px rgba(145, 69, 239, .12);
}

html[data-theme="dark"] .user-row.active {
  border-color: rgba(185,144,255,.44);
  box-shadow: 0 0 0 3px rgba(185,144,255,.14);
}

.user-row strong {
  font-size: 15px;
}

.user-row span {
  color: #625d72;
  font-size: 12px;
}

.badge-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 5px;
}

.badge {
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  border-radius: 999px;
  padding: 0 9px;
  color: #4d4960;
  background: rgba(255, 255, 255, .62);
  font-size: 12px;
  font-weight: 700;
}

.badge.admin {
  color: #7840df;
}

html[data-theme="dark"] .badge.admin {
  color: var(--violet-deep);
}

.badge.banned {
  color: #a11d44;
  background: rgba(255, 230, 239, .8);
}

.split-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.vpn-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.vpn-item {
  display: grid;
  gap: 6px;
  border-radius: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, .45);
}

.vpn-item code {
  max-width: 100%;
  overflow: hidden;
  color: #4a405f;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .admin-layout,
  .split-fields {
    grid-template-columns: 1fr;
  }

  .user-list {
    max-height: none;
  }
}
