﻿:root {
  --bg: #f3f1ee;
  --bg-soft: #faf9f7;
  --panel: #ffffff;
  --ink: #000000;
  --muted: #625f5b;
  --line: #d8d1c8;
  --accent: #25899e;
  --accent-dark: #0f6574;
  --gold: #b5a16a;
  --beige: #d1c8bf;
  --danger: #b42318;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

html[data-theme="dark"] {
  --bg: #080b12;
  --bg-soft: #121a28;
  --panel: #101725;
  --ink: #f7fbff;
  --muted: #aab7c6;
  --line: rgba(255, 255, 255, 0.14);
  --accent: #25899e;
  --accent-dark: #61d8f4;
  --gold: #b5a16a;
  --beige: #263140;
  --danger: #ff8d83;
  --shadow: 0 18px 54px rgba(0, 0, 0, 0.34);
}

@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 180ms;
  animation-timing-function: ease;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(37, 137, 158, 0.1), transparent 280px),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
}

.page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 32px;
}

.project-menu-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(37, 137, 158, 0.28), transparent 34rem),
    linear-gradient(135deg, #080b12 0%, #101725 48%, #1e1725 100%);
  color: #f7fbff;
}

html[data-theme="light"] .project-menu-body {
  background:
    radial-gradient(circle at top left, rgba(37, 137, 158, 0.18), transparent 34rem),
    linear-gradient(135deg, #eef7f9 0%, #f8f6f1 52%, #eee9e2 100%);
  color: #0c1118;
}

.project-menu {
  width: min(1120px, calc(100% - 32px));
  min-height: 100vh;
  display: grid;
  align-content: start;
  gap: 18px;
  margin: 0 auto;
  padding: 28px 0 42px;
}

.auth-body {
  display: grid;
  place-items: center;
}

.auth-shell {
  width: min(440px, calc(100% - 32px));
}

.auth-card {
  display: grid;
  gap: 18px;
  padding: 28px;
  border: 1px solid rgba(97, 216, 244, 0.22);
  border-radius: 8px;
  background: rgba(8, 11, 18, 0.78);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.36);
}

html[data-theme="light"] .auth-card {
  border-color: rgba(37, 137, 158, 0.2);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 24px 70px rgba(37, 137, 158, 0.14);
}

.auth-card .brand-mark {
  width: 52px;
  height: 52px;
}

.auth-card h1 {
  margin: 4px 0 0;
  color: #fff;
  font-size: 30px;
}

html[data-theme="light"] .auth-card h1 {
  color: #0c1118;
}

.auth-card p {
  margin: 6px 0 0;
  color: rgba(247, 251, 255, 0.68);
}

html[data-theme="light"] .auth-card p {
  color: #526070;
}

.auth-form {
  display: grid;
  gap: 10px;
}

.auth-form label {
  color: rgba(247, 251, 255, 0.72);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

html[data-theme="light"] .auth-form label {
  color: #526070;
}

.auth-form input {
  min-height: 44px;
  border: 1px solid rgba(97, 216, 244, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 10px 12px;
  font: inherit;
}

html[data-theme="light"] .auth-form input {
  background: #fff;
  color: #0c1118;
}

.auth-form input:focus {
  border-color: var(--accent-dark);
  outline: 2px solid rgba(97, 216, 244, 0.2);
}

.auth-form button {
  min-height: 44px;
  margin-top: 6px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.auth-error,
.auth-notice {
  padding: 12px 14px;
  border-radius: 8px;
  font-weight: 800;
}

.auth-error {
  background: rgba(255, 141, 131, 0.15);
  color: #ffb1aa;
}

.auth-notice {
  background: rgba(181, 161, 106, 0.18);
  color: #f4d66f;
}

.command-hero {
  position: relative;
  min-height: 330px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  align-items: end;
  gap: 28px;
  overflow: hidden;
  padding: 42px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
    rgba(8, 11, 18, 0.76);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.36);
}

html[data-theme="light"] .command-hero {
  border-color: rgba(15, 101, 116, 0.18);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.58)),
    rgba(255, 255, 255, 0.72);
  box-shadow: 0 24px 70px rgba(37, 137, 158, 0.14);
}

.command-hero-compact {
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 24px;
}

.command-hero-compact::before {
  display: none;
}

.command-brand {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  align-items: center;
  gap: 22px;
}

.command-logo {
  width: 148px;
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(181, 161, 106, 0.84);
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

html[data-theme="light"] .command-logo {
  color: #0c1118;
}

.command-brand .kicker {
  margin-bottom: 6px;
}

.command-brand h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1;
}

html[data-theme="light"] .command-brand h1 {
  color: #0c1118;
}

.command-brand p {
  max-width: 680px;
  margin: 8px 0 0;
  color: rgba(247, 251, 255, 0.72);
  font-size: 15px;
  line-height: 1.5;
}

html[data-theme="light"] .command-brand p {
  color: #526070;
}

.command-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(88px, 1fr));
  gap: 10px;
}

.command-stats div {
  min-width: 94px;
  padding: 12px 14px;
  border: 1px solid rgba(97, 216, 244, 0.22);
  border-radius: 8px;
  background: rgba(8, 11, 18, 0.54);
}

html[data-theme="light"] .command-stats div {
  border-color: rgba(37, 137, 158, 0.22);
  background: rgba(255, 255, 255, 0.72);
}

.command-stats span {
  display: block;
  color: rgba(247, 251, 255, 0.62);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

html[data-theme="light"] .command-stats span {
  color: #5f6d7a;
}

.command-stats strong {
  display: block;
  margin-top: 4px;
  color: #fff;
  font-size: 24px;
}

html[data-theme="light"] .command-stats strong {
  color: #0c1118;
}

.command-hero::before {
  content: "";
  position: absolute;
  inset: 18px;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

.orbit {
  position: absolute;
  pointer-events: none;
  border: 1px solid rgba(75, 219, 255, 0.22);
  transform: rotate(-18deg);
}

.orbit-one {
  width: 520px;
  height: 150px;
  right: -80px;
  top: 44px;
  border-radius: 50%;
}

.orbit-two {
  width: 620px;
  height: 210px;
  right: -160px;
  top: 96px;
  border-color: rgba(181, 161, 106, 0.26);
  border-radius: 50%;
}

.command-copy,
.command-status {
  position: relative;
  z-index: 1;
}

.kicker {
  display: inline-flex;
  margin-bottom: 12px;
  color: #61d8f4;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.command-copy h1,
.placeholder-panel h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(42px, 8vw, 78px);
  line-height: 0.95;
}

html[data-theme="light"] .command-copy h1,
html[data-theme="light"] .placeholder-panel h1 {
  color: #0c1118;
}

.command-copy p,
.placeholder-panel p {
  max-width: 660px;
  margin-top: 18px;
  color: rgba(247, 251, 255, 0.72);
  font-size: 17px;
  line-height: 1.6;
}

html[data-theme="light"] .command-copy p,
html[data-theme="light"] .placeholder-panel p,
html[data-theme="light"] .project-tile p {
  color: #526070;
}

.command-status {
  align-self: start;
  justify-self: end;
  display: grid;
  gap: 7px;
  min-width: 180px;
  padding: 18px;
  border: 1px solid rgba(97, 216, 244, 0.26);
  border-radius: 8px;
  background: rgba(8, 11, 18, 0.6);
}

html[data-theme="light"] .command-status {
  border-color: rgba(37, 137, 158, 0.28);
  background: rgba(255, 255, 255, 0.72);
}

.command-status span,
.project-status,
.project-meta {
  color: rgba(247, 251, 255, 0.66);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

html[data-theme="light"] .command-status span,
html[data-theme="light"] .project-status {
  color: #5f6d7a;
}

.command-status strong {
  color: #fff;
  font-size: 26px;
}

html[data-theme="light"] .command-status strong {
  color: #0c1118;
}

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

.project-rail-section {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

html[data-theme="light"] .project-rail-section {
  border-color: rgba(15, 101, 116, 0.14);
  background: rgba(255, 255, 255, 0.62);
}

.rail-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.rail-head .kicker {
  margin-bottom: 4px;
}

.rail-head p {
  margin: 0;
  color: rgba(247, 251, 255, 0.66);
}

html[data-theme="light"] .rail-head p {
  color: #526070;
}

.rail-controls {
  display: inline-flex;
  gap: 8px;
}

.rail-controls button {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.rail-controls button:hover {
  border-color: rgba(97, 216, 244, 0.62);
  background: rgba(37, 137, 158, 0.2);
}

html[data-theme="light"] .rail-controls button {
  border-color: rgba(15, 101, 116, 0.18);
  background: rgba(255, 255, 255, 0.7);
  color: #0c1118;
}

.project-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(290px, 360px);
  gap: 14px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline mandatory;
  padding-bottom: 6px;
}

.project-rail::-webkit-scrollbar {
  height: 8px;
}

.project-rail::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(97, 216, 244, 0.28);
}

.project-rail .project-tile {
  scroll-snap-align: start;
}

.project-tile {
  min-height: 220px;
  display: grid;
  align-content: space-between;
  gap: 18px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.075);
  color: #fff;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.project-rail-section-testing .project-tile {
  min-height: 190px;
  border-color: rgba(181, 161, 106, 0.22);
}

html[data-theme="light"] .project-tile {
  border-color: rgba(15, 101, 116, 0.16);
  background: rgba(255, 255, 255, 0.68);
  color: #0c1118;
}

.project-tile:hover,
.project-tile:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(97, 216, 244, 0.7);
  background: rgba(255, 255, 255, 0.12);
  outline: 0;
}

html[data-theme="light"] .project-tile:hover,
html[data-theme="light"] .project-tile:focus-visible {
  background: #fff;
}

.project-tile.is-active {
  border-color: rgba(181, 161, 106, 0.8);
  background:
    linear-gradient(135deg, rgba(181, 161, 106, 0.24), transparent),
    rgba(255, 255, 255, 0.09);
}

html[data-theme="light"] .project-tile.is-active {
  background:
    linear-gradient(135deg, rgba(181, 161, 106, 0.22), transparent),
    rgba(255, 255, 255, 0.84);
}

.project-tile strong {
  display: block;
  font-size: 24px;
  line-height: 1.12;
}

.project-tile p {
  margin: 0;
  color: rgba(247, 251, 255, 0.68);
  line-height: 1.5;
}

.project-meta {
  color: #b5a16a;
}

.theme-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.075);
}

html[data-theme="light"] .theme-panel {
  border-color: rgba(15, 101, 116, 0.16);
  background: rgba(255, 255, 255, 0.72);
  color: #0c1118;
}

.theme-panel h2 {
  margin: 0;
  border: 0;
  padding: 0;
  color: inherit;
  font-size: 22px;
}

.theme-panel p {
  max-width: 620px;
  margin-top: 8px;
  color: rgba(247, 251, 255, 0.68);
  line-height: 1.5;
}

html[data-theme="light"] .theme-panel p {
  color: #526070;
}

.theme-switch {
  display: inline-grid;
  grid-template-columns: 58px auto;
  align-items: center;
  gap: 12px;
  color: #fff;
  cursor: pointer;
  user-select: none;
}

html[data-theme="light"] .theme-switch {
  color: #0c1118;
}

.theme-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.theme-slider {
  position: relative;
  width: 58px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  transition: background 160ms ease, border-color 160ms ease;
}

.theme-slider::after {
  content: "";
  position: absolute;
  top: 5px;
  left: 5px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.24);
  transition: transform 160ms ease;
}

.theme-switch input:checked + .theme-slider {
  border-color: rgba(97, 216, 244, 0.68);
  background: rgba(37, 137, 158, 0.72);
}

.theme-switch input:checked + .theme-slider::after {
  transform: translateX(26px);
}

.theme-switch strong {
  font-size: 13px;
  white-space: nowrap;
}

.theme-switch-compact {
  grid-template-columns: 40px auto;
  gap: 8px;
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
}

.theme-switch-compact .theme-slider {
  width: 40px;
  height: 22px;
}

.theme-switch-compact .theme-slider::after {
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
}

.theme-switch-compact input:checked + .theme-slider::after {
  transform: translateX(18px);
}

.theme-switch-compact strong {
  font-size: 12px;
}

html[data-theme="light"] .theme-switch-compact {
  border-color: rgba(15, 101, 116, 0.18);
  background: rgba(255, 255, 255, 0.62);
}

.project-placeholder {
  align-content: start;
}

.back-link,
.header-back {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}

html[data-theme="light"] .back-link,
html[data-theme="light"] .header-back {
  border-color: rgba(15, 101, 116, 0.18);
  color: #0c1118;
}

.back-link:hover,
.header-back:hover {
  border-color: rgba(255, 255, 255, 0.48);
}

.placeholder-panel {
  padding: 42px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(8, 11, 18, 0.76);
}

html[data-theme="light"] .placeholder-panel {
  border-color: rgba(15, 101, 116, 0.18);
  background: rgba(255, 255, 255, 0.76);
}

.placeholder-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.header-back {
  background: rgba(255, 255, 255, 0.12);
  font-size: 12px;
  text-transform: uppercase;
}

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

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding: 18px 20px;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

h1 {
  margin: 0;
  font-size: 28px;
  letter-spacing: 0;
}

p {
  margin: 4px 0 0;
  color: var(--muted);
}

.month-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.month-form label {
  color: rgba(255, 255, 255, 0.78);
}

.month-form select {
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  background: #fff;
  color: #000;
  padding: 6px 10px;
  font: inherit;
}

html[data-theme="dark"] .month-form select {
  background: #0d1420;
  color: #f7fbff;
}

.refresh-button {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  font-size: 21px;
  line-height: 1;
}

.refresh-button:hover {
  background: rgba(255, 255, 255, 0.24);
}

.button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 13px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}

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

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

.tabs {
  display: flex;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
  margin-bottom: 14px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.05);
}

.tabs a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
  background: transparent;
  white-space: nowrap;
  font-weight: 700;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.tabs a.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 8px 18px rgba(37, 137, 158, 0.22);
}

.tabs a.is-pending {
  background: rgba(37, 137, 158, 0.78);
  border-color: rgba(37, 137, 158, 0.9);
  color: #fff;
}

html[data-theme="dark"] .tabs {
  background: rgba(255, 255, 255, 0.04);
  box-shadow: none;
}

html[data-theme="dark"] .tabs a {
  color: #aab7c6;
}

html[data-theme="dark"] .tabs a.active,
html[data-theme="dark"] .tabs a.is-pending {
  color: #fff;
}

html[data-theme="dark"] .tabs a:not(.active):hover {
  border-color: rgba(97, 216, 244, 0.26);
  background: rgba(97, 216, 244, 0.08);
  color: #f7fbff;
}

.summary div,
.comparison-hero div,
.comparison-metrics div,
.panel,
.notice {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.05);
}

.summary div {
  padding: 12px 16px;
  border-top: 4px solid var(--gold);
}

.comparison-hero div,
.comparison-metrics div {
  padding: 12px 16px;
  border-top: 4px solid var(--accent);
}

.summary span,
.comparison-hero span,
.comparison-metrics span {
  display: block;
  color: var(--accent-dark);
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 700;
}

.summary strong,
.comparison-hero strong,
.comparison-metrics strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
}

.comparison-hero small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.panel,
.table-wrap {
  overflow-x: auto;
}

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

.product-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.05);
}

.product-head {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) minmax(80px, 0.55fr) minmax(130px, 0.85fr) minmax(130px, 0.85fr) minmax(140px, 0.9fr);
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, var(--bg-soft), #fff);
}

html[data-theme="dark"] .product-head {
  background: linear-gradient(90deg, var(--bg-soft), rgba(255, 255, 255, 0.03));
}

h2 {
  margin: 0;
  font-size: 17px;
  border-left: 4px solid var(--accent);
  padding-left: 10px;
}

.product-head span {
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}

.product-head strong {
  font-size: 16px;
  text-align: right;
  white-space: nowrap;
}

.empty-panel {
  padding: 16px;
  color: var(--muted);
  text-align: center;
}

table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
}

.variations-table {
  table-layout: fixed;
}

.col-variation {
  width: 30%;
}

.col-quantity {
  width: 12%;
}

.col-percent {
  width: 20%;
}

.col-net,
.col-gross {
  width: 19%;
}

.orders-table {
  min-width: 980px;
  table-layout: auto;
}

.comparison-table {
  min-width: 1040px;
}

.col-action {
  width: 72px;
}

th,
td {
  padding: 7px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--accent-dark);
  font-size: 12px;
  text-transform: uppercase;
  padding-top: 8px;
  padding-bottom: 8px;
  background: #f8f5ef;
}

html[data-theme="dark"] th {
  background: #151f2e;
  color: var(--gold);
}

html[data-theme="dark"] .sortable-table th button::after,
html[data-theme="dark"] .sortable-table th button[data-sort-direction="asc"]::after,
html[data-theme="dark"] .sortable-table th button[data-sort-direction="desc"]::after {
  color: var(--gold);
}

tbody tr:hover {
  background: rgba(37, 137, 158, 0.06);
}

html[data-theme="dark"] tbody tr:hover {
  background: rgba(97, 216, 244, 0.08);
}

td:nth-child(2),
td:nth-child(3),
td:nth-child(4),
td:nth-child(5),
th:nth-child(2),
th:nth-child(3),
th:nth-child(4),
th:nth-child(5) {
  text-align: right;
}

.orders-table th,
.orders-table td {
  text-align: left;
}

.orders-table th:nth-child(5),
.orders-table td:nth-child(5) {
  text-align: right;
}

.orders-table .col-action,
.orders-table .order-action {
  text-align: center;
}

.icon-button {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--accent-dark);
  cursor: pointer;
  font-size: 15px;
}

html[data-theme="dark"] .icon-button {
  background: #121a28;
  color: #61d8f4;
}

.icon-button:hover {
  border-color: var(--accent);
  background: rgba(37, 137, 158, 0.08);
}

html[data-theme="dark"] .icon-button:hover {
  background: rgba(97, 216, 244, 0.12);
}

.notice {
  display: grid;
  gap: 8px;
  padding: 16px;
  color: var(--danger);
}

.notice span {
  color: var(--ink);
}

.empty {
  color: var(--muted);
  text-align: center;
}

.subtext {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 9px;
  background: #eee9e2;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

html[data-theme="dark"] .status-badge {
  background: rgba(255, 255, 255, 0.09);
}

.status-completed {
  background: rgba(37, 137, 158, 0.18);
  color: var(--accent-dark);
}

.status-shipping {
  background: rgba(181, 161, 106, 0.28);
  color: #6b5520;
}

html[data-theme="dark"] .status-shipping {
  color: #f0d98d;
}

.order-dialog {
  width: min(960px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] .order-dialog {
  background: var(--panel);
  color: var(--ink);
}

.order-dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

.order-dialog form {
  margin: 0;
}

.dialog-head,
.dialog-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.dialog-head h2 {
  border: 0;
  padding: 0;
}

.dialog-close {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

html[data-theme="dark"] .dialog-close {
  background: #121a28;
  color: #f7fbff;
}

.dialog-body {
  padding: 18px;
  overflow: auto;
  max-height: calc(100vh - 180px);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px;
  margin-bottom: 22px;
}

.detail-grid h3,
.detail-grid h4 {
  margin: 0 0 10px;
  font-size: 16px;
}

.detail-grid h4 {
  margin-top: 18px;
  margin-bottom: 4px;
  font-size: 13px;
}

.detail-grid p {
  margin: 2px 0;
  color: var(--ink);
}

.order-detail-table th:nth-child(2),
.order-detail-table td:nth-child(2),
.order-detail-table th:nth-child(3),
.order-detail-table td:nth-child(3),
.order-detail-table th:nth-child(4),
.order-detail-table td:nth-child(4) {
  text-align: right;
}

.dialog-foot {
  border-top: 1px solid var(--line);
  border-bottom: 0;
  background: var(--bg-soft);
}

.comparison-panel {
  margin-bottom: 14px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
}

.section-head h2 {
  border: 0;
  padding: 0;
}

.section-head span {
  color: var(--muted);
  font-size: 13px;
}

.month-chart {
  display: grid;
  grid-template-columns: repeat(12, minmax(64px, 1fr));
  gap: 10px;
  padding: 18px 16px 10px;
  overflow-x: auto;
}

.month-bar {
  display: grid;
  gap: 7px;
  justify-items: center;
  min-width: 64px;
}

.bar-pair {
  height: 180px;
  display: flex;
  align-items: end;
  gap: 5px;
  padding: 0 6px;
  border-bottom: 1px solid var(--line);
}

.bar {
  width: 18px;
  min-height: 2px;
  border-radius: 4px 4px 0 0;
}

.ro-bar,
.ro-dot {
  background: var(--accent);
}

.hu-bar,
.hu-dot {
  background: var(--gold);
}

.month-bar strong {
  font-size: 12px;
  text-transform: uppercase;
}

.month-bar small {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.chart-legend {
  display: flex;
  gap: 16px;
  padding: 0 16px 16px;
  color: var(--muted);
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  display: inline-block;
  border-radius: 50%;
}

.comparison-table th:nth-child(n+3),
.comparison-table td:nth-child(n+3) {
  text-align: right;
}

.sortable-table th button {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: inherit;
  gap: 5px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-weight: inherit;
  text-align: inherit;
  text-transform: inherit;
  padding: 0;
}

.sortable-table th button::after {
  content: "â†•";
  color: var(--muted);
  font-size: 11px;
}

.sortable-table th button[data-sort-direction="asc"]::after {
  content: "â†‘";
  color: var(--accent-dark);
}

.sortable-table th button[data-sort-direction="desc"]::after {
  content: "â†“";
  color: var(--accent-dark);
}


.workspace-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 74px;
  padding: 14px 22px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(5, 9, 15, 0.82);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.28);
}

html[data-theme="light"] .workspace-topbar {
  border-color: rgba(15, 101, 116, 0.16);
  background: rgba(255, 255, 255, 0.78);
}

.workspace-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
}

html[data-theme="light"] .workspace-brand {
  color: #0c1118;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(97, 216, 244, 0.7);
  border-radius: 50%;
  color: #61d8f4;
  font-size: 26px;
  font-style: italic;
  font-weight: 700;
}

.workspace-brand strong {
  color: #61d8f4;
  font-size: 24px;
  letter-spacing: 0.02em;
}

.workspace-brand span:last-child {
  font-size: 20px;
  font-weight: 800;
}

.workspace-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.logout-link {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border: 1px solid rgba(97, 216, 244, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #f7fbff;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.logout-link:hover {
  border-color: var(--accent-dark);
  background: rgba(37, 137, 158, 0.16);
}

html[data-theme="light"] .logout-link {
  background: rgba(255, 255, 255, 0.78);
  color: #0c1118;
}

.workspace-mini-stat,
.user-chip {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.workspace-mini-stat {
  flex-direction: column;
  align-items: start;
  min-width: 150px;
  padding: 7px 16px;
}

.workspace-mini-stat span {
  color: rgba(247, 251, 255, 0.7);
  font-size: 12px;
}

.workspace-mini-stat strong {
  color: #fff;
  font-size: 15px;
}

.user-chip {
  width: 42px;
  border-radius: 50%;
  color: #fff;
  font-weight: 900;
}

html[data-theme="light"] .workspace-mini-stat,
html[data-theme="light"] .user-chip {
  border-color: rgba(15, 101, 116, 0.16);
  background: rgba(255, 255, 255, 0.72);
  color: #0c1118;
}

html[data-theme="light"] .workspace-mini-stat strong {
  color: #0c1118;
}

html[data-theme="light"] .workspace-mini-stat span {
  color: #526070;
}

.project-menu-body {
  background:
    radial-gradient(circle at 22% 18%, rgba(37, 137, 158, 0.15), transparent 28rem),
    radial-gradient(circle at 74% 34%, rgba(181, 161, 106, 0.08), transparent 30rem),
    linear-gradient(135deg, #070b11 0%, #0d1621 54%, #060910 100%);
}

.project-menu {
  width: min(1480px, calc(100% - 24px));
  gap: 26px;
  padding: 10px 0 18px;
}

.command-hero-compact {
  grid-template-columns: minmax(0, 1fr) minmax(520px, 0.95fr);
  gap: 28px;
  padding: 22px;
  border-color: rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025)),
    rgba(13, 20, 29, 0.78);
}

.command-brand {
  grid-template-columns: 76px minmax(0, 1fr);
}

.command-logo {
  width: 68px;
  min-height: 68px;
  border: 1px solid rgba(97, 216, 244, 0.7);
  border-radius: 16px;
  color: #61d8f4;
  font-size: 32px;
  letter-spacing: 0;
}

.command-brand h1 {
  font-size: clamp(24px, 2.4vw, 31px);
  line-height: 1.15;
}

.command-brand p {
  margin-top: 8px;
  font-size: 16px;
}

.command-stats {
  grid-template-columns: repeat(4, minmax(120px, 1fr));
}

.command-stats div {
  min-height: 82px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  column-gap: 14px;
  align-content: center;
  padding: 14px 16px;
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.045);
}

.command-stats i {
  grid-row: span 2;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(97, 216, 244, 0.55);
  border-radius: 50%;
  color: #61d8f4;
  font-style: normal;
  font-size: 20px;
}

.command-stats div:nth-child(2) i {
  border-color: rgba(181, 161, 106, 0.72);
  color: #e0bd46;
}

.command-stats strong {
  margin: 0;
  font-size: 24px;
  line-height: 1;
}

.command-stats span {
  margin-top: 5px;
  text-transform: none;
  font-size: 13px;
  font-weight: 500;
}

.project-rail-section {
  position: relative;
  gap: 14px;
  padding: 0 54px 6px;
  border: 0;
  background: transparent;
}

.rail-head {
  padding: 0 0 4px;
}

.rail-head .kicker {
  position: relative;
  margin: 0 0 8px;
  padding-left: 28px;
  color: #fff;
  font-size: 22px;
  letter-spacing: 0;
  text-transform: none;
}

.rail-head .kicker::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #61d8f4;
}

.project-rail-section-testing .rail-head .kicker::before {
  background: #e0bd46;
}

.rail-head p {
  padding-left: 28px;
}

.rail-controls {
  position: absolute;
  inset: 110px 6px auto 6px;
  z-index: 3;
  justify-content: space-between;
  pointer-events: none;
}

.rail-controls button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(5, 9, 15, 0.68);
  pointer-events: auto;
}

.project-rail {
  grid-auto-columns: minmax(430px, 500px);
  gap: 16px;
  padding: 0 0 16px;
}

.project-tile {
  position: relative;
  min-height: 176px;
  grid-template-columns: 96px minmax(0, 1fr);
  align-content: start;
  gap: 20px 22px;
  padding: 26px 22px 0;
  overflow: hidden;
  border-color: rgba(255, 255, 255, 0.11);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    rgba(18, 28, 39, 0.72);
}

.project-tile.is-active {
  border-color: rgba(97, 216, 244, 0.82);
  background:
    linear-gradient(145deg, rgba(37, 137, 158, 0.22), rgba(255, 255, 255, 0.03)),
    rgba(18, 28, 39, 0.82);
}

.project-rail-section-testing .project-tile {
  border-color: rgba(181, 161, 106, 0.2);
}

.project-icon {
  width: 96px;
  height: 96px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(97, 216, 244, 0.66);
  border-radius: 16px;
  color: #61d8f4;
  font-size: 44px;
}

.project-rail-section-testing .project-icon {
  border-color: rgba(181, 161, 106, 0.7);
  color: #e0bd46;
}

.project-main {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 96px;
}

.project-main strong {
  font-size: 23px;
}

.project-status {
  width: fit-content;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(181, 161, 106, 0.38);
  color: #f0d16c;
}

.project-meta {
  color: rgba(247, 251, 255, 0.72);
  text-transform: none;
}

.project-foot {
  grid-column: 1 / -1;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 4px -22px 0;
  padding: 10px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(181, 161, 106, 0.08);
  color: rgba(247, 251, 255, 0.72);
}

.project-foot em {
  color: #61d8f4;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.project-rail-section-testing .project-foot em {
  color: #e0bd46;
}

.project-tile-empty {
  pointer-events: none;
  opacity: 0.72;
}

.workspace-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 32px 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(247, 251, 255, 0.56);
}

html[data-theme="light"] .project-menu-body {
  background:
    radial-gradient(circle at 20% 18%, rgba(37, 137, 158, 0.14), transparent 28rem),
    radial-gradient(circle at 72% 30%, rgba(181, 161, 106, 0.1), transparent 30rem),
    linear-gradient(135deg, #eef7f9 0%, #f8f6f1 56%, #eee9e2 100%);
}

html[data-theme="light"] .command-hero-compact,
html[data-theme="light"] .workspace-topbar {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(15, 101, 116, 0.18);
}

html[data-theme="light"] .rail-head .kicker {
  color: #0c1118;
}

html[data-theme="light"] .rail-head p {
  color: #405061;
}

html[data-theme="light"] .project-rail-section {
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(15, 101, 116, 0.08);
  border-radius: 8px;
}

html[data-theme="light"] .project-tile {
  border-color: rgba(15, 101, 116, 0.16);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(250, 249, 247, 0.88)),
    #fff;
  color: #0c1118;
}

html[data-theme="light"] .project-tile.is-active {
  border-color: rgba(37, 137, 158, 0.58);
  background:
    linear-gradient(145deg, rgba(37, 137, 158, 0.08), rgba(181, 161, 106, 0.08)),
    #fff;
}

html[data-theme="light"] .project-main strong {
  color: #0c1118;
}

html[data-theme="light"] .project-status {
  background: rgba(209, 200, 191, 0.78);
  color: #405061;
}

html[data-theme="light"] .project-tile.is-active .project-status {
  background: rgba(181, 161, 106, 0.34);
  color: #5d4b1f;
}

html[data-theme="light"] .project-meta {
  color: #526070;
}

html[data-theme="light"] .project-foot {
  border-top-color: rgba(15, 101, 116, 0.12);
  background: rgba(243, 241, 238, 0.9);
  color: #526070;
}

html[data-theme="light"] .project-foot em {
  color: #25899e;
}

html[data-theme="light"] .project-rail-section-testing .project-foot em {
  color: #93792e;
}

html[data-theme="light"] .project-tile-empty {
  background: rgba(255, 255, 255, 0.72);
}

html[data-theme="light"] .rail-controls button {
  border-color: rgba(15, 101, 116, 0.18);
  background: rgba(255, 255, 255, 0.86);
  color: #0c1118;
}

html[data-theme="light"] .workspace-footer {
  border-top-color: rgba(15, 101, 116, 0.14);
  color: #526070;
}
@media (max-width: 720px) {
  .project-menu {
    align-content: start;
    padding-top: 24px;
  }

  .command-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 28px;
  }

  .command-hero-compact {
    padding: 20px;
  }

  .command-brand {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .command-logo {
    width: 126px;
  }

  .command-stats {
    grid-template-columns: 1fr;
  }

  .command-copy h1,
  .placeholder-panel h1 {
    font-size: 46px;
  }

  .command-copy p,
  .placeholder-panel p {
    font-size: 15px;
  }

  .command-status {
    justify-self: stretch;
  }

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

  .rail-head {
    align-items: start;
    flex-direction: column;
  }

  .project-rail {
    grid-auto-columns: minmax(260px, 86vw);
  }

  .project-tile {
    min-height: 190px;
  }

  .theme-panel,
  .placeholder-top {
    grid-template-columns: 1fr;
    align-items: stretch;
    display: grid;
  }

  .theme-switch {
    justify-content: space-between;
  }

  .header,
  .summary,
  .comparison-hero,
  .comparison-metrics,
  .product-head {
    grid-template-columns: 1fr;
    display: grid;
  }

  .month-form {
    margin-left: 0;
    justify-content: start;
  }

  .detail-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .product-head span,
  .product-head strong {
    text-align: left;
  }
}


