﻿:root {
  color-scheme: light;
  --bg: #f5f7ff;
  --surface: #ffffff;
  --surface-2: #eef2ff;
  --field: #ffffff;
  --card-hover: #f8fafb;
  --text: #09122f;
  --muted: #65708c;
  --line: #d9def4;
  --primary: #1669ff;
  --primary-dark: #0c2eb8;
  --purple: #7a32ff;
  --cyan: #05bdf2;
  --navy: #080d29;
  --warning: #c47a03;
  --danger: #b42318;
  --accent: #7a32ff;
  --shadow: 0 18px 48px rgba(9, 18, 47, 0.12);
}

body[data-theme="dark"] {
  color-scheme: dark;
  --bg: #070a16;
  --surface: #10182b;
  --surface-2: #17213a;
  --field: #0b1222;
  --card-hover: #151f36;
  --text: #f5f8ff;
  --muted: #9aa8c7;
  --line: #273554;
  --primary: #38bdf8;
  --primary-dark: #2563eb;
  --purple: #a855f7;
  --cyan: #22d3ee;
  --warning: #fbbf24;
  --danger: #f87171;
  --accent: #a855f7;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  overflow-x: auto;
}

body[data-theme="dark"] .auth-screen {
  background:
    radial-gradient(circle at 18% 82%, rgba(34, 211, 238, 0.16), transparent 30%),
    radial-gradient(circle at 62% 18%, rgba(168, 85, 247, 0.18), transparent 28%),
    linear-gradient(90deg, #071831 0%, #090f2b 42%, #030613 100%);
}

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

button {
  cursor: pointer;
}

.auth-screen {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(430px, 560px) minmax(360px, 520px);
  gap: clamp(24px, 3vw, 52px);
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 36px;
  background:
    radial-gradient(circle at 18% 82%, rgba(5, 189, 242, 0.18), transparent 30%),
    radial-gradient(circle at 62% 18%, rgba(122, 50, 255, 0.2), transparent 28%),
    linear-gradient(90deg, #152f64 0%, #10194a 42%, #070a24 100%);
}

body.session-restoring .auth-screen {
  visibility: hidden;
}

.auth-hero {
  display: contents;
  color: #ffffff;
}

.auth-brand {
  position: fixed;
  top: 28px;
  left: 30px;
  z-index: 2;
}

.auth-brand .brand-mark {
  background: transparent;
}

.auth-brand small {
  color: rgba(255, 255, 255, 0.74);
}

.auth-language-control {
  position: fixed;
  top: 28px;
  right: 30px;
  z-index: 3;
  width: 62px;
}

.auth-language-control select {
  min-height: 40px;
  padding: 0 8px;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(11, 23, 54, 0.72);
  color: #ffffff;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 800;
  box-shadow: var(--shadow);
}

.auth-hero .eyebrow {
  color: #77dcff;
}

.auth-hero-main {
  display: contents;
}

.auth-logo {
  display: block;
  width: min(320px, 24vw);
  max-width: 100%;
  margin: 0;
  filter: drop-shadow(0 22px 34px rgba(0, 0, 0, 0.22));
}

.auth-hero-copy {
  min-width: 0;
}

.auth-hero h1 {
  max-width: 720px;
  margin: 8px 0 14px;
  font-size: clamp(2.4rem, 4.2vw, 4.6rem);
  line-height: 1.02;
}

.auth-copy {
  max-width: 520px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.08rem;
}

.auth-card {
  width: 100%;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  box-shadow: 0 28px 78px rgba(0, 0, 0, 0.28);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 18px;
  padding: 4px;
  border-radius: 8px;
  background: var(--surface-2);
}

.auth-tab {
  min-height: 40px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.auth-tab.active {
  background: var(--surface);
  color: var(--primary-dark);
  box-shadow: 0 8px 20px rgba(23, 33, 43, 0.08);
}

.auth-form {
  display: none;
  gap: 13px;
}

.auth-form.active {
  display: grid;
}

.email-domain-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 8px;
}

.email-domain-row input,
.email-domain-row select {
  min-width: 0;
}

.auth-message {
  display: none;
  min-height: 42px;
  align-items: center;
  border-radius: 8px;
  padding: 10px 12px;
  font-weight: 700;
}

.auth-message.show {
  display: flex;
}

.auth-message.error {
  background: #fff1f0;
  color: var(--danger);
}

.auth-message.success {
  background: var(--surface-2);
  color: var(--primary);
}

.password-rules {
  display: grid;
  gap: 6px;
  margin: -2px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.84rem;
}

.password-rules li::before {
  content: "x";
  display: inline-grid;
  width: 18px;
  height: 18px;
  margin-right: 6px;
  place-items: center;
  border-radius: 50%;
  background: #eef2f6;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.password-rules li.valid {
  color: #075dc9;
}

.password-rules li.valid::before {
  content: "ok";
  background: #dff3ff;
  color: #075dc9;
}

.code-preview {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px dashed var(--primary);
  border-radius: 8px;
  background: #eff6ff;
}

.code-preview span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.code-preview strong {
  font-size: 1.4rem;
  letter-spacing: 0.12em;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(1040px, 1fr);
  min-width: 1320px;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100vh;
  overflow-y: auto;
  padding: 24px 18px;
  background:
    radial-gradient(circle at 15% 12%, rgba(122, 50, 255, 0.32), transparent 36%),
    linear-gradient(180deg, #080d29 0%, #0d1641 100%);
  color: #eef6f8;
}

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

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

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

.brand small,
.connection small {
  color: #a9b3d7;
}

.nav-list {
  display: grid;
  gap: 3px;
}

.nav-item {
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 8px;
  color: #dbe5ff;
  font-size: 0.86rem;
  text-decoration: none;
}

.nav-item.active,
.nav-item:hover {
  background: linear-gradient(90deg, rgba(122, 50, 255, 0.24), rgba(5, 189, 242, 0.12));
  color: #ffffff;
}

.sync-panel {
  margin-top: 4px;
  padding-top: 14px;
  padding-bottom: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.sync-panel h2 {
  margin: 0 0 12px;
  font-size: 0.82rem;
  text-transform: uppercase;
  color: #aab8c4;
}

.sync-all-button {
  width: 100%;
  min-height: 34px;
  margin-bottom: 8px;
  border: 1px solid rgba(50, 216, 246, 0.42);
  border-radius: 8px;
  background: rgba(50, 216, 246, 0.12);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 900;
}

.auto-sync-countdown {
  display: block;
  margin: 0 0 8px;
  color: #a9b3d7;
  font-size: 0.74rem;
  line-height: 1.3;
}

.auto-sync-last-run {
  display: block;
  margin: -3px 0 8px;
  color: #a9b3d7;
  font-size: 0.69rem;
  line-height: 1.3;
}

.auto-sync-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.auto-sync-row .auto-sync-countdown {
  flex: 1;
  margin-bottom: 0;
  white-space: nowrap;
}

.auto-sync-toggle {
  display: inline-grid;
  width: 28px;
  height: 24px;
  place-items: center;
  border: 1px solid rgba(52, 211, 235, 0.55);
  border-radius: 7px;
  background: rgba(52, 211, 235, 0.08);
  color: var(--cyan);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.auto-sync-toggle.paused {
  border-color: rgba(255, 193, 7, 0.6);
  color: var(--warning);
}

.connection {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 4px 10px;
  align-items: start;
  padding: 10px 0;
}

.connection > span {
  width: 10px;
  height: 10px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 16px rgba(5, 189, 242, 0.62);
}

.connection.connected > span {
  background: #22c55e;
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.62);
}

.connection.error > span {
  background: #ef4444;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.62);
}

.connection p,
.connection small {
  margin: 0;
}

.connection small {
  grid-column: 2;
  white-space: nowrap;
  font-size: 0.78rem;
}

.connection p {
  position: relative;
}

.connection.syncing p {
  padding-left: 18px;
}

.connection.syncing p::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.22em;
  width: 11px;
  height: 11px;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 0.72s linear infinite;
}

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

.connection-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin-top: 8px;
}

.mini-button {
  min-width: 0;
  min-height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 7px;
  padding: 0 4px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 0.62rem;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-button:hover {
  border-color: rgba(50, 216, 246, 0.7);
  background: rgba(50, 216, 246, 0.14);
}

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

.sync-progress-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(4, 9, 24, 0.68);
  backdrop-filter: blur(4px);
}

.sync-progress-overlay[hidden] {
  display: none;
}

.sync-progress-card {
  width: min(440px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.sync-progress-card h2,
.sync-progress-card p {
  margin: 0;
}

.sync-progress-card h2 {
  margin-bottom: 8px;
}

.sync-progress-percent {
  display: block;
  margin-top: 12px;
  color: var(--cyan);
  font-size: 1.45rem;
  line-height: 1;
}

.sync-progress-track {
  height: 12px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
}

.sync-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--cyan));
  transition: width 0.24s ease;
}

.sync-progress-cancel {
  width: 100%;
  margin-top: 14px;
}

.content {
  min-width: 0;
  padding: 28px;
}

.topbar,
.section-header,
.modal-header,
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.topbar h1,
.section-header h2,
.modal-header h2 {
  margin: 4px 0 0;
  line-height: 1.1;
}

.app-page[hidden] {
  display: none !important;
}

.app-footer {
  margin-top: 18px;
  color: var(--muted);
}

.app-footer-shell {
  display: grid;
  gap: 12px;
  padding: 16px 0 4px;
  border-top: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
}

.app-footer-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.app-footer-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  min-width: 0;
}

.app-footer-logo {
  color: var(--text);
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
}

.app-footer-kicker {
  color: color-mix(in srgb, var(--text) 84%, var(--muted));
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.app-footer-brand p {
  flex-basis: 100%;
  margin: 0;
  color: color-mix(in srgb, var(--muted) 82%, var(--text));
  font-size: 0.78rem;
  line-height: 1.45;
}

.app-footer-actions {
  display: flex;
  justify-content: flex-end;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  gap: 7px;
  padding: 6px 9px;
  border: 1px solid color-mix(in srgb, #34d399 32%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, #34d399 10%, var(--surface));
  color: color-mix(in srgb, #bbf7d0 72%, var(--text));
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  box-shadow: none;
}

.status-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #34d399;
  box-shadow: 0 0 0 3px color-mix(in srgb, #34d399 18%, transparent);
}

.app-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-items: center;
}

.app-footer-nav a {
  position: relative;
  color: color-mix(in srgb, var(--muted) 86%, var(--text));
  font-size: 0.76rem;
  font-weight: 700;
  text-decoration: none;
  transition: color 220ms ease, transform 220ms ease;
}

.app-footer-nav a::after {
  position: absolute;
  right: 0;
  bottom: -3px;
  left: 0;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, var(--primary), var(--cyan));
  opacity: 0;
  transform: scaleX(0.5);
  transform-origin: center;
  transition: opacity 220ms ease, transform 220ms ease;
}

.app-footer-nav a:hover,
.app-footer-nav a:focus-visible {
  color: var(--text);
  transform: translateY(-1px);
}

.app-footer-nav a:hover::after,
.app-footer-nav a:focus-visible::after {
  opacity: 1;
  transform: scaleX(1);
}

.app-footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding-top: 10px;
  border-top: 1px solid color-mix(in srgb, var(--line) 44%, transparent);
  color: color-mix(in srgb, var(--muted) 78%, var(--text));
  font-size: 0.74rem;
  line-height: 1.5;
}

.app-footer-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px 14px;
  white-space: nowrap;
}

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

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

#home-ai-slot {
  margin-bottom: 14px;
}

.home-dashboard-main {
  margin-top: 18px;
}

.home-heading-spacer {
  height: 10px;
}

.home-store-card {
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--surface) 85%, var(--primary) 15%), var(--surface));
  box-shadow: var(--shadow);
}

.home-store-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.home-store-identity h2 {
  margin: 2px 0;
  font-size: 1.15rem;
}

.home-store-identity small {
  color: var(--muted);
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.home-number-card {
  grid-column: auto;
}

.home-performance-inline {
  max-width: 760px;
  width: min(100%, 760px);
  margin: 0 auto 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}

.home-performance-inline h2 {
  margin: 2px 0 12px;
  font-size: 1.35rem;
}

.home-performance-inline .dashboard-performance-list {
  grid-template-columns: repeat(auto-fit, minmax(260px, 320px));
  max-width: 720px;
  margin: 0 auto;
  gap: 10px;
  justify-content: center;
}

.home-performance-inline .dashboard-performance-card {
  gap: 8px;
  padding: 10px;
  text-align: left;
  width: 100%;
}

.home-performance-inline .dashboard-performance-card > strong {
  font-size: 1.25rem;
}

.home-performance-inline .dashboard-performance-card dl {
  column-gap: 14px;
  row-gap: 5px;
}

.home-performance-inline .dashboard-performance-card dl div {
  gap: 8px;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
  align-items: start;
}

.dashboard-main {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 18px;
  margin-bottom: 0;
}

.dashboard-insights-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 20px;
}

.dashboard-ai-panel {
  display: block;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

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

.dashboard-ai-header h2 {
  margin: 2px 0 4px;
  font-size: 1.2rem;
}

.dashboard-ai-header p:not(.eyebrow) {
  margin: 0;
  font-size: 0.86rem;
}

#dashboard-ai-button {
  border-color: rgba(217, 70, 239, 0.72);
  background: linear-gradient(115deg, #6d28d9, #c026d3 52%, #22d3ee);
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.28);
}

#dashboard-ai-button:hover {
  background: linear-gradient(115deg, #7c3aed, #db2777 52%, #06b6d4);
  box-shadow: 0 0 20px rgba(217, 70, 239, 0.42);
}

.dashboard-ai-result {
  margin-top: 14px;
  max-width: 980px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  line-height: 1.55;
}

.dashboard-ai-result p {
  margin: 0 0 12px;
}

.dashboard-ai-result p:last-child {
  margin-bottom: 0;
}

.dashboard-ai-result strong {
  color: var(--text);
}

.dashboard-ai-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.dashboard-ai-ok-button {
  min-width: 92px;
  padding-inline: 24px;
}

.confirm-modal.dashboard-ai-modal {
  width: min(840px, calc(100vw - 32px));
}

.dashboard-ai-modal-card {
  max-height: min(720px, calc(100vh - 48px));
}

.dashboard-ai-modal .dashboard-ai-result {
  max-width: none;
  max-height: min(520px, calc(100vh - 230px));
  margin-top: 0;
  overflow-y: auto;
  padding: 4px 6px 4px 0;
  border-top: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(34, 211, 238, 0.7) transparent;
}

.dashboard-ai-modal .dashboard-ai-result::-webkit-scrollbar {
  width: 5px;
}

.dashboard-ai-modal .dashboard-ai-result::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.7);
}

.dashboard-filters {
  order: -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.dashboard-filters label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.dashboard-filters select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text);
  padding: 0 10px;
}

select option {
  background: var(--surface);
  color: var(--text);
}

body[data-theme="dark"] select option,
body.app-active select option {
  background: #0d172b;
  color: #f8fbff;
}

body.app-active select {
  color-scheme: dark;
  background-color: var(--field);
  color: var(--text);
}

.home-number-card,
.chart-card,
.home-performance,
.home-detail-panel,
.settings-page,
.placeholder-page,
.champions-panel,
.dashboard-side-panel,
.shipping-label-page,
.clients-page,
.store-employees-panel,
.home-calendar-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.home-calendar-card {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
  padding: 16px;
}

.calendar-form {
  display: grid;
  gap: 6px;
}

.calendar-form-actions,
.calendar-event-actions {
  display: flex;
  gap: 6px;
}

.calendar-form-actions .primary-button,
.calendar-form-actions .secondary-button {
  flex: 1;
}

.holiday-list,
.event-list {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.82rem;
}

.calendar-commemorations {
  display: grid;
  gap: 6px;
}

.calendar-commemorations > .mini-button {
  justify-self: start;
}

.calendar-commemorations-list {
  display: grid;
  max-height: 180px;
  gap: 5px;
  padding-top: 2px;
  overflow-y: auto;
  color: var(--muted);
  font-size: 0.78rem;
}

.calendar-commemorations-list[hidden] {
  display: none;
}

.calendar-event-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding-top: 5px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.calendar-event-item > span {
  min-width: 0;
}

.calendar-event-actions .mini-button {
  min-height: 24px;
  padding: 0 7px;
  font-size: 0.62rem;
}

.calendar-event-actions .mini-button.danger {
  color: #ff9b93;
}

.home-number-card {
  display: grid;
  min-height: 86px;
  gap: 4px;
  padding: 10px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.home-number-card strong {
  color: var(--cyan);
  font-size: 1.45rem;
}

.home-number-card span {
  font-weight: 900;
  font-size: 0.82rem;
}

.home-number-card small {
  font-size: 0.74rem;
}

.home-number-card small,
.home-detail-panel p,
.muted-copy {
  color: var(--muted);
}

.home-marketplace-line {
  display: block;
  color: var(--cyan) !important;
  font-weight: 800;
}

.home-detail-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.home-detail-row {
  display: grid;
  grid-template-columns: 64px minmax(260px, 1.3fr) minmax(220px, 1fr) minmax(250px, 1.1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.home-detail-row small {
  color: var(--muted);
}

.home-detail-image {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.home-detail-product,
.home-detail-order,
.home-detail-dates {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.home-detail-product strong,
.home-detail-order small,
.home-detail-dates small {
  overflow-wrap: anywhere;
}

.home-detail-product .marketplace-badge {
  justify-self: start;
}

.home-detail-dates {
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

.home-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.home-detail-actions .compact-button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.78rem;
}

.home-performance,
.home-detail-panel,
.settings-page,
.placeholder-page,
.champions-panel,
.dashboard-side-panel,
.shipping-label-page {
  margin-bottom: 18px;
  padding: 18px;
}

.home-performance {
  position: sticky;
  top: 18px;
}

.store-rating-card {
  display: grid;
  max-width: 340px;
  gap: 6px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.store-rating-card strong {
  color: #fbbf24;
  letter-spacing: 2px;
}

.chart-card {
  display: grid;
  min-height: 300px;
  padding: 22px;
}

.chart-card h2,
.champions-panel h2 {
  margin-top: 0;
}

.bar-chart {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 7px;
  align-items: end;
  min-height: 140px;
  margin-top: auto;
  position: relative;
}

.bar-chart-line-overlay {
  position: absolute;
  inset: 0 0 42px;
  pointer-events: none;
  z-index: 3;
}

.bar-chart-line-overlay svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.bar-chart-line-label {
  font-size: 8px;
  font-weight: 800;
}

.sales-map-list,
.platform-line-chart {
  display: grid;
  gap: 10px;
  min-height: 180px;
}

.sales-map-list {
  max-height: 340px;
  overflow-y: auto;
  align-content: start;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(34, 211, 238, 0.7) transparent;
}

.sales-map-list::-webkit-scrollbar {
  width: 5px;
}

.sales-map-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.7);
}

.sales-map-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 44px;
  gap: 10px;
  align-items: center;
  padding-bottom: 8px;
}

.sales-map-row i {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 4px;
  border-radius: 999px;
  background: var(--cyan);
}

.platform-line-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 42px;
  align-items: end;
  gap: 10px;
}

.platform-line-bars {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: end;
  gap: 4px;
  min-height: 64px;
}

.platform-line-bars i {
  border-radius: 999px 999px 2px 2px;
  background: var(--cyan);
}

.bar-chart-item {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  min-height: 140px;
  gap: 4px;
  align-items: end;
  color: var(--muted);
  font-size: 0.68rem;
  text-align: center;
}

.bar-chart-bar {
  grid-row: 1;
  align-self: end;
  min-height: 6px;
  border-radius: 999px 999px 4px 4px;
  background: linear-gradient(180deg, var(--cyan), var(--primary));
}

.bar-chart-item strong {
  grid-row: 2;
  overflow: hidden;
  font-size: 0.68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-chart-item small {
  grid-row: 3;
}

.bar-chart-item:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 30;
  min-width: 180px;
  max-width: 240px;
  transform: translateX(-50%);
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  box-shadow: var(--shadow);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.45;
  pointer-events: none;
  white-space: pre-line;
}

.champion-platform-grid,
.sales-champions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.champion-platform-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

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

.champion-platform-head small {
  color: var(--muted);
  font-weight: 800;
}

.champion-mini-list {
  display: grid;
  gap: 10px;
}

.champion-card,
.sales-champion-card {
  display: grid;
  grid-template-columns: auto 56px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.champion-platform-card .champion-card {
  background: color-mix(in srgb, var(--surface) 64%, transparent);
}

.sales-champion-card {
  grid-template-columns: 84px 56px 1fr;
  margin-bottom: 14px;
}

.champion-card > span,
.sales-champion-card > span {
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.champion-card img,
.sales-champion-card img {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
}

.champion-card small,
.sales-champion-card small {
  color: var(--muted);
}

.dashboard-side-panel {
  position: sticky;
  top: 22px;
  margin-bottom: 0;
}

.dashboard-side-panel h2 {
  margin: 2px 0 14px;
  line-height: 1.1;
}

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

.dashboard-performance-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.dashboard-performance-card > strong {
  color: #fbbf24;
  font-size: 1.45rem;
}

.dashboard-performance-card dl {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  row-gap: 7px;
  margin: 0;
}

.dashboard-performance-card dl div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: baseline;
  gap: 6px;
  color: var(--muted);
  min-width: 0;
}

.dashboard-performance-card dt {
  min-width: 0;
  overflow-wrap: anywhere;
}

.dashboard-performance-card dd {
  margin: 0;
  color: var(--text);
  font-weight: 900;
  white-space: nowrap;
}

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

.home-order-deadline {
  color: var(--cyan);
  font-weight: 800;
}

.home-order-pending {
  color: #fbbf24 !important;
  font-weight: 800;
}

.home-invoice-status {
  color: var(--text) !important;
  font-weight: 800;
}

.shipping-label-card {
  display: grid;
  grid-template-columns: 72px minmax(260px, 1fr) minmax(220px, 0.8fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.shipping-label-card img {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  object-fit: cover;
}

.shipping-label-card h3 {
  margin: 8px 0 4px;
}

.shipping-label-card p,
.shipping-label-card dt,
.shipping-empty-state p {
  color: var(--muted);
}

.shipping-label-card dl {
  display: grid;
  gap: 6px;
  margin: 0;
}

.shipping-label-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.shipping-label-card dd {
  margin: 0;
  font-weight: 900;
}

.shipping-label-actions {
  display: grid;
  gap: 8px;
}

.shopee-shipping-method {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid #ff6b45;
  border-radius: 8px;
  background: color-mix(in srgb, #ff6b45 10%, var(--surface-2));
}

.shopee-shipping-method-icon {
  display: grid;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #76c854;
}

.shopee-shipping-method p {
  margin: 4px 0 0;
  font-size: 0.82rem;
}

.shipping-empty-state {
  display: grid;
  min-height: 190px;
  place-items: center;
  text-align: center;
}

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

.settings-sync-card {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.settings-sync-card h3 {
  margin: 2px 0 0;
}

.settings-danger-card {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(248, 113, 113, 0.38);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-2) 86%, rgba(127, 29, 29, 0.35));
}

.settings-danger-card h3 {
  margin: 2px 0 0;
}

.settings-danger-card p:not(.eyebrow) {
  max-width: 680px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.settings-delete-account {
  min-height: 38px;
  white-space: nowrap;
}

.settings-sync-interval {
  display: grid;
  min-width: 300px;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.settings-sync-interval select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--text);
  background: var(--surface);
  font: inherit;
}

.settings-sync-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.76rem;
}

.settings-sync-controls {
  display: flex;
  align-items: end;
  gap: 10px;
}

.settings-sync-controls > .secondary-button {
  min-height: 36px;
  white-space: nowrap;
}

.settings-sync-refresh {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.settings-sync-refresh input {
  width: 16px;
  height: 16px;
  accent-color: var(--cyan);
}

.settings-sync-save {
  grid-column: 1 / -1;
  justify-self: end;
  min-height: 36px;
}

.auto-sync-success-notice {
  position: fixed;
  z-index: 1100;
  right: 24px;
  bottom: 24px;
  display: grid;
  width: min(360px, calc(100vw - 32px));
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(34, 211, 238, 0.7);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auto-sync-success-notice strong {
  color: var(--cyan);
}

.auto-sync-success-notice span {
  color: var(--muted);
  font-size: 0.84rem;
}

.auto-sync-success-notice .secondary-button {
  justify-self: end;
  min-height: 32px;
}

.settings-connections .connection {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.settings-connections .connection-actions {
  margin-top: 5px;
}

.settings-connections .mini-button {
  min-height: 26px;
  font-size: 0.58rem;
}

.modal-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
}

.modal-title-row h2 {
  margin: 0;
}

.modal-marketplace-badge {
  min-height: 28px;
  padding: 0 12px;
  font-size: 0.82rem;
}

.modal-edit-toggle {
  margin-left: auto;
}

.shopee-seller-layout {
  display: grid;
  grid-template-columns: 250px minmax(680px, 1fr) 280px;
  gap: 14px;
  align-items: start;
}

.shopee-seller-layout[hidden] {
  display: none;
}

.seller-diagnostic,
.seller-preview,
.seller-tab-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  box-shadow: var(--shadow);
}

.seller-diagnostic {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.seller-diagnostic h3,
.seller-diagnostic p {
  margin: 0;
}

.seller-diagnostic strong {
  color: var(--primary-dark);
  font-size: 1.3rem;
}

.diagnostic-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.diagnostic-bar span {
  flex: 1 1 auto !important;
  min-width: 42px;
  max-width: calc(100% - 78px);
  height: 9px;
  border-radius: 999px;
  background: var(--primary);
}

.diagnostic-bar b {
  flex: 0 0 auto;
  max-width: 78px;
  border-radius: 999px;
  padding: 5px 10px;
  color: white;
  background: var(--primary);
  font-size: 0.75rem;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shopee-quality-card {
  display: grid;
  gap: 14px;
}

.shopee-cost-card {
  box-shadow: none;
}

.official-missing {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.seller-diagnostic.meli-sidebar {
  align-content: start;
  gap: 14px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.meli-quality-card,
.meli-cost-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--surface-2);
  box-shadow: var(--shadow);
}

.meli-quality-card h3,
.meli-cost-card h3 {
  margin: 0 0 14px;
  color: var(--text);
  font-size: 1.05rem;
}

.meli-quality-score {
  display: grid;
  grid-template-areas: "meter";
  justify-items: center;
  min-height: 112px;
}

.meli-quality-score svg {
  grid-area: meter;
  width: 132px;
  height: 90px;
}

.meli-quality-score path {
  fill: none;
  stroke: var(--line);
  stroke-width: 7;
  stroke-linecap: round;
}

.meli-quality-score .score-arc {
  stroke: #00a650;
}

.meli-quality-number {
  grid-area: meter;
  align-self: center;
  display: grid;
  justify-items: center;
  margin-top: 22px;
}

.meli-quality-number strong {
  color: #00a650;
  font-size: 1.9rem;
  line-height: 1;
}

.meli-quality-number span {
  margin-top: 3px;
  color: #00a650;
  font-size: 0.83rem;
}

.meli-quality-columns {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.meli-quality-columns p {
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.meli-quality-columns b,
.meli-quality-columns span {
  display: block;
}

.meli-quality-columns b {
  color: var(--text);
}

.meli-quality-columns span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.82rem;
}

.meli-cost-card label {
  display: block;
  margin-bottom: 14px;
}

.meli-cost-card label strong {
  display: block;
  margin-top: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--text);
  background: var(--field);
  font-size: 1rem;
}

.meli-cost-card dl {
  display: grid;
  gap: 9px;
  margin: 0;
}

.meli-cost-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.88rem;
}

.meli-cost-card dt,
.meli-cost-card dd {
  margin: 0;
}

.meli-cost-card .total {
  margin-top: 4px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  color: var(--text);
  font-weight: 800;
}

.meli-cost-card small {
  display: block;
  margin-top: 14px;
  color: var(--muted);
  line-height: 1.35;
}

.seller-editor-main {
  min-width: 0;
}

.seller-tabs {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  gap: 2px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.seller-tabs button {
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 14px 16px;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  font-weight: 700;
  white-space: nowrap;
}

.seller-tabs button.active {
  color: var(--danger);
  border-bottom-color: var(--danger);
}

.seller-tab-panel {
  display: none;
  margin-top: 12px;
  padding: 18px;
}

.seller-tab-panel.active {
  display: grid;
  gap: 16px;
}

.seller-tab-panel h3 {
  margin: 0;
}

.seller-basic-media,
.seller-basic-fields,
.seller-spec-grid,
.seller-tax-grid,
.seller-shipping-grid,
.seller-other-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.seller-basic-media,
.seller-description-slot,
.seller-sales-slot {
  display: grid;
  gap: 14px;
}

.shopee-image-picker,
.shopee-video-picker,
.seller-platform-extra {
  grid-column: 1 / -1;
}

.image-preview-strip {
  display: grid;
  grid-template-columns: repeat(9, minmax(72px, 1fr));
  gap: 8px;
}

.image-slot {
  position: relative;
  display: grid;
  min-height: 86px;
  overflow: hidden;
  border: 1px dashed var(--line);
  border-radius: 8px;
  place-items: center;
  background: var(--surface);
}

.image-slot[draggable="true"] {
  cursor: grab;
}

.image-slot[draggable="true"]:active,
.image-slot.is-dragging {
  cursor: grabbing;
}

.image-slot.is-dragging {
  opacity: 0.45;
}

.image-slot.is-drag-over {
  border-color: var(--primary);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--primary) 42%, transparent);
}

.image-slot img {
  width: 100%;
  height: 86px;
  object-fit: cover;
}

.image-slot span:not(.empty-slot) {
  position: absolute;
  left: 6px;
  bottom: 6px;
  border-radius: 4px;
  padding: 2px 6px;
  color: white;
  background: rgba(0, 0, 0, 0.72);
  font-size: 0.72rem;
  font-weight: 800;
}

.image-delete-button {
  position: absolute;
  right: 5px;
  bottom: 5px;
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.28);
}

.image-delete-button:hover {
  filter: brightness(1.08);
}

#product-form.is-readonly .image-delete-button,
.modal-card.is-readonly .image-delete-button {
  display: none;
}

.empty-slot {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.video-preview-box {
  display: grid;
  min-height: 74px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  gap: 8px;
  place-items: center;
  color: var(--muted);
  background: var(--surface);
  padding: 10px;
  text-align: center;
}

.video-preview-box video,
.video-preview-box img {
  max-width: 100%;
  max-height: 180px;
  border-radius: 8px;
  object-fit: contain;
}

.video-preview-box strong {
  color: var(--text);
  font-size: 0.9rem;
}

.description-counter {
  justify-self: end;
  color: var(--muted);
}

.seller-preview {
  position: sticky;
  top: 0;
  display: grid;
  gap: 10px;
  padding: 16px;
}

.seller-preview h3,
.seller-preview p {
  margin: 0;
}

.preview-phone {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.preview-image {
  display: grid;
  min-height: 160px;
  background: var(--surface-2);
  place-items: center;
}

.preview-image img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.preview-title,
.preview-section {
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.preview-store {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.preview-store span {
  display: grid;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  place-items: center;
  color: white;
  background: var(--primary);
  font-weight: 900;
}

.preview-store button {
  margin-left: auto;
  border: 1px solid var(--danger);
  border-radius: 4px;
  padding: 5px 10px;
  color: var(--danger);
  background: transparent;
}

.preview-section b {
  display: block;
  margin-bottom: 8px;
}

.preview-section p {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.86rem;
}

.preview-section strong {
  color: var(--text);
}

.preview-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1.35fr;
}

.preview-actions button {
  min-height: 42px;
  border: 0;
  color: white;
  background: #20b29a;
  font-weight: 800;
}

.preview-actions button:last-child {
  background: #ee4d2d;
}

.meli-preview {
  color: var(--text);
  background: var(--surface);
}

.meli-preview-gallery {
  display: grid;
  min-height: 185px;
  background: var(--field);
  place-items: center;
}

.meli-preview-gallery img {
  width: 100%;
  height: 205px;
  object-fit: contain;
  background: var(--field);
}

.meli-preview-gallery span {
  color: var(--muted);
  font-weight: 700;
}

.meli-preview-body {
  padding: 14px;
}

.meli-preview-condition {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.78rem;
}

.meli-preview h4 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.25;
}

.meli-preview-price {
  display: block;
  color: var(--text);
  font-size: 1.85rem;
  font-weight: 400;
}

.meli-preview-installments {
  margin: 4px 0;
  color: #00a650;
  font-size: 0.86rem;
}

.meli-preview-shipping {
  margin: 10px 0 12px;
  color: #00a650;
  font-weight: 700;
}

.meli-preview-seller,
.meli-preview-section {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.meli-preview-seller span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.meli-preview-seller b,
.meli-preview-section b {
  color: var(--text);
}

.meli-preview-section p {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.meli-preview-section strong {
  color: var(--text);
  text-align: right;
}

.meli-preview-actions {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.meli-preview-actions button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  color: #ffffff;
  background: #3483fa;
  font-weight: 700;
}

.meli-preview-actions button:last-child {
  color: #3483fa;
  background: #e3edfb;
}

body:not([data-theme="dark"]) .meli-preview {
  color: #333333;
  background: #ffffff;
}

body:not([data-theme="dark"]) .meli-preview-gallery,
body:not([data-theme="dark"]) .meli-preview-gallery img {
  background: #ffffff;
}

body:not([data-theme="dark"]) .meli-preview h4,
body:not([data-theme="dark"]) .meli-preview-price,
body:not([data-theme="dark"]) .meli-preview-seller b,
body:not([data-theme="dark"]) .meli-preview-section b,
body:not([data-theme="dark"]) .meli-preview-section strong {
  color: #333333;
}

body:not([data-theme="dark"]) .meli-preview-condition,
body:not([data-theme="dark"]) .meli-preview-gallery span,
body:not([data-theme="dark"]) .meli-preview-seller span,
body:not([data-theme="dark"]) .meli-preview-section p {
  color: #666666;
}

body:not([data-theme="dark"]) .meli-preview-seller,
body:not([data-theme="dark"]) .meli-preview-section {
  border-top-color: #eeeeee;
}

.topbar h1 {
  max-width: 860px;
  font-size: clamp(1.25rem, 1.8vw, 1.85rem);
  line-height: 1.18;
  white-space: nowrap;
}

.eyebrow {
  margin: 0;
  color: var(--primary-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.topbar-actions,
.modal-actions > div {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.clear-store-button {
  min-height: 40px;
}

.confirm-modal {
  width: min(520px, calc(100vw - 32px));
  border: 0;
  padding: 0;
  background: transparent;
}

.confirm-modal::backdrop {
  background: rgba(4, 9, 24, 0.72);
  backdrop-filter: blur(4px);
}

.confirm-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

.confirm-card h2,
.confirm-card p {
  margin: 0;
}

.confirm-card > p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.5;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.shopee-label-format-modal {
  width: min(460px, calc(100vw - 32px));
}

.label-format-field {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.shopee-label-format-modal select {
  min-height: 42px;
  width: 100%;
}

.photo-crop-card {
  width: min(440px, calc(100vw - 32px));
}

.photo-crop-preview {
  position: relative;
  display: grid;
  width: 260px;
  height: 260px;
  justify-self: center;
  overflow: hidden;
  border: 2px solid var(--primary);
  border-radius: 999px;
  background: var(--field);
  place-items: center;
  box-shadow: inset 0 0 0 999px rgba(0, 0, 0, 0.04);
}

.photo-crop-preview::after {
  position: absolute;
  inset: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.68);
  border-radius: 999px;
  content: "";
  pointer-events: none;
}

.photo-crop-preview img {
  position: absolute;
  max-width: none;
  object-fit: fill;
  transform-origin: top left;
}

.photo-crop-controls {
  display: grid;
  gap: 10px;
}

.photo-crop-controls label {
  display: grid;
  gap: 6px;
}

.photo-crop-controls input[type="range"] {
  accent-color: var(--primary);
}

.shopee-edit-panel {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface-2);
}

.shopee-edit-panel[hidden] {
  display: none;
}

.shopee-edit-panel h3,
.modal-variation-section h4 {
  margin: 0;
  font-size: 1rem;
}

.wide-field {
  display: grid;
  gap: 6px;
}

.form-grid .wide-field {
  grid-column: 1 / -1;
}

.field-help {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.78rem;
}

.wide-field textarea {
  min-height: 130px;
  padding-top: 10px;
  padding-bottom: 10px;
  resize: vertical;
}

#shopee-description {
  min-height: 420px;
  line-height: 1.45;
}

.file-picker-button {
  position: relative;
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--text);
  background: var(--surface);
  cursor: pointer;
  font-weight: 800;
}

.file-picker-button input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  appearance: none;
  font-size: 0;
}

.file-picker-button input::file-selector-button,
.file-picker-button input::-webkit-file-upload-button {
  display: none;
}

.shopee-image-picker small {
  color: var(--muted);
}

.product-modal form.is-readonly input,
.product-modal form.is-readonly textarea,
.product-modal form.is-readonly select {
  opacity: 0.78;
}

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

.modal-variation-section {
  display: grid;
  gap: 10px;
}

.modal-variation-section[hidden] {
  display: none;
}

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

.modal-variation-card {
  display: grid;
  grid-template-columns: 58px minmax(160px, 0.45fr) minmax(360px, 1fr);
  align-items: start;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface);
}

.modal-variation-card img {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  object-fit: cover;
}

.modal-variation-info {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.modal-variation-info strong,
.modal-variation-info span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal-variation-info span {
  color: var(--muted);
  font-size: 0.86rem;
}

.modal-variation-numbers,
.modal-variation-editor {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  text-align: right;
}

.modal-variation-editor {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  text-align: left;
}

.modal-variation-editor label {
  display: grid;
  gap: 4px;
}

.modal-variation-editor .personal-variation-field {
  grid-column: span 2;
}

.modal-variation-editor .wide-field {
  grid-column: 1 / 4;
}

.modal-variation-editor input {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 9px;
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
}

.variation-file-field input {
  min-height: auto;
  padding: 7px;
}

.variation-sales-readonly {
  display: grid;
  align-content: end;
  gap: 4px;
  min-height: 36px;
  color: var(--muted);
  font-size: 0.78rem;
}

.variation-sales-readonly strong {
  color: var(--text);
  font-size: 0.95rem;
}

.variation-cost-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px 10px;
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--input-bg) 84%, var(--primary) 16%);
}

.variation-cost-preview strong {
  grid-column: 1 / -1;
  color: var(--text);
  font-size: 0.82rem;
}

.variation-cost-preview span {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 0.74rem;
}

.variation-cost-preview b {
  color: var(--text);
  font-size: 0.88rem;
  white-space: nowrap;
}

.variation-delete-button {
  width: max-content;
  min-height: 32px;
  margin-top: 2px;
  padding: 7px 12px;
}

.modal-variation-numbers span,
.modal-variation-editor span {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 0.78rem;
}

.modal-variation-numbers strong {
  color: var(--text);
  font-size: 0.95rem;
}

.platform-details {
  display: grid;
  gap: 14px;
  margin-top: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface-2);
}

.platform-details[hidden] {
  display: none;
}

.platform-details h3 {
  margin: 0;
  font-size: 1rem;
}

.platform-gallery {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.platform-gallery img {
  width: 76px;
  height: 76px;
  flex: 0 0 76px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
}

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

.platform-detail-item {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  min-width: 0;
}

.platform-detail-item.wide {
  grid-column: 1 / -1;
}

.platform-detail-item.wide strong {
  max-height: 180px;
  overflow: auto;
  white-space: pre-line;
}

.platform-detail-item.compact {
  align-content: start;
}

.platform-detail-item.compact strong {
  font-size: 0.9rem;
}

.platform-detail-item span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.platform-detail-item strong {
  overflow-wrap: anywhere;
}

.platform-raw-details {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.platform-raw-details summary {
  cursor: pointer;
  color: var(--primary);
  font-weight: 900;
}

.platform-raw-details pre {
  max-height: 240px;
  overflow: auto;
  white-space: pre-wrap;
  margin: 10px 0 0;
  border-radius: 8px;
  padding: 12px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.76rem;
}

.primary-button,
.secondary-button,
.danger-button,
.icon-button {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 14px;
  font-weight: 750;
}

.primary-button {
  background: linear-gradient(90deg, var(--primary-dark), var(--primary), var(--cyan));
  color: #ffffff;
}

.primary-button:hover {
  background: linear-gradient(90deg, #081f91, #0e5ff0, #00aee4);
}

.secondary-button {
  display: inline-grid;
  place-items: center;
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
}

.google-auth-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 44px;
  min-height: 44px;
  margin-top: 4px;
  background: #ffffff;
  color: #3c4043;
  border: 1px solid #dadce0;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.12);
  font-size: 0;
}

.google-auth-icon {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.google-auth-button.is-loading .google-auth-icon {
  animation: google-auth-pulse 0.8s ease-in-out infinite alternate;
}

@keyframes google-auth-pulse {
  from { opacity: 0.55; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.google-auth-button span {
  display: none;
}

.auth-login-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  align-items: center;
  gap: 10px;
}

.auth-login-actions .primary-button {
  width: 100%;
}

.auth-login-actions .google-auth-button {
  margin-top: 0;
}

.google-auth-button::before {
  content: none;
}

.notification-button strong[hidden] {
  display: none;
}

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

.seller-panel-heading h3 {
  margin: 0;
}

.compact-button {
  min-height: 36px;
  padding: 0 12px;
  font-size: 0.85rem;
}

.personal-cost-fields {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.personal-cost-fields[hidden] {
  display: none !important;
}

.sales-manual-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 154px;
}

.sales-manual-actions .secondary-button,
.sales-manual-actions .store-delete-button {
  width: auto;
  min-width: 68px;
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.75rem;
  white-space: nowrap;
}

.sales-manual-actions .store-delete-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.text-button {
  width: max-content;
  min-height: 28px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--primary);
  font-weight: 800;
  text-align: left;
}

.text-button:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.theme-toggle,
.profile-button,
.settings-shortcut {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

.account-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: -4px;
  padding: 6px 0 0;
}

.account-controls .profile-button {
  flex: 1 1 auto;
  min-width: 0;
}

.account-controls .theme-toggle {
  flex: 0 0 78px;
}

.sidebar-theme-row {
  display: flex;
  justify-content: stretch;
  margin: 4px 0 6px;
  padding: 0 2px;
}

.sidebar-theme-row .theme-toggle {
  width: 100%;
  min-height: 40px;
}

.sidebar-theme-row .theme-toggle::before {
  width: calc(50% - 6px);
}

body[data-theme="dark"] .sidebar-theme-row .theme-toggle::before {
  transform: translateX(calc(100% + 4px));
}

.settings-shortcut {
  flex: 0 0 40px;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  cursor: pointer;
}

.settings-shortcut::before {
  content: none;
}

.settings-gear-icon {
  width: 18px;
  height: 18px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.settings-shortcut.active,
.settings-shortcut:hover {
  border-color: rgba(52, 211, 235, 0.55);
  background: rgba(52, 211, 235, 0.12);
}

.notification-button {
  position: relative;
  flex: 0 0 40px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.notification-button strong {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 18px;
  padding: 2px 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
}

.notification-panel {
  display: grid;
  gap: 10px;
  position: fixed;
  z-index: 1000;
  width: min(360px, calc(100vw - 24px));
  max-height: min(540px, calc(100vh - 24px));
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow-y: auto;
}

.notification-panel[hidden] {
  display: none;
}

.notification-head,
.notification-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

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

.notification-list article {
  align-items: flex-start;
  padding: 8px;
  border-radius: 8px;
  background: var(--surface-2);
}

.notification-list article > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.notification-list article .mini-button {
  flex: 0 0 auto;
  min-width: 48px;
  padding: 0 8px;
  overflow: visible;
}

.notification-list small {
  display: block;
  color: var(--muted);
}

.notification-open-page {
  width: 100%;
  min-height: 34px;
}

.notifications-page {
  display: grid;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

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

.notification-page-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.notification-page-item > div {
  min-width: 0;
}

.notification-page-item strong,
.notification-page-item p {
  margin: 0;
}

.notification-page-item p {
  margin-top: 4px;
  color: var(--muted);
}

.notification-page-item.is-unread strong,
.notification-page-item.is-unread p {
  font-weight: 800;
}

.notification-page-item.is-read strong,
.notification-page-item.is-read p,
.notification-read-state {
  color: var(--muted);
  font-weight: 500;
}

.clients-page,
.store-employees-panel {
  padding: 16px;
}

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

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

.store-employees-panel {
  grid-column: 1 / -1;
  width: 100%;
}

.store-employee-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.client-form label,
.store-employee-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.client-form input,
.client-form select,
.store-employee-form input {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text);
  padding: 0 12px;
}

.client-form .full-row,
.store-employee-form .full-row,
.employee-permissions {
  grid-column: 1 / -1;
}

.employee-permissions {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.employee-permissions-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.employee-permissions legend {
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 900;
}

.employee-permissions-header small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.employee-permission-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.employee-permission-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 6px;
}

.employee-permissions label.employee-permission-option {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 800;
  background: var(--input-bg);
  cursor: pointer;
}

.employee-permission-option input {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  accent-color: var(--cyan);
}

.employee-permission-option span {
  min-width: 0;
  line-height: 1.25;
}

.client-actions,
.store-employee-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.clients-list,
.store-employees-list,
.store-employee-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.client-card,
.store-employee-card,
.store-employee-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.store-employee-list article > div {
  min-width: 0;
}

.store-employee-list article > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 4px;
  flex-wrap: wrap;
}

.store-employee-list article strong,
.store-employee-list article small {
  overflow: hidden;
  text-overflow: ellipsis;
}

.store-employee-list article small {
  color: var(--text);
}

.store-employee-list article span {
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
}

.store-employee-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: max-content;
}

.store-employee-row-actions .mini-button,
.store-employee-row-actions .store-delete-button {
  min-height: 30px;
  min-width: 58px;
  padding: 0 11px;
  font-size: 0.68rem;
  line-height: 1;
  white-space: nowrap;
}

.client-card h4,
.store-employee-card h4 {
  margin: 0;
}

.client-card dl,
.store-employee-card dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 8px 0 0;
  color: var(--muted);
}

.client-card dt,
.store-employee-card dt {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.client-card dd,
.store-employee-card dd {
  margin: 0;
  color: var(--text);
  font-size: 0.82rem;
}

.client-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.meli-reputation-graph {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  margin: 8px 0;
}

.meli-reputation-graph span {
  height: 12px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.22);
}

.meli-reputation-graph span.active.level-1_red {
  background: #ef4444;
}

.meli-reputation-graph span.active.level-2_orange {
  background: #f97316;
}

.meli-reputation-graph span.active.level-3_yellow {
  background: #facc15;
}

.meli-reputation-graph span.active.level-4_light_green {
  background: #a3e635;
}

.meli-reputation-graph span.active.level-5_green {
  background: #22c55e;
}

.profile-button .profile-settings-shortcut {
  display: inline-grid;
  width: 32px;
  min-height: 32px;
  margin-left: auto;
  flex: 0 0 32px;
  border-radius: 8px;
}

.profile-modal .modal-header {
  position: relative;
  min-height: 40px;
  padding-right: 218px;
}

.profile-modal .modal-header .modal-settings-shortcut {
  position: absolute;
  top: 24px;
  right: 72px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: auto;
  min-width: 132px;
  height: 40px;
  min-height: 40px;
  padding: 0 13px;
  margin: 0;
  flex: 0 0 auto;
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1;
}

.profile-modal .modal-header .modal-settings-shortcut .settings-gear-icon {
  width: 17px;
  height: 17px;
  stroke-width: 2;
}

.profile-modal .modal-header .modal-settings-shortcut span {
  white-space: nowrap;
}

.profile-modal .modal-header #close-profile-modal {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  min-height: 40px;
  margin-left: 0;
  line-height: 1;
}

.store-switcher {
  display: grid;
  gap: 6px;
  margin-bottom: 6px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
}

.store-switcher-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.store-switcher-head button {
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--input-bg);
  color: var(--text);
  font-weight: 900;
  cursor: pointer;
}

.store-switcher-list {
  display: grid;
  gap: 6px;
}

.store-switch-button {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 6px 7px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.store-switch-button.active,
.store-switch-button:hover {
  border-color: var(--line);
  background: linear-gradient(90deg, rgba(71, 48, 178, 0.45), rgba(13, 103, 166, 0.35));
}

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

.nav-item {
  font-size: 0.86rem;
}

.sidebar .brand-copy strong {
  font-size: 0.96rem;
}

.sidebar .brand-copy small,
.profile-button span,
.store-switch-button small {
  font-size: 0.72rem;
}

.store-switch-button strong {
  font-size: 0.86rem;
  line-height: 1.12;
}

.store-switch-button small {
  color: var(--muted);
  font-size: 0.72rem;
}

.store-expand-button {
  width: 100%;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 7px;
  background: transparent;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.store-expand-button:hover {
  background: rgba(50, 216, 246, 0.1);
}

.theme-toggle {
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  width: 78px;
  padding: 4px;
  box-shadow: var(--shadow);
}

.theme-toggle::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 32px;
  height: 30px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--primary-dark), var(--cyan));
  transition: transform 0.2s ease;
}

body[data-theme="dark"] .theme-toggle::before {
  transform: translateX(36px);
}

.theme-icon {
  position: relative;
  z-index: 1;
  display: grid;
  min-width: 32px;
  place-items: center;
}

.theme-sun::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 2px color-mix(in srgb, currentColor 22%, transparent);
}

.theme-sun::after {
  content: "";
  position: absolute;
  width: 2px;
  height: 4px;
  border-radius: 999px;
  background: currentColor;
  box-shadow:
    0 -9px 0 currentColor,
    0 9px 0 currentColor,
    9px 0 0 currentColor,
    -9px 0 0 currentColor,
    6px -6px 0 currentColor,
    -6px -6px 0 currentColor,
    6px 6px 0 currentColor,
    -6px 6px 0 currentColor;
}

.theme-moon::before {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 50%;
  box-shadow: -5px 0 0 0 currentColor;
  transform: translateX(4px);
}

.profile-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-start;
  padding: 0 10px;
  font-weight: 750;
  box-shadow: var(--shadow);
}

.profile-button-copy {
  display: block;
  min-width: 0;
  text-align: left;
}

.session-user {
  display: block;
  max-width: 86px;
  overflow: hidden;
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 900;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-avatar {
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.36), transparent 26%),
    linear-gradient(135deg, var(--purple), var(--primary), var(--cyan));
  color: #ffffff;
  background-position: center;
  background-size: cover;
  font-weight: 900;
}

.profile-avatar.small {
  width: 30px;
  height: 30px;
  font-size: 0.74rem;
}

.profile-avatar.large {
  width: 112px;
  height: 112px;
  font-size: 2rem;
  box-shadow: 0 18px 38px rgba(9, 18, 47, 0.2);
}

.profile-avatar.has-photo {
  color: transparent;
}

.store-avatar {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  font-size: 0.78rem;
  font-weight: 900;
}

.store-avatar.large {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  font-size: 1.1rem;
}

.store-avatar.has-photo {
  background: transparent;
}

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

.danger-button {
  background: #fff1f0;
  color: var(--danger);
  border-color: #ffd2cc;
}

.icon-button {
  width: 40px;
  padding: 0;
  background: var(--surface-2);
  color: var(--text);
}

#import-file {
  display: none;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin: 26px 0;
}

.metric {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

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

.metric strong {
  font-size: 2rem;
}

.metric.warning strong {
  color: var(--warning);
}

.metric.sales strong {
  color: var(--cyan);
}

.metric.accent strong {
  color: var(--accent);
}

.metric.net strong {
  color: var(--ok);
}

.sales-dashboard-section {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.sales-sort,
.sales-filter {
  display: grid;
  gap: 6px;
  min-width: 190px;
}

.sales-metrics-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.sales-list {
  display: grid;
  gap: 10px;
}

.sales-row {
  display: grid;
  grid-template-columns: 64px minmax(230px, 1fr) repeat(5, minmax(96px, auto)) minmax(154px, auto) 34px;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.sales-variation-row {
  margin-left: 96px;
  background: color-mix(in srgb, var(--surface-2) 82%, var(--primary) 18%);
}

.sales-variation-row img {
  width: 54px;
  height: 54px;
}

.sales-variation-toggle {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(52, 211, 235, 0.4);
  border-radius: 8px;
  background: rgba(52, 211, 235, 0.1);
  color: var(--cyan);
  font-weight: 900;
  cursor: pointer;
}

.sales-row img {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface);
}

.sales-row div {
  display: grid;
  gap: 4px;
}

.sales-row span,
.sales-row small,
.sales-empty p {
  color: var(--muted);
  font-size: 0.84rem;
}

.sales-row > div:nth-last-child(-n + 5) {
  justify-items: end;
}

.sales-row > .sales-manual-actions {
  justify-items: initial;
}

.sales-manual-placeholder {
  min-width: 154px;
}

.sales-row .marketplace-badge {
  display: inline-flex;
  width: fit-content;
  margin-right: 6px;
}

.sales-empty {
  display: grid;
  min-height: 160px;
  place-items: center;
  text-align: center;
  color: var(--muted);
}

.sales-register-button {
  min-width: 150px;
}

.small-modal .modal-panel {
  width: min(560px, calc(100vw - 32px));
}

.small-modal .register-sale-panel {
  width: min(760px, calc(100vw - 32px));
}

.register-sale-panel {
  display: grid;
  gap: 16px;
}

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

.register-sale-fields label:first-child {
  grid-column: 1 / -1;
}

.register-sale-fields .register-sale-full {
  grid-column: 1 / -1;
}

.register-sale-empty,
.empty-panel {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.register-sale-empty p,
.empty-panel p {
  margin: 0;
  color: var(--muted);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
  margin: 8px 0;
}

.calendar-title-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 26px;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
}

.calendar-title-row h3 {
  margin: 0;
  text-align: center;
  font-size: 0.9rem;
}

.calendar-nav-button {
  width: 26px;
  min-height: 26px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--text);
  font-size: 1rem;
  font-weight: 900;
}

.calendar-weekday {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.calendar-day {
  position: relative;
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--field);
  color: var(--text);
  font-size: 0.74rem;
  font-weight: 800;
}

.calendar-day.is-empty {
  border-color: transparent;
  background: transparent;
  cursor: default;
}

.calendar-day.today {
  border-color: var(--cyan);
  box-shadow: inset 0 0 0 2px rgba(34, 211, 238, 0.18);
}

.calendar-day.has-event,
.calendar-day.has-holiday {
  background: linear-gradient(135deg, var(--primary-dark), var(--cyan));
  color: #fff;
}

.calendar-day.selected {
  outline: 3px solid rgba(168, 85, 247, 0.34);
}

.platform-line-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.platform-line-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
}

.platform-line-legend i {
  width: 18px;
  height: 4px;
  border-radius: 999px;
}

.platform-line-svg {
  width: 100%;
  min-height: 230px;
}

.platform-line-svg text {
  fill: var(--muted);
  font-size: 11px;
}

.platform-line-svg .platform-line-data-label {
  font-size: 10px;
  font-weight: 800;
}

.chart-grid-line {
  stroke: var(--line);
  stroke-width: 1;
  opacity: 0.55;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 170px 170px;
  gap: 12px;
  align-items: end;
  margin-bottom: 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

label span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: var(--field);
  color: var(--text);
}

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

.product-table-section {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.section-header {
  margin-bottom: 14px;
}

#result-count {
  color: var(--muted);
  font-weight: 700;
}

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

.product-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}

.product-edit {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 96px 120px 120px;
  width: 100%;
  gap: 16px;
  align-items: center;
  border: 0;
  padding: 12px 48px 12px 12px;
  background: transparent;
  color: inherit;
  text-align: left;
}

.product-edit:hover {
  background: var(--card-hover);
}

.product-edit img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--surface-2);
}

.product-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.product-title-row h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
}

.marketplace-badge,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 0.76rem;
  font-weight: 800;
}

.marketplace-badge.shopee {
  background: #fff0e8;
  color: #c2410c;
}

.marketplace-badge.mercado-livre {
  background: #eaf2ff;
  color: #1d4ed8;
}

.marketplace-badge.tiktok-shop {
  background: #ecfeff;
  color: #0f172a;
}

.marketplace-badge.outros {
  background: #f1eaff;
  color: #5b21b6;
}

.product-meta {
  margin: 6px 0 10px;
  color: var(--muted);
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.status-pill.ok {
  background: #eaf7ff;
  color: #075dc9;
}

.status-pill.low {
  background: #fff7ed;
  color: var(--warning);
}

.status-pill.promo {
  background: #f1eaff;
  color: #5b21b6;
}

.stock-box,
.sales-box,
.price-box {
  display: grid;
  gap: 4px;
  justify-items: end;
}

.stock-box span,
.sales-box span,
.price-box span,
.stock-box small {
  color: var(--muted);
  font-size: 0.78rem;
}

.stock-box strong,
.sales-box strong,
.price-box strong {
  font-size: 1.15rem;
}

.current-price {
  display: block;
}

.old-price {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  text-decoration: line-through;
}

.variation-toggle {
  position: absolute;
  right: 12px;
  top: 44px;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 900;
}

.variation-toggle:hover {
  background: var(--card-hover);
}

.product-card.expanded .variation-toggle {
  color: var(--primary);
}

.variation-panel {
  display: grid;
  gap: 8px;
  padding: 0 12px 12px 116px;
}

.variation-panel[hidden] {
  display: none;
}

.variation-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 86px 86px 100px;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.variation-row img {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: 7px;
  background: var(--surface);
}

.variation-name {
  margin: 0 0 4px;
  font-weight: 850;
}

.variation-meta,
.variation-number span {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.variation-number {
  display: grid;
  gap: 3px;
  justify-items: end;
}

.variation-number strong {
  font-size: 0.98rem;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 220px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  color: var(--text);
}

.product-modal {
  width: min(1720px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  border: 0;
  border-radius: 8px;
  padding: 0;
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

.export-modal,
.import-modal {
  width: min(560px, calc(100vw - 28px));
}

.product-modal::backdrop {
  background: rgba(15, 23, 42, 0.56);
}

.modal-card {
  max-height: calc(100vh - 28px);
  overflow: auto;
  padding: 24px;
  background: var(--surface);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0 14px;
}

.promo-row {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 14px;
  align-items: end;
  margin-bottom: 20px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  min-height: 42px;
  gap: 10px;
}

.checkbox-label input {
  width: 18px;
  min-height: 18px;
}

.checkbox-label span {
  margin: 0;
  color: var(--text);
}

.export-platform-field {
  display: block;
  margin: 20px 0;
}

.export-actions {
  align-items: center;
  padding-top: 4px;
}

.export-actions > div {
  flex: 0 0 auto;
  flex-wrap: nowrap;
}

.export-actions > span {
  max-width: 270px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.profile-modal {
  position: relative;
  width: min(720px, calc(100vw - 28px));
}

.profile-grid {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 22px;
  margin: 22px 0 16px;
}

.profile-photo-panel {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.profile-photo-panel .file-button {
  width: 100%;
}

#profile-photo {
  display: none;
}

.profile-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

.profile-fields {
  display: grid;
  gap: 13px;
}

.profile-stores-section {
  display: grid;
  gap: 12px;
  margin: 4px 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--surface-2);
}

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

.profile-stores-header h3 {
  margin: 0;
}

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

.profile-store-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  background: var(--surface);
}

.profile-store-item.active {
  border-color: var(--primary);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 45%, transparent);
}

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

.profile-store-item small {
  color: var(--muted);
}

.store-delete-button {
  display: grid;
  width: 34px;
  height: 34px;
  border: 1px solid color-mix(in srgb, var(--danger) 55%, var(--line));
  border-radius: 8px;
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 900;
  place-items: center;
}

.store-delete-button:hover {
  background: color-mix(in srgb, var(--danger) 22%, transparent);
}

.client-card .store-delete-button {
  width: max-content;
  min-width: 76px;
  padding: 0 12px;
}

.profile-store-form {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 14px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.profile-store-form[hidden] {
  display: none;
}

.profile-store-photo-box {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 10px;
}

#profile-store-photo {
  display: none;
}

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

.profile-store-fields .wide-field,
.profile-store-actions {
  grid-column: 1 / -1;
}

.profile-store-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.profile-name-language-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  gap: 10px;
  align-items: end;
}

.profile-language-row {
  min-width: 0;
}

.profile-language-row select {
  min-height: 42px;
  padding-left: 10px;
  padding-right: 10px;
  text-align: center;
  font-size: 1.15rem;
}

.profile-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 10px;
  align-items: end;
}

.profile-inline-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 10px;
  align-items: end;
}

.profile-double-code-row,
.profile-password-fields {
  display: grid;
  gap: 13px;
}

.profile-flow-note[hidden],
.profile-double-code-row[hidden],
.profile-password-fields[hidden],
.profile-code-row[hidden],
.profile-full-action[hidden] {
  display: none;
}

.profile-double-code-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-flow-note {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface-2);
  color: var(--primary);
  font-weight: 800;
}

.profile-full-action {
  width: 100%;
}

.profile-save-password {
  justify-self: end;
  min-width: 150px;
  min-height: 38px;
}

.text-button {
  width: max-content;
  border: 0;
  background: transparent;
  color: var(--primary);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  padding: 0;
}

.profile-code-row .secondary-button {
  width: 100%;
  min-height: 42px;
}

.profile-message {
  display: none;
  margin: 0 0 14px;
  border-radius: 8px;
  padding: 10px 12px;
  font-weight: 800;
}

.profile-message.show {
  display: block;
}

.profile-message.error {
  background: #fff1f0;
  color: var(--danger);
}

.profile-message.success {
  background: var(--surface-2);
  color: var(--primary);
}

body[data-theme="dark"] .metric,
body[data-theme="dark"] .toolbar,
body[data-theme="dark"] .product-table-section,
body[data-theme="dark"] .auth-card {
  border-color: var(--line);
}

body[data-theme="dark"] .marketplace-badge.shopee {
  background: rgba(251, 146, 60, 0.16);
  color: #fdba74;
}

body[data-theme="dark"] .marketplace-badge.mercado-livre {
  background: rgba(96, 165, 250, 0.16);
  color: #93c5fd;
}

body[data-theme="dark"] .marketplace-badge.tiktok-shop {
  background: rgba(34, 211, 238, 0.16);
  color: #67e8f9;
}

body[data-theme="dark"] .marketplace-badge.outros,
body[data-theme="dark"] .status-pill.promo {
  background: rgba(168, 85, 247, 0.18);
  color: #d8b4fe;
}

body[data-theme="dark"] .status-pill.ok {
  background: rgba(56, 189, 248, 0.14);
  color: #7dd3fc;
}

body[data-theme="dark"] .status-pill.low {
  background: rgba(251, 191, 36, 0.14);
  color: #fde68a;
}

@media (max-width: 1020px) {
  .settings-connections {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .auth-screen {
    grid-template-columns: 1fr;
  }

  .auth-hero {
    min-height: auto;
    gap: 48px;
  }

  .auth-hero-main {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .auth-logo {
    width: min(300px, 64vw);
  }

  .auth-card {
    transform: none;
  }

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

  .sidebar {
    position: static;
    height: auto;
  }

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

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

  .home-layout,
  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .home-performance,
  .dashboard-side-panel {
    position: static;
  }

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

  .home-number-card,
  .home-number-card:nth-child(5),
  .home-number-card:nth-child(6),
  .home-number-card:nth-child(7) {
    grid-column: auto;
  }

  .home-performance-inline {
    max-width: 100%;
  }

  .home-detail-row {
    grid-template-columns: 64px minmax(220px, 1fr) minmax(220px, 1fr);
  }

  .home-detail-dates {
    grid-column: 2 / -1;
    padding-left: 0;
    border-left: 0;
  }
}

@media (max-width: 720px) {
  .app-footer {
    margin-top: 18px;
  }

  .app-footer-shell {
    gap: 10px;
    padding-top: 14px;
  }

  .app-footer-main {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }

  .app-footer-actions {
    justify-content: flex-start;
  }

  .app-footer-nav {
    gap: 7px 12px;
  }

  .app-footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .app-footer-meta {
    justify-content: flex-start;
    white-space: normal;
  }

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

  .settings-sync-card,
  .settings-danger-card {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .settings-sync-meta {
    display: grid;
    gap: 5px;
  }

  .settings-sync-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .settings-sync-interval {
    min-width: 0;
  }

  .auth-screen {
    padding: 94px 18px 18px;
  }

  .auth-brand {
    top: 18px;
    left: 18px;
  }

  .auth-language-control {
    top: 18px;
    right: 18px;
  }

  .home-performance-inline .dashboard-performance-list {
    grid-template-columns: 1fr;
  }

  .home-detail-row {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .home-detail-image {
    width: 56px;
    height: 56px;
  }

  .home-detail-order,
  .home-detail-dates {
    grid-column: 1 / -1;
  }

  .auth-hero h1 {
    font-size: 2.25rem;
  }

  .auth-hero {
    gap: 30px;
  }

  .auth-logo {
    width: min(240px, 72vw);
  }

  .content {
    padding: 82px 18px 18px;
  }

  .topbar,
  .section-header,
  .modal-header,
  .modal-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .store-employees-head,
  .employee-permissions-header {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-modal .modal-header {
    padding-top: 50px;
    padding-right: 0;
  }

  .profile-modal .modal-header .modal-settings-shortcut,
  .profile-modal .modal-header #close-profile-modal {
    top: 0;
  }

  .store-employee-form {
    grid-template-columns: 1fr;
  }

  .store-employee-list article {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .store-employee-list article span,
  .store-employee-row-actions {
    justify-self: start;
  }

  .employee-permission-actions {
    justify-content: flex-start;
  }

  .metrics-grid,
  .home-grid,
  .dashboard-filters,
  .toolbar,
  .form-grid,
  .promo-row,
  .profile-grid,
  .shopee-edit-grid {
    grid-template-columns: 1fr;
  }

  .profile-photo-panel {
    justify-items: start;
  }

  .profile-code-row {
    grid-template-columns: 1fr;
  }

  .profile-inline-field,
  .profile-double-code-row,
  .profile-name-language-row,
  .email-domain-row,
  .platform-detail-grid {
    grid-template-columns: 1fr;
  }

  .product-edit {
    grid-template-columns: 72px minmax(0, 1fr);
    padding-right: 48px;
  }

  .product-edit img {
    width: 72px;
    height: 72px;
  }

  .variation-toggle {
    top: 34px;
  }

  .variation-panel {
    padding-left: 12px;
  }

  .variation-row {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .modal-variation-card {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .modal-variation-card img {
    width: 54px;
    height: 54px;
  }

  .modal-variation-numbers {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    text-align: left;
  }

  .modal-variation-editor {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .modal-variation-editor .wide-field {
    grid-column: 1 / -1;
  }

  .personal-cost-fields {
    grid-template-columns: 1fr;
  }

  .variation-number {
    justify-items: start;
  }

  .stock-box,
  .sales-box,
  .price-box {
    grid-column: 2;
    justify-items: start;
  }
}

@media (max-width: 520px) {
  .status-badge {
    white-space: normal;
  }
}

@media (max-width: 1180px) {
  .shopee-seller-layout {
    grid-template-columns: 1fr;
  }

  .seller-preview {
    position: static;
  }

  .image-preview-strip {
    grid-template-columns: repeat(3, minmax(72px, 1fr));
  }

  .auth-screen {
    grid-template-columns: 280px 430px 380px !important;
    min-width: 1180px;
    padding: 96px 28px 36px;
    justify-content: center;
  }

  .auth-hero,
  .auth-hero-main {
    display: contents !important;
  }

  .auth-logo {
    width: 280px !important;
  }

  .auth-hero h1 {
    font-size: 3.2rem !important;
  }

  .auth-copy {
    max-width: 420px;
  }

  .auth-card {
    transform: none !important;
  }
}

@media (max-width: 1320px) {
  body.app-active {
    overflow-x: auto;
  }

  body.app-active .app-shell {
    display: grid;
    grid-template-columns: 280px minmax(1040px, 1fr);
    min-width: 1320px;
  }

  body.app-active .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
  }

  body.app-active .content {
    padding: 28px;
  }

  body.app-active .topbar,
  body.app-active .section-header,
  body.app-active .modal-header,
  body.app-active .modal-actions {
    align-items: center;
    flex-direction: row;
  }

  body.app-active .metrics-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  body.app-active .toolbar {
    grid-template-columns: minmax(260px, 1fr) 180px 170px 170px;
  }

  body.app-active .product-edit {
    grid-template-columns: 88px minmax(0, 1fr) 120px 120px;
  }

  body.app-active .product-edit img {
    width: 88px;
    height: 88px;
  }

  body.app-active .stock-box,
  body.app-active .sales-box,
  body.app-active .price-box {
    grid-column: auto;
    justify-items: end;
  }

}

