:root {
  color-scheme: dark;
  --ink: #eefcff;
  --muted: #95b7c2;
  --line: rgba(148, 163, 184, .18);
  --panel: rgba(15, 23, 42, .82);
  --soft: rgba(20, 184, 166, .1);
  --accent: #14b8a6;
  --accent-dark: #2dd4bf;
  --bad: #ff7487;
  --good: #51e2a2;
  --gold: #f6c768;
  --bg: #08111f;
  font-family: Inter, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button { border: 0; cursor: pointer; }
.hidden { display: none !important; }

.login-panel {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 1fr) 420px;
  gap: 48px;
  align-items: center;
  padding: 64px clamp(28px, 6vw, 96px);
  background:
    radial-gradient(circle at 50% 36%, rgba(56, 158, 176, .22), transparent 32%),
    radial-gradient(circle at 86% 10%, rgba(214, 178, 111, .1), transparent 26%),
    linear-gradient(180deg, #061019 0%, #071017 48%, #020609 100%);
}

.public-site {
  display: block;
  padding: 0;
  overflow-y: auto;
  background:
    radial-gradient(circle at 12% 18%, rgba(40, 227, 208, .16), transparent 28%),
    radial-gradient(circle at 74% 2%, rgba(56, 160, 255, .12), transparent 24%),
    linear-gradient(90deg, rgba(40, 227, 208, .08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(40, 227, 208, .06) 1px, transparent 1px),
    linear-gradient(180deg, #06141f 0%, #071722 48%, #040b11 100%);
  background-size: auto, auto, 80px 80px, 80px 80px, auto;
}
.public-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px clamp(20px, 5vw, 72px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  background: rgba(4, 18, 29, .72);
  backdrop-filter: blur(18px);
}
.public-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #eefcff;
  text-decoration: none;
  font-weight: 900;
}
.public-logo-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, .96), transparent 18%),
    linear-gradient(135deg, #12d4bd, #1f8df5 58%, #0b2934);
  box-shadow: 0 0 18px rgba(40, 227, 208, .38);
  font-size: 15px;
}
.public-nav { display: flex; gap: 28px; align-items: center; }
.public-nav a { color: #a9c2ca; text-decoration: none; font-weight: 800; font-size: 14px; }
.public-nav a:hover { color: #eefcff; }
.public-download,
.hero-actions a:first-child,
.download-card a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  background: #28e3d0;
  color: #001914;
  text-decoration: none;
  font-weight: 900;
}
.public-content { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.public-hero {
  position: relative;
  min-height: calc(100vh - 70px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 540px);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding: 86px 0 84px;
}
.public-hero > *:not(#heroCanvas):not(.hero-glow) {
  position: relative;
  z-index: 2;
}
#heroCanvas {
  position: absolute;
  inset: -70px calc((100vw - min(1180px, calc(100vw - 40px))) / -2) 0;
  width: 100vw;
  height: calc(100% + 70px);
  pointer-events: none;
  opacity: .82;
  z-index: 0;
}
.hero-glow {
  position: absolute;
  inset: auto 12% 4% 30%;
  height: 280px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(40, 227, 208, .14), transparent 68%);
  filter: blur(10px);
  pointer-events: none;
  z-index: 1;
}
.hero-copy h1 {
  margin: 10px 0 16px;
  font-size: clamp(56px, 8vw, 108px);
  line-height: .92;
  letter-spacing: 0;
}
.hero-copy .lead { max-width: 620px; color: #c7dce3; }
.hero-actions { display: flex; gap: 12px; margin-top: 26px; }
.hero-actions a:last-child {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  background: rgba(255, 255, 255, .05);
  color: #eefcff;
  text-decoration: none;
  font-weight: 900;
}
.hero-card {
  min-height: 430px;
  height: 430px;
  align-self: center;
  margin-top: 90px;
  border: 1px solid rgba(121, 192, 204, .34);
  border-radius: 8px;
  background: rgba(255, 255, 255, .035);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .3), inset 0 0 60px rgba(40, 227, 208, .06);
  overflow: hidden;
}
.public-login-card {
  min-height: 0;
  height: 100%;
  border: 0;
  border-radius: 0;
  padding: 26px;
  background: linear-gradient(135deg, rgba(42, 60, 72, .92), rgba(33, 48, 55, .9));
  box-shadow: none;
  align-content: start;
  gap: 14px;
}
.card-dots { display: flex; gap: 10px; margin-bottom: 18px; }
.card-dots i { width: 10px; height: 10px; border-radius: 999px; background: #28e3d0; opacity: .85; }
.login-index-head { margin-bottom: 22px; }
.login-index-head h2 { margin: 0; font-size: 18px; }
.login-index-head span { color: #ffd84d; font-size: 16px; }
.login-card-fields {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}
.login-card-fields input {
  min-height: 40px;
  padding: 10px 12px;
  background: rgba(4, 15, 23, .55);
}
.login-card-fields button {
  min-height: 42px;
  margin-top: 4px;
}
.public-login-card .error { min-height: 16px; }

/* Public landing page mirrors the production site; scoped so the logged-in app stays unchanged. */
.public-site {
  --site-bg: #06141f;
  --site-panel: rgba(255, 255, 255, .08);
  --site-panel-strong: rgba(255, 255, 255, .13);
  --site-line: rgba(146, 225, 221, .2);
  --site-text: #eefcff;
  --site-muted: #a9c2ca;
  --site-cyan: #28e3d0;
  --site-blue: #3d8bff;
  --site-green: #0cae8f;
  --site-yellow: #f4d35e;
  display: block;
  min-height: 100vh;
  padding: 0;
  overflow-y: auto;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", Arial, sans-serif;
  color: var(--site-text);
  background: var(--site-bg);
}

.public-site::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(93, 222, 220, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(93, 222, 220, .045) 1px, transparent 1px),
    radial-gradient(circle at 20% 10%, rgba(21, 201, 176, .22), transparent 34%),
    radial-gradient(circle at 82% 24%, rgba(61, 139, 255, .18), transparent 30%),
    radial-gradient(circle at 70% 85%, rgba(244, 211, 94, .1), transparent 28%);
  background-size: 52px 52px, 52px 52px, auto, auto, auto;
}

.public-site .site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  min-height: 68px;
  padding: 14px clamp(18px, 5vw, 72px);
  border-bottom: 1px solid var(--site-line);
  background: rgba(4, 18, 29, .72);
  backdrop-filter: blur(18px);
}

.public-site .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
}

.public-site .brand img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: cover;
}

.public-site .site-nav {
  display: flex;
  justify-content: center;
  gap: 26px;
  color: var(--site-muted);
  font-size: 14px;
  font-weight: 700;
}

.public-site .site-nav a,
.public-site .hero-actions a {
  color: inherit;
  text-decoration: none;
}

.public-site .site-nav a:hover { color: var(--site-text); }

.public-site .nav-cta,
.public-site .primary-button,
.public-site .ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
}

.public-site .nav-cta,
.public-site .primary-button {
  color: #001914;
  background: linear-gradient(135deg, var(--site-cyan), var(--site-green));
}

.public-site .ghost-button {
  border: 1px solid var(--site-line);
  color: var(--site-text);
  background: rgba(255, 255, 255, .05);
}

.public-site .menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--site-line);
  border-radius: 8px;
  background: var(--site-panel);
  color: var(--site-text);
}

.public-site .section {
  position: relative;
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 92px 0;
}

.public-site .hero {
  min-height: calc(100vh - 68px);
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: 42px;
  overflow: hidden;
}

.public-site #heroCanvas,
.public-site .hero-glow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.public-site #heroCanvas {
  pointer-events: none;
  opacity: .82;
  z-index: 0;
}

.public-site .hero-glow {
  background: radial-gradient(circle at 42% 44%, rgba(40, 227, 208, .18), transparent 30%);
  pointer-events: none;
  z-index: 1;
}

.public-site .hero-content,
.public-site .hero-panel,
.public-site .login-slot {
  position: relative;
  z-index: 2;
}

.public-site .eyebrow {
  margin: 0 0 12px;
  color: var(--site-cyan);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.public-site h1 {
  margin: 0 0 16px;
  font-size: clamp(56px, 10vw, 128px);
  line-height: .95;
  letter-spacing: 0;
}

.public-site .hero-subtitle {
  max-width: 620px;
  margin: 0;
  color: #cce7ed;
  font-size: 20px;
}

.public-site .hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.public-site .hero-panel {
  min-height: 0;
  margin-top: 78px;
  padding: 24px;
  border: 1px solid var(--site-line);
  border-radius: 8px;
  background: linear-gradient(145deg, var(--site-panel-strong), rgba(255, 255, 255, .045));
  box-shadow: 0 28px 80px rgba(0, 0, 0, .28);
  backdrop-filter: blur(18px);
}

.public-site .panel-top {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
}

.public-site .panel-top span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--site-cyan);
  opacity: .8;
}

.public-site .metric-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.public-site .metric-line strong { font-size: 18px; }
.public-site .metric-line em { color: var(--site-yellow); font-style: normal; font-weight: 900; }

.public-site .chart-bars {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
  height: 120px;
  gap: 13px;
  margin: 22px 0 18px;
}

.public-site .chart-bars i {
  display: block;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, var(--site-cyan), var(--site-blue));
}

.public-site .chart-bars i:nth-child(1) { height: 44%; }
.public-site .chart-bars i:nth-child(2) { height: 66%; }
.public-site .chart-bars i:nth-child(3) { height: 52%; }
.public-site .chart-bars i:nth-child(4) { height: 82%; }
.public-site .chart-bars i:nth-child(5) { height: 70%; }

.public-site .login-card-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 0;
}

.public-site .login-card-fields label {
  display: grid;
  gap: 6px;
  color: var(--site-muted);
  font-size: 13px;
  font-weight: 700;
}

.public-site .login-card-fields input {
  min-height: 46px;
  border: 1px solid var(--site-line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--site-text);
  background: rgba(255, 255, 255, .04);
}

.public-site .login-card-fields button {
  min-height: 48px;
  border-radius: 8px;
  color: #001914;
  font-weight: 900;
  background: linear-gradient(135deg, var(--site-cyan), var(--site-green));
}

.public-site .public-login-card .error {
  margin: 8px 0 0;
  color: var(--bad);
}

.public-site .login-panel-title {
  margin-bottom: 12px;
}

.public-site .login-panel-title p {
  margin: 0 0 6px;
  color: var(--site-cyan);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.public-site .login-panel-title h2 {
  margin: 0;
  color: var(--site-text);
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: 0;
}

.public-site .login-panel-title span {
  display: block;
  margin-top: 6px;
  color: #cce7ed;
  font-size: 13px;
}
.index-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.index-head strong { font-size: 18px; }
.index-head span { color: #ffd84d; font-weight: 900; }
.bar-chart { height: 150px; display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; gap: 13px; margin-bottom: 22px; }
.bar-chart i {
  display: block;
  min-height: 78px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, #2fe0d1, #3488ef);
}
.bar-chart i:nth-child(2) { height: 120px; }
.bar-chart i:nth-child(3) { height: 96px; }
.bar-chart i:nth-child(4) { height: 148px; }
.bar-chart i:nth-child(5) { height: 126px; }
.index-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.index-grid span {
  min-height: 42px;
  padding: 12px;
  border: 1px solid rgba(121, 192, 204, .34);
  border-radius: 8px;
  color: #a9c2ca;
  background: rgba(255, 255, 255, .03);
}
.login-fields { display: grid; gap: 12px; margin-top: 16px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .08); }
.public-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding: 10px 0 54px; }
.public-stats article,
.service-grid article,
.download-card,
.about-section,
.contact-section {
  border: 1px solid rgba(121, 192, 204, .22);
  border-radius: 8px;
  background: rgba(255, 255, 255, .035);
  box-shadow: inset 0 0 40px rgba(40, 227, 208, .04);
}
.public-stats article { padding: 22px; }
.public-stats strong { display: block; font-size: 28px; color: #28e3d0; }
.public-stats span { color: #a9c2ca; font-weight: 800; }
.public-section { padding: 56px 0; }
.public-section h2 { margin: 0 0 24px; font-size: 34px; }
.service-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.service-grid article { display: grid; gap: 14px; padding: 20px; }
.service-grid b { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 8px; background: rgba(40, 227, 208, .12); color: #28e3d0; }
.service-grid strong { font-size: 17px; }
.service-grid span,
.about-section p,
.contact-section p { color: #a9c2ca; line-height: 1.7; }
.download-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.download-tabs button { background: rgba(255, 255, 255, .04); color: #a9c2ca; border: 1px solid rgba(255, 255, 255, .09); }
.download-tabs button.active { background: #28e3d0; color: #001914; }
.download-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.download-card { display: grid; grid-template-columns: 48px 1fr auto; gap: 14px; align-items: center; padding: 18px; }
.download-card p { margin: 6px 0; color: #a9c2ca; }
.download-card span { color: #7fa0aa; font-size: 13px; font-weight: 800; }
.download-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 10px; background: rgba(40, 227, 208, .12); color: #28e3d0; font-weight: 900; }
.download-empty { border: 1px dashed rgba(121, 192, 204, .24); border-radius: 8px; padding: 24px; color: #a9c2ca; }
.about-section,
.contact-section { padding: 24px; }

.brand-block h1 { font-size: clamp(42px, 6vw, 76px); line-height: 1; margin: 18px 0; text-shadow: 0 0 26px rgba(54, 216, 232, .4); }
.lead { max-width: 720px; color: #c4dce4; font-size: 20px; line-height: 1.7; }
.eyebrow { margin: 0 0 8px; color: var(--accent); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; font-weight: 800; }
.mark { width: 72px; height: 72px; display: grid; place-items: center; background: rgba(2, 8, 12, .92); color: #fff; border: 1px solid var(--line); border-radius: 18px; font-weight: 900; font-size: 24px; box-shadow: 0 0 36px rgba(54, 216, 232, .22); }
.mark.small { width: 42px; height: 42px; border-radius: 12px; font-size: 15px; }
.login-metrics { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.login-metrics span { background: rgba(54, 216, 232, .08); border: 1px solid var(--line); padding: 10px 14px; border-radius: 8px; font-weight: 800; }
.login-card { background: rgba(8, 23, 32, .86); border: 1px solid var(--line); box-shadow: 0 24px 80px rgba(0, 0, 0, .28); border-radius: 20px; padding: 30px; display: grid; gap: 18px; }
.login-card h2 { margin: 0; font-size: 30px; }
label { display: grid; gap: 8px; font-weight: 800; color: #d8edf3; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; background: rgba(3, 11, 17, .55); padding: 12px 13px; color: var(--ink); }
textarea { min-height: 140px; resize: vertical; }
.form-grid { display: grid; gap: 12px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
button, .login-card button { background: var(--accent); color: #041016; border-radius: 8px; padding: 12px 16px; font-weight: 900; }
button.secondary, .bulk-row button, .filters button { background: rgba(54, 216, 232, .12); color: var(--ink); border: 1px solid rgba(54, 216, 232, .2); }
.hint { color: var(--muted); margin: 8px 0; font-size: 14px; }
.error { min-height: 20px; margin: 0; color: var(--bad); font-weight: 800; }

.app {
  display: grid;
  grid-template-columns: 224px 1fr;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 10%, rgba(20, 184, 166, .16), transparent 30%),
    radial-gradient(circle at 82% 20%, rgba(99, 102, 241, .12), transparent 28%),
    linear-gradient(180deg, #0b1423 0%, #08111f 45%, #050914 100%);
  overflow: hidden;
}

.app.sidebar-collapsed {
  grid-template-columns: 0 1fr;
}

.sidebar { background: rgba(4, 10, 20, .78); color: #dce5ec; padding: 18px 12px; display: flex; flex-direction: column; gap: 22px; border-right: 1px solid rgba(148, 163, 184, .12); transition: transform .22s ease, opacity .22s ease; }
.sidebar-toggle {
  position: fixed;
  top: 42px;
  left: 207px;
  z-index: 30;
  display: grid;
  place-items: center;
  width: 34px;
  height: 52px;
  padding: 0;
  border: 1px solid rgba(45, 212, 191, .36);
  border-left-color: rgba(45, 212, 191, .18);
  border-radius: 0 10px 10px 0;
  background: linear-gradient(180deg, rgba(14, 42, 56, .96), rgba(4, 18, 29, .96));
  color: #bdf7f3;
  box-shadow: 8px 0 26px rgba(0, 0, 0, .22), inset 0 0 18px rgba(45, 212, 191, .08);
  cursor: pointer;
  transition: left .22s ease, top .22s ease, transform .22s ease;
}
.sidebar-toggle span {
  display: block;
  font-size: 28px;
  line-height: 1;
  transform: translateX(-1px);
}
.app.sidebar-collapsed .sidebar {
  transform: translateX(-100%);
  opacity: 0;
  pointer-events: none;
}
.app.sidebar-collapsed .sidebar-toggle {
  left: 0;
  top: 92px;
  border-radius: 0 10px 10px 0;
}
.app.sidebar-collapsed .sidebar-toggle span {
  transform: translateX(1px) rotate(180deg);
}
.side-brand { display: flex; align-items: center; gap: 12px; padding: 8px; }
.side-brand span { display: block; color: #91a2b1; font-size: 13px; margin-top: 2px; }
nav { display: grid; gap: 6px; }
nav button { text-align: left; color: #b9c7d3; background: transparent; padding: 12px 14px; border-radius: 8px; font-weight: 800; }
nav button.active, nav button:hover { background: rgba(20, 184, 166, .13); color: #fff; }

.main {
  min-width: 0;
  height: 100vh;
  overflow: hidden;
  padding: 16px 20px 20px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  background-image:
    linear-gradient(rgba(148, 163, 184, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, .025) 1px, transparent 1px);
  background-size: 56px 56px;
}

.main.compact-view {
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
}

.main.compact-view .topbar {
  display: none;
}

#overview.view:not(.hidden) {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
}

.view:not(.hidden):not(#overview) {
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

#connect.view:not(.hidden) {
  display: grid;
  grid-template-rows: auto minmax(420px, 1fr);
  gap: 10px;
  min-height: 0;
}

#orders.view:not(.hidden),
#fees.view:not(.hidden),
#stores.view:not(.hidden),
#settings.view:not(.hidden),
#distribution.view:not(.hidden) {
  display: grid;
}

#profit.view:not(.hidden) {
  display: grid;
}

#orders > .panel,
#fees > .panel,
#stores > .panel,
#settings > .panel,
#distribution > .panel,
#profit .panel {
  min-height: 0;
  height: 100%;
  overflow: auto;
}

#orders > .panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

#orders > .panel > .panel-head {
  position: sticky;
  top: 0;
  z-index: 8;
  padding-bottom: 14px;
  margin-bottom: 0;
  background: var(--panel);
}

.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: center;
  min-height: 68px;
  margin-bottom: 0;
  padding: 10px 16px;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(15, 23, 42, .88), rgba(15, 23, 42, .52));
  box-shadow: 0 18px 60px rgba(2, 6, 23, .24);
}

.topbar h2 { margin: 0; font-size: 28px; letter-spacing: .02em; text-shadow: none; }
.top-actions { justify-self: end; display: flex; gap: 10px; align-items: center; }
.pacific-clock {
  justify-self: center;
  min-width: 300px;
  padding: 8px 22px;
  text-align: center;
  border: 1px solid rgba(18, 195, 181, .32);
  border-radius: 14px;
  background: rgba(8, 19, 33, .44);
  box-shadow: inset 0 0 24px rgba(18, 195, 181, .08);
}
.pacific-clock span,
.pacific-clock em {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.pacific-clock strong {
  display: block;
  margin: 2px 0;
  color: #e5f7ff;
  font-size: 22px;
  letter-spacing: .08em;
}

.store-selector, .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(2, 6, 23, .16);
}

.kpi-grid article {
  background: rgba(15, 23, 42, .46);
  border: 1px solid rgba(148, 163, 184, .13);
  border-radius: 12px;
}

.control-strip { position: sticky; top: 0; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; background: rgba(11, 20, 35, .92); border: 1px solid var(--line); border-radius: 14px; padding: 10px; }
.time-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.time-tabs button { background: rgba(148, 163, 184, .08); color: var(--ink); border: 1px solid rgba(148, 163, 184, .14); padding: 9px 12px; }
.time-tabs button.active { background: var(--accent); color: #041016; }
.selection-note { color: var(--muted); font-weight: 800; font-size: 14px; }

.bigscreen-grid {
  display: grid;
  grid-template-columns: minmax(250px, 300px) minmax(650px, 1fr) minmax(320px, 380px);
  gap: 14px;
  align-items: stretch;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.center-stage, .right-stack { min-width: 0; min-height: 0; display: flex; }
.store-selector { margin-bottom: 0; padding: 14px; min-height: 0; height: 100%; display: flex; flex-direction: column; }
.selector-head { display: grid; gap: 10px; align-items: center; margin-bottom: 10px; }
.selector-head h3, .panel h3 { margin: 0; }
.selector-head span { color: var(--muted); font-size: 13px; }
.bulk-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.bulk-row button { padding: 9px 10px; }
.store-list { flex: 1; min-height: 0; overflow: auto; display: grid; align-content: start; gap: 6px; padding-right: 4px; }
.store-row {
  display: grid;
  gap: 4px;
  align-items: center;
  width: 100%;
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, .12);
  border-radius: 8px;
  background: rgba(15, 23, 42, .42);
  color: var(--ink);
  text-align: left;
}
.store-row.active { border-color: rgba(20, 184, 166, .8); background: rgba(20, 184, 166, .12); }
.store-row strong {
  display: block;
  white-space: normal;
  word-break: break-word;
  font-size: 14px;
  line-height: 1.25;
}
.store-row span {
  display: block;
  white-space: normal;
  word-break: break-word;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}
.store-row em {
  justify-self: start;
  max-width: 100%;
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(20, 184, 166, .1);
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.kpi-grid { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.kpi-grid article { padding: 12px; display: grid; gap: 6px; min-height: 102px; }
.kpi-grid span { color: var(--muted); font-weight: 800; }
.kpi-grid strong { font-size: 21px; color: #fff; text-shadow: none; }
.kpi-grid em { color: var(--good); font-style: normal; font-weight: 900; font-size: 13px; }
.kpi-grid small { justify-self: end; align-self: end; color: var(--gold); font-weight: 900; font-size: 12px; }

.panel { padding: 16px; min-width: 0; margin-bottom: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel-head h3 { margin: 0; font-size: 18px; }
.panel-head span { color: var(--muted); font-weight: 800; font-size: 13px; }
.chart-metric-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(45, 212, 191, .22);
  border-radius: 8px;
  background: rgba(2, 6, 23, .32);
}
.chart-metric-tabs button {
  min-width: 76px;
  height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
}
.chart-metric-tabs button.active {
  background: var(--accent);
  color: #04201e;
}
.chart-wrap { height: 392px; position: relative; }
svg { width: 100%; height: 100%; display: block; background: radial-gradient(circle at 50% 50%, rgba(54, 216, 232, .08), transparent 38%), repeating-linear-gradient(to bottom, transparent, transparent 63px, rgba(149, 183, 194, .08) 64px); border-radius: 10px; }
.line { fill: none; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.line.current { stroke: var(--accent); }
.line.previous { stroke: #9eb2c0; stroke-dasharray: 8 10; }
.hotspot { fill: transparent; cursor: crosshair; }
.tooltip { position: fixed; pointer-events: none; background: rgba(33, 33, 33, .96); color: #fff; border: 0; border-radius: 4px; padding: 9px 11px; display: grid; gap: 7px; min-width: 86px; z-index: 9999; box-shadow: 0 10px 28px rgba(0, 0, 0, .32); }
.tooltip b { font-size: 12px; font-weight: 700; }
.tooltip span { display: flex; align-items: center; gap: 7px; font-size: 12px; color: #f8fafc; white-space: nowrap; }
.ticker-detail-tooltip {
  min-width: 178px;
  gap: 6px;
  border: 1px solid rgba(45, 212, 191, .18);
  background: rgba(24, 28, 31, .96);
}
.ticker-detail-tooltip b {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ticker-detail-tooltip span {
  justify-content: space-between;
  gap: 16px;
}
.ticker-detail-tooltip em {
  max-width: 220px;
  color: #f4d35e;
  font-size: 11px;
  font-style: normal;
  line-height: 1.3;
  white-space: normal;
}

.summary-panel { margin-bottom: 14px; padding: 10px; min-height: 0; }
.compare-panel { min-height: 320px; }
.summary-compare-panel { margin-bottom: 0; padding: 10px 4px 0; border-top: 1px solid rgba(148, 163, 184, .12); }

.side-chart-wrap {
  position: relative;
  display: grid;
  grid-template-rows: minmax(180px, 1fr) 18px 22px;
  gap: 4px;
  min-height: clamp(232px, 27vh, 316px);
}

.side-chart-wrap svg {
  width: 100%;
  height: 100%;
  min-height: 180px;
  background:
    linear-gradient(to bottom, transparent, transparent 24%, rgba(148, 163, 184, .1) 24.4%, transparent 25%, transparent 49%, rgba(148, 163, 184, .1) 49.4%, transparent 50%, transparent 74%, rgba(148, 163, 184, .1) 74.4%, transparent 75%),
    rgba(2, 6, 23, .22);
}

.side-line {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.side-line.current {
  stroke: #3b7cff;
}

.side-line.previous {
  stroke: #ffb12c;
}

.hover-line { stroke: rgba(148, 163, 184, .42); stroke-width: 1; stroke-dasharray: 3 3; stroke-linecap: round; pointer-events: none; }

.chart-point { stroke: #fff; stroke-width: 1.4; pointer-events: none; }
.current-point { fill: #3b7cff; }
.previous-point { fill: #ffb12c; }

.tip-dot { display: inline-block; width: 7px; height: 7px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .72); }

.chart-axis-labels {
  position: static;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 0;
  padding: 0;
  color: var(--muted);
  font-size: 11px;
  pointer-events: none;
}

.side-chart-legend {
  display: flex;
  gap: 14px;
  align-items: center;
  padding-top: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  margin-right: 6px;
}

.current-dot { background: #3b7cff; }
.previous-dot { background: #ffb12c; }

.ticker-main-panel { min-height: 0; height: 100%; width: 100%; display: flex; flex-direction: column; margin-bottom: 0; }

.pulled-order-list {
  height: 438px;
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, .13);
  border-radius: 12px;
  background: rgba(2, 6, 23, .2);
}

.pulled-order-head,
.pulled-order-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) minmax(160px, 1.1fr) 120px 88px 88px 88px 88px 74px;
  gap: 10px;
  align-items: center;
  min-width: 960px;
}

.pulled-order-head {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 10px 12px;
  background: rgba(15, 23, 42, .96);
  color: var(--muted);
  font-weight: 900;
  border-bottom: 1px solid var(--line);
}

.pulled-order-row {
  padding: 9px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, .12);
  color: #dceff5;
}

.pulled-order-row:hover { background: rgba(20, 184, 166, .08); }

.product-cell {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 8px 10px;
  align-items: center;
}

.product-cell img {
  grid-row: span 2;
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, .18);
}

.product-cell b {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.product-cell em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.pulled-order-row i {
  justify-self: start;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(81, 226, 162, .12);
  color: var(--good);
  font-style: normal;
  font-weight: 900;
  font-size: 13px;
}

.pulled-empty {
  padding: 24px;
  color: var(--muted);
}

.statement-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.statement-row { display: flex; justify-content: space-between; gap: 16px; padding: 11px 4px; border-bottom: 1px solid var(--line); font-size: 15px; }
.statement-row:nth-child(1), .statement-row:nth-child(3), .statement-row.total { background: var(--soft); margin: 0 -4px; padding-left: 10px; padding-right: 10px; font-weight: 900; }
.statement-row.total { font-size: 22px; }
.statement-row strong { font-size: 17px; }
.sync-cards { display: grid; gap: 10px; }
.sync-cards div { display: grid; gap: 6px; padding: 12px; border: 1px solid rgba(148, 163, 184, .14); border-radius: 10px; background: rgba(20, 184, 166, .06); }
.sync-cards span { color: var(--muted); font-weight: 800; }
.sync-cards strong { color: #fff; font-size: 15px; }

.sync-mini { height: 100%; width: 100%; display: flex; flex-direction: column; margin-bottom: 0; }
.owner-list { flex: 1; min-height: 0; overflow: auto; display: grid; align-content: start; gap: 10px; }
.owner-card { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 12px; border: 1px solid rgba(148, 163, 184, .14); border-radius: 10px; background: rgba(20, 184, 166, .06); }
.owner-card strong { display: block; color: #fff; margin-bottom: 4px; }
.owner-card span { display: block; color: var(--muted); font-size: 13px; line-height: 1.35; }
.owner-card b { color: var(--gold); white-space: nowrap; }

.ticker-window { height: 118px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: rgba(2, 6, 23, .24); }
.main-ticker-window { flex: 1; height: auto; min-height: 0; }
.ticker-track { display: grid; animation: ticker var(--ticker-duration, 120s) linear infinite; }
.ticker-track.no-scroll { animation: none; }
.ticker-window:hover .ticker-track { animation-play-state: paused; }
.ticker-item { display: grid; grid-template-columns: 42px 54px 150px 190px 1fr 160px 90px; gap: 12px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line); height: 68px; overflow: hidden; }
.ticker-item img { width: 42px; height: 42px; object-fit: cover; border-radius: 8px; }
.ticker-item span { color: var(--muted); }
.ticker-item .ticker-sku {
  display: -webkit-box;
  overflow: hidden;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.ticker-item em { color: var(--good); font-style: normal; font-weight: 900; }
.ticker-item i { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-style: normal; color: var(--accent); font-weight: 900; }
.ticker-item.empty { grid-template-columns: 1fr; color: var(--muted); }
@keyframes ticker { from { transform: translateY(0); } to { transform: translateY(-50%); } }

.two-col, .dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
#connect .two-col { min-height: 0; }
.connect-form-panel {
  display: grid;
  grid-template-columns: minmax(460px, 1.2fr) minmax(260px, .7fr) minmax(300px, .9fr) auto;
  gap: 8px 10px;
  align-items: end;
  padding: 10px 14px;
}
.connect-form-panel .compact-head {
  grid-column: 1 / -1;
}
.connect-form-panel .connect-status {
  grid-column: 1 / 4;
  margin: 0;
  min-height: 32px;
  display: flex;
  align-items: center;
}
.connect-form-panel textarea {
  min-height: 46px;
  height: 52px;
  resize: vertical;
}
.connect-form-panel .form-grid.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 8px;
}
.connect-form-panel #identifyShopButton {
  min-height: 42px;
  white-space: nowrap;
}
.compact-head {
  margin-bottom: 0;
}
.compact-head h3 {
  margin: 0;
}
.compact-head span {
  font-size: 12px;
}
.compact-head .small {
  padding: 7px 10px;
  min-width: auto;
}
.dashboard-grid { min-height: 0; height: 100%; align-items: stretch; }
.access-registry-panel {
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.access-table { flex: 1; min-height: 0; overflow: auto; display: grid; align-content: start; gap: 10px; padding-right: 4px; }
.access-api-map {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 4px;
}
.access-api-map div {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border: 1px solid rgba(20, 184, 166, .24);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(20, 184, 166, .12), rgba(15, 23, 42, .42));
}
.access-api-map strong { color: #eaf7fb; }
.access-api-map span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--muted);
  font-size: 13px;
}
.access-api-map em { color: var(--accent); font-style: normal; font-weight: 900; font-size: 13px; }
.access-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.3fr) .68fr 1fr .55fr .6fr .65fr .78fr .78fr minmax(130px, .75fr) minmax(320px, 340px);
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, .13);
  border-radius: 12px;
  background: rgba(15, 23, 42, .64);
}
.access-row.access-head {
  padding-top: 9px;
  padding-bottom: 9px;
  background: rgba(54, 216, 232, .08);
  color: var(--muted);
  font-weight: 900;
}
.access-row.access-head span:last-child { text-align: right; padding-right: 150px; }
.access-main strong { display: block; color: #fff; font-size: 16px; }
.access-main span, .access-row div span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.access-row b { color: #ecfeff; font-size: 13px; }
.access-status { display: flex; align-items: center; }
.access-row i {
  display: inline-flex;
  justify-content: center;
  max-width: 100%;
  border-radius: 999px;
  padding: 5px 8px;
  background: rgba(20, 184, 166, .13);
  color: var(--accent);
  font-style: normal;
  font-weight: 900;
  font-size: 12px;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
}
.access-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
  align-items: center;
  min-width: 0;
}
.sync-store,
.clear-store,
.update-cookie {
  justify-self: end;
  padding: 8px 10px;
  min-width: 82px;
  white-space: nowrap;
}
.sync-store { min-width: 126px; font-variant-numeric: tabular-nums; }
.update-cookie {
  min-width: 92px;
  border: 1px solid rgba(34, 211, 238, .34);
  background: rgba(14, 116, 144, .18);
  color: #a5f3fc;
}
.update-cookie:hover {
  border-color: rgba(34, 211, 238, .72);
  background: rgba(14, 116, 144, .3);
}
.sync-store {
  border: 1px solid rgba(20, 184, 166, .34);
  background: rgba(20, 184, 166, .14);
  color: #99f6e4;
}
.sync-store:hover {
  border-color: rgba(20, 184, 166, .72);
  background: rgba(20, 184, 166, .24);
}
.sync-store.sync-running {
  border-color: rgba(251, 191, 36, .34);
  background: rgba(120, 53, 15, .18);
  color: #fde68a;
}
.sync-store.sync-running:hover {
  border-color: rgba(251, 191, 36, .72);
  background: rgba(120, 53, 15, .34);
}
.clear-store {
  border-color: rgba(248, 113, 113, .34);
  background: rgba(127, 29, 29, .18);
  color: #fecaca;
}
.clear-store:hover {
  border-color: rgba(248, 113, 113, .7);
  background: rgba(127, 29, 29, .34);
}
.access-empty, .owner-empty {
  padding: 18px;
  border: 1px dashed rgba(148, 163, 184, .25);
  border-radius: 12px;
  color: var(--muted);
  background: rgba(15, 23, 42, .38);
}
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.order-range-filters button {
  background: rgba(54, 216, 232, .12);
  color: #dff7ff;
  border-color: rgba(54, 216, 232, .32);
}
.order-range-filters button:hover,
.order-range-filters button:focus-visible {
  color: #ffffff;
  border-color: rgba(54, 216, 232, .68);
}
.order-range-filters button:active {
  color: #ffffff;
  background: rgba(20, 184, 166, .22);
}
.order-analysis-controls { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.order-analysis-controls label { display: flex; flex-direction: row; align-items: center; gap: 8px; color: var(--muted); font-weight: 900; white-space: nowrap; }
.order-analysis-controls select {
  min-width: 230px;
  height: 38px;
  border: 1px solid rgba(20, 184, 166, .42);
  border-radius: 8px;
  background: rgba(8, 18, 32, .94);
  color: var(--text);
  padding: 0 12px;
  font-weight: 900;
}
.order-analysis-controls .order-range-filters button.active {
  border-color: rgba(20, 184, 166, .9) !important;
  background: var(--accent) !important;
  color: #041016 !important;
}
.order-analysis-controls .order-range-filters button.active:hover,
.order-analysis-controls .order-range-filters button.active:focus-visible,
.order-analysis-controls .order-range-filters button.active:active {
  color: #041016 !important;
  background: var(--accent) !important;
}
.table { display: grid; align-content: start; border: 1px solid var(--line); border-radius: 8px; overflow: auto; }
.table-row { display: grid; grid-template-columns: 1.3fr 1.3fr 1fr .8fr .8fr .8fr .8fr; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); align-items: center; min-width: 900px; }
.order-analysis-row { grid-template-columns: 48px 58px 342px 122px minmax(126px, .8fr) 112px 112px 112px 112px 112px 112px 112px 96px; min-width: 1600px; font-size: 13px; }
.order-analysis-row.loading { min-width: 0; grid-template-columns: 1fr; color: var(--muted); font-weight: 900; }
.sort-header { width: 100%; display: flex; align-items: center; gap: 4px; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 900; padding: 0; cursor: pointer; text-align: left; }
.sort-header i { color: var(--accent); font-style: normal; min-width: 12px; }
.sort-header.active { color: var(--text); }
.table-row.header { position: sticky; top: 0; z-index: 6; background: rgb(18, 52, 69); color: var(--muted); font-weight: 900; }
.table-row.summary { position: sticky; bottom: 0; background: rgba(14, 35, 54, .96); color: var(--text); font-weight: 900; box-shadow: 0 -1px 0 var(--line); }
.table-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-analysis-row > span:nth-child(3),
.order-analysis-row > span:nth-child(n+6):nth-child(-n+12) {
  overflow: visible;
  text-overflow: clip;
}
.order-id-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
  overflow: visible;
}
.order-thumb-wrap {
  position: relative;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
}
.order-thumb-wrap.is-empty {
  border: 1px dashed rgba(45, 212, 191, .18);
  border-radius: 6px;
  background: rgba(2, 6, 23, .35);
}
.order-thumb-wrap > img:first-child {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(45, 212, 191, .22);
  border-radius: 6px;
  object-fit: cover;
  background: rgba(2, 6, 23, .48);
}
.order-thumb-preview {
  position: fixed;
  z-index: 10001;
  display: none;
  width: 180px;
  height: 180px;
  margin: -74px 0 0 34px;
  border: 1px solid rgba(45, 212, 191, .48);
  border-radius: 8px;
  object-fit: cover;
  background: #071926;
  box-shadow: 0 18px 52px rgba(0, 0, 0, .42);
  pointer-events: none;
}
.order-thumb-wrap:hover .order-thumb-preview {
  display: block;
}
.order-id-cell b {
  flex: 0 0 auto;
  color: inherit;
  font: inherit;
  font-weight: 900;
  white-space: nowrap;
}
.order-id-cell button {
  flex: 0 0 auto;
  min-height: 24px;
  min-width: 36px;
  padding: 0 6px;
  border: 1px solid rgba(45, 212, 191, .34);
  border-radius: 6px;
  background: rgba(20, 184, 166, .14);
  color: #dff8fb;
  font-size: 11px;
  font-weight: 900;
}
.order-analysis-row > span:nth-child(5) {
  overflow: hidden;
  text-overflow: ellipsis;
}
.sku-cell {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.floating-tooltip {
  position: fixed;
  z-index: 10002;
  max-width: min(520px, calc(100vw - 32px));
  padding: 8px 10px;
  border: 1px solid rgba(45, 212, 191, .42);
  border-radius: 6px;
  background: rgba(4, 18, 29, .98);
  color: #effcff;
  font-size: 13px;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
  box-shadow: 0 14px 38px rgba(0, 0, 0, .34);
  pointer-events: none;
}
.profit-positive { color: var(--good); font-weight: 900; }
.fee-list, .settings-list, .store-admin-list { display: grid; gap: 10px; }
.fee-item, .settings-list div, .admin-row { display: grid; grid-template-columns: 1fr 120px 140px; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; align-items: center; }
.fee-item span { color: var(--muted); font-size: 13px; }
.fee-item strong { text-align: right; font-size: 18px; }
.formula { background: var(--soft); border: 1px solid rgba(87, 210, 224, .28); border-radius: 8px; padding: 16px; font-weight: 900; margin: 14px 0; }
.profit-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.profit-card { border: 1px solid var(--line); border-radius: 8px; padding: 14px; background: rgba(3, 11, 17, .32); }
.profit-card span { color: var(--muted); font-weight: 800; }
.profit-card strong { display: block; font-size: 24px; margin-top: 8px; }
.upload-form {
  display: grid;
  grid-template-columns: 1.2fr .8fr .8fr 1.5fr auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}
.upload-form label { min-width: 0; }
.upload-form input,
.upload-form select { min-height: 44px; }
.upload-form button { min-height: 44px; }
.upload-form .connect-status { grid-column: 1 / -1; margin: 0; }
.distribution-list { display: grid; gap: 10px; }
.distribution-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 140px 100px 100px 80px;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(3, 11, 17, .28);
}
.distribution-row span { color: var(--muted); font-weight: 800; }
.distribution-row a { color: var(--accent-dark); font-weight: 900; text-decoration: none; }

@media (max-width: 980px) {
  .bigscreen-grid { grid-template-columns: 1fr; }
  .bigscreen-grid { height: auto; }
  #overview.view:not(.hidden) { display: block; min-height: auto; }
  .kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .store-list { max-height: 260px; }
}

@media (max-width: 1100px) {
  .login-panel, .app, .two-col, .dashboard-grid { grid-template-columns: 1fr; }
  .public-hero, .service-grid, .download-list, .upload-form { grid-template-columns: 1fr; }
  .public-nav { display: none; }
  .public-site .site-header { grid-template-columns: 1fr auto; }
  .public-site .menu-toggle { display: inline-grid; place-items: center; }
  .public-site .site-nav {
    display: none;
    grid-column: 1 / -1;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--site-line);
    border-radius: 8px;
    background: rgba(4, 18, 29, .95);
  }
  .public-site .site-nav.open { display: flex; }
  .public-site .nav-cta { display: none; }
  .public-site .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 72px;
  }
  .public-site .hero-panel { margin-top: 0; }
  .public-site .public-stats,
  .public-site .service-grid,
  .public-site .download-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sidebar { position: static; }
  .main { height: auto; min-height: 100vh; overflow: visible; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .store-row, .ticker-item, .table-row, .access-row, .access-api-map { grid-template-columns: 1fr 1fr; }
  .access-actions { justify-content: flex-start; flex-wrap: wrap; }
}

@media (max-width: 640px) {
  .login-panel { padding: 28px 16px; }
  .public-site { padding: 0; }
  .public-header { align-items: flex-start; flex-direction: column; }
  .public-content { width: min(100% - 28px, 1180px); }
  .public-hero { min-height: auto; padding-top: 42px; }
  .public-site .section { width: min(100% - 28px, 1180px); padding: 64px 0; }
  .public-site .brand span { font-size: 14px; }
  .public-site .hero-subtitle { font-size: 17px; }
  .public-site .login-card-fields,
  .public-site .public-stats,
  .public-site .service-grid,
  .public-site .download-list {
    grid-template-columns: 1fr;
  }
  .public-stats { grid-template-columns: 1fr; }
  .download-card { grid-template-columns: 1fr; }
  .main { padding: 14px; }
  .topbar, .top-actions, .control-strip, .selector-head { flex-direction: column; display: flex; align-items: stretch; }
  .kpi-grid, .profit-cards, .bulk-row { grid-template-columns: 1fr; }
}

@media (max-height: 820px) and (min-width: 981px) {
  .main { padding: 10px 14px 12px; gap: 8px; }
  .topbar { min-height: 54px; padding: 8px 12px; }
  .topbar h2 { font-size: 24px; }
  .control-strip { margin-bottom: 8px; padding: 8px; }
  .time-tabs button { padding: 7px 10px; }
  .summary-panel { margin-bottom: 8px; padding: 8px; }
  .kpi-grid { gap: 8px; margin-bottom: 8px; }
  .kpi-grid article { min-height: 78px; padding: 9px; gap: 4px; }
  .kpi-grid strong { font-size: 18px; }
  .kpi-grid span { font-size: 13px; }
  .kpi-grid em { font-size: 12px; line-height: 1.2; }
  .panel-head { margin-bottom: 8px; }
  .panel-head h3 { font-size: 16px; }
  .compare-panel { min-height: 0; }
  .summary-compare-panel { padding-top: 8px; }
  .side-chart-wrap { min-height: 132px; }
  .side-chart-wrap svg { height: 116px; }
  .chart-axis-labels { bottom: 24px; }
  .side-chart-legend { padding-top: 4px; }
  .bigscreen-grid { min-height: 220px; }
  .store-selector, .ticker-main-panel, .sync-mini { padding: 12px; }
  .store-row { min-height: 42px; padding: 7px 9px; }
}

/* Final WDT visual skin: presentation only, no layout/data behavior changes. */
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", Arial, sans-serif;
  background: #06141f;
}

.app {
  background:
    linear-gradient(rgba(93, 222, 220, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(93, 222, 220, .028) 1px, transparent 1px),
    radial-gradient(circle at 18% 12%, rgba(21, 201, 176, .16), transparent 34%),
    radial-gradient(circle at 82% 24%, rgba(61, 139, 255, .14), transparent 30%),
    radial-gradient(circle at 72% 88%, rgba(244, 211, 94, .07), transparent 28%),
    #06141f;
  background-size: 52px 52px, 52px 52px, auto, auto, auto, auto;
}

.sidebar {
  background: rgba(4, 18, 29, .76);
  border-right-color: rgba(146, 225, 221, .16);
  backdrop-filter: blur(18px);
}

.mark.small {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, .92), transparent 18%),
    linear-gradient(135deg, #12d4bd, #1f8df5 58%, #0b2934);
  box-shadow: 0 0 18px rgba(40, 227, 208, .34);
}

.side-brand strong,
.topbar h2,
.panel-head h3,
.selector-head h3 {
  letter-spacing: 0;
}

nav button {
  color: #c5d7de;
}

nav button.active,
nav button:hover {
  background: rgba(40, 227, 208, .13);
  color: #eefcff;
}

.main {
  background-image:
    linear-gradient(rgba(93, 222, 220, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(93, 222, 220, .025) 1px, transparent 1px);
  background-size: 52px 52px;
}

.topbar,
.store-selector,
.panel,
.kpi-grid article,
.control-strip,
.summary-panel,
.ticker-main-panel,
.sync-mini,
.store-row,
.owner-card,
.fee-item,
.profit-card,
.distribution-row,
.access-card,
.access-row {
  border-color: rgba(146, 225, 221, .2);
  background: linear-gradient(145deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .035));
  box-shadow: 0 20px 58px rgba(0, 0, 0, .18), inset 0 0 34px rgba(40, 227, 208, .035);
  backdrop-filter: blur(16px);
}

.topbar {
  border-radius: 8px;
}

.store-selector,
.panel {
  border-radius: 8px;
}

.kpi-grid article {
  border-radius: 8px;
}

.pacific-clock {
  border-color: rgba(40, 227, 208, .32);
  background: rgba(4, 18, 29, .52);
  box-shadow: inset 0 0 24px rgba(40, 227, 208, .08);
}

button,
.login-card button {
  background: linear-gradient(135deg, #28e3d0, #0cae8f);
  color: #001914;
  border-radius: 8px;
}

button.secondary,
.bulk-row button,
.filters button,
.time-tabs button,
.chart-metric-tabs button,
.order-range-filters button {
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(146, 225, 221, .22);
  color: #eefcff;
}

.time-tabs button.active,
.chart-metric-tabs button.active,
.order-analysis-controls .order-range-filters button.active {
  background: #28e3d0;
  border-color: #28e3d0;
  color: #001914;
}

input,
select,
textarea {
  border-color: rgba(146, 225, 221, .2);
  background: rgba(4, 18, 29, .62);
}

.table-row.header {
  background: rgba(18, 52, 69, .92);
  color: #a9d7df;
}

.table-row.summary {
  background: rgba(14, 45, 58, .96);
}

/* Mature admin refresh: denser, calmer, production-dashboard visual system. */
:root {
  --ink: #eefcff;
  --muted: #9fc0c8;
  --line: rgba(146, 225, 221, .18);
  --panel: rgba(8, 19, 31, .74);
  --soft: rgba(40, 227, 208, .08);
  --accent: #28e3d0;
  --accent-dark: #12bfae;
  --bg: #06141f;
}

.app {
  grid-template-columns: 256px 1fr;
  background:
    linear-gradient(rgba(93, 222, 220, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(93, 222, 220, .022) 1px, transparent 1px),
    radial-gradient(circle at 16% 10%, rgba(21, 201, 176, .16), transparent 32%),
    radial-gradient(circle at 78% 20%, rgba(61, 139, 255, .12), transparent 28%),
    linear-gradient(180deg, #06141f 0%, #071722 46%, #040b11 100%);
  background-size: 52px 52px, 52px 52px, auto, auto, auto;
}

.sidebar {
  padding: 22px 16px;
  background: rgba(4, 18, 29, .82);
  border-right: 1px solid rgba(146, 225, 221, .16);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, .03);
}

.side-brand {
  min-height: 54px;
  padding: 8px 10px 18px;
  border-bottom: 1px solid rgba(146, 225, 221, .12);
}

.side-brand strong {
  color: #f2feff;
  font-size: 15px;
}

.side-brand span {
  color: #86aab4;
}

nav {
  gap: 8px;
}

nav button {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #b8d3da;
  background: transparent;
  transition: background .16s ease, border-color .16s ease, color .16s ease;
}

nav button.active {
  border-color: rgba(40, 227, 208, .18);
  background: rgba(40, 227, 208, .13);
  color: #f5ffff;
  box-shadow: inset 0 0 18px rgba(40, 227, 208, .05);
}

nav button:hover {
  border-color: rgba(146, 225, 221, .14);
  background: rgba(255, 255, 255, .045);
}

.main {
  padding: 18px 22px 22px;
  gap: 14px;
  background-image:
    linear-gradient(rgba(93, 222, 220, .022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(93, 222, 220, .018) 1px, transparent 1px);
}

.topbar {
  min-height: 76px;
  padding: 12px 16px;
  border-radius: 8px;
  border-color: rgba(146, 225, 221, .2);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .035)),
    rgba(4, 18, 29, .68);
}

.topbar h2 {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0;
}

.pacific-clock {
  min-width: 310px;
  border-radius: 8px;
}

.control-strip {
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .065), rgba(255, 255, 255, .025)),
    rgba(4, 18, 29, .72);
}

.store-selector,
.panel,
.summary-panel,
.ticker-main-panel,
.sync-mini,
.access-registry-panel {
  border-radius: 8px;
  border-color: rgba(146, 225, 221, .18);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .028)),
    rgba(4, 18, 29, .66);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .18);
}

.kpi-grid {
  gap: 10px;
}

.kpi-grid article {
  min-height: 96px;
  padding: 14px;
  border-radius: 8px;
  border-color: rgba(146, 225, 221, .14);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .065), rgba(255, 255, 255, .025)),
    rgba(7, 20, 32, .7);
}

.kpi-grid article:hover {
  border-color: rgba(40, 227, 208, .28);
  box-shadow: inset 0 0 28px rgba(40, 227, 208, .045);
}

.kpi-grid span,
.panel-head span,
.selector-head span {
  color: #9fc0c8;
}

.kpi-grid strong {
  color: #f6feff;
  font-size: 22px;
  letter-spacing: 0;
}

.kpi-grid small {
  color: #f4d35e;
  opacity: .95;
}

button,
.login-card button {
  border: 1px solid rgba(40, 227, 208, .18);
  background: linear-gradient(135deg, #28e3d0, #10bfae);
  color: #001914;
  box-shadow: 0 10px 24px rgba(16, 191, 174, .12);
}

button.secondary,
.bulk-row button,
.filters button,
.time-tabs button,
.chart-metric-tabs button,
.order-range-filters button {
  border-color: rgba(146, 225, 221, .22);
  background: rgba(255, 255, 255, .045);
  color: #dff8fb;
  box-shadow: none;
}

button.secondary:hover,
.bulk-row button:hover,
.filters button:hover,
.time-tabs button:hover,
.chart-metric-tabs button:hover,
.order-range-filters button:hover {
  border-color: rgba(40, 227, 208, .34);
  background: rgba(40, 227, 208, .09);
}

.time-tabs button.active,
.chart-metric-tabs button.active,
.order-analysis-controls .order-range-filters button.active {
  background: linear-gradient(135deg, #28e3d0, #12bfae);
  border-color: rgba(40, 227, 208, .78);
  color: #001914;
}

input,
select,
textarea {
  border-color: rgba(146, 225, 221, .2);
  background: rgba(3, 14, 23, .68);
  color: #eefcff;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(40, 227, 208, .7);
  box-shadow: 0 0 0 3px rgba(40, 227, 208, .1);
}

.store-row,
.owner-card,
.fee-item,
.profit-card,
.distribution-row,
.access-row {
  border-radius: 8px;
  border-color: rgba(146, 225, 221, .14);
  background: rgba(255, 255, 255, .035);
}

.store-row.active,
.store-row:hover {
  border-color: rgba(40, 227, 208, .42);
  background: rgba(40, 227, 208, .09);
}

.table {
  border-color: rgba(146, 225, 221, .16);
  background: rgba(4, 18, 29, .42);
}

.table-row {
  border-bottom-color: rgba(146, 225, 221, .12);
}

.table-row:not(.header):not(.summary):hover {
  background: rgba(40, 227, 208, .045);
}

.table-row.header {
  background: rgba(18, 52, 69, .96);
  color: #b7e8ee;
}

.table-row.summary {
  background: rgba(12, 46, 58, .98);
  color: #f4ffff;
}

.ticker-item {
  border-color: rgba(146, 225, 221, .12);
  background: rgba(255, 255, 255, .028);
}

/* Admin visual refresh v2: keep existing layout metrics, upgrade only the skin. */
.app {
  grid-template-columns: 224px 1fr;
  background:
    radial-gradient(circle at 18% 8%, rgba(44, 212, 191, .12), transparent 30%),
    radial-gradient(circle at 92% 18%, rgba(59, 130, 246, .12), transparent 28%),
    radial-gradient(circle at 78% 92%, rgba(244, 211, 94, .055), transparent 26%),
    linear-gradient(rgba(116, 232, 224, .024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(116, 232, 224, .018) 1px, transparent 1px),
    #06141f;
  background-size: auto, auto, auto, 52px 52px, 52px 52px, auto;
}

.sidebar {
  padding: 18px 12px;
  background:
    linear-gradient(180deg, rgba(3, 17, 29, .92), rgba(2, 10, 18, .88)),
    rgba(4, 18, 29, .84);
  border-right: 1px solid rgba(146, 225, 221, .14);
}

.side-brand {
  padding: 8px;
  border-bottom: 0;
}

.side-brand strong {
  color: #f4feff;
  font-size: 15px;
}

.side-brand span {
  color: #8fb4bd;
}

nav button {
  min-height: auto;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  color: #b7d3db;
  background: transparent;
}

nav button.active {
  color: #ffffff;
  border-color: rgba(40, 227, 208, .14);
  background:
    linear-gradient(90deg, rgba(40, 227, 208, .18), rgba(40, 227, 208, .06));
  box-shadow: inset 3px 0 0 rgba(40, 227, 208, .86);
}

nav button:hover {
  color: #ffffff;
  border-color: rgba(146, 225, 221, .14);
  background: rgba(255, 255, 255, .045);
}

.main {
  padding: 16px 20px 20px;
  gap: 12px;
  background-image:
    linear-gradient(rgba(116, 232, 224, .018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(116, 232, 224, .014) 1px, transparent 1px);
  background-size: 52px 52px;
}

.topbar {
  min-height: 68px;
  padding: 10px 16px;
  border-radius: 12px;
  border-color: rgba(146, 225, 221, .18);
  background:
    linear-gradient(135deg, rgba(13, 31, 48, .92), rgba(7, 18, 31, .72)),
    rgba(4, 18, 29, .72);
  box-shadow: 0 18px 52px rgba(0, 0, 0, .2);
}

.topbar h2 {
  color: #f7feff;
  font-size: 28px;
  letter-spacing: 0;
}

.pacific-clock {
  min-width: 300px;
  border-radius: 12px;
  border-color: rgba(40, 227, 208, .34);
  background: linear-gradient(180deg, rgba(6, 25, 39, .9), rgba(4, 18, 29, .68));
}

.pacific-clock strong {
  color: #f7feff;
}

.control-strip {
  border-radius: 12px;
  background: rgba(7, 19, 33, .78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
}

.store-selector,
.panel,
.summary-panel,
.ticker-main-panel,
.sync-mini,
.access-registry-panel {
  border-radius: 12px;
  border-color: rgba(146, 225, 221, .16);
  background:
    linear-gradient(180deg, rgba(12, 28, 44, .84), rgba(7, 17, 30, .78)),
    rgba(4, 18, 29, .62);
  box-shadow: 0 16px 46px rgba(0, 0, 0, .18), inset 0 1px 0 rgba(255, 255, 255, .035);
}

.kpi-grid article {
  min-height: 102px;
  padding: 12px;
  border-radius: 12px;
  border-color: rgba(146, 225, 221, .13);
  background:
    linear-gradient(180deg, rgba(15, 34, 52, .74), rgba(8, 20, 34, .68));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.kpi-grid article:hover {
  border-color: rgba(40, 227, 208, .3);
  background:
    linear-gradient(180deg, rgba(18, 43, 61, .82), rgba(8, 22, 35, .72));
}

.kpi-grid span,
.panel-head span,
.selector-head span,
.hint {
  color: #9bbac3;
}

.kpi-grid strong {
  color: #f7feff;
  font-size: 21px;
  letter-spacing: 0;
}

.kpi-grid em,
.money-good,
.positive {
  color: #45f0a7;
}

.kpi-grid small {
  color: #f4d35e;
}

button,
.login-card button {
  border: 1px solid rgba(40, 227, 208, .22);
  border-radius: 8px;
  background: linear-gradient(135deg, #28e3d0, #10bfae);
  color: #001914;
  box-shadow: 0 8px 20px rgba(16, 191, 174, .1);
}

button.secondary,
.bulk-row button,
.filters button,
.time-tabs button,
.chart-metric-tabs button,
.order-range-filters button {
  border: 1px solid rgba(146, 225, 221, .2);
  background: rgba(255, 255, 255, .045);
  color: #e3f9fb;
  box-shadow: none;
}

.time-tabs button.active,
.chart-metric-tabs button.active,
.order-analysis-controls .order-range-filters button.active {
  border-color: rgba(40, 227, 208, .78);
  background: linear-gradient(135deg, #28e3d0, #12bfae);
  color: #001914;
}

input,
select,
textarea {
  border-color: rgba(146, 225, 221, .18);
  background: rgba(3, 14, 23, .68);
  color: #eefcff;
}

.store-row,
.ticker-item,
.owner-card,
.fee-item,
.profit-card,
.distribution-row,
.access-row {
  border-radius: 10px;
  border-color: rgba(146, 225, 221, .12);
  background: rgba(255, 255, 255, .028);
}

.store-row.active {
  border-color: rgba(40, 227, 208, .52);
  background: linear-gradient(90deg, rgba(40, 227, 208, .16), rgba(40, 227, 208, .05));
}

.table {
  border-color: rgba(146, 225, 221, .14);
  background: rgba(3, 13, 23, .34);
}

.table-row {
  border-bottom-color: rgba(146, 225, 221, .1);
}

.table-row.header {
  background: linear-gradient(180deg, rgba(20, 57, 75, .98), rgba(16, 46, 63, .98));
  color: #b9e8ef;
}

.table-row:not(.header):not(.summary):nth-child(even) {
  background: rgba(255, 255, 255, .014);
}

.table-row:not(.header):not(.summary):hover {
  background: rgba(40, 227, 208, .05);
}

.table-row.summary {
  background: linear-gradient(180deg, rgba(14, 52, 65, .98), rgba(10, 42, 55, .98));
  color: #f7feff;
}

.public-site .public-login-card {
  width: clamp(420px, 25vw, 489px);
  min-height: clamp(350px, 21vw, 407px);
  height: auto;
  margin: 0;
  padding: 28px 32px;
  border: 1px solid rgba(146, 225, 221, .2);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 14%, rgba(40, 227, 208, .12), transparent 32%),
    linear-gradient(145deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .045));
  box-shadow: 0 28px 80px rgba(0, 0, 0, .28), inset 0 0 42px rgba(40, 227, 208, .045);
  backdrop-filter: blur(18px);
  display: grid;
  align-content: start;
  gap: 18px;
}

.public-site .public-login-card .login-card-fields {
  grid-template-columns: 1fr;
  gap: 13px;
}

.public-site .public-login-card .login-card-fields button {
  grid-column: 1 / -1;
}

.public-site .public-login-card h2 {
  margin: 0;
  color: #eefcff;
  font-size: 30px;
  line-height: 1.12;
  letter-spacing: 0;
}

.public-site .login-slot {
  width: clamp(560px, 34vw, 672px);
  min-height: clamp(440px, 28vw, 522px);
  height: auto;
  margin-top: 78px;
  justify-self: center;
  display: grid;
  place-items: center;
}

.public-site .auth-head {
  display: grid;
  gap: 6px;
}

.public-site .auth-head span {
  color: #a9c2ca;
  font-size: 14px;
  font-weight: 800;
}

.public-site .auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  padding: 4px;
  border: 1px solid rgba(146, 225, 221, .16);
  border-radius: 8px;
  background: rgba(3, 14, 23, .44);
}

.public-site .auth-tabs button {
  min-height: 36px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  color: #a9c2ca;
  background: transparent;
  box-shadow: none;
  font-size: 14px;
  font-weight: 900;
}

.public-site .auth-tabs button.active {
  color: #001914;
  background: linear-gradient(135deg, #28e3d0, #12bfae);
}

.public-site .login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 26px;
  color: #a9c2ca;
  font-size: 13px;
  font-weight: 800;
}

.public-site .login-options label {
  display: inline-flex;
  grid-auto-flow: column;
  align-items: center;
  gap: 6px;
  color: inherit;
  font-size: inherit;
}

.public-site .login-options input {
  width: 14px;
  height: 14px;
  min-height: 0;
  padding: 0;
  accent-color: #28e3d0;
}

.public-site .login-options span {
  color: rgba(169, 194, 202, .78);
  font-weight: 700;
}

.public-site .public-login-card.auth-register {
  min-height: clamp(442px, 28vw, 504px);
  height: auto;
}

.public-site .public-login-card.auth-register .login-card-fields {
  gap: 10px;
}

.public-site .public-login-card.auth-register .auth-head h2 {
  font-size: 28px;
}

@media (max-width: 1100px) {
  .public-site .login-slot { margin-top: 0; }
  .public-site .public-login-card { width: min(100%, 489px); }
}

@media (max-width: 760px) {
  * {
    max-width: 100%;
  }

  html,
  body {
    width: 100%;
    max-width: 100%;
    height: 100%;
    min-width: 0;
    overflow: hidden;
    position: relative;
    background: #06141f;
    overscroll-behavior: none;
    touch-action: pan-y;
  }

  .shell {
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: 100vw;
    height: 100dvh;
    min-width: 0;
    overflow-x: clip;
    overflow-y: hidden;
  }

  .app {
    display: block;
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    height: 100dvh;
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-x: none;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    background:
      radial-gradient(circle at 18% 8%, rgba(44, 212, 191, .16), transparent 34%),
      radial-gradient(circle at 88% 18%, rgba(59, 130, 246, .14), transparent 30%),
      linear-gradient(rgba(116, 232, 224, .026) 1px, transparent 1px),
      linear-gradient(90deg, rgba(116, 232, 224, .018) 1px, transparent 1px),
      #06141f;
    background-size: auto, auto, 44px 44px, 44px 44px, auto;
  }

  .sidebar {
    display: none;
  }

  .sidebar-toggle {
    display: none;
  }

  .main {
    display: block;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    height: auto;
    min-height: 100dvh;
    overflow-x: clip;
    overflow-y: visible;
    padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    background-image: none;
    transition: transform .22s ease;
  }

  body.mobile-pulling .main {
    transform: translateY(72px);
  }

  .view:not(#overview) {
    display: none !important;
  }

  #overview.view:not(.hidden) {
    display: block;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    min-height: 0;
    margin: -8px -8px 8px;
    padding: 10px 10px 8px;
    border-width: 0 0 1px;
    border-radius: 0;
    background: rgba(5, 16, 27, .92);
    backdrop-filter: blur(18px);
    box-sizing: border-box;
  }

  .topbar .eyebrow {
    font-size: 10px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .topbar h2 {
    font-size: 20px;
    line-height: 1.15;
  }

  .pacific-clock {
    justify-self: stretch;
    min-width: 0;
    padding: 7px 10px;
    border-radius: 8px;
  }

  .pacific-clock strong {
    font-size: 17px;
    letter-spacing: .04em;
  }

  .top-actions {
    justify-self: stretch;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .top-actions button {
    min-height: 34px;
    padding: 0 8px;
    font-size: 13px;
    text-align: center;
  }

  .control-strip {
    position: sticky;
    top: 134px;
    z-index: 16;
    display: block;
    margin: 0 0 10px;
    padding: 7px;
    border-radius: 10px;
    background: rgba(6, 18, 30, .9);
    backdrop-filter: blur(16px);
  }

  .time-tabs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
  }

  .time-tabs button {
    min-height: 30px;
    padding: 0 2px;
    font-size: 11px;
    text-align: center;
  }

  .selection-note {
    margin-top: 7px;
    font-size: 11px;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .summary-panel {
    width: 100%;
    padding: 7px;
    margin-bottom: 8px;
    max-width: 100%;
    overflow: hidden;
  }

  .kpi-grid {
    display: grid;
    grid-auto-flow: row;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
    max-width: 100%;
    margin: 0 0 8px;
    padding: 0;
    overflow: visible;
  }

  .kpi-grid article {
    min-width: 0;
    min-height: 68px;
    padding: 6px 5px;
    gap: 3px;
  }

  .kpi-grid span {
    font-size: 10px;
    line-height: 1.15;
  }

  .kpi-grid strong {
    font-size: clamp(11px, 3.15vw, 14px);
    line-height: 1.2;
    word-break: break-word;
  }

  .kpi-grid em,
  .kpi-grid small {
    font-size: 9px;
    line-height: 1.1;
  }

  .summary-compare-panel {
    width: 100%;
    max-width: 100%;
    padding: 8px 0 0;
    overflow: hidden;
  }

  .compare-panel {
    min-height: 0;
  }

  .panel-head {
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
  }

  .panel-head h3 {
    font-size: 14px;
  }

  .panel-head span {
    font-size: 11px;
    text-align: right;
  }

  .chart-metric-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .chart-metric-tabs button {
    min-width: 0;
    height: 28px;
    padding: 0 4px;
    font-size: 11px;
  }

  .side-chart-wrap {
    width: 100%;
    max-width: 100%;
    grid-template-rows: minmax(156px, 1fr) 16px 18px;
    min-height: 198px;
    gap: 3px;
    overflow: hidden;
    touch-action: none;
    overscroll-behavior: contain;
  }

  .side-chart-wrap svg {
    width: 100%;
    max-width: 100%;
    height: 100%;
    min-height: 156px;
    border-radius: 8px;
    touch-action: none;
  }

  .chart-axis-labels {
    font-size: 10px;
  }

  .side-chart-legend {
    gap: 10px;
    padding-top: 0;
    font-size: 11px;
  }

  .bigscreen-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .bigscreen-grid,
  .bigscreen-grid * {
    min-width: 0;
  }

  .store-selector,
  .center-stage,
  .right-stack {
    width: 100%;
    max-width: 100%;
    min-height: 0;
    height: auto;
    display: block;
  }

  .store-selector,
  .ticker-main-panel,
  .sync-mini {
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 0;
    box-sizing: border-box;
    padding: 8px;
  }

  .selector-head {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
  }

  .store-list {
    display: grid;
    grid-auto-flow: row;
    grid-template-columns: 1fr;
    max-height: none;
    width: 100%;
    max-width: 100%;
    padding: 0;
    overflow: visible;
  }

  .store-row {
    width: 100%;
    min-width: 0;
    min-height: 60px;
    box-sizing: border-box;
    overflow: hidden;
  }

  .store-row strong,
  .store-row span,
  .store-row em,
  .owner-card strong,
  .owner-card span,
  .owner-card em {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .ticker-main-panel {
    min-height: 0;
  }

  .main-ticker-window {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: none;
    overflow-y: visible;
    overflow-x: hidden;
  }

  .ticker-window:not(.main-ticker-window) {
    height: auto;
    max-height: none;
  }

  .ticker-track {
    display: grid;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    transform: none !important;
    animation: none !important;
  }

  .ticker-item {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    grid-template-areas:
      "thumb meta"
      "thumb title"
      "thumb money";
    gap: 4px 10px;
    min-height: 66px;
    padding: 7px;
    overflow: hidden;
  }

  .ticker-item img {
    grid-area: thumb;
    width: 36px;
    height: 36px;
    align-self: start;
  }

  .ticker-item > span:first-of-type {
    grid-area: meta;
    color: #9fc0c8;
    font-size: 11px;
  }

  .ticker-item strong {
    grid-area: meta;
    justify-self: end;
    max-width: 62%;
    overflow: hidden;
    color: #f6feff;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .ticker-item b {
    grid-area: title;
    align-self: start;
    color: #dff8fb;
    font-size: 10px;
    font-weight: 800;
  }

  .ticker-item .ticker-sku,
  .ticker-item i {
    min-width: 0;
  }

  .ticker-item .ticker-sku {
    grid-area: title;
    margin-top: 17px;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.35;
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .ticker-item em {
    grid-area: money;
    justify-self: start;
    text-align: left;
    font-size: 11px;
  }

  .ticker-item i {
    grid-area: money;
    justify-self: end;
    max-width: 44%;
    font-size: 11px;
  }

  .owner-list {
    display: grid;
    flex: none;
    width: 100%;
    max-width: 100%;
    gap: 8px;
    overflow: visible;
  }

  .owner-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    min-height: 50px;
    padding: 8px;
  }
}

/* Header now contains only the business clock. */
.topbar .removed-topbar-block { display: none !important; }
.topbar.topbar-clock-only { grid-template-columns: minmax(0, 1fr); }
.topbar-clock-only .pacific-clock { justify-self: center; }
.mobile-refresh-indicator { display: none; }
@media (max-width: 760px) {
  .topbar-clock-only .pacific-clock { justify-self: stretch; }
  .mobile-refresh-indicator {
    position: fixed;
    top: calc(max(0px, env(safe-area-inset-top)) + 32px);
    left: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100vw;
    height: 28px;
    padding: 0 16px;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    background: transparent;
    pointer-events: none;
  }
  .mobile-refresh-indicator i {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(37, 215, 200, .28);
    border-top-color: #25d7c8;
    border-radius: 50%;
    animation: mobile-refresh-spin .72s linear infinite;
  }
  .mobile-refresh-indicator span {
    line-height: 1;
    white-space: nowrap;
  }
  .mobile-refresh-indicator.hidden { display: none; }
}
@keyframes mobile-refresh-spin {
  to { transform: rotate(360deg); }
}

/* Dashboard layout repair: keep the desktop big screen readable instead of squeezing the chart into a broken one-screen fit. */
@media (min-width: 761px) {
  .main {
    overflow-y: auto;
    overflow-x: hidden;
  }

  #overview.view:not(.hidden) {
    display: block;
    height: auto;
    min-height: 100%;
    overflow: visible;
  }

  .summary-panel {
    display: block;
    padding: 12px;
    margin-bottom: 14px;
    overflow: visible;
  }

  .summary-compare-panel {
    display: block;
    min-height: 0;
    padding: 10px 0 0;
    overflow: visible;
  }

  .summary-compare-panel .panel-head {
    min-height: 36px;
    margin-bottom: 8px;
  }

  .side-chart-wrap {
    display: grid;
    grid-template-rows: 260px 18px 22px;
    gap: 6px;
    min-height: 306px;
    height: 306px;
    overflow: visible;
  }

  .side-chart-wrap svg {
    width: 100%;
    height: 260px;
    min-height: 260px;
    max-height: 260px;
    overflow: visible;
  }

  .chart-axis-labels {
    position: static;
    height: 18px;
    align-items: center;
  }

  .side-chart-legend {
    height: 22px;
    padding-top: 0;
    align-items: center;
  }

  .bigscreen-grid {
    min-height: 280px;
  }
}

@media (max-height: 820px) and (min-width: 981px) {
  .side-chart-wrap {
    grid-template-rows: 220px 18px 22px;
    min-height: 266px;
    height: 266px;
  }

  .side-chart-wrap svg {
    height: 220px;
    min-height: 220px;
    max-height: 220px;
  }
}

/* Clock and date filters remain in document order and scroll with the page. */
.topbar.topbar-clock-only, #overview > .control-strip {
  position: static;
  top: auto;
  z-index: auto;
}

/* Compact store selection above the date range. */
.store-dropdown-bar { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(6, 18, 30, .9); }
.store-dropdown-bar label { flex: 0 0 auto; color: #cbe2e7; font-size: 13px; font-weight: 700; }
.store-dropdown-bar select { flex: 1; min-width: 0; width: 100%; height: 36px; padding: 0 10px; border: 1px solid rgba(146,225,221,.25); border-radius: 8px; background: #12232d; color: #effcff; font: inherit; font-size: 14px; }
.store-dropdown-bar select:focus-visible { outline: 2px solid #14b8a6; outline-offset: 2px; }
@media (min-width: 1201px) { .bigscreen-grid { grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); } }
@media (max-width: 1200px) { .bigscreen-grid { grid-template-columns: minmax(0, 1fr); } }

.data-status { margin: 0 0 10px; padding: 0 8px; color: #9db9c7; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }

@media (max-width: 760px) {
  .login-panel.public-site {
    position: fixed;
    inset: 0;
    display: grid;
    width: 100vw;
    height: 100dvh;
    min-height: 0;
    padding: clamp(14px, 4vw, 22px);
    overflow-x: hidden;
    overflow-y: auto;
    place-items: center;
    overscroll-behavior: contain;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    background:
      radial-gradient(circle at 50% 12%, rgba(40, 227, 208, .16), transparent 38%),
      linear-gradient(180deg, #071926, #041016 72%);
  }

  .login-panel.public-site .site-header,
  .login-panel.public-site .hero-content,
  .login-panel.public-site .hero-glow,
  .login-panel.public-site .hero-actions,
  .login-panel.public-site .public-stats,
  .login-panel.public-site .public-section,
  .login-panel.public-site .downloads-section,
  .login-panel.public-site .site-footer {
    display: none !important;
  }

  .login-panel.public-site .hero {
    display: grid;
    width: 100%;
    height: auto;
    min-height: 100%;
    padding: 0;
    place-items: center;
  }

  .login-panel.public-site .hero::before,
  .login-panel.public-site .hero::after,
  .login-panel.public-site #heroCanvas {
    display: none;
  }

  .public-site .login-slot {
    width: min(100%, 390px);
    min-height: 0;
    height: auto;
    margin: 0;
    place-items: center;
  }

  .public-site .public-login-card {
    width: min(100%, 390px);
    min-height: 0;
    max-height: calc(100dvh - clamp(28px, 8vw, 44px));
    padding: clamp(18px, 5vw, 24px);
    gap: clamp(12px, 3.2vw, 16px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .public-site .public-login-card h2 {
    font-size: clamp(24px, 7vw, 30px);
  }

  .public-site .auth-head span,
  .public-site .login-options {
    font-size: clamp(12px, 3.2vw, 14px);
  }

  .public-site .public-login-card .login-card-fields {
    gap: clamp(10px, 3vw, 13px);
  }

  .public-site .public-login-card input,
  .public-site .public-login-card button {
    font-size: 16px;
  }

  .public-site .login-options {
    align-items: flex-start;
    flex-direction: column;
  }

  .public-site .login-options span {
    display: none;
  }
}
