:root {
  --page: #f2f5f3;
  --surface-soft: #f7f9f8;
  --text: #18221f;
  --muted: #66736e;
  --faint: #98a29e;
  --primary: #087c68;
  --primary-dark: #075f51;
  --primary-soft: #e1f1eb;
  --nav: #172622;
  --nav-2: #20332e;
  --coral: #d76f57;
  --coral-soft: #faeee9;
  --yellow: #c69b35;
  --yellow-soft: #f8f1df;
  --shadow-soft: 0 1px 2px rgba(20, 35, 30, 0.04), 0 6px 20px rgba(20, 35, 30, 0.025);
}

body {
  background:
    linear-gradient(90deg, rgba(8, 124, 104, 0.025) 1px, transparent 1px),
    var(--page);
  background-size: 72px 72px, auto;
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 22%),
    var(--nav);
}

.brand-mark {
  position: relative;
  color: var(--primary-dark);
}

.brand-mark::after {
  content: "";
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 8px;
  height: 8px;
  border: 2px solid var(--nav);
  border-radius: 50%;
  background: #66d2aa;
}

.nav-item.active {
  background: #eff8f4;
  color: #14231f;
}

.nav-item.active::after {
  content: "";
  position: absolute;
  right: 6px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary);
}

.nav-item:hover:not(.active) {
  background: rgba(255, 255, 255, 0.065);
}

.topbar {
  background: rgba(242, 245, 243, 0.93);
}

.topbar h1 {
  display: flex;
  align-items: center;
  gap: 9px;
}

.topbar h1::before {
  content: "";
  width: 18px;
  height: 6px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primary) 0 62%, var(--coral) 62%);
}

.screen-head > div:first-child {
  position: relative;
  padding-left: 14px;
}

.screen-head > div:first-child::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: 3px;
  border-radius: 2px;
  background: var(--primary);
}

.screen-head p {
  max-width: 680px;
}

.metric {
  border-top: 3px solid var(--primary);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.metric:nth-child(2) {
  border-top-color: var(--blue);
}

.metric:nth-child(3) {
  border-top-color: var(--coral);
}

.metric:nth-child(4) {
  border-top-color: var(--yellow);
}

.metric:nth-child(5) {
  border-top-color: #765d9b;
}

.metric:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(20, 35, 30, 0.08);
}

.metric strong,
.workbench-card strong {
  font-variant-numeric: tabular-nums;
}

.metric:nth-child(3) .metric-icon {
  color: var(--coral);
  background: var(--coral-soft) !important;
}

.metric:nth-child(4) .metric-icon {
  color: var(--yellow);
  background: var(--yellow-soft) !important;
}

.operations-board {
  position: relative;
  border-top: 3px solid var(--primary);
}

.operations-board::before {
  content: "WORK QUEUE";
  position: absolute;
  right: 16px;
  top: -10px;
  padding: 2px 7px;
  background: var(--page);
  color: var(--faint);
  font-size: 9px;
  font-weight: 700;
}

.workbench-card {
  transition: background 0.14s ease;
}

.workbench-card:hover {
  background: #f3f8f6;
}

.panel {
  border-color: #dce3df;
}

.panel-head h3 {
  display: flex;
  align-items: center;
  gap: 7px;
}

.panel-head h3::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--primary);
}

.content-grid .panel:nth-child(2) .panel-head h3::before {
  background: var(--coral);
}

.content-grid .panel:nth-child(3) .panel-head h3::before {
  background: var(--blue);
}

.platform-card {
  position: relative;
  overflow: hidden;
  transition: border-color 0.14s ease, transform 0.14s ease, box-shadow 0.14s ease;
}

.platform-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--primary);
  opacity: 0.35;
}

.platform-card:hover {
  border-color: #b8cbc4;
  transform: translateY(-1px);
  box-shadow: 0 7px 18px rgba(20, 35, 30, 0.06);
}

.table-wrap {
  background: #fff;
}

th {
  color: #52615b;
}

.primary-btn {
  border-color: var(--primary-dark);
  background: var(--primary-dark);
}

.primary-btn:hover {
  border-color: #044e42;
  background: #044e42;
}

.secondary-btn:hover,
.small-btn:hover:not(:disabled) {
  border-color: #aac2b9;
  background: #f0f7f4;
}

.tag {
  border: 1px solid transparent;
}

.tag.ok {
  border-color: #c9e5d5;
}

.tag.warn {
  border-color: #eadbb5;
}

.tag.bad {
  border-color: #edcfcc;
}

.tag.info {
  border-color: #cad8e9;
}

.auth-screen {
  position: fixed;
  overflow: hidden;
  background: linear-gradient(90deg, var(--nav) 0%, var(--nav) 38%, var(--page) 38%, var(--page) 100%);
}

.auth-screen::before {
  content: "ORDER  ·  INVENTORY  ·  FULFILLMENT";
  position: absolute;
  left: 5vw;
  bottom: 8vh;
  max-width: 24vw;
  color: rgba(255, 255, 255, 0.46);
  font-size: clamp(18px, 2.2vw, 34px);
  font-weight: 650;
  line-height: 1.35;
}

.auth-card {
  margin-left: 28vw;
  border: 1px solid #d8e1dd;
  box-shadow: 0 24px 70px rgba(20, 35, 30, 0.15);
}

.auth-card .brand {
  background: var(--nav);
}

.auth-card h2 {
  margin-top: 8px;
}

.auth-card .primary-btn {
  min-height: 40px;
}

@media (prefers-reduced-motion: reduce) {
  .metric,
  .platform-card,
  .workbench-card {
    transition: none;
  }
}

@media (max-width: 720px) {
  .auth-screen {
    background: var(--page);
  }

  .auth-screen::before {
    display: none;
  }

  .auth-card {
    margin-left: 0;
  }

  .screen-head > div:first-child {
    padding-left: 10px;
  }
}
