@font-face {
  font-family: ManropeLinks;
  src: url("/fonts/manrope-500.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: ManropeLinks;
  src: url("/fonts/manrope-600.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: ManropeLinks;
  src: url("/fonts/manrope-700.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #030303;
  --panel: #050505;
  --panel-soft: #111214;
  --panel-raised: #17181b;
  --line: #27282d;
  --line-strong: #36383f;
  --text: #f4f3ee;
  --muted: #9b9da5;
  --soft: #c7c7c0;
  --accent: #eceae2;
  --accent-text: #050505;
  --purple: #7a5cff;
  --green: #7ee8a2;
  --danger: #ff8c8c;
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.42);
  --font-ui: ManropeLinks, "Helvetica Neue", Arial, ui-sans-serif, system-ui, sans-serif;
  font-family: var(--font-ui);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  font-weight: 500;
  text-rendering: geometricPrecision;
}

[hidden] {
  display: none !important;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:active {
  transform: translateY(1px) scale(0.99);
}

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  height: 100vh;
  background:
    radial-gradient(circle at 62% 48%, rgba(255, 255, 255, 0.045), transparent 31%),
    linear-gradient(180deg, #030303, #050505 44%, #020202);
}

.content-view,
.panel,
.dialog,
.auth-card,
.link-row,
.nav-item,
.primary-button,
.ghost-button,
.round-button,
.icon-button,
.mini-button,
.seo-grid article,
.settings-card,
.stat-card {
  transition:
    opacity 220ms ease,
    transform 220ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 220ms ease,
    color 180ms ease;
}

.primary-button,
.ghost-button,
.round-button,
.icon-button,
.mini-button,
input,
select,
textarea,
.account-chip,
.usage-card,
.help-faq details,
.ticket-item,
.user-row {
  transition:
    opacity 220ms ease,
    transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 220ms ease,
    color 180ms ease,
    filter 220ms ease;
}

.sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.92);
  padding: 14px;
  animation: sidebarIn 240ms ease both;
}

.workspace-switch,
.account-chip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.account-chip .avatar {
  color: #e8e8e3;
  background: linear-gradient(135deg, #383a40, #121317);
}

.workspace-switch {
  grid-template-columns: minmax(0, 1fr);
  padding: 2px 6px 20px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 7px;
  color: #fff;
  background: linear-gradient(135deg, #3f4148, #16171b);
  font-size: 13px;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.avatar.small {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  font-size: 12px;
}

.workspace-name,
.account-chip > div:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.workspace-name strong,
.account-chip strong {
  overflow: hidden;
  color: #f1f1ed;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-name span,
.account-chip span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-list {
  display: grid;
  gap: 4px;
  padding-top: 18px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: #b7b7bc;
  background: transparent;
  padding: 8px 12px;
  text-align: left;
  font-size: 14px;
  font-weight: 500;
  transition: 160ms ease;
}

.nav-item:hover,
.nav-item.is-active {
  border-color: var(--line);
  color: var(--text);
  background: #17181b;
}

.nav-icon {
  width: 16px;
  color: #d4d5dc;
  text-align: center;
}

.sidebar-bottom {
  display: grid;
  gap: 10px;
  margin-top: auto;
}

.usage-card,
.account-chip {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0a0a0b;
  padding: 11px;
}

.usage-card > div:first-child {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}

.usage-card strong {
  color: var(--text);
  font-weight: 600;
}

.usage-bar {
  overflow: hidden;
  height: 6px;
  margin-top: 10px;
  border-radius: 999px;
  background: #1d1e22;
}

.usage-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6f6bff, #f2f0e8);
  transition: width 260ms ease;
}

.workspace {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
}

.workspace::-webkit-scrollbar {
  width: 10px;
}

.workspace::-webkit-scrollbar-thumb {
  border: 3px solid #050505;
  border-radius: 999px;
  background: #3a3a40;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 54px;
  border-bottom: 0;
  background: transparent;
  padding: 0 24px;
  backdrop-filter: none;
  animation: topbarIn 260ms ease both;
}

.brand-link,
.top-link {
  color: var(--soft);
  text-decoration: none;
}

.brand-link {
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 600;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.content-view {
  display: none;
  width: min(1104px, calc(100vw - 320px));
  margin: 0 auto;
  padding: 34px 0 72px;
}

.content-view.is-active {
  display: block;
  animation: viewIn 420ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.content-view.is-leaving {
  display: block;
  animation: viewOut 150ms ease both;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 40px;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0;
}

.head-actions,
.filters {
  display: flex;
  align-items: center;
  gap: 8px;
}

.primary-button,
.ghost-button,
.round-button,
.icon-button,
.mini-button,
select {
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--text);
  background: #111113;
}

.primary-button {
  min-height: 36px;
  border-color: #f0eee6;
  color: var(--accent-text);
  background: var(--accent);
  padding: 0 15px;
  font-weight: 600;
}

.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(255, 255, 255, 0.1);
}

.primary-button.light {
  width: 100%;
  min-height: 48px;
  justify-content: center;
}

.primary-button.full,
.ghost-button.full {
  width: 100%;
}

.ghost-button {
  min-height: 34px;
  padding: 0 13px;
  color: #d8d8d4;
}

.ghost-button:hover,
.round-button:hover,
.icon-button:hover,
.mini-button:hover {
  border-color: #575961;
  background: #1b1c20;
}

.round-button,
.icon-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
}

.mini-button {
  min-height: 30px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 600;
}

.filters {
  margin-bottom: 16px;
}

.search-box {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 10px;
  min-width: 260px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #15161a;
  padding: 0 12px;
}

input,
select {
  min-height: 34px;
  color: var(--text);
  background: #111113;
}

input {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 0 12px;
}

.search-box input {
  border: 0;
  background: transparent;
  outline: none;
}

select {
  min-width: 210px;
  padding: 0 12px;
}

select.native-select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.custom-select {
  position: relative;
  min-width: 210px;
}

.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 0 12px 0 14px;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 72%),
    #111113;
  font-weight: 600;
  text-align: left;
}

.custom-select-trigger::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-top: -3px;
  border-right: 2px solid #aeb0b7;
  border-bottom: 2px solid #aeb0b7;
  transform: rotate(45deg);
  transition:
    transform 180ms ease,
    border-color 180ms ease;
}

.custom-select.is-open .custom-select-trigger {
  border-color: #60636e;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent 72%),
    #141519;
  box-shadow: 0 0 0 3px rgba(122, 92, 255, 0.16);
}

.custom-select.is-open .custom-select-trigger::after {
  margin-top: 3px;
  border-color: #f4f3ee;
  transform: rotate(225deg);
}

.custom-select-menu {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  left: 0;
  z-index: 80;
  display: grid;
  gap: 3px;
  max-height: 230px;
  overflow: auto;
  border: 1px solid #34363d;
  border-radius: 13px;
  padding: 5px;
  background:
    radial-gradient(circle at 45% 0%, rgba(255, 255, 255, 0.07), transparent 42%),
    #09090a;
  box-shadow:
    0 22px 70px rgba(0, 0, 0, 0.64),
    0 0 0 1px rgba(255, 255, 255, 0.025) inset;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px) scale(0.985);
  transform-origin: 50% 0%;
  transition:
    opacity 160ms ease,
    transform 190ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.custom-select.is-open .custom-select-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.custom-select-menu::-webkit-scrollbar {
  width: 8px;
}

.custom-select-menu::-webkit-scrollbar-thumb {
  border: 2px solid #09090a;
  border-radius: 999px;
  background: #3a3b42;
}

.custom-select-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  border: 0;
  border-radius: 9px;
  padding: 0 10px;
  color: #c7c8cf;
  background: transparent;
  font-weight: 650;
  text-align: left;
}

.custom-select-option:hover,
.custom-select-option.is-selected {
  color: var(--text);
  background: #1a1b20;
}

.custom-select-option.is-selected::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #f0eee6;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.22);
}

.panel {
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.048), transparent 32%),
    rgba(0, 0, 0, 0.54);
  box-shadow: var(--shadow);
}

.empty-state {
  display: grid;
  min-height: 416px;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 40px;
  text-align: center;
  animation: softRise 320ms ease both;
}

.empty-state[hidden] {
  display: none;
}

.orb {
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  background:
    radial-gradient(circle at 35% 22%, #fff, #777 22%, transparent 46%),
    #111;
  color: white;
  font-size: 36px;
  box-shadow: 0 0 110px rgba(255, 255, 255, 0.13);
}

.empty-media-card {
  width: min(132px, 42vw);
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 30px;
  background: #020202;
  box-shadow:
    0 0 90px rgba(255, 255, 255, 0.11),
    0 24px 60px rgba(0, 0, 0, 0.72);
  transform: translateZ(0) scale(1);
  transition: transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 320ms ease;
}

.empty-media-card:hover {
  transform: translateZ(0) scale(1);
  box-shadow:
    0 0 90px rgba(255, 255, 255, 0.11),
    0 24px 60px rgba(0, 0, 0, 0.72);
}

.empty-media {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
  filter: brightness(1.16) contrast(1.1);
  pointer-events: none;
}

.empty-state p {
  max-width: 430px;
  color: var(--muted);
  line-height: 1.5;
}

.link-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.link-list.is-updating {
  animation: listIn 240ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(17, 18, 20, 0.72);
  padding: 14px;
  animation: itemIn 280ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.link-row:hover,
.link-row.is-selected {
  border-color: #4c4f59;
  background: #15161a;
  transform: translateY(-1px);
}

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

.short-url {
  display: inline-flex;
  max-width: 100%;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.destination {
  overflow: hidden;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-meta {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
}

.link-actions {
  display: flex;
  gap: 6px;
}

.details-layout {
  display: grid;
  gap: 14px;
}

.details-hero,
.details-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    radial-gradient(circle at 72% 20%, rgba(255, 255, 255, 0.055), transparent 34%),
    rgba(9, 9, 10, 0.74);
  box-shadow: var(--shadow);
}

.details-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
}

.details-hero h2 {
  margin: 0 0 10px;
  font-size: 28px;
}

.details-url {
  margin-bottom: 6px;
}

.details-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.details-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 14px;
}

.details-card {
  padding: 18px;
}

.details-form {
  display: grid;
  gap: 13px;
}

.details-form label {
  display: grid;
  gap: 8px;
  color: #d5d5cf;
  font-size: 13px;
  font-weight: 600;
}

.qr-preview-card {
  display: grid;
  gap: 14px;
}

.seo-grid,
.settings-grid,
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.seo-grid article,
.settings-card,
.stat-card {
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(17, 18, 20, 0.74);
  padding: 18px;
}

.seo-grid p,
.settings-card p {
  color: var(--muted);
  line-height: 1.5;
}

.settings-card label {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  color: #d5d5cf;
  font-size: 13px;
  font-weight: 600;
}

.settings-card input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(5, 5, 6, 0.74);
  color: var(--text);
  padding: 12px;
  outline: none;
}

.toggle-row {
  display: flex !important;
  grid-template-columns: none;
  align-items: center;
  gap: 10px;
}

.toggle-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--light);
}

.rewards-layout {
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
}

.plan-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 20px;
}

.plan-row strong {
  font-size: 17px;
  white-space: nowrap;
}

.plan-row .primary-button {
  min-width: 110px;
}

.transactions-card {
  grid-column: 1 / -1;
}

.transactions-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.transaction-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(5, 5, 6, 0.72);
  padding: 12px;
}

.transaction-row > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.transaction-row strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transaction-row span {
  color: var(--muted);
  font-size: 12px;
}

.transaction-status {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  background: #101114;
  color: var(--soft) !important;
  font-size: 12px;
}

.transaction-status.is-paid {
  border-color: rgba(126, 232, 162, 0.36);
  color: var(--green) !important;
}

.transaction-status.is-expired,
.transaction-status.is-cancelled {
  color: var(--muted) !important;
}

.transaction-pay {
  text-decoration: none;
}

.admin-payouts-panel {
  margin-top: 14px;
}

.admin-payout-row {
  grid-template-columns: minmax(0, 1fr) 150px 140px 140px auto;
}

.admin-payout-row input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(5, 5, 6, 0.76);
  color: var(--text);
  padding: 10px;
}

.settings-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.analytics-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

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

.stat-card strong {
  font-size: 28px;
}

.analytics-panel {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 14px;
  min-height: 320px;
  margin-top: 16px;
  padding: 14px;
}

.analytics-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(8, 8, 9, 0.72);
  padding: 16px;
}

.analytics-card.is-wide {
  grid-row: span 2;
}

.section-head,
.ticket-head-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.section-head span {
  color: var(--muted);
  font-size: 12px;
}

.chart {
  display: flex;
  align-items: end;
  gap: 7px;
  height: 220px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: #080809;
}

.bar {
  position: relative;
  flex: 1;
  min-width: 8px;
  border-radius: 999px 999px 4px 4px;
  background: linear-gradient(180deg, #f2f0e8, #6e64ff);
  transition: height 260ms ease, filter 180ms ease;
}

.bar span {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 10px;
  opacity: 0;
  transition: opacity 160ms ease;
}

.bar:hover span {
  opacity: 1;
}

.hour-chart {
  display: flex;
  align-items: end;
  gap: 3px;
  height: 126px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #080809;
  padding: 12px;
}

.hour-bar {
  flex: 1;
  min-width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, #d9d7cf, #4f4a9d);
  opacity: 0.9;
}

.breakdown {
  display: grid;
  gap: 8px;
}

.breakdown-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 9px 0;
  color: var(--muted);
}

.qr-panel {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  align-items: center;
  gap: 28px;
  min-height: 320px;
  padding: 28px;
}

.qr-preview {
  display: grid;
  place-items: center;
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #09090a;
}

.qr-preview img {
  width: 220px;
  height: 220px;
}

.link-button {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 230ms ease,
    visibility 0s linear 230ms;
}

.modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.dialog {
  display: grid;
  gap: 15px;
  width: min(560px, calc(100vw - 32px));
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: #0d0d0f;
  padding: 22px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(16px) scale(0.985);
  transition:
    opacity 240ms ease,
    transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dialog label {
  display: grid;
  gap: 8px;
  color: #d5d5cf;
  font-size: 13px;
  font-weight: 600;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.alias-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #111113;
}

.alias-row span {
  padding-left: 12px;
  color: var(--muted);
}

.alias-row input {
  border: 0;
  background: transparent;
}

.alias-row.is-locked {
  opacity: 0.58;
  background: #0a0a0b;
}

.alias-row.is-locked input {
  cursor: not-allowed;
}

.expiry-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #0a0a0b;
  padding: 4px;
}

.expiry-toggle button {
  min-height: 34px;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-weight: 600;
}

.expiry-toggle button.is-active {
  color: var(--text);
  background: #24252a;
}

#expiresInput {
  margin-top: 8px;
}

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

.form-error {
  min-height: 18px;
  margin: 0;
  color: var(--danger);
  font-size: 13px;
}

.auth-modal {
  align-items: start;
  padding-top: 7vh;
}

.auth-card {
  position: relative;
  display: grid;
  justify-items: center;
  width: min(360px, calc(100vw - 32px));
  color: #fff;
  text-align: center;
  opacity: 0;
  transform: translateY(16px) scale(0.985);
  transition:
    opacity 240ms ease,
    transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.auth-mark {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  margin: 44px 0 20px;
  border: 1px solid #2c2c2c;
  border-radius: 999px;
  background: #171717;
  font-family: var(--font-ui);
  font-size: 25px;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 260ms ease, background 260ms ease, box-shadow 260ms ease;
}

.auth-card h2 {
  margin: 0 0 10px;
  font-size: 30px;
  font-weight: 600;
}

.auth-card p {
  color: #d8d8d8;
}

.auth-form {
  display: grid;
  gap: 10px;
  width: 100%;
  margin-top: 14px;
  animation: authStepIn 260ms ease both;
}

.auth-form.is-leaving {
  animation: authStepOut 170ms ease both;
}

.auth-form input {
  min-height: 54px;
  border: 1px solid #5a5a5a;
  background: #0b0b0b;
  color: #fff;
  font-size: 16px;
  font-weight: 450;
}

.auth-close {
  margin-top: 20px;
  border: 0;
  color: #8d8d8d;
  background: transparent;
  transition: color 180ms ease, opacity 180ms ease;
}

.auth-close:hover {
  color: #fff;
}

.auth-card.is-code-step .auth-mark {
  transform: scale(0.96);
  background: #111214;
}

.auth-card.is-code-step h2,
.auth-card.is-code-step p {
  animation: softRise 220ms ease both;
}

.help-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 18;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 22px;
  width: min(390px, calc(100vw - 24px));
  height: 100vh;
  transform: translateX(105%);
  border-left: 1px solid var(--line);
  background: rgba(3, 3, 3, 0.96);
  padding: 22px 24px;
  overflow-y: auto;
  box-shadow: -28px 0 80px rgba(0, 0, 0, 0.48);
  opacity: 0;
  transition:
    transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 240ms ease;
}

.help-drawer.is-open {
  transform: translateX(0);
  opacity: 1;
}

.help-drawer.is-open .support-form,
.help-drawer.is-open .help-faq {
  animation: drawerItemIn 320ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.help-drawer.is-open .help-faq {
  animation-delay: 60ms;
}

.help-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

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

.support-form.needs-login > h2,
.support-form.needs-login > label,
.support-form.needs-login > button[type="submit"],
.support-form.needs-login > .form-error {
  display: none;
}

.support-login-gate {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #0b0b0c;
  padding: 16px;
}

.support-login-gate p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.quick-actions strong {
  font-size: 13px;
}

.quick-actions button,
.help-footer button {
  display: flex;
  justify-content: space-between;
  border: 0;
  color: #d7d9e0;
  background: transparent;
  padding: 6px 0;
  text-align: left;
  font: inherit;
}

.quick-actions button::after {
  content: "›";
  color: var(--muted);
}

.help-answer {
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #0b0b0c;
  padding: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.support-form {
  align-content: start;
}

.support-form label {
  display: grid;
  gap: 8px;
  color: #d5d5cf;
  font-size: 13px;
  font-weight: 600;
}

.support-form textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #111113;
  color: var(--text);
  padding: 12px;
  font: inherit;
}

.help-faq {
  display: grid;
  align-content: start;
  gap: 8px;
}

.help-faq h2 {
  margin: 0 0 6px;
}

.help-faq details {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #0b0b0c;
  padding: 12px 14px;
}

.help-faq summary {
  cursor: pointer;
  color: #e6e6e0;
  font-weight: 600;
}

.help-faq p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.help-footer {
  display: grid;
  gap: 10px;
  align-self: end;
}

.help-footer span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #c5c7cf;
}

.help-footer i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #23c465;
  box-shadow: 0 0 18px rgba(35, 196, 101, 0.65);
}

.tickets-panel {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: 560px;
}

.ticket-list {
  display: grid;
  align-content: start;
  gap: 8px;
  border-right: 1px solid var(--line);
  padding: 14px;
}

.ticket-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #101113;
  padding: 12px;
  color: var(--text);
  text-align: left;
}

.ticket-item-main {
  min-width: 0;
}

.ticket-delete {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #d9b0b0;
  background: #151113;
}

.ticket-item.is-active {
  border-color: #5c5f6a;
  background: #17181c;
}

.ticket-item strong,
.user-row strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.ticket-item span,
.user-row span {
  color: var(--muted);
  font-size: 12px;
}

.ticket-thread {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  padding: 16px;
}

.ticket-thread-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.danger-button {
  color: #ffd1d1;
  border-color: rgba(255, 140, 140, 0.28);
}

.ticket-messages {
  display: grid;
  align-content: start;
  gap: 10px;
  overflow-y: auto;
  padding: 16px 0;
}

.ticket-message {
  max-width: 82%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #101113;
  padding: 12px;
  white-space: pre-wrap;
}

.ticket-message.is-support,
.ticket-message.is-admin {
  justify-self: end;
  background: #18191d;
}

.ticket-reply {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
}

.ticket-reply input {
  min-height: 40px;
}

.users-panel {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 420px;
  padding: 14px;
}

.user-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.7fr);
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #101113;
  padding: 12px;
}

.user-role-tools {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.user-role-tools label {
  display: grid;
  gap: 6px;
}

.user-role-tools label > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.user-role-tools .custom-select {
  min-width: 0;
  width: 100%;
}

.user-save-button {
  min-height: 36px;
  min-width: 92px;
  border-color: rgba(240, 238, 230, 0.34);
  color: #f4f3ee;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent 72%),
    #16171b;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  transform: translateY(20px);
  opacity: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #111;
  padding: 12px 14px;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: 180ms ease;
  pointer-events: none;
}

.toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.docs-page {
  overflow: auto;
  min-height: 100vh;
  background:
    radial-gradient(circle at 60% 18%, rgba(255, 255, 255, 0.07), transparent 28%),
    #030303;
}

.doc-wrap {
  width: min(960px, calc(100% - 36px));
  margin: 0 auto;
  padding: 54px 0 90px;
}

.doc-wrap h1 {
  max-width: 760px;
  margin: 70px 0 18px;
  font-size: 64px;
  font-weight: 600;
  letter-spacing: 0;
}

.doc-wrap > p {
  max-width: 690px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.55;
}

.doc-wrap .link-button {
  margin-top: 24px;
}

@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.995);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes viewOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-6px) scale(0.998);
  }
}

@keyframes listIn {
  from {
    opacity: 0.72;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes softRise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes authStepIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes authStepOut {
  to {
    opacity: 0;
    transform: translateY(-6px);
  }
}

@keyframes sidebarIn {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes topbarIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal.is-open .dialog,
.modal.is-open .auth-card {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes itemIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.992);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes drawerItemIn {
  from {
    opacity: 0;
    transform: translateX(10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
}

@media (max-width: 980px) {
  body {
    overflow: auto;
  }

  .app-shell {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .nav-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .sidebar-bottom {
    display: none;
  }

  .workspace {
    overflow: visible;
  }

  .content-view {
    width: min(100% - 28px, 980px);
  }

  .custom-select {
    width: 100%;
  }

  .page-head,
  .filters,
  .analytics-panel,
  .details-hero,
  .details-grid,
  .qr-panel {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .seo-grid,
  .settings-grid,
  .analytics-grid {
    grid-template-columns: 1fr;
  }

  .plan-row {
    align-items: stretch;
    flex-direction: column;
  }

  .transaction-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  select {
    width: 100%;
  }

  .user-row,
  .user-role-tools {
    grid-template-columns: 1fr;
  }
}
