:root {
  color-scheme: dark;
  --bg: #070910;
  --bg-soft: #0c101a;
  --surface: rgba(16, 21, 34, 0.7);
  --surface-strong: rgba(14, 18, 30, 0.92);
  --surface-hover: rgba(29, 35, 52, 0.82);
  --border: rgba(255, 255, 255, 0.085);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f5f7fb;
  --muted: #98a2b5;
  --muted-strong: #b6becc;
  --primary: #9b7cff;
  --primary-bright: #b49cff;
  --primary-soft: rgba(139, 92, 246, 0.15);
  --cyan: #34d7e8;
  --cyan-soft: rgba(34, 211, 238, 0.12);
  --green: #41d99a;
  --green-soft: rgba(52, 211, 153, 0.12);
  --yellow: #f5c75b;
  --yellow-soft: rgba(251, 191, 36, 0.12);
  --danger: #ff788e;
  --danger-soft: rgba(251, 113, 133, 0.12);
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
  --sidebar: 252px;
  --font: Inter, "SF Pro Display", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 80% 0%, rgba(72, 40, 130, 0.18), transparent 36%),
    radial-gradient(circle at 0% 95%, rgba(12, 94, 105, 0.13), transparent 34%),
    var(--bg);
  font: 14px/1.45 var(--font);
}

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

button {
  border: 0;
}

button,
select,
input[type="checkbox"] {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--primary-bright);
  outline-offset: 2px;
}

svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.hidden {
  display: none !important;
}

.glass-panel {
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(24px) saturate(125%);
  -webkit-backdrop-filter: blur(24px) saturate(125%);
}

.ambient {
  position: fixed;
  z-index: -2;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.32;
  pointer-events: none;
}

.ambient-one {
  top: -160px;
  right: 8%;
  width: 520px;
  height: 520px;
  background: #6f42d9;
}

.ambient-two {
  bottom: -220px;
  left: 12%;
  width: 480px;
  height: 480px;
  background: #0e7988;
  opacity: 0.2;
}

.noise {
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  opacity: 0.045;
  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='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.65'/%3E%3C/svg%3E");
}

.loading-bar {
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  width: 0;
  height: 2px;
  opacity: 0;
  background: linear-gradient(90deg, var(--primary), var(--cyan));
  box-shadow: 0 0 14px var(--primary);
  transition: width 0.35s ease, opacity 0.2s ease;
}

.loading-bar.active {
  width: 70%;
  opacity: 1;
}

.loading-bar.complete {
  width: 100%;
  opacity: 0;
}

.brand-mark {
  display: grid;
  flex: 0 0 auto;
  width: 43px;
  height: 43px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(155, 124, 255, 0.24), rgba(52, 215, 232, 0.08));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 10px 28px rgba(84, 54, 180, 0.24);
}

.brand-mark svg {
  width: 29px;
  height: 29px;
  stroke: none;
}

.brand-mark svg > path:first-child {
  fill: url("#brand-gradient");
  fill: var(--primary);
}

.brand-mark .brand-spark {
  fill: white;
}

.login-screen {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(340px, 520px) minmax(420px, 1fr);
  align-items: center;
  gap: clamp(48px, 8vw, 130px);
  width: min(1180px, calc(100% - 72px));
  margin: 0 auto;
  padding: 42px 0;
}

.login-card {
  position: relative;
  overflow: hidden;
  padding: 38px;
  border-radius: var(--radius-xl);
}

.login-card::before {
  position: absolute;
  top: -90px;
  right: -100px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.14);
  filter: blur(60px);
  content: "";
}

.login-brand,
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.login-brand strong,
.sidebar-brand strong {
  display: block;
  letter-spacing: -0.025em;
  font-size: 18px;
  font-weight: 690;
}

.login-brand span:not(.brand-mark),
.sidebar-brand span:not(.brand-mark) {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 11px;
}

.login-copy {
  position: relative;
  margin: 50px 0 32px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-strong);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 700;
}

.eyebrow i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
}

.login-copy h1 {
  max-width: 400px;
  margin: 13px 0 12px;
  letter-spacing: -0.052em;
  font-size: clamp(34px, 4vw, 46px);
  line-height: 1.06;
  font-weight: 650;
}

.login-copy p {
  max-width: 410px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.login-form {
  position: relative;
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 600;
}

.input-shell {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 11px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: rgba(5, 8, 14, 0.44);
  transition: border 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.input-shell:focus-within {
  border-color: rgba(155, 124, 255, 0.52);
  background: rgba(10, 12, 21, 0.7);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.11);
}

.input-shell > svg {
  flex: 0 0 auto;
  width: 18px;
  color: #778196;
}

.input-shell input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
}

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

.form-error:empty {
  display: none;
}

.button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 15px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  font-weight: 630;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, opacity 0.16s ease;
}

.button:hover:not(:disabled) {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.075);
  transform: translateY(-1px);
}

.button:active:not(:disabled) {
  transform: translateY(0);
}

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

.button svg {
  width: 17px;
  height: 17px;
}

.button-large {
  min-height: 50px;
  border-radius: 13px;
  font-size: 14px;
}

.button-primary {
  border-color: rgba(177, 154, 255, 0.35);
  background: linear-gradient(135deg, #8e68ed, #7351d0);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 12px 28px rgba(87, 54, 171, 0.25);
}

.button-primary:hover:not(:disabled) {
  border-color: rgba(209, 196, 255, 0.55);
  background: linear-gradient(135deg, #9c7af1, #7b58d4);
}

.button-danger {
  border-color: rgba(255, 120, 142, 0.25);
  background: var(--danger-soft);
  color: #ff9aac;
}

.button-ghost {
  border-color: transparent;
  background: transparent;
  color: var(--muted-strong);
}

.button.is-loading > span {
  opacity: 0.65;
}

.button.is-loading::before {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  content: "";
}

.icon-button {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted-strong);
  transition: color 0.16s ease, background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.icon-button:hover {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

.icon-button.compact {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
}

.icon-button.compact svg {
  width: 18px;
}

.icon-button.spinning svg {
  animation: spin 0.8s linear infinite;
}

.login-trust {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
}

.login-trust span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.login-trust svg {
  width: 15px;
  height: 15px;
  color: var(--green);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 9px var(--green);
}

.login-visual {
  position: relative;
  min-height: 580px;
}

.orb {
  position: absolute;
  border-radius: 50%;
}

.orb-main {
  top: 52px;
  left: 50%;
  width: 390px;
  height: 390px;
  transform: translateX(-48%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.18), transparent 15%),
    radial-gradient(circle at 50% 65%, rgba(24, 26, 46, 0.18), transparent 50%),
    linear-gradient(145deg, rgba(139, 92, 246, 0.8), rgba(42, 109, 168, 0.3) 58%, rgba(9, 13, 22, 0.45));
  box-shadow: inset -40px -60px 100px rgba(6, 8, 16, 0.6), inset 18px 18px 50px rgba(255, 255, 255, 0.08), 0 45px 140px rgba(84, 44, 172, 0.35);
  animation: float 8s ease-in-out infinite;
}

.orb-main::before,
.orb-main::after {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  content: "";
}

.orb-main::before {
  inset: 46px;
}

.orb-main::after {
  inset: 105px;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.24), transparent 12%), rgba(8, 10, 18, 0.2);
  box-shadow: 0 0 70px rgba(52, 215, 232, 0.16);
}

.orb-small {
  right: 2%;
  bottom: 76px;
  width: 90px;
  height: 90px;
  border: 1px solid rgba(255,255,255,.1);
  background: linear-gradient(135deg, rgba(52, 215, 232, 0.68), rgba(80, 54, 160, 0.34));
  box-shadow: inset -15px -15px 30px rgba(7,9,16,.5), 0 20px 60px rgba(26, 163, 183, .16);
  animation: float 6s ease-in-out infinite reverse;
}

.floating-card {
  position: absolute;
  z-index: 2;
  border-radius: 17px;
}

.floating-sms {
  top: 88px;
  right: -18px;
  display: flex;
  width: 258px;
  align-items: center;
  gap: 13px;
  padding: 16px;
  animation: float 7s ease-in-out infinite;
}

.floating-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 12px;
  background: var(--green-soft);
  color: var(--green);
}

.floating-sms small,
.floating-number small {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 10px;
}

.floating-sms strong,
.floating-number strong {
  display: block;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
}

.success-pulse {
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 13px var(--green);
}

.floating-number {
  bottom: 72px;
  left: -34px;
  min-width: 236px;
  padding: 17px 18px;
  animation: float 9s ease-in-out infinite reverse;
}

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

.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  gap: 0;
}

.sidebar {
  position: fixed;
  z-index: 100;
  top: 12px;
  bottom: 12px;
  left: 12px;
  display: flex;
  width: calc(var(--sidebar) - 12px);
  flex-direction: column;
  padding: 20px 14px 14px;
  border-radius: 20px;
  background: rgba(11, 14, 23, 0.84);
}

.sidebar-brand {
  padding: 0 6px 22px;
}

.sidebar-brand .brand-mark {
  width: 39px;
  height: 39px;
  border-radius: 12px;
}

.sidebar-brand .brand-mark svg {
  width: 26px;
  height: 26px;
}

.sidebar-nav {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  overflow-y: auto;
}

.nav-label {
  margin: 15px 12px 8px;
  color: #687287;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-size: 9px;
  font-weight: 750;
}

.nav-label-spaced {
  margin-top: 28px;
}

.nav-item {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 43px;
  align-items: center;
  gap: 11px;
  padding: 0 12px;
  border-radius: 11px;
  background: transparent;
  color: #8f99ac;
  text-align: left;
  font-size: 13px;
  font-weight: 560;
  transition: background 0.16s ease, color 0.16s ease;
}

.nav-item::before {
  position: absolute;
  left: -14px;
  width: 3px;
  height: 20px;
  border-radius: 0 4px 4px 0;
  background: var(--primary);
  opacity: 0;
  box-shadow: 0 0 12px var(--primary);
  content: "";
  transform: scaleY(0.6);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.035);
  color: #c7ceda;
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.15), rgba(139, 92, 246, 0.04));
  color: white;
}

.nav-item.active::before {
  opacity: 1;
  transform: scaleY(1);
}

.nav-item svg {
  width: 18px;
  height: 18px;
}

.nav-item.active svg {
  color: var(--primary-bright);
}

.nav-badge {
  min-width: 21px;
  margin-left: auto;
  padding: 2px 6px;
  border-radius: 10px;
  background: var(--primary);
  color: white;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
}

.sidebar-footer {
  display: grid;
  gap: 10px;
  padding-top: 15px;
  border-top: 1px solid var(--border);
}

.connection-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.connection-pill > svg {
  width: 15px;
  margin-left: auto;
  color: #596378;
}

.connection-icon {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 9px;
  background: var(--green-soft);
}

.connection-icon i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
}

.connection-pill strong,
.connection-pill span {
  display: block;
}

.connection-pill strong {
  font-size: 11px;
}

.connection-pill div > span {
  margin-top: 1px;
  color: var(--green);
  font-size: 9px;
}

.profile-button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 8px 7px;
  border-radius: 11px;
  background: transparent;
  text-align: left;
}

.profile-button:hover {
  background: rgba(255, 255, 255, 0.035);
}

.profile-button .avatar {
  display: grid;
  width: 33px;
  height: 33px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(155,124,255,.45), rgba(52,215,232,.18));
  font-size: 12px;
  font-weight: 700;
}

.profile-button > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.profile-button strong,
.profile-button small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-button strong {
  font-size: 11px;
}

.profile-button small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 9px;
}

.profile-button > svg {
  width: 16px;
  color: #596378;
}

.workspace {
  min-width: 0;
  grid-column: 2;
  padding: 0 28px 50px;
}

.topbar {
  position: sticky;
  z-index: 50;
  top: 0;
  display: flex;
  min-height: 86px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: linear-gradient(180deg, rgba(7,9,16,.98) 0%, rgba(7,9,16,.86) 72%, transparent 100%);
  backdrop-filter: blur(14px);
}

.topbar-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-title span {
  display: block;
  margin-bottom: 3px;
  color: #788397;
  font-size: 10px;
}

.topbar-title h1 {
  margin: 0;
  letter-spacing: -0.035em;
  font-size: 24px;
  line-height: 1.1;
  font-weight: 650;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.last-updated {
  margin-right: 5px;
  color: #6f798c;
  font-size: 10px;
}

.mobile-menu-button {
  display: none;
}

.page-content {
  max-width: 1480px;
  margin: 0 auto;
  animation: fade-in 0.22s ease;
}

.welcome-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 15px 0 22px;
}

.welcome-row h2 {
  margin: 0 0 7px;
  letter-spacing: -0.035em;
  font-size: 22px;
  font-weight: 620;
}

.welcome-row p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.date-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255,255,255,.025);
  color: var(--muted-strong);
  font-size: 10px;
}

.date-pill svg {
  width: 14px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
}

.metric-card {
  position: relative;
  overflow: hidden;
  min-height: 128px;
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(15, 19, 31, 0.64);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}

.metric-card::after {
  position: absolute;
  right: -34px;
  bottom: -56px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--card-glow, rgba(139,92,246,.12));
  filter: blur(28px);
  content: "";
}

.metric-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
  font-weight: 580;
}

.metric-icon {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(255,255,255,.035);
  color: var(--metric-color, var(--primary-bright));
}

.metric-icon svg {
  width: 15px;
  height: 15px;
}

.metric-value {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 12px;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  font-size: 26px;
  line-height: 1;
  font-weight: 660;
}

.metric-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  color: #727d90;
  font-size: 9px;
}

.metric-foot .positive {
  color: var(--green);
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.75fr);
  gap: 13px;
  margin-top: 13px;
}

.panel {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: rgba(15, 19, 31, 0.62);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}

.panel-header {
  display: flex;
  min-height: 61px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 18px;
  border-bottom: 1px solid var(--border);
}

.panel-header h3 {
  margin: 0;
  letter-spacing: -0.02em;
  font-size: 13px;
  font-weight: 630;
}

.panel-header p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.panel-header .button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 10px;
}

.chart-panel {
  min-height: 310px;
}

.chart-wrap {
  position: relative;
  height: 245px;
  padding: 22px 18px 16px 48px;
}

.chart-y-axis {
  position: absolute;
  top: 22px;
  bottom: 37px;
  left: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #5f697c;
  font-size: 8px;
}

.chart {
  position: relative;
  display: flex;
  height: 100%;
  align-items: flex-end;
  justify-content: space-around;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  background-image: linear-gradient(to bottom, transparent calc(25% - 1px), var(--border) 25%, transparent calc(25% + 1px), transparent calc(50% - 1px), var(--border) 50%, transparent calc(50% + 1px), transparent calc(75% - 1px), var(--border) 75%, transparent calc(75% + 1px));
}

.chart-column {
  position: relative;
  display: flex;
  width: 100%;
  height: 100%;
  align-items: flex-end;
  justify-content: center;
}

.chart-bar {
  width: min(28px, 62%);
  min-height: 3px;
  border-radius: 7px 7px 2px 2px;
  background: linear-gradient(180deg, var(--primary-bright), rgba(99,73,177,.48));
  box-shadow: 0 0 24px rgba(139,92,246,.12);
  transition: height 0.3s ease;
}

.chart-column:hover .chart-bar {
  filter: brightness(1.16);
}

.chart-label {
  position: absolute;
  bottom: -22px;
  color: #697487;
  font-size: 8px;
}

.chart-tooltip {
  position: absolute;
  z-index: 2;
  bottom: calc(var(--height) + 7px);
  padding: 5px 7px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface-strong);
  opacity: 0;
  font-size: 8px;
  white-space: nowrap;
  pointer-events: none;
  transform: translateY(3px);
  transition: opacity .15s ease, transform .15s ease;
}

.chart-column:hover .chart-tooltip {
  opacity: 1;
  transform: translateY(0);
}

.active-list {
  display: grid;
  gap: 8px;
  padding: 11px;
}

.activation-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: rgba(255,255,255,.018);
  transition: background .16s ease, border-color .16s ease;
}

.activation-row.clickable:hover {
  border-color: var(--border);
  background: rgba(255,255,255,.04);
  cursor: pointer;
}

.service-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(139,92,246,.14), rgba(52,215,232,.07));
  color: var(--primary-bright);
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
}

.activation-main {
  min-width: 0;
  flex: 1;
}

.activation-main strong,
.activation-main span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activation-main strong {
  font-size: 10px;
}

.activation-main span {
  margin-top: 2px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 9px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border: 1px solid transparent;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 8px;
  font-weight: 650;
}

.status::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.status-waiting {
  border-color: rgba(245,199,91,.12);
  background: var(--yellow-soft);
  color: var(--yellow);
}

.status-received,
.status-success {
  border-color: rgba(65,217,154,.12);
  background: var(--green-soft);
  color: var(--green);
}

.status-cancelled,
.status-error {
  border-color: rgba(255,120,142,.12);
  background: var(--danger-soft);
  color: var(--danger);
}

.status-neutral {
  border-color: var(--border);
  background: rgba(255,255,255,.03);
  color: var(--muted-strong);
}

.recent-panel {
  margin-top: 13px;
}

.data-table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.data-table th {
  height: 39px;
  padding: 0 15px;
  border-bottom: 1px solid var(--border);
  color: #677286;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: 8px;
  font-weight: 700;
}

.data-table td {
  height: 58px;
  padding: 0 15px;
  border-bottom: 1px solid rgba(255,255,255,.045);
  color: var(--muted-strong);
  font-size: 10px;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr {
  transition: background .15s ease;
}

.data-table tbody tr.clickable:hover {
  background: rgba(255,255,255,.025);
  cursor: pointer;
}

.table-service {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
}

.table-service .service-avatar {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  font-size: 9px;
}

.table-service strong,
.table-service span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-service strong {
  color: var(--text);
  font-size: 10px;
}

.table-service span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.mono {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

.empty-state {
  display: grid;
  min-height: 230px;
  place-items: center;
  padding: 38px 20px;
  text-align: center;
}

.empty-icon {
  display: grid;
  width: 50px;
  height: 50px;
  margin: 0 auto 13px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: rgba(255,255,255,.025);
  color: #687286;
}

.empty-icon svg {
  width: 23px;
  height: 23px;
}

.empty-state h3 {
  margin: 0 0 6px;
  font-size: 13px;
}

.empty-state p {
  max-width: 360px;
  margin: 0 auto 16px;
  color: var(--muted);
  font-size: 10px;
}

.skeleton {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255,255,255,.045);
}

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

.catalog-layout {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 13px;
  align-items: start;
  margin-top: 14px;
}

.filters-panel {
  position: sticky;
  top: 98px;
  padding: 17px;
}

.filters-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.filters-header h3 {
  margin: 0;
  font-size: 13px;
}

.link-button {
  padding: 0;
  background: transparent;
  color: var(--primary-bright);
  font-size: 9px;
}

.filter-group {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}

.filter-group > label,
.filter-group > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 620;
}

.control,
.select-control {
  width: 100%;
  min-height: 41px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: 0;
  background: rgba(5,8,14,.36);
  color: var(--muted-strong);
  font-size: 10px;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.control:focus,
.select-control:focus {
  border-color: rgba(155,124,255,.48);
  box-shadow: 0 0 0 3px rgba(139,92,246,.09);
}

.select-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238e98aa' stroke-width='1.8'%3E%3Cpath d='m8 10 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 15px;
  padding-right: 32px;
}

.select-control option {
  background: #101522;
  color: var(--text);
}

.price-range {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.input-prefix {
  position: relative;
}

.input-prefix::before {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 10px;
  color: #697487;
  font-size: 10px;
  content: "$";
  transform: translateY(-50%);
}

.input-prefix .control {
  padding-left: 23px;
}

.toggle-row {
  display: flex;
  min-height: 41px;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px;
  color: var(--muted-strong);
  font-size: 10px;
}

.switch {
  position: relative;
  width: 34px;
  height: 19px;
}

.switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.switch-track {
  position: absolute;
  inset: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,.055);
  transition: background .16s ease, border-color .16s ease;
}

.switch-track::after {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #8490a3;
  content: "";
  transition: transform .16s ease, background .16s ease;
}

.switch input:checked + .switch-track {
  border-color: rgba(155,124,255,.4);
  background: rgba(139,92,246,.34);
}

.switch input:checked + .switch-track::after {
  background: #d5caff;
  transform: translateX(15px);
}

.quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.chip {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,.025);
  color: var(--muted);
  font-size: 8px;
}

.chip:hover,
.chip.active {
  border-color: rgba(155,124,255,.28);
  background: var(--primary-soft);
  color: var(--primary-bright);
}

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

.catalog-toolbar {
  display: flex;
  min-height: 61px;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: rgba(15,19,31,.62);
}

.search-control {
  position: relative;
  min-width: 180px;
  flex: 1;
}

.search-control svg {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 16px;
  color: #6f798c;
  transform: translateY(-50%);
}

.search-control .control {
  padding-left: 36px;
}

.catalog-toolbar .select-control {
  width: 176px;
}

.results-count {
  min-width: 105px;
  color: var(--muted);
  text-align: right;
  font-size: 9px;
}

.catalog-table-panel {
  margin-top: 10px;
}

.catalog-table .col-service {
  width: 26%;
}

.catalog-table .col-country {
  width: 24%;
}

.catalog-table .col-price,
.catalog-table .col-stock {
  width: 16%;
}

.catalog-table .col-action {
  width: 18%;
  text-align: right;
}

.catalog-table td:last-child {
  text-align: right;
}

.country-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.flag {
  display: grid;
  width: 27px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: rgba(255,255,255,.03);
  font-size: 13px;
}

.country-cell strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
}

.country-cell span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.price {
  color: var(--text);
  font-size: 12px;
  font-weight: 680;
}

.stock {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted-strong);
}

.stock i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(65,217,154,.55);
}

.table-buy-button {
  min-height: 32px;
  padding: 0 11px;
  font-size: 9px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px;
  border-top: 1px solid var(--border);
}

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

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

.pagination-actions .button {
  min-height: 31px;
  padding: 0 10px;
  font-size: 9px;
}

.activations-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.activation-card {
  position: relative;
  overflow: hidden;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(15,19,31,.64);
  transition: border-color .16s ease, transform .16s ease, background .16s ease;
}

.activation-card:hover {
  border-color: var(--border-strong);
  background: rgba(20,25,39,.72);
  transform: translateY(-2px);
}

.activation-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.activation-card-head .status {
  margin-left: auto;
}

.activation-card-number {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(5,8,14,.35);
}

.activation-card-number strong {
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
  font-size: 15px;
}

.copy-button {
  width: 31px;
  height: 31px;
  border: 0;
  background: rgba(255,255,255,.035);
}

.copy-button svg {
  width: 15px;
}

.activation-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 9px;
}

.activation-card .button {
  width: 100%;
  margin-top: 14px;
}

.history-toolbar {
  display: flex;
  align-items: center;
  gap: 9px;
}

.history-toolbar .select-control {
  width: 145px;
  min-height: 34px;
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, .7fr);
  gap: 13px;
  margin-top: 14px;
}

.settings-card {
  padding: 19px;
}

.settings-card h3 {
  margin: 0;
  font-size: 14px;
}

.settings-card > p {
  margin: 6px 0 20px;
  color: var(--muted);
  font-size: 10px;
}

.connection-card {
  position: relative;
  overflow: hidden;
}

.connection-card::after {
  position: absolute;
  top: -80px;
  right: -70px;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: rgba(52,211,153,.08);
  filter: blur(45px);
  content: "";
}

.connection-hero {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid rgba(65,217,154,.14);
  border-radius: 13px;
  background: rgba(52,211,153,.055);
}

.connection-hero .service-avatar {
  width: 40px;
  height: 40px;
  color: var(--green);
}

.connection-hero strong,
.connection-hero span {
  display: block;
}

.connection-hero span {
  margin-top: 2px;
  color: var(--green);
  font-size: 9px;
}

.connection-detail {
  display: flex;
  min-height: 45px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--border);
}

.connection-detail:last-of-type {
  border-bottom: 0;
}

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

.connection-detail strong {
  text-align: right;
  font-size: 10px;
}

.settings-actions {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}

.security-list {
  display: grid;
  gap: 12px;
}

.security-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.security-item > span {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  background: var(--primary-soft);
  color: var(--primary-bright);
}

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

.security-item strong,
.security-item small {
  display: block;
}

.security-item strong {
  font-size: 10px;
}

.security-item small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.drawer-backdrop,
.modal-backdrop,
.mobile-overlay {
  position: fixed;
  z-index: 300;
  inset: 0;
  background: rgba(3, 5, 10, 0.64);
  backdrop-filter: blur(5px);
  animation: fade-in .18s ease;
}

.drawer {
  position: fixed;
  z-index: 310;
  top: 10px;
  right: 10px;
  bottom: 10px;
  width: min(450px, calc(100vw - 20px));
  overflow-y: auto;
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  background: rgba(12, 16, 27, .96);
  box-shadow: -30px 0 90px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.04);
  transform: translateX(calc(100% + 20px));
  transition: transform .24s cubic-bezier(.2,.8,.2,1);
}

.drawer.open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
}

.drawer-header h2 {
  margin: 0;
  letter-spacing: -.03em;
  font-size: 18px;
}

.drawer-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.drawer-body {
  padding: 20px;
}

.purchase-summary {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255,255,255,.025);
}

.purchase-service {
  display: flex;
  align-items: center;
  gap: 11px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--border);
}

.purchase-service .service-avatar {
  width: 42px;
  height: 42px;
}

.purchase-service strong,
.purchase-service span {
  display: block;
}

.purchase-service span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.summary-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 10px;
}

.summary-line strong {
  color: var(--text);
  font-weight: 600;
}

.summary-line.total {
  margin-top: 4px;
  padding-top: 13px;
  border-top: 1px solid var(--border);
}

.summary-line.total strong {
  color: var(--primary-bright);
  font-size: 18px;
}

.info-callout {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid rgba(52,215,232,.12);
  border-radius: 11px;
  background: var(--cyan-soft);
  color: #a7cfd5;
  font-size: 9px;
  line-height: 1.55;
}

.info-callout svg {
  width: 16px;
  flex: 0 0 auto;
  color: var(--cyan);
}

.drawer-actions {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.drawer-actions .button {
  width: 100%;
  min-height: 45px;
}

.sms-number-block {
  margin: 2px 0 18px;
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(5,8,14,.38);
}

.sms-number-label {
  color: var(--muted);
  font-size: 9px;
}

.sms-number-value {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 7px;
}

.sms-number-value strong {
  letter-spacing: .025em;
  font-variant-numeric: tabular-nums;
  font-size: 20px;
}

.sms-message {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(65,217,154,.13);
  border-radius: 14px;
  background: var(--green-soft);
}

.sms-message.waiting {
  border-color: rgba(245,199,91,.13);
  background: var(--yellow-soft);
}

.sms-message-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 9px;
}

.sms-code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 13px 0 10px;
}

.sms-code strong {
  color: var(--green);
  letter-spacing: .08em;
  font-variant-numeric: tabular-nums;
  font-size: 26px;
}

.sms-message p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 10px;
  line-height: 1.6;
}

.waiting-visual {
  display: grid;
  place-items: center;
  padding: 22px 10px;
  text-align: center;
}

.pulse-rings {
  position: relative;
  display: grid;
  width: 55px;
  height: 55px;
  place-items: center;
  margin-bottom: 13px;
  border: 1px solid rgba(245,199,91,.2);
  border-radius: 50%;
}

.pulse-rings::before,
.pulse-rings::after {
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(245,199,91,.24);
  border-radius: 50%;
  content: "";
  animation: pulse 1.8s ease-out infinite;
}

.pulse-rings::after {
  animation-delay: .6s;
}

.pulse-rings svg {
  width: 21px;
  color: var(--yellow);
}

.waiting-visual strong {
  font-size: 11px;
}

.waiting-visual span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.modal-backdrop {
  z-index: 400;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal {
  width: min(420px, 100%);
  padding: 22px;
  border-radius: 20px;
  background: rgba(14,18,30,.95);
  animation: modal-in .2s ease;
}

.modal-icon {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 15px;
  place-items: center;
  border-radius: 12px;
  background: var(--danger-soft);
  color: var(--danger);
}

.modal h2 {
  margin: 0;
  letter-spacing: -.03em;
  font-size: 18px;
}

.modal p {
  margin: 8px 0 19px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}

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

.toast-region {
  position: fixed;
  z-index: 600;
  top: 16px;
  right: 16px;
  display: grid;
  width: min(360px, calc(100vw - 32px));
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 13px;
  border: 1px solid var(--border-strong);
  border-radius: 13px;
  background: rgba(17,21,34,.96);
  box-shadow: 0 18px 50px rgba(0,0,0,.38);
  backdrop-filter: blur(18px);
  animation: toast-in .22s ease;
  pointer-events: auto;
}

.toast > span:first-child {
  display: grid;
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--green);
}

.toast.error > span:first-child {
  background: var(--danger-soft);
  color: var(--danger);
}

.toast svg {
  width: 13px;
}

.toast strong,
.toast small {
  display: block;
}

.toast strong {
  font-size: 10px;
}

.toast small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.toast button {
  margin-left: auto;
  padding: 2px;
  background: transparent;
  color: #667185;
}

.toast button svg {
  width: 14px;
}

.mobile-nav,
.mobile-overlay {
  display: none;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

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

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}

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

@keyframes pulse {
  0% { opacity: .8; transform: scale(.8); }
  100% { opacity: 0; transform: scale(1.8); }
}

@media (max-width: 1180px) {
  :root {
    --sidebar: 224px;
  }

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

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

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

  .catalog-layout {
    grid-template-columns: 218px minmax(0, 1fr);
  }

  .catalog-table .col-stock {
    display: none;
  }
}

@media (max-width: 900px) {
  .login-screen {
    grid-template-columns: minmax(0, 520px);
    justify-content: center;
    width: min(560px, calc(100% - 36px));
  }

  .login-visual {
    display: none;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    width: 252px;
    transform: translateX(calc(-100% - 24px));
    transition: transform .22s ease;
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .workspace {
    padding: 0 18px 88px;
  }

  .mobile-menu-button {
    display: grid;
  }

  .mobile-overlay.visible {
    display: block;
    z-index: 90;
  }

  .catalog-layout {
    display: block;
  }

  .filters-panel {
    position: static;
    margin-bottom: 10px;
  }

  .filters-panel.collapsed .filter-body {
    display: none;
  }

  .catalog-toolbar {
    flex-wrap: wrap;
  }

  .search-control {
    flex-basis: 100%;
  }

  .catalog-toolbar .select-control {
    flex: 1;
    width: auto;
  }

  .mobile-nav {
    position: fixed;
    z-index: 80;
    right: 10px;
    bottom: 10px;
    left: 10px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    min-height: 62px;
    padding: 6px;
    border-radius: 18px;
    background: rgba(12,16,27,.92);
  }

  .mobile-nav-item {
    display: grid;
    place-items: center;
    gap: 2px;
    padding: 4px;
    border-radius: 12px;
    background: transparent;
    color: #737e92;
    font-size: 8px;
  }

  .mobile-nav-item svg {
    width: 19px;
    height: 19px;
  }

  .mobile-nav-item.active {
    background: var(--primary-soft);
    color: var(--primary-bright);
  }

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

@media (max-width: 680px) {
  .login-card {
    padding: 28px 22px;
  }

  .login-copy {
    margin-top: 38px;
  }

  .login-copy h1 {
    font-size: 34px;
  }

  .login-trust {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }

  .workspace {
    padding-right: 12px;
    padding-left: 12px;
  }

  .topbar {
    min-height: 76px;
  }

  .topbar-title h1 {
    font-size: 20px;
  }

  .topbar-title span,
  .last-updated,
  .desktop-buy-button {
    display: none !important;
  }

  .welcome-row {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .metric-card {
    min-height: 118px;
    padding: 14px;
  }

  .metric-value {
    font-size: 22px;
  }

  .chart-wrap {
    padding-left: 40px;
  }

  .recent-panel .data-table th:nth-child(3),
  .recent-panel .data-table td:nth-child(3),
  .recent-panel .data-table th:nth-child(4),
  .recent-panel .data-table td:nth-child(4) {
    display: none;
  }

  .activations-grid {
    grid-template-columns: 1fr;
  }

  .catalog-toolbar .select-control {
    flex-basis: calc(100% - 110px);
  }

  .results-count {
    flex: 1;
  }

  .catalog-table thead {
    display: none;
  }

  .catalog-table,
  .catalog-table tbody,
  .catalog-table tr,
  .catalog-table td {
    display: block;
    width: 100% !important;
    height: auto;
  }

  .catalog-table tr {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 15px;
    border-bottom: 1px solid var(--border);
  }

  .catalog-table td {
    padding: 0;
    border: 0;
  }

  .catalog-table td:nth-child(1),
  .catalog-table td:nth-child(2) {
    grid-column: span 1;
  }

  .catalog-table td:nth-child(3),
  .catalog-table td:nth-child(5) {
    align-self: center;
  }

  .catalog-table td:last-child {
    text-align: right;
  }

  .catalog-table .col-stock {
    display: none;
  }

  .table-buy-button {
    width: 100%;
  }

  .history-panel .data-table th:nth-child(3),
  .history-panel .data-table td:nth-child(3),
  .history-panel .data-table th:nth-child(5),
  .history-panel .data-table td:nth-child(5) {
    display: none;
  }

  .drawer {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 92vh;
    border-radius: 22px 22px 0 0;
    transform: translateY(105%);
  }

  .drawer.open {
    transform: translateY(0);
  }
}

@media (max-width: 420px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .metric-card {
    min-height: 104px;
  }

  .metric-value {
    margin-top: 7px;
  }

  .price-range {
    grid-template-columns: 1fr;
  }
}

@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;
  }
}

@supports not (backdrop-filter: blur(1px)) {
  .glass-panel,
  .sidebar,
  .drawer,
  .modal,
  .toast {
    background: var(--surface-strong);
  }
}
