@import url('/assets/fonts/fonts.css');
:root {
  color-scheme: light;
  --bg: #f5f6f8;
  --surface: #fff;
  --surface-2: #edf0f3;
  --surface-3: #e5e9ed;
  --text: #202329;
  --muted: #71777e;
  --line: #e7eaed;
  --accent: #b5f18b;
  --accent-text: #263321;
  --purple: #c8bcff;
  --purple-soft: #f0ecff;
  --blue: #4668e8;
  --blue-soft: #edf1ff;
  --danger: #bc3e52;
  --danger-soft: #fff0f1;
  --success: #2c7a4d;
  --shadow: 0 18px 60px #232a3510;
  --radius: 22px;
  --scroll: #c0c7cb;
  --scroll-hover: #98a3a9;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --sidebar: 88px;
}
html.dark {
  color-scheme: dark;
  --bg: #17191e;
  --surface: #202329;
  --surface-2: #292d34;
  --surface-3: #333841;
  --text: #eef0f4;
  --muted: #a0a7b2;
  --line: #343941;
  --purple-soft: #353047;
  --blue: #a6b9ff;
  --blue-soft: #293348;
  --danger: #ff96a7;
  --danger-soft: #442b34;
  --success: #a8e2ba;
  --shadow: 0 18px 60px #0003;
  --scroll: #4a5260;
  --scroll-hover: #6b7688;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
* {
  scrollbar-width: thin;
  scrollbar-color: var(--scroll) transparent;
}
*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
*::-webkit-scrollbar-track {
  background: transparent;
}
*::-webkit-scrollbar-thumb {
  background: var(--scroll);
  border: 1px solid transparent;
  border-radius: 8px;
  background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover {
  background: var(--scroll-hover);
}
*::-webkit-scrollbar-corner {
  background: transparent;
}
html {
  font-family: var(--font);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  background: var(--bg);
  color: var(--text);
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}
body {
  margin: 0;
  min-width: 320px;
  line-height: 1.55;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
button {
  border: 0;
}
input,
textarea,
select {
  max-width: 100%;
}
textarea {
  resize: vertical;
}
button,
summary,
a,
input,
textarea,
select {
  outline-offset: 4px;
}
:focus-visible {
  outline: 3px solid var(--blue);
}
::selection {
  background: var(--purple);
  color: #202329;
}
img,
video {
  max-width: 100%;
  object-fit: cover;
}
img {
  display: block;
}
svg {
  flex-shrink: 0;
}
.icon {
  vertical-align: middle;
}
h1,
h2,
h3,
h4,
p {
  margin: 0;
}
h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.045em;
}
h1 {
  font-size: clamp(30px, 3.2vw, 44px);
  font-weight: 650;
}
h2 {
  font-size: 25px;
  font-weight: 600;
}
h3 {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.02em;
}
small {
  font-size: 12px;
}
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 24px 0;
}
ol,
ul {
  padding-left: 22px;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}
legend {
  font-weight: 600;
  margin-bottom: 16px;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
}
th {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
td,
th {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 1000;
  padding: 12px 20px;
  background: var(--accent);
  color: var(--accent-text);
  border-radius: 12px;
}
.skip-link:focus {
  top: 12px;
}
.button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 11px 19px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  transition:
    background 0.18s,
    transform 0.18s,
    box-shadow 0.18s;
  white-space: nowrap;
}
.button:hover,
.icon-button:hover {
  background: var(--surface-3);
}
.button:active,
.icon-button:active {
  transform: scale(0.97);
}
.button.primary {
  background: var(--accent);
  color: var(--accent-text);
}
.button.primary:hover {
  background: #a4e878;
  box-shadow: 0 5px 18px #75a95325;
}
.button.secondary {
  background: var(--surface);
  border-color: var(--line);
}
.button.ghost {
  background: transparent;
}
.button.danger {
  background: var(--danger-soft);
  color: var(--danger);
}
.button.small {
  min-height: 34px;
  padding: 7px 12px;
  font-size: 12px;
}
.button.large {
  padding: 16px 25px;
  min-height: 54px;
  font-size: 14px;
}
.button.full {
  width: 100%;
}
.button.dark {
  background: #202329;
  color: #fff;
}
.icon-button {
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 12px;
  background: transparent;
}
.icon-button.active {
  background: var(--accent);
  color: var(--accent-text);
}
.text-link {
  color: var(--blue);
  font-weight: 550;
}
.text-link:hover {
  text-decoration: underline;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.row.wrap {
  flex-wrap: wrap;
}
.row.between {
  justify-content: space-between;
}
.row.end {
  justify-content: flex-end;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.stack.compact {
  gap: 10px;
}
.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}
.card {
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.card.flat {
  border: 0;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 8px;
  background: var(--surface-2);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}
.badge.mint {
  background: var(--accent);
  color: var(--accent-text);
}
.badge.purple {
  background: var(--purple-soft);
  color: var(--text);
}
.badge.blue {
  background: var(--blue-soft);
  color: var(--blue);
}
.badge.error {
  color: var(--danger);
  background: var(--danger-soft);
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.avatar {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  overflow: hidden;
  border-radius: 15px;
  background: var(--purple-soft);
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -0.03em;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar.large {
  width: 76px;
  height: 76px;
  border-radius: 26px;
  font-size: 26px;
}
.avatar.small {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  font-size: 10px;
}
.avatar.mint {
  background: var(--accent);
  color: var(--accent-text);
}
.avatar.pink {
  background: #f5d2e1;
  color: #5c2f46;
}
.avatar.blue {
  background: #cee6f5;
  color: #294861;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  font-weight: 550;
}
.field > span {
  color: var(--muted);
}
.input {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  min-height: 46px;
  padding: 12px 14px;
  background: var(--bg);
  transition:
    border-color 0.18s,
    box-shadow 0.18s;
  font-size: 14px;
  font-weight: 400;
}
.input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
}
.input::placeholder {
  color: var(--muted);
  font-weight: 400;
}
.check-field {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}
.check-field input {
  accent-color: var(--blue);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.check-field small {
  display: block;
}
select {
  cursor: pointer;
}
.field-error,
.error-note {
  padding: 14px 16px;
  border-radius: 12px;
  color: var(--danger);
  background: var(--danger-soft);
  font-size: 13px;
}
.info-note {
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--blue-soft);
  font-size: 13px;
}
.tabs {
  display: flex;
  gap: 5px;
  overflow: auto;
  padding: 5px;
  border-radius: 13px;
  background: var(--surface-2);
  width: fit-content;
  max-width: 100%;
}
.tabs button,
.tabs a {
  border: 0;
  border-radius: 9px;
  background: transparent;
  padding: 8px 13px;
  font-size: 12px;
  font-weight: 550;
  color: var(--muted);
  white-space: nowrap;
}
.tabs .active,
.tabs [aria-selected='true'] {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 2px 8px #00000005;
}
.tabs .active.mint {
  background: var(--accent);
  color: var(--accent-text);
}
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}
.page-header p {
  margin-top: 9px;
  color: var(--muted);
  font-size: 13px;
}
.page-header .eyebrow {
  display: block;
  margin-bottom: 10px;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 30px 0 18px;
  gap: 16px;
}
.section-title h2 {
  font-size: 20px;
}
.empty {
  text-align: center;
  max-width: 460px;
  margin: auto;
  padding: 64px 24px;
}
.empty h2 {
  font-size: 24px;
  margin: 18px 0 12px;
}
.empty p {
  color: var(--muted);
  font-size: 13px;
}
.empty .button {
  margin-top: 24px;
}
.empty-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 25px;
  width: 76px;
  height: 76px;
  background: var(--purple-soft);
  transform: rotate(-8deg);
}
.empty-symbol svg {
  transform: rotate(8deg);
}
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  min-height: 180px;
  color: var(--muted);
}
.spinner {
  width: 22px;
  height: 22px;
  border: 2px solid var(--line);
  border-top-color: var(--text);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.skeleton {
  min-height: 14px;
  border-radius: 6px;
  background: var(--surface-2);
  animation: breathe 1.5s ease-in-out infinite;
}
.list-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}
.list-row:last-child {
  border-bottom: 0;
}
.list-row .grow,
.grow {
  flex: 1;
  min-width: 0;
}
.list-row strong {
  font-size: 13px;
}
.list-row p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.table-wrap {
  max-width: 100%;
  overflow: auto;
}
.stat-number {
  font-size: 36px;
  line-height: 1;
  letter-spacing: -0.06em;
  font-weight: 600;
}
.divider {
  width: 1px;
  height: 24px;
  background: var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 29px;
  line-height: 1;
  font-weight: 750;
  letter-spacing: -0.08em;
  color: var(--text);
}
.brand img {
  width: 40px;
  height: 40px;
}
.brand-dot {
  font-size: 9px;
  vertical-align: top;
  position: relative;
  top: 3px;
  left: 4px;
  letter-spacing: 0;
}
.app-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 25px 14px;
  background: var(--surface);
  border-right: 1px solid var(--line);
  gap: 22px;
}
.app-sidebar .brand img {
  width: 43px;
  height: 43px;
}
.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  width: 100%;
  overflow-y: auto;
  min-height: 0;
}
.rail-link {
  background: transparent;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 58px;
  min-height: 58px;
  border-radius: 16px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 550;
  line-height: 1.15;
  transition: 0.18s;
}
.rail-link.rail-notifications {
  display: none;
}
.rail-link:hover {
  background: var(--surface-2);
  color: var(--text);
}
.rail-link.active {
  background: var(--accent);
  color: var(--accent-text);
}
.rail-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}
.app-page {
  padding-left: var(--sidebar);
}
.app-page #workspace {
  min-height: 100dvh;
  padding: 36px 40px;
  max-width: 1800px;
  margin: auto;
}
.app-page[data-page='messenger'] #workspace {
  max-width: none;
  padding: 0;
}
.connection-banner {
  padding: 9px 20px;
  position: relative;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 12px;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  z-index: 15;
}
.demo-banner {
  padding: 7px 20px;
  background: var(--purple-soft);
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.demo-banner a {
  text-decoration: underline;
}
.account-chip {
  position: relative;
}
.online-dot {
  position: absolute;
  right: -2px;
  bottom: 1px;
  width: 10px;
  height: 10px;
  background: var(--accent);
  border: 2px solid var(--surface);
  border-radius: 50%;
}
.app-menu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.app-menu-grid a {
  padding: 20px 10px;
  text-align: center;
  border-radius: 16px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}
.app-menu-grid a:hover {
  background: var(--purple-soft);
}
.app-menu-grid .icon {
  color: var(--muted);
}
.dialog {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 0;
  width: min(500px, calc(100vw - 32px));
  max-height: calc(100dvh - 40px);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 30px 120px #0003;
  overflow: hidden;
  animation: enter 0.2s ease both;
}
.dialog.wide {
  width: min(880px, calc(100vw - 32px));
}
.dialog::backdrop {
  background: #11182766;
  backdrop-filter: blur(7px);
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  gap: 16px;
}
.dialog-heading h2 {
  font-size: 20px;
}
.dialog-body {
  padding: 24px;
  max-height: calc(100dvh - 140px);
  overflow: auto;
}
.dialog-body > p {
  margin-bottom: 24px;
}
.dialog-body .button {
  white-space: normal;
}
#toasts {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(420px, calc(100vw - 48px));
  pointer-events: none;
}
.toast {
  padding: 16px 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 13px;
  animation: enter 0.2s ease;
  overflow-wrap: anywhere;
}
.toast.error {
  color: var(--danger);
  border-color: var(--danger);
}
.toast.success {
  border-left: 4px solid var(--accent);
}
.notice {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  font-size: 13px;
  background: var(--surface-2);
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes breathe {
  50% {
    opacity: 0.5;
  }
}
@media (min-width: 1600px) {
  .app-page #workspace {
    padding: 44px 60px;
  }
}
@media (max-width: 1050px) {
  .app-page #workspace {
    padding: 28px;
  }
  .page-header {
    flex-wrap: wrap;
  }
  .card {
    padding: 21px;
  }
}
@media (max-width: 700px) {
  :root {
    --sidebar: 0px;
  }
  .app-sidebar {
    inset: auto 0 0;
    width: auto;
    height: 71px;
    padding: 7px 12px;
    flex-direction: row;
    gap: 0;
    border: 0;
    border-top: 1px solid var(--line);
    padding-bottom: max(7px, env(safe-area-inset-bottom));
    background: var(--surface);
  }
  .app-sidebar > .brand,
  .rail-footer {
    display: none;
  }
  .rail-nav {
    flex-direction: row;
    justify-content: space-around;
    gap: 0;
    overflow: visible;
  }
  .rail-nav .rail-link {
    min-height: 53px;
    width: min(55px, calc((100vw - 24px) / 6));
    border-radius: 13px;
  }
  .rail-nav .rail-notifications {
    display: flex;
  }
  .rail-nav .rail-link.mobile-hidden {
    display: none;
  }
  .app-page {
    padding-bottom: 76px;
  }
  .app-page #workspace {
    padding: 24px 18px;
    min-height: calc(100dvh - 76px);
  }
  h1 {
    font-size: 32px;
  }
  .card {
    padding: 20px;
    border-radius: 19px;
  }
  .page-header {
    gap: 18px;
    margin-bottom: 24px;
  }
  .page-header .row {
    flex-wrap: wrap;
  }
  .page-header .button {
    font-size: 12px;
  }
  .dialog {
    max-height: calc(100dvh - 24px);
    border-radius: 21px;
  }
  .dialog-body {
    padding: 20px;
  }
  .app-menu-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .row.wrap-mobile {
    flex-wrap: wrap;
  }
  .demo-banner {
    font-size: 10px;
    padding: 7px 12px;
  }
  .grid {
    gap: 14px;
  }
  .table-wrap {
    border-radius: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
