:root {
  --bg: #f7f8fb;
  --panel: #ffffff;
  --ink: #111318;
  --muted: #6c7280;
  --line: #e2e7ef;
  --focus: rgba(101, 54, 217, 0.34);
  --purple: #6536d9;
  --purple-dark: #4d24bd;
  --purple-soft: #efe9ff;
  --orange: #ff7a1a;
  --green: #0f8a42;
  --green-soft: #e1f7e9;
  --sidebar: #070b14;
  --sidebar-2: #111827;
  --shadow: 0 20px 60px rgba(31, 41, 55, 0.08);
  --card-shadow: 0 14px 38px rgba(15, 23, 42, 0.07);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(101, 54, 217, 0.05), transparent 32%),
    linear-gradient(315deg, rgba(17, 24, 39, 0.04), transparent 34%),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[hidden] {
  display: none !important;
}

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

button {
  touch-action: manipulation;
}

button,
a,
input,
select,
textarea {
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease,
    opacity 160ms ease;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.auth-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, #070b14 0%, #111827 46%, #f7f8fb 46%, #f7f8fb 100%);
}

.auth-card {
  width: min(100%, 440px);
  padding: 34px;
  border: 1px solid rgba(226, 231, 239, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.22);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
}

.auth-logo {
  width: 116px;
  height: 28px;
  object-fit: contain;
  object-position: left center;
}

.auth-card h1 {
  margin: 0 0 10px;
  color: #070b14;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: 0;
}

.auth-copy {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.auth-link {
  width: 100%;
  min-height: 40px;
  margin-top: 8px;
  border: 0;
  color: var(--purple);
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 680;
}

.auth-link:hover,
.auth-link:focus-visible {
  text-decoration: underline;
}

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

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  gap: 30px;
  padding: 34px 22px;
  color: #f8fafc;
  background:
    linear-gradient(160deg, rgba(101, 54, 217, 0.16), transparent 40%),
    linear-gradient(180deg, var(--sidebar), var(--sidebar-2));
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.05);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 8px;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: #ffffff;
  color: #111827;
  font-size: 20px;
  font-weight: 760;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.brand-wordmark {
  display: block;
  width: 92px;
  height: 18px;
  margin-bottom: 7px;
  object-fit: contain;
  object-position: left center;
  filter: brightness(0) invert(1);
}

.brand-block h1,
.topbar h2,
.panel h3 {
  margin: 0;
  line-height: 1.1;
}

.brand-block h1 {
  color: #ffffff;
  font-size: 21px;
  font-weight: 720;
}

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

.sidebar .eyebrow {
  color: rgba(248, 250, 252, 0.72);
}

nav {
  display: grid;
  gap: 10px;
}

.nav-item,
.primary,
.secondary {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 680;
}

.nav-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  color: #d9e2ef;
  background: transparent;
  text-align: left;
}

.nav-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: #ffffff;
  line-height: 1;
}

.nav-caret {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: #ffffff;
  opacity: 0;
}

.nav-icon svg,
.nav-caret svg,
.metric-icon svg,
.metric-arrow svg,
.button-plus svg,
.button-icon svg,
.icon-button svg,
.rewrite-icon-button svg,
.search-box svg {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.nav-icon svg,
.nav-caret svg {
  width: 22px;
  height: 22px;
}

.nav-item.active,
.nav-item:hover {
  color: #ffffff;
  background: linear-gradient(135deg, #6f3bf1, #642ecb);
  box-shadow: 0 14px 34px rgba(101, 54, 217, 0.32);
}

.nav-item.active .nav-caret,
.nav-item:hover .nav-caret {
  opacity: 1;
}

.connection-card {
  display: grid;
  gap: 16px;
  margin-top: auto;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.18);
}

.connection-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: #f8fafc;
  font-size: 14px;
}

.connection-row span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.connection-row strong {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #41d982;
  font-size: 13px;
}

.connection-row strong::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #41d982;
}

.sidebar-logout {
  min-height: 42px;
  margin-top: 4px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  font-weight: 680;
}

.sidebar-logout:hover,
.sidebar-logout:focus-visible {
  background: rgba(255, 255, 255, 0.12);
}

.connection-icon {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  font-size: 11px;
  font-weight: 760;
}

.connection-icon.woo {
  background: #7952b3;
}

.connection-icon.ai {
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

main {
  display: flex;
  min-width: 0;
  min-height: 100vh;
  flex-direction: column;
  padding: 38px 46px 24px;
}

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

.topbar h2 {
  font-size: 32px;
  font-weight: 760;
  letter-spacing: 0;
}

.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 20px;
  color: #fff;
  background: linear-gradient(135deg, #6d39e6, #5f2ccc);
  box-shadow: 0 12px 24px rgba(101, 54, 217, 0.28);
}

.primary:hover {
  background: linear-gradient(135deg, #5d2dcc, #4e23b5);
}

.button-plus {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
}

.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 16px;
  color: var(--ink);
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.04);
}

.secondary:hover {
  border-color: #cfd7e4;
  background: #fbfcff;
}

.wide {
  width: 100%;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}

.metric,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--card-shadow);
}

.metric {
  position: relative;
  display: grid;
  min-height: 142px;
  grid-template-columns: 70px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 18px;
  padding: 26px;
}

.metric-icon {
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  font-size: 30px;
  box-shadow: 0 14px 30px rgba(101, 54, 217, 0.25);
}

.metric-purple .metric-icon {
  background: linear-gradient(135deg, #7c3ff2, #6536d9);
}

.metric-orange .metric-icon {
  background: linear-gradient(135deg, #ff8a22, #ff6b13);
  box-shadow: 0 14px 30px rgba(255, 122, 26, 0.25);
}

.metric-dark .metric-icon {
  background: linear-gradient(135deg, #1b2230, #080c14);
  box-shadow: 0 14px 30px rgba(17, 24, 39, 0.22);
}

.metric span {
  display: block;
  color: #565d6c;
  font-size: 15px;
  font-weight: 600;
}

.metric strong {
  display: block;
  margin-top: 5px;
  color: #030712;
  font-size: 29px;
  font-weight: 760;
}

.metric p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.metric-arrow {
  display: grid !important;
  width: 24px;
  height: 24px;
  place-items: center;
  align-self: start;
  color: #2f3747 !important;
}

.panel {
  padding: 24px;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.panel h3 {
  font-size: 24px;
  font-weight: 760;
}

.panel-tools {
  display: flex;
  align-items: center;
  gap: 14px;
}

.panel-tools select,
.search-box input {
  height: 46px;
  border-radius: 8px;
  background: #ffffff;
}

.search-box {
  position: relative;
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.search-box input {
  min-width: 270px;
  padding-right: 42px;
}

.search-box span {
  position: absolute;
  right: 14px;
  top: 50%;
  color: #9aa3b2;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  font-size: 20px;
  transform: translateY(-50%);
}

.product-list {
  display: grid;
  gap: 8px;
}

.product-row {
  display: grid;
  min-height: 94px;
  grid-template-columns: 74px minmax(0, 1fr) auto auto;
  gap: 18px;
  align-items: center;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.product-thumb {
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9fc;
  color: var(--purple);
  font-size: 24px;
  font-weight: 760;
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-row h4 {
  margin: 0 0 7px;
  overflow: hidden;
  color: #0d1117;
  font-size: 15px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-row p,
.hint,
.body-copy {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.body-copy {
  margin-bottom: 16px;
  line-height: 1.5;
}

.status-pill {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border-radius: 999px;
  padding: 0 14px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 12px;
  font-weight: 760;
  white-space: nowrap;
}

.review-button {
  min-width: 106px;
}

.review-button span {
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
  font-size: 20px;
}

.form-grid,
.review-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(420px, 1.18fr);
  gap: 18px;
}

label {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  color: #344054;
  font-size: 13px;
  font-weight: 680;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--ink);
  background: #fbfcfe;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #cfd7e4;
  background: #ffffff;
}

textarea {
  resize: vertical;
}

.check-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.check-row input {
  width: 18px;
  height: 18px;
}

.rewrite-field {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}

.field-action-row {
  display: flex;
  min-height: 32px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.field-action-row label {
  margin: 0;
}

.field-action-row label span {
  margin-left: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: none;
}

.rewrite-icon-button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  min-height: 34px;
  place-items: center;
  border: 1px solid #d7c9ff;
  border-radius: 8px;
  color: var(--purple);
  background: var(--purple-soft);
  cursor: pointer;
  font-size: 11px;
  font-weight: 760;
}

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

.rewrite-icon-button:hover,
.rewrite-icon-button:focus-visible {
  border-color: var(--purple);
}

.editor-section {
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.editor-section h4,
.preview-block h4 {
  margin: 0 0 12px;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.section-title-row h4 {
  margin: 0;
}

.compact {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.suggestion-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: #3f4857;
  font-size: 14px;
  line-height: 1.45;
}

.intelligence-section {
  border: 1px solid #f2d2a9;
  border-radius: 8px;
  padding: 14px;
  background: #fff8ef;
}

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

.preview-panel {
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 48px);
  overflow: auto;
}

.variant-table {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.variant-head,
.variant-row {
  display: grid;
  grid-template-columns: 0.9fr 0.9fr 1.3fr 0.8fr 0.7fr 40px;
  gap: 8px;
  align-items: center;
}

.variant-head {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  text-transform: uppercase;
}

.variant-row input {
  min-width: 0;
}

.icon-button {
  min-height: 42px;
  width: 40px;
  padding: 0;
  font-size: 20px;
  line-height: 1;
}

.icon-button svg {
  width: 20px;
  height: 20px;
}

.empty-state {
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fbfcfe;
  font-size: 13px;
}

.user-list {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.user-row {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.user-row strong,
.user-row span {
  display: block;
}

.user-row strong {
  color: #111318;
  font-size: 14px;
}

.user-row span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.reset-grid {
  margin-top: 16px;
}

.bulk-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.bulk-columns span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border: 1px solid #ded6f8;
  border-radius: 8px;
  padding: 0 10px;
  color: var(--purple);
  background: var(--purple-soft);
  font-size: 12px;
  font-weight: 680;
}

.bulk-result {
  display: grid;
  gap: 12px;
}

.bulk-summary {
  display: flex;
  min-height: 64px;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.bulk-summary strong {
  color: var(--purple);
  font-size: 32px;
  line-height: 1;
}

.bulk-summary span,
.bulk-preview-list span,
.bulk-skipped span {
  color: var(--muted);
  font-size: 13px;
}

.bulk-preview-list {
  display: grid;
  gap: 8px;
}

.bulk-preview-list article {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.bulk-preview-list strong,
.bulk-skipped strong {
  color: #111318;
  font-size: 14px;
}

.bulk-skipped {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid #f2d2a9;
  border-radius: 8px;
  background: #fff8ef;
}

.preview-block {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.preview-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.preview-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #edf1f5;
}

.preview-list li strong,
.preview-list li span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.preview-list li span {
  text-align: right;
}

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

.stat-preview-card {
  min-height: 132px;
  padding: 14px;
  border: 1px solid #e1e7ef;
  border-radius: 8px;
  background: #ffffff;
}

.stat-preview-value {
  display: block;
  min-height: 38px;
  color: #151a23;
  font-size: 32px;
  font-weight: 760;
  line-height: 1;
  overflow-wrap: anywhere;
}

.stat-preview-value.stat-value-long {
  font-size: 25px;
}

.stat-preview-title {
  display: block;
  margin-top: 8px;
  color: #3f4857;
  font-size: 14px;
  font-weight: 720;
}

.stat-preview-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.action-stack {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.source-result {
  min-height: 40px;
  margin: -4px 0 14px;
  padding: 10px 12px;
  border: 1px solid #e1e7ef;
  border-radius: 8px;
  color: #3f4857;
  background: #fbfcfe;
  font-size: 13px;
  line-height: 1.45;
}

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

.catalog-grid h4 {
  margin: 0 0 10px;
}

.catalog-grid ul,
.workflow-list {
  margin: 0;
  padding-left: 18px;
  color: #3f4857;
  font-size: 14px;
  line-height: 1.55;
}

.catalog-grid li {
  margin-bottom: 5px;
}

pre {
  max-height: 280px;
  overflow: auto;
  border-radius: 8px;
  padding: 12px;
  color: #dbeafe;
  background: #101827;
  white-space: pre-wrap;
}

.app-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding-top: 36px;
  color: var(--muted);
  font-size: 13px;
}

.app-footer strong {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #1f2430;
}

.app-footer img {
  width: 78px;
  height: 18px;
  object-fit: contain;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  main {
    padding: 28px;
  }

  .metrics-grid,
  .form-grid,
  .review-layout,
  .catalog-grid {
    grid-template-columns: 1fr;
  }

  .panel-tools {
    width: 100%;
    flex-wrap: wrap;
  }

  .search-box,
  .search-box input {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 820px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .app-shell,
  .stat-preview-grid {
    grid-template-columns: 1fr;
  }

  .sidebar,
  .preview-panel {
    position: static;
    width: 100%;
    min-width: 0;
    height: auto;
    max-height: none;
  }

  .sidebar {
    gap: 18px;
    max-width: 100vw;
    overflow: hidden;
    padding: 22px 20px;
  }

  .brand-block {
    justify-content: flex-start;
  }

  nav {
    display: flex;
    gap: 8px;
    margin: 0 -20px;
    overflow-x: auto;
    padding: 2px 20px 8px;
    scroll-padding-inline: 20px;
    scrollbar-width: none;
  }

  nav::-webkit-scrollbar {
    display: none;
  }

  .brand-block,
  .connection-card {
    min-width: 0;
    width: 100%;
  }

  .nav-item {
    flex: 0 0 auto;
    width: auto;
    min-height: 46px;
    grid-template-columns: 24px auto;
    padding: 11px 14px;
    white-space: nowrap;
  }

  .nav-caret {
    display: none;
  }

  .connection-card {
    width: min(100%, calc(100vw - 40px));
  }

  .connection-row {
    min-width: 0;
    gap: 8px;
  }

  .connection-row span {
    min-width: 0;
  }

  .connection-row strong {
    flex: 0 0 auto;
    font-size: 12px;
  }

  main {
    width: 100%;
    padding: 26px 20px 22px;
  }

  .topbar,
  .panel-header,
  .app-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar .primary,
  .panel-tools,
  .panel-tools select {
    width: 100%;
  }

  .product-row {
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 12px;
  }

  .product-row h4 {
    white-space: normal;
  }

  .product-row .status-pill,
  .product-row .review-button {
    grid-column: 2;
    justify-self: start;
  }

  .variant-head {
    display: none;
  }

  .variant-row {
    grid-template-columns: 1fr 1fr;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
  }

  .mini-grid,
  .stat-preview-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .auth-card,
  .panel {
    padding: 22px;
  }

  .auth-card h1,
  .topbar h2 {
    font-size: 26px;
  }

  .metric {
    min-height: auto;
    grid-template-columns: 54px minmax(0, 1fr);
    padding: 20px;
  }

  .metric-icon {
    width: 52px;
    height: 52px;
    font-size: 25px;
  }

  .metric-arrow {
    display: none !important;
  }

  .preview-list li {
    display: grid;
    gap: 4px;
  }

  .preview-list li span {
    text-align: left;
  }
}

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