:root {
  color-scheme: light;
  --bg: #f5f6fa;
  --surface: #ffffff;
  --surface-soft: #f8f9fc;
  --surface-hover: #f2f3f8;
  --ink: #171821;
  --ink-soft: #5f6372;
  --ink-muted: #8e93a3;
  --border: #e7e8ee;
  --border-strong: #d9dbe5;
  --primary: #6557e8;
  --primary-strong: #5546db;
  --primary-soft: #efedff;
  --green: #159a68;
  --green-soft: #e7f8f1;
  --red: #e6535f;
  --red-soft: #fff0f1;
  --amber: #bf7b14;
  --amber-soft: #fff5df;
  --blue: #3a7ce8;
  --blue-soft: #eaf2ff;
  --violet: #8a57e8;
  --violet-soft: #f1eaff;
  --sidebar: #11121a;
  --sidebar-soft: #1a1c27;
  --shadow-sm: 0 1px 2px rgba(19, 20, 27, .03), 0 8px 24px rgba(19, 20, 27, .04);
  --shadow-md: 0 14px 40px rgba(22, 23, 32, .08);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); }
button, input { font: inherit; }
button { color: inherit; }
svg { display: block; fill: currentColor; }
.hidden { display: none !important; }

button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(101, 87, 232, .22);
  outline-offset: 2px;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  color: #fff;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 2%, rgba(116, 101, 255, .18), transparent 31%),
    linear-gradient(180deg, #12131d 0%, #0f1017 100%);
  border-right: 1px solid rgba(255, 255, 255, .05);
}

.sidebar::after {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  left: -150px;
  bottom: -110px;
  border-radius: 50%;
  background: rgba(101, 87, 232, .13);
  filter: blur(12px);
  pointer-events: none;
}

.brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 7px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(145deg, #7869ff, #566eea 52%, #42b6d9);
  box-shadow: 0 10px 28px rgba(93, 83, 235, .32), inset 0 1px 0 rgba(255, 255, 255, .3);
}

.brand-mark svg { width: 25px; height: 25px; }
.brand div { display: grid; gap: 1px; }
.brand strong { font-size: 17px; letter-spacing: -.025em; }
.brand small { color: #8e92a6; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

.workspace-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 10px 11px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px;
  background: rgba(255, 255, 255, .045);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
}

.workspace-logo,
.store-logo {
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(145deg, #f25361, #ff7b5d);
}

.workspace-logo { width: 34px; height: 34px; font-size: 14px; }
.workspace-card div { display: grid; gap: 3px; min-width: 0; }
.workspace-card strong { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.workspace-card small { color: #858a9e; font-size: 10px; }
.workspace-chevron { color: #72778b; font-size: 16px; }

.nav-list { position: relative; z-index: 1; display: grid; gap: 5px; }
.nav-item {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  border: 0;
  border-radius: 11px;
  color: #8f94a8;
  background: transparent;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  transition: color .18s ease, background .18s ease, transform .18s ease;
}

.nav-item svg { width: 19px; height: 19px; }
.nav-item:not(:disabled) { cursor: pointer; }
.nav-item:not(:disabled):hover { color: #fff; background: rgba(255, 255, 255, .06); transform: translateX(2px); }
.nav-item.active { color: #fff; background: linear-gradient(90deg, rgba(101, 87, 232, .22), rgba(101, 87, 232, .09)); box-shadow: inset 2px 0 0 #7e70ff; }
.nav-item em { color: #686d80; font-size: 8px; font-style: normal; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.nav-item:disabled { opacity: .78; }

.sidebar-footer {
  position: relative;
  z-index: 1;
  margin-top: auto;
  display: grid;
  gap: 15px;
  padding: 16px 9px 0;
  border-top: 1px solid rgba(255, 255, 255, .065);
}

.system-status { display: flex; align-items: center; gap: 10px; }
.system-status > span { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: #38cf8e; box-shadow: 0 0 0 5px rgba(56, 207, 142, .1), 0 0 15px rgba(56, 207, 142, .35); }
.system-status div { display: grid; gap: 2px; }
.system-status strong { font-size: 11px; }
.system-status small { color: #73788b; font-size: 9px; }
.version { color: #525668; font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

.app-main {
  min-width: 0;
  width: 100%;
  max-width: 1640px;
  margin: 0 auto;
  padding: 34px 42px 56px;
}

.topbar {
  min-height: 72px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.topbar-copy { min-width: 0; }
.eyebrow,
.panel-kicker {
  margin: 0 0 7px;
  color: var(--ink-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .105em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 7px; font-size: clamp(27px, 2.25vw, 37px); line-height: 1.12; letter-spacing: -.045em; }
.page-subtitle { margin: 0; color: var(--ink-soft); font-size: 13px; }

.connection-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 9px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 4px 16px rgba(17, 18, 26, .03);
  font-size: 11px;
  font-weight: 750;
  backdrop-filter: blur(12px);
}

.connection-badge > span { width: 7px; height: 7px; border-radius: 50%; background: #aaaebb; }
.connection-badge.connected { color: #13734f; border-color: #cfeee1; background: #edfbf5; }
.connection-badge.connected > span { background: #23af76; box-shadow: 0 0 0 4px rgba(35, 175, 118, .1); }

.connect-layout {
  margin-top: 32px;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(340px, .76fr);
  gap: 20px;
}

.connect-hero {
  position: relative;
  min-height: 590px;
  padding: clamp(34px, 4vw, 58px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  border-radius: 28px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255,255,255,.035), transparent 43%),
    linear-gradient(145deg, #171825 0%, #18172a 45%, #24204b 100%);
  box-shadow: var(--shadow-md);
}

.connect-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .1;
  background-image: linear-gradient(rgba(255,255,255,.18) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.18) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}

.hero-glow { position: absolute; border-radius: 50%; filter: blur(10px); pointer-events: none; }
.hero-glow-one { width: 330px; height: 330px; right: -95px; top: -100px; background: rgba(108, 90, 244, .25); }
.hero-glow-two { width: 260px; height: 260px; left: 18%; bottom: -175px; background: rgba(53, 183, 209, .18); }
.connect-hero-content { position: relative; z-index: 2; max-width: 690px; }
.hero-kicker { display: inline-flex; padding: 7px 10px; border: 1px solid rgba(255,255,255,.12); border-radius: 999px; color: #bdb8ff; background: rgba(255,255,255,.045); font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.connect-hero h2 { max-width: 720px; margin: 22px 0 16px; font-size: clamp(32px, 3.3vw, 52px); line-height: 1.03; letter-spacing: -.055em; }
.connect-hero-content > p { max-width: 590px; margin-bottom: 28px; color: #aaaec0; font-size: 14px; line-height: 1.7; }
.feature-list { display: grid; gap: 14px; }
.feature-list > div { display: grid; grid-template-columns: 31px 1fr; align-items: start; gap: 11px; }
.feature-list > div > span { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 8px; color: #aaa1ff; background: rgba(121, 105, 255, .12); font-size: 8px; font-weight: 800; }
.feature-list p { margin: 0; display: grid; gap: 3px; }
.feature-list strong { font-size: 12px; }
.feature-list small { color: #777c90; font-size: 10px; line-height: 1.45; }

.mini-dashboard {
  position: relative;
  z-index: 2;
  width: min(82%, 620px);
  min-height: 178px;
  margin: 36px 0 -94px auto;
  padding: 17px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 18px 18px 0 0;
  background: rgba(255,255,255,.075);
  box-shadow: 0 -5px 60px rgba(84, 69, 219, .13), inset 0 1px 0 rgba(255,255,255,.08);
  backdrop-filter: blur(14px);
  transform: rotate(-1.2deg);
}

.mini-top { display: flex; align-items: center; gap: 5px; }
.mini-top i { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.3); }
.mini-top span { margin-left: auto; color: #65daa4; font-size: 7px; font-weight: 900; letter-spacing: .12em; }
.mini-metrics { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin: 14px 0; }
.mini-metrics b { height: 34px; border-radius: 8px; background: rgba(255,255,255,.08); }
.mini-chart { height: 82px; padding: 9px 4px 0; overflow: hidden; border-radius: 9px; background: rgba(0,0,0,.08); }
.mini-chart svg { width: 100%; height: 100%; }
.mini-chart path:first-child { fill: none; stroke: #9e91ff; stroke-width: 3; vector-effect: non-scaling-stroke; }
.mini-chart .mini-area { fill: url(#none); stroke: none; opacity: .16; }

.connect-form-card {
  min-height: 590px;
  padding: 29px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.form-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 34px; }
.form-icon { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 12px; color: var(--primary); background: var(--primary-soft); font-size: 19px; font-weight: 600; }
.form-heading div { display: grid; gap: 3px; }
.form-heading h3 { margin: 0; font-size: 16px; letter-spacing: -.02em; }
.form-heading p { margin: 0; color: var(--ink-muted); font-size: 10px; }
.field-label,
.date-grid label span { color: #454856; font-size: 11px; font-weight: 750; }
.token-wrap { position: relative; margin: 8px 0 19px; }
input {
  width: 100%;
  height: 48px;
  padding: 0 13px;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  color: var(--ink);
  background: #fff;
  outline: none;
  font-size: 12px;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
input:hover { border-color: #c7c9d5; }
input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(101,87,232,.09); }
.token-wrap input { padding-right: 84px; }
.token-wrap button { position: absolute; right: 7px; top: 7px; height: 34px; padding: 0 10px; border: 0; border-radius: 8px; color: var(--ink-soft); background: var(--surface-soft); font-size: 10px; font-weight: 700; cursor: pointer; }
.date-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.date-grid label { display: grid; gap: 8px; }
.primary-button,
.secondary-button { border: 0; cursor: pointer; }
.primary-button {
  width: 100%;
  height: 49px;
  margin-top: 22px;
  padding: 0 10px 0 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #7465ef);
  box-shadow: 0 12px 26px rgba(101, 87, 232, .24);
  font-size: 12px;
  font-weight: 800;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.primary-button b { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 8px; background: rgba(255,255,255,.14); font-size: 15px; }
.primary-button:hover { transform: translateY(-1px); box-shadow: 0 16px 30px rgba(101, 87, 232, .3); filter: saturate(1.06); }
.primary-button:disabled { opacity: .65; cursor: wait; transform: none; }
.security-note { margin-top: auto; padding: 15px 0 4px; display: flex; align-items: center; gap: 8px; color: var(--ink-muted); font-size: 9px; line-height: 1.45; }
.security-note svg { width: 16px; height: 16px; flex: 0 0 auto; color: var(--green); }
.error-message { min-height: 17px; margin: 8px 0 0; color: var(--red); font-size: 10px; line-height: 1.45; }

.loading-card {
  margin-top: 32px;
  min-height: 440px;
  padding: 70px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  text-align: center;
}
.loading-orbit { position: relative; width: 66px; height: 66px; margin-bottom: 24px; border: 1px solid #dedafc; border-radius: 50%; animation: spin 1.8s linear infinite; }
.loading-orbit span { position: absolute; width: 13px; height: 13px; right: 3px; top: 7px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 7px var(--primary-soft); }
.loading-orbit i { position: absolute; inset: 18px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), #49a3d8); }
.loading-card h2 { margin-bottom: 8px; font-size: 21px; letter-spacing: -.03em; }
.loading-card > p { color: var(--ink-muted); font-size: 12px; }
.loading-steps { display: flex; gap: 7px; margin-top: 22px; }
.loading-steps span { padding: 6px 9px; border-radius: 999px; color: var(--ink-muted); background: var(--surface-soft); font-size: 8px; font-weight: 750; }
.loading-steps span.active { color: var(--primary); background: var(--primary-soft); }
@keyframes spin { to { transform: rotate(360deg); } }

.dashboard { margin-top: 27px; }
.dashboard-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.store-row { display: flex; align-items: center; gap: 12px; }
.store-logo { width: 39px; height: 39px; flex: 0 0 auto; font-size: 14px; }
.store-row .eyebrow { margin-bottom: 3px; }
.store-row h2 { margin: 0; font-size: 21px; letter-spacing: -.035em; }
.dashboard-subline { margin: 8px 0 0 51px; display: flex; align-items: center; gap: 8px; color: var(--ink-muted); font-size: 10px; }
.dashboard-subline i { width: 3px; height: 3px; border-radius: 50%; background: #c2c4ce; }
.dashboard-subline b { color: var(--ink-soft); font-weight: 700; }
.secondary-button { height: 39px; padding: 0 13px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--border); border-radius: 10px; color: var(--ink-soft); background: var(--surface); box-shadow: 0 3px 10px rgba(17,18,26,.03); font-size: 10px; font-weight: 750; transition: background .16s ease, border-color .16s ease, transform .16s ease; }
.secondary-button svg { width: 15px; height: 15px; }
.secondary-button:hover { border-color: var(--border-strong); background: var(--surface-hover); transform: translateY(-1px); }

.warnings { display: grid; gap: 8px; }
.warning { margin-bottom: 8px; padding: 11px 13px; display: flex; align-items: center; gap: 8px; border: 1px solid #f5dfad; border-radius: 11px; color: #815a12; background: #fff9e9; font-size: 10px; }
.warning::before { content: "!"; width: 18px; height: 18px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: #fff; background: #d3962b; font-size: 9px; font-weight: 900; }

.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.metric-card {
  position: relative;
  min-height: 144px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.metric-card:hover { transform: translateY(-2px); border-color: #dddfea; box-shadow: 0 13px 30px rgba(18,19,27,.065); }
.metric-card > * { position: relative; z-index: 1; }
.metric-top { display: flex; align-items: center; gap: 9px; }
.metric-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: var(--green); background: var(--green-soft); }
.metric-icon svg { width: 16px; height: 16px; }
.metric-icon.icon-blue { color: var(--blue); background: var(--blue-soft); }
.metric-icon.icon-violet { color: var(--violet); background: var(--violet-soft); }
.metric-icon.icon-red { color: var(--red); background: var(--red-soft); }
.metric-label { color: var(--ink-soft); font-size: 10px; font-weight: 700; }
.metric-card strong { display: block; margin: 14px 0 6px; font-size: clamp(24px, 2vw, 31px); line-height: 1; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.metric-card small { color: var(--ink-muted); font-size: 9px; }
.metric-primary { color: #fff; border-color: transparent; background: linear-gradient(135deg, #5e50dd 0%, #7163ec 64%, #7589ed 100%); box-shadow: 0 14px 34px rgba(89,72,211,.22); }
.metric-primary .metric-icon { color: #fff; background: rgba(255,255,255,.14); }
.metric-primary .metric-label, .metric-primary small { color: rgba(255,255,255,.7); }
.metric-decoration { position: absolute; z-index: 0; width: 150px; height: 150px; right: -58px; bottom: -77px; border: 25px solid rgba(255,255,255,.08); border-radius: 50%; }

.analytics-grid { display: grid; grid-template-columns: minmax(0, 1.72fr) minmax(300px, .78fr); gap: 13px; margin-top: 13px; }
.panel { border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.chart-panel, .status-panel, .orders-panel { padding: 20px; }
.panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.panel-kicker { margin-bottom: 4px; font-size: 8px; }
.panel-header h3 { margin: 0; font-size: 14px; letter-spacing: -.025em; }
.chart-summary { display: grid; gap: 3px; text-align: right; }
.chart-summary span { color: var(--ink-muted); font-size: 8px; }
.chart-summary strong { font-size: 13px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.sales-chart { min-height: 300px; margin-top: 16px; overflow: hidden; }
.sales-chart svg { width: 100%; height: 300px; overflow: visible; }
.chart-grid { stroke: #ebecef; stroke-width: 1; }
.chart-axis-label { fill: #9b9eab; font-size: 9px; font-family: inherit; }
.chart-area { fill: url(#salesArea); }
.chart-line { fill: none; stroke: #6557e8; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 6px 8px rgba(101,87,232,.16)); }
.chart-point { fill: #fff; stroke: #6557e8; stroke-width: 2.5; }
.chart-point:hover { r: 5.5; }
.chart-empty { min-height: 270px; display: grid; place-items: center; color: var(--ink-muted); font-size: 11px; }

.status-panel { display: flex; flex-direction: column; }
.status-overview { margin: 20px 0 17px; display: grid; grid-template-columns: 94px 1fr; align-items: center; gap: 16px; }
.status-donut { --completion: 0deg; position: relative; width: 90px; height: 90px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--green) 0 var(--completion), #eef0f4 var(--completion) 360deg); }
.status-donut::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--surface); }
.status-donut div { position: relative; display: grid; gap: 1px; text-align: center; }
.status-donut strong { font-size: 18px; letter-spacing: -.04em; }
.status-donut span { color: var(--ink-muted); font-size: 7px; }
.status-overview > div:last-child { display: grid; gap: 4px; }
.status-overview > div:last-child span { color: var(--ink-muted); font-size: 8px; }
.status-overview > div:last-child strong { font-size: 25px; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.status-overview > div:last-child small { color: var(--ink-muted); font-size: 8px; }
.status-list { display: grid; gap: 10px; margin-top: auto; }
.status-row { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 8px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #9397a5; }
.status-dot.completed { background: var(--green); }
.status-dot.cancelled { background: var(--red); }
.status-dot.returned { background: var(--amber); }
.status-dot.processing { background: var(--violet); }
.status-name { min-width: 0; overflow: hidden; color: var(--ink-soft); font-size: 9px; font-weight: 650; white-space: nowrap; text-overflow: ellipsis; }
.status-count { font-size: 10px; font-weight: 800; font-variant-numeric: tabular-nums; }
.progress { grid-column: 2 / -1; height: 4px; overflow: hidden; border-radius: 99px; background: #eef0f4; }
.progress span { display: block; height: 100%; border-radius: 99px; background: #9397a5; }
.progress span.completed { background: var(--green); }
.progress span.cancelled { background: var(--red); }
.progress span.returned { background: var(--amber); }
.progress span.processing { background: var(--violet); }

.orders-panel { margin-top: 13px; }
.table-caption { padding: 6px 9px; border-radius: 999px; color: var(--ink-muted); background: var(--surface-soft); font-size: 8px; font-weight: 700; }
.table-wrap { margin-top: 15px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 10px; }
th { padding: 10px 12px; border-bottom: 1px solid var(--border); color: var(--ink-muted); font-size: 8px; font-weight: 800; letter-spacing: .045em; text-align: left; text-transform: uppercase; white-space: nowrap; }
td { padding: 12px; border-bottom: 1px solid #f0f1f4; color: var(--ink-soft); white-space: nowrap; transition: background .15s ease; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fafafd; }
td strong { color: var(--ink); font-size: 10px; }
.money { text-align: right; font-variant-numeric: tabular-nums; }
td.money { color: var(--ink); font-weight: 800; }
.order-status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 999px; color: #646876; background: #f1f2f5; font-size: 8px; font-weight: 750; }
.order-status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.order-status.completed { color: #11734e; background: var(--green-soft); }
.order-status.cancelled { color: #b53c47; background: var(--red-soft); }
.order-status.returned { color: #98610d; background: var(--amber-soft); }
.order-status.processing { color: #6740af; background: var(--violet-soft); }

@media (max-width: 1180px) {
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analytics-grid { grid-template-columns: 1fr; }
  .status-panel { min-height: 320px; }
  .status-overview { grid-template-columns: 100px 1fr; }
}

@media (max-width: 960px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; width: 100%; height: auto; padding: 14px 18px; flex-direction: row; align-items: center; }
  .sidebar::after, .workspace-card, .sidebar-footer { display: none; }
  .brand { padding: 0; }
  .brand small { display: none; }
  .nav-list { margin-left: auto; display: flex; }
  .nav-item { width: auto; grid-template-columns: 18px auto; padding: 0 10px; }
  .nav-item em, .nav-item:disabled { display: none; }
  .app-main { padding: 26px 24px 45px; }
  .connect-layout { grid-template-columns: 1fr; }
  .connect-hero { min-height: 520px; }
  .connect-form-card { min-height: auto; }
  .security-note { margin-top: 22px; }
}

@media (max-width: 680px) {
  .sidebar { justify-content: space-between; }
  .brand strong { font-size: 15px; }
  .brand-mark { width: 35px; height: 35px; }
  .brand-mark svg { width: 21px; height: 21px; }
  .nav-item span { display: none; }
  .nav-item { min-height: 38px; padding: 0 10px; }
  .app-main { padding: 21px 15px 38px; }
  .topbar { align-items: flex-start; }
  .page-subtitle { display: none; }
  .connection-badge { padding: 8px 10px; font-size: 9px; }
  .connect-layout { margin-top: 23px; }
  .connect-hero { min-height: 490px; padding: 30px 23px; border-radius: 22px; }
  .connect-hero h2 { font-size: 33px; }
  .mini-dashboard { width: 96%; margin-bottom: -72px; }
  .connect-form-card { padding: 24px 20px; border-radius: 22px; }
  .date-grid { grid-template-columns: 1fr; }
  .dashboard-head { align-items: flex-start; }
  .secondary-button { width: 39px; padding: 0; justify-content: center; }
  .secondary-button svg { width: 17px; height: 17px; }
  .secondary-button { font-size: 0; }
  .dashboard-subline { margin-left: 0; flex-wrap: wrap; }
  .metrics-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 130px; }
  .chart-panel, .status-panel, .orders-panel { padding: 16px; }
  .sales-chart { min-height: 255px; overflow-x: auto; }
  .sales-chart svg { min-width: 620px; height: 255px; }
  .status-overview { grid-template-columns: 90px 1fr; }
  .panel-header { align-items: center; }
  .chart-summary { display: none; }
  table { min-width: 650px; }
}

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