:root {
  color-scheme: dark;
  --bg: #050505;
  --bg-raised: #0a0a0a;
  --glass: rgba(18, 18, 18, 0.72);
  --glass-strong: rgba(22, 22, 22, 0.9);
  --glass-soft: rgba(255, 255, 255, 0.035);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f5f5f5;
  --text-soft: #d4d4d4;
  --muted: #858585;
  --muted-2: #5f5f5f;
  --accent: #f2f2f2;
  --accent-ink: #090909;
  --danger: #d78383;
  --notion-paper: #f6f5f4;
  --notion-blue: #0075de;
  --notion-amber: #ffb110;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.2, 0.9, 0.24, 1.14);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  overscroll-behavior: none;
  background:
    radial-gradient(96% 54% at 14% -16%, rgba(246, 245, 244, 0.19), transparent 66%),
    radial-gradient(72% 50% at 108% 50%, rgba(0, 117, 222, 0.13), transparent 72%),
    radial-gradient(56% 34% at 12% 108%, rgba(255, 177, 16, 0.055), transparent 72%),
    linear-gradient(155deg, #050505 0%, #080a0e 48%, #07111d 100%);
  color: var(--text);
  font-family: Inter, "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

.ambient-light {
  position: absolute;
  display: block;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.045);
  filter: blur(110px);
  opacity: 0.7;
  animation: ambient-drift 18s ease-in-out infinite alternate;
}

.ambient-light-a {
  top: -18vw;
  left: 7%;
  width: min(560px, 65vw);
  aspect-ratio: 1;
  background: rgba(246, 245, 244, 0.12);
}

.ambient-light-b {
  right: -18vw;
  bottom: -25vw;
  width: min(620px, 72vw);
  aspect-ratio: 1;
  opacity: 0.32;
  background: rgba(0, 117, 222, 0.12);
  animation-delay: -7s;
}

.ambient-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.016) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.016) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.32), transparent 68%);
  opacity: 0.45;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  opacity: 0.18;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.13'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

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

button {
  -webkit-user-select: none;
  user-select: none;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.56);
  outline-offset: 2px;
}

.app {
  position: relative;
  max-width: 680px;
  min-height: 100vh;
  margin: 0 auto;
  padding-bottom: calc(96px + var(--safe-bottom));
  opacity: 1;
  transition: opacity 0.42s ease;
}

.app.is-loading {
  opacity: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: 11px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  background: rgba(5, 7, 13, 0.68);
  backdrop-filter: blur(24px) saturate(115%);
  -webkit-backdrop-filter: blur(24px) saturate(115%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 4px;
  border: 0;
  background: transparent;
  color: var(--text);
}

.brand b {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.brand-copy small {
  margin-top: 1px;
  color: var(--muted-2);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.topbar-status {
  display: none;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.topbar-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #bdbdbd;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.045);
}

.brand-mark,
.boot-mark {
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  background: linear-gradient(145deg, #f7f7f7, #a8a8a8);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 8px 24px rgba(0, 0, 0, 0.35);
  color: #090909;
  font-weight: 900;
}

.brand-mark {
  width: 31px;
  height: 31px;
  border-radius: 10px;
  font-size: 14px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.brand-fallback {
  position: relative;
  z-index: 0;
}

.brand-duck {
  position: absolute;
  inset: -2px;
  z-index: 1;
  display: block;
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  object-fit: contain;
  pointer-events: none;
}

.avatar {
  width: 39px;
  height: 39px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: var(--text-soft);
  font-weight: 750;
  transition:
    transform 0.25s var(--ease-spring),
    border-color 0.25s ease,
    background 0.25s ease;
  overflow: hidden;
}

.avatar:active {
  transform: scale(0.92);
}

.avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar.has-photo {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(177, 187, 205, 0.08);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.12),
    0 8px 26px rgba(0, 0, 0, 0.28);
}

.content {
  padding: 22px 18px 4px;
  animation: page-in 0.48s var(--ease-out);
}

.content > * {
  animation: item-in 0.5s both var(--ease-out);
}

.content > :nth-child(2) { animation-delay: 0.035s; }
.content > :nth-child(3) { animation-delay: 0.07s; }
.content > :nth-child(4) { animation-delay: 0.105s; }
.content > :nth-child(5) { animation-delay: 0.14s; }

.page-head {
  margin: 1px 1px 23px;
}

.eyebrow {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.page-head h1 {
  margin: 8px 0 6px;
  font-size: clamp(25px, 7vw, 31px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.page-head p,
.muted {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.hero,
.card,
.metric,
.quick {
  border: 1px solid var(--line);
  background: var(--glass-soft);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 16px 44px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(22px) saturate(110%);
  -webkit-backdrop-filter: blur(22px) saturate(110%);
}

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 21px;
  border-radius: 22px;
}

.dashboard-grid,
.subscription-grid {
  display: grid;
  gap: 11px;
}

.dashboard-side {
  display: grid;
  gap: 11px;
}

.hero-kicker,
.traffic-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hero .hero-kicker {
  justify-content: flex-start;
}

.plan-chip {
  max-width: 54%;
  padding: 5px 9px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(112deg, rgba(255, 255, 255, 0.075), transparent 34%),
    radial-gradient(80% 90% at 100% 0, rgba(255, 255, 255, 0.06), transparent 64%);
  opacity: 0.72;
}

.hero-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 700;
}

.status::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.065);
  content: "";
  animation: status-pulse 2.8s ease-in-out infinite;
}

.status.off {
  color: var(--muted-2);
}

.status.off::before {
  animation: none;
}

.hero h2 {
  margin: 13px 0 4px;
  font-size: 24px;
  font-weight: 780;
  letter-spacing: -0.03em;
}

.hero-value {
  color: var(--muted);
  font-size: 12px;
}

.shield {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  color: var(--text-soft);
}

.shield svg {
  width: 23px;
}

.actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 11px;
}

.quick {
  display: flex;
  min-width: 0;
  min-height: 76px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 6px;
  border-radius: 18px;
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 700;
  transition:
    transform 0.28s var(--ease-spring),
    background 0.25s ease,
    border-color 0.25s ease;
}

.quick svg {
  width: 20px;
  color: var(--text-soft);
  transition: transform 0.28s var(--ease-spring);
}

.quick:active {
  transform: scale(0.965);
  background: rgba(255, 255, 255, 0.075);
}

.section {
  margin-top: 27px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 24px;
  margin: 0 2px 11px;
}

.section-title h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 760;
  letter-spacing: -0.015em;
}

.link-btn {
  padding: 6px 2px;
  border: 0;
  background: transparent;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 650;
}

.card {
  margin-bottom: 9px;
  padding: 14px;
  border-radius: 18px;
  transition:
    transform 0.28s var(--ease-spring),
    border-color 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease;
}

button.card {
  cursor: pointer;
}

button.card:active {
  transform: scale(0.982);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.065);
}

.row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.row > span:last-child,
.row-between > span:first-child {
  min-width: 0;
}

.iconbox {
  display: grid;
  flex: 0 0 40px;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text-soft);
}

.iconbox svg {
  width: 19px;
}

.row-title {
  display: block;
  color: var(--text);
  font-size: 13px;
  font-weight: 720;
  line-height: 1.35;
}

.row-sub {
  display: block;
  max-width: min(58vw, 330px);
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chev {
  width: 17px;
  flex: 0 0 auto;
  color: var(--muted-2);
  transition: transform 0.25s var(--ease-spring);
}

button.card:active .chev {
  transform: translateX(3px);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.metric {
  position: relative;
  min-width: 0;
  padding: 16px;
  border-radius: 18px;
}

.metric-icon {
  position: absolute;
  top: 13px;
  right: 13px;
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
}

.metric-icon svg {
  width: 13px;
}

.metric b {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 20px;
  font-weight: 780;
  letter-spacing: -0.035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.btn {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow: hidden;
  padding: 13px 16px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 15px;
  background: var(--accent);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 10px 28px rgba(0, 0, 0, 0.22);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 800;
  transition:
    transform 0.25s var(--ease-spring),
    opacity 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.btn::after {
  position: absolute;
  inset: -60% auto -60% -35%;
  width: 28%;
  content: "";
  pointer-events: none;
  background: rgba(255, 255, 255, 0.48);
  filter: blur(14px);
  opacity: 0;
  transform: skewX(-18deg);
  transition: left 0.55s var(--ease-out), opacity 0.2s ease;
}

.btn:active {
  transform: scale(0.975);
}

.btn:active::after {
  left: 105%;
  opacity: 0.55;
}

.btn svg {
  width: 17px;
}

.btn.secondary {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.045);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
  color: var(--text-soft);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.btn.danger {
  border-color: rgba(215, 131, 131, 0.23);
  background: rgba(215, 131, 131, 0.075);
  box-shadow: none;
  color: var(--danger);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.btn-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 15px;
}

.url-box {
  margin: 14px 0;
  padding: 13px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 13px;
  background: rgba(0, 0, 0, 0.26);
  color: #bdbdbd;
  font: 11px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace;
  overflow-wrap: anywhere;
}

.key-card {
  overflow: hidden;
}

.key-label {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
}

.key-value {
  max-height: 68px;
  overflow-y: auto;
  scrollbar-width: none;
}

.key-value::-webkit-scrollbar {
  display: none;
}

.key-note {
  margin: -2px 1px 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.traffic-card {
  margin-top: 11px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.028);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 16px 44px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.traffic-head b {
  display: block;
  margin-top: 5px;
  font-size: 14px;
  font-weight: 760;
  letter-spacing: -0.02em;
}

.traffic-percent {
  color: var(--text-soft);
  font-size: 18px;
  font-weight: 780;
  letter-spacing: -0.04em;
}

.progress-track {
  height: 5px;
  margin-top: 15px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #777, #f1f1f1);
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.16);
  transform-origin: left;
  animation: progress-in 0.85s var(--ease-out) both;
}

.traffic-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.traffic-card.compact {
  margin-top: 9px;
}

.management-panel {
  margin-top: 18px;
}

.renew-btn {
  margin-top: 11px;
}

.plan {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.plan-price {
  flex: 0 0 auto;
  text-align: right;
}

.plan-price b {
  display: block;
  font-size: 13px;
}

.plan-price span {
  color: var(--muted);
  font-size: 9px;
}

.ticket-status {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text-soft);
  font-size: 9px;
  font-weight: 760;
}

.ticket-status.closed {
  color: var(--muted);
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 15px 0;
}

.message {
  max-width: 86%;
  padding: 11px 13px;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 16px 16px 16px 5px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.55;
  animation: message-in 0.34s both var(--ease-out);
}

.message.user {
  align-self: flex-end;
  border-radius: 16px 16px 5px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.message small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
}

.input,
.textarea,
.select {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: 0;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  color: var(--text);
  transition:
    border-color 0.22s ease,
    background 0.22s ease,
    box-shadow 0.22s ease;
}

.input::placeholder,
.textarea::placeholder {
  color: #555;
  transition: color 0.2s ease;
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.035);
}

.input:focus::placeholder,
.textarea:focus::placeholder {
  color: #707070;
}

.textarea {
  min-height: 118px;
  resize: vertical;
}

.field {
  margin-bottom: 12px;
}

.field label {
  display: block;
  margin: 0 1px 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.empty {
  padding: 44px 16px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.empty svg {
  width: 34px;
  margin-bottom: 11px;
  color: var(--muted-2);
}

.nav {
  position: fixed;
  bottom: calc(10px + var(--safe-bottom));
  left: 50%;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: min(656px, calc(100% - 24px));
  height: 66px;
  padding: 6px;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, 0.105);
  border-radius: 22px;
  background: rgba(15, 15, 15, 0.78);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 20px 55px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(26px) saturate(120%);
  -webkit-backdrop-filter: blur(26px) saturate(120%);
}

.nav-item {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: #666;
  font-size: 8px;
  font-weight: 700;
  transition:
    color 0.24s ease,
    background 0.24s ease,
    transform 0.26s var(--ease-spring);
}

.nav-item svg {
  width: 19px;
  transition: transform 0.26s var(--ease-spring);
}

.nav-item.active {
  background: rgba(255, 255, 255, 0.075);
  color: var(--text);
}

.nav-item.active svg {
  transform: translateY(-1px);
}

.nav-item:active {
  transform: scale(0.93);
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.64);
  opacity: 0;
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
  transition:
    opacity 0.28s ease,
    backdrop-filter 0.28s ease;
}

.sheet-backdrop.show {
  opacity: 1;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.sheet {
  position: fixed;
  bottom: 0;
  left: 50%;
  z-index: 51;
  width: min(680px, 100%);
  max-height: 89vh;
  padding: 8px 18px calc(24px + var(--safe-bottom));
  overflow: auto;
  transform: translate(-50%, 104%) scale(0.985);
  border: 1px solid var(--line-strong);
  border-bottom: 0;
  border-radius: 28px 28px 0 0;
  background: rgba(13, 13, 13, 0.91);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 -22px 70px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(30px) saturate(115%);
  -webkit-backdrop-filter: blur(30px) saturate(115%);
  overscroll-behavior: contain;
  transition: transform 0.44s var(--ease-out);
}

.sheet.show {
  transform: translate(-50%, 0) scale(1);
}

.sheet-handle {
  width: 38px;
  height: 4px;
  margin: 3px auto 19px;
  border-radius: 999px;
  background: #3b3b3b;
}

.sheet h2 {
  margin: 0 0 6px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.sheet-desc {
  margin: 0 0 19px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

#sheetContent > * {
  animation: sheet-item-in 0.42s both var(--ease-out);
}

#sheetContent > :nth-child(2) { animation-delay: 0.025s; }
#sheetContent > :nth-child(3) { animation-delay: 0.05s; }
#sheetContent > :nth-child(4) { animation-delay: 0.075s; }
#sheetContent > :nth-child(5) { animation-delay: 0.1s; }

.toast {
  position: fixed;
  bottom: calc(92px + var(--safe-bottom));
  left: 50%;
  z-index: 80;
  max-width: calc(100% - 36px);
  padding: 11px 15px;
  transform: translate(-50%, 18px) scale(0.96);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(24, 24, 24, 0.9);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition:
    opacity 0.25s ease,
    transform 0.35s var(--ease-spring);
}

.toast.show {
  transform: translate(-50%, 0) scale(1);
  opacity: 1;
}

.toast.error {
  border-color: rgba(215, 131, 131, 0.25);
  color: #e3aaaa;
}

.boot {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(72% 48% at 50% 36%, rgba(246, 245, 244, 0.15), transparent 72%),
    radial-gradient(56% 34% at 80% 80%, rgba(0, 117, 222, 0.09), transparent 72%),
    linear-gradient(155deg, #050505 0%, #080a0e 52%, #07111d 100%);
  transition:
    opacity 0.48s ease,
    visibility 0.48s ease,
    transform 0.48s var(--ease-out);
}

.boot.done {
  visibility: hidden;
  opacity: 0;
  transform: scale(1.025);
}

.boot-duck {
  display: block;
  width: 132px;
  height: 132px;
  object-fit: contain;
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.36));
  animation: boot-float 2.3s ease-in-out infinite;
}

.boot-mark {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  font-size: 27px;
  animation: boot-float 2.3s ease-in-out infinite;
}

.boot-name {
  margin-top: 10px;
  color: rgba(245, 247, 252, 0.86);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.boot-line {
  width: 94px;
  height: 2px;
  margin-top: 20px;
  overflow: hidden;
  border-radius: 99px;
  background: #1b1b1b;
}

.boot-line i {
  display: block;
  width: 38%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--notion-paper), #ffffff, var(--notion-blue));
  animation: loading 1.05s ease-in-out infinite;
}

.skeleton {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.025);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  color: transparent;
}

.skeleton::after {
  position: absolute;
  inset: 0;
  content: "";
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.07), transparent);
  animation: shimmer 1.35s infinite;
}

@media (hover: hover) and (pointer: fine) {
  .avatar:hover {
    transform: translateY(-1px);
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.08);
  }

  .quick:hover,
  button.card:hover {
    transform: translateY(-2px);
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.06);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.065),
      0 20px 48px rgba(0, 0, 0, 0.24);
  }

  .quick:hover svg {
    transform: translateY(-2px);
  }

  button.card:hover .chev {
    transform: translateX(2px);
  }

  .btn:hover {
    transform: translateY(-1px) scale(1.006);
    background: #fff;
  }

  .btn.secondary:hover {
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.07);
  }

  .nav-item:hover {
    color: var(--text-soft);
  }
}

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

@keyframes item-in {
  from { opacity: 0; transform: translateY(12px) scale(0.992); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

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

@keyframes message-in {
  from { opacity: 0; transform: translateY(6px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes status-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.055); }
  50% { box-shadow: 0 0 0 7px rgba(255, 255, 255, 0); }
}

@keyframes boot-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes loading {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(285%); }
}

@keyframes shimmer {
  100% { transform: translateX(100%); }
}

@keyframes ambient-drift {
  from { transform: translate3d(-3%, -2%, 0) scale(0.96); }
  to { transform: translate3d(5%, 6%, 0) scale(1.08); }
}

@keyframes progress-in {
  from { transform: scaleX(0); opacity: 0.25; }
  to { transform: scaleX(1); opacity: 1; }
}

@media (min-width: 760px) {
  body {
    overflow-y: scroll;
  }

  .app {
    max-width: 1120px;
    padding-bottom: 58px;
  }

  .topbar {
    position: relative;
    height: 86px;
    padding: 18px 24px;
    border-bottom-color: rgba(255, 255, 255, 0.045);
    background: transparent;
  }

  .topbar-status {
    display: flex;
    margin-left: auto;
    margin-right: 60px;
  }

  .content {
    max-width: 940px;
    margin: 0 auto;
    padding: 34px 24px 60px;
  }

  .page-head {
    margin-bottom: 28px;
  }

  .page-head h1 {
    max-width: 680px;
    font-size: 36px;
  }

  .page-head p {
    font-size: 13px;
  }

  .dashboard-grid {
    grid-template-columns: minmax(0, 1.42fr) minmax(290px, 0.8fr);
    align-items: stretch;
  }

  .dashboard-side {
    grid-template-rows: auto 1fr;
  }

  .hero {
    display: flex;
    min-height: 274px;
    flex-direction: column;
    justify-content: space-between;
    padding: 28px;
  }

  .hero h2 {
    max-width: 390px;
    margin-top: 31px;
    font-size: 32px;
  }

  .hero-value {
    font-size: 13px;
  }

  .hero .shield {
    width: 66px;
    height: 66px;
    border-radius: 21px;
  }

  .hero .shield svg {
    width: 29px;
  }

  .dashboard-side .metric-grid {
    min-height: 126px;
  }

  .dashboard-side .metric {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 18px;
  }

  .dashboard-side .metric b {
    font-size: 23px;
  }

  .dashboard-side .actions {
    margin-top: 0;
  }

  .dashboard-side .quick {
    height: 100%;
    min-height: 117px;
  }

  .traffic-card {
    padding: 20px 22px;
  }

  .section {
    margin-top: 34px;
  }

  .subscription-grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(330px, 0.92fr);
    align-items: start;
    gap: 18px;
  }

  .management-panel {
    margin-top: 0;
  }

  .nav {
    top: 18px;
    bottom: auto;
    width: 470px;
    height: 50px;
    padding: 5px;
    border-radius: 17px;
    background: rgba(14, 14, 14, 0.72);
  }

  .nav-item {
    flex-direction: row;
    gap: 7px;
    border-radius: 12px;
    font-size: 9px;
  }

  .nav-item svg {
    width: 15px;
  }

  .sheet {
    top: 50%;
    bottom: auto;
    width: min(580px, calc(100% - 48px));
    max-height: min(760px, calc(100vh - 56px));
    padding: 10px 24px 26px;
    transform: translate(-50%, -46%) scale(0.96);
    border-bottom: 1px solid var(--line-strong);
    border-radius: 26px;
    opacity: 0;
    transition:
      transform 0.38s var(--ease-out),
      opacity 0.28s ease;
  }

  .sheet.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }

  .sheet-handle {
    opacity: 0;
  }

  .toast {
    bottom: 28px;
  }
}

@media (max-width: 360px) {
  .content {
    padding-inline: 14px;
  }

  .topbar {
    padding-inline: 14px;
  }

  .hero {
    padding: 18px;
  }

  .quick {
    min-height: 72px;
    font-size: 9px;
  }

  .row-sub {
    max-width: 52vw;
  }

  .nav {
    width: calc(100% - 18px);
  }
}

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