:root {
  --forest: #0c2d26;
  --forest-2: #123d33;
  --venture: #13846f;
  --venture-bright: #25aa8d;
  --ink: #10241f;
  --muted: #667872;
  --line: #dce6e2;
  --surface: #ffffff;
  --soft: #f2f6f4;
  --red: #bf3645;
  --red-soft: #fae8ea;
  --amber: #c77a16;
  --amber-soft: #fff0d9;
  --green-soft: #e4f3ed;
  --shadow: 0 18px 50px rgba(12, 45, 38, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  color: var(--ink);
  background-color: #f5f8f6;
  background-image:
    linear-gradient(rgba(19, 132, 111, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(19, 132, 111, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  font: 15px/1.5 Inter, ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.command-header,
header {
  min-height: 82px;
  display: flex;
  align-items: center;
  gap: 38px;
  padding: 0 5%;
  color: #ffffff;
  background: var(--forest);
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.brand-lockup,
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
}

.venture-mark,
.brand .mark {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #ffffff;
  background: var(--venture);
  font-size: 22px;
  font-weight: 900;
}

.venture-name strong,
.brand b {
  display: block;
  font-size: 15px;
  letter-spacing: 0.14em;
}

.venture-name small,
.brand small {
  display: block;
  color: #70d4be;
  font-size: 8px;
  letter-spacing: 0.22em;
}

.system-identity,
.mod-title {
  display: flex;
  align-items: center;
  gap: 15px;
  padding-left: 32px;
  border-left: 1px solid rgba(255,255,255,0.18);
}

.system-code,
.mod-title b {
  font-size: 22px;
  font-weight: 850;
  letter-spacing: -0.04em;
}

.system-identity strong {
  display: block;
  font-size: 13px;
  letter-spacing: 0.03em;
}

.system-identity small,
.mod-title span {
  display: block;
  margin-top: 2px;
  color: #9eb9b2;
  font-size: 10px;
}

.command-nav {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  gap: 28px;
  margin-left: auto;
}

.command-nav a {
  position: relative;
  display: flex;
  align-items: center;
  color: #aec5bf;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.command-nav a:hover,
.command-nav .nav-active {
  color: #ffffff;
}

.command-nav .nav-active::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  content: "";
  background: var(--venture-bright);
}

.logout {
  margin-left: auto;
  color: inherit;
  text-decoration: none;
}

.readiness-bar {
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 5%;
  color: #c5d8d3;
  background: var(--forest-2);
  font-size: 11px;
  letter-spacing: 0.03em;
}

.readiness-bar div {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
}

.readiness-bar span + span {
  padding-left: 28px;
  border-left: 1px solid rgba(255,255,255,0.13);
}

.pulse {
  width: 7px;
  height: 7px;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50%;
  background: #42d9a8;
  box-shadow: 0 0 0 5px rgba(66,217,168,0.1);
}

.shell {
  width: min(1480px, 92%);
  margin: 0 auto;
}

.command-hero,
.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 30px;
  padding: 54px 0 31px;
}

.eyebrow {
  margin: 0;
  color: var(--venture);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.17em;
}

.command-hero h1,
.hero h1 {
  max-width: 850px;
  margin: 12px 0 14px;
  font-size: clamp(38px, 4vw, 61px);
  line-height: 0.99;
  letter-spacing: -0.055em;
}

.hero-copy,
.hero p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.primary-action,
.new-investigation-button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 7px;
  color: #ffffff;
  background: var(--venture);
  box-shadow: 0 10px 25px rgba(19,132,111,0.17);
  text-decoration: none;
  font-weight: 800;
}

.primary-action span {
  font-size: 22px;
  font-weight: 400;
}

.primary-action:hover,
.new-investigation-button:hover,
button:hover {
  background: #0f725f;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.metrics article {
  position: relative;
  min-height: 158px;
  padding: 20px 22px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: 0 7px 24px rgba(12,45,38,0.045);
}

.metrics article::after {
  position: absolute;
  right: -23px;
  bottom: -30px;
  width: 100px;
  height: 100px;
  content: "";
  border: 1px solid rgba(19,132,111,0.1);
  border-radius: 50%;
}

.metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.metric-index {
  color: var(--venture);
  font: 700 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.metric-label {
  color: var(--muted);
  font-size: 13px;
}

.metrics strong {
  position: relative;
  z-index: 1;
  display: block;
  margin: 20px 0 3px;
  font-size: 31px;
  line-height: 1;
  letter-spacing: -0.035em;
}

.metrics small {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 12px;
}

.priority-metric {
  color: #ffffff;
  background: var(--forest) !important;
  border-color: var(--forest) !important;
}

.priority-metric .metric-index,
.priority-metric .metric-label,
.priority-metric small {
  color: #a9c3bc;
}

.priority-metric strong {
  color: #62d5b9;
}

.intelligence-panel,
.panel {
  margin: 22px 0 60px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.panel-heading,
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 23px 24px;
  border-bottom: 1px solid var(--line);
}

.panel-heading h2,
.panel-head h2 {
  margin: 5px 0 0;
  font-size: 21px;
  letter-spacing: -0.025em;
}

.classification-key {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.classification-key span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.classification-key i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.key-red {
  background: var(--red);
}

.key-amber {
  background: var(--amber);
}

.key-green {
  background: var(--venture);
}

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

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  padding: 13px 16px;
  color: #72827d;
  background: #edf3f0;
  text-align: left;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

td {
  padding: 17px 16px;
  border-top: 1px solid var(--line);
  white-space: nowrap;
}

.case-row {
  transition: background 140ms ease, box-shadow 140ms ease;
}

.case-row:hover {
  background: #f7faf9;
  box-shadow: inset 3px 0 0 var(--venture);
}

td small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.case-number,
.asin {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.case-number {
  color: var(--forest);
  letter-spacing: 0.02em;
}

.asin {
  color: #768a84;
}

.product-name {
  max-width: 350px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.score {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-weight: 850;
}

.compliance-score {
  color: var(--red);
  background: var(--red-soft);
  border-bottom: 2px solid #e9a4ac;
}

.commercial-score {
  color: var(--amber);
  background: var(--amber-soft);
  border-bottom: 2px solid #ecc98d;
}

.priority {
  color: var(--venture);
  font-size: 23px;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 29px;
  padding: 5px 10px;
  color: var(--forest-2);
  background: var(--green-soft);
  border: 1px solid #cfe7de;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.045em;
}

.status-ready-for-submission {
  color: #ffffff;
  background: var(--venture);
  border-color: var(--venture);
}

.status-pending-score-verification,
.status-pending-compliance-review,
.status-needs-match-confirmation {
  color: #87500c;
  background: var(--amber-soft);
  border-color: #ecd29f;
}

.status-compliant-control,
.status-closed-low-risk {
  color: #58706a;
  background: #edf2f0;
  border-color: #dce5e2;
}

.panel-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 13px 18px;
  color: #788984;
  background: var(--forest);
  font-size: 10px;
  letter-spacing: 0.04em;
}

/* Login and investigation forms */

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background-color: var(--forest);
  background-image:
    linear-gradient(rgba(69,190,161,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(69,190,161,0.07) 1px, transparent 1px);
  background-size: 42px 42px;
}

.login-card {
  width: min(440px, 92%);
  padding: 42px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 28px 80px rgba(0,0,0,0.24);
}

.login-card h1 {
  margin: 23px 0 5px;
  font-size: 39px;
  letter-spacing: -0.045em;
}

.muted,
.fine,
.form-note {
  color: var(--muted);
}

form {
  margin-top: 28px;
}

label {
  display: block;
  margin: 15px 0 6px;
  color: var(--forest);
  font-size: 12px;
  font-weight: 800;
}

input {
  width: 100%;
  padding: 14px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid #c8d7d2;
  border-radius: 7px;
  font-size: 16px;
}

input:focus {
  border-color: var(--venture);
  outline: 3px solid rgba(19,132,111,0.13);
}

button {
  padding: 12px 18px;
  color: #ffffff;
  background: var(--venture);
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 800;
}

form button {
  width: 100%;
  margin-top: 22px;
  padding: 14px;
}

.fine {
  margin-top: 25px;
  text-align: center;
  font-size: 11px;
}

.error,
.form-error {
  margin-top: 16px;
  padding: 11px 13px;
  color: #9e2835;
  background: var(--red-soft);
  border: 1px solid #edb5bb;
  border-radius: 7px;
  font-weight: 750;
}

.investigation-shell {
  max-width: 820px;
}

.investigation-panel {
  padding: 34px;
}

.investigation-form {
  display: grid;
  gap: 14px;
  margin: 0;
}

.investigation-form input {
  text-transform: uppercase;
}

.form-note {
  margin: 0;
  line-height: 1.55;
}

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

.form-actions button {
  width: auto;
  margin: 0;
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  color: var(--forest);
  background: #ffffff;
  border: 1px solid #c8d7d2;
  border-radius: 7px;
  text-decoration: none;
}

@media (max-width: 1050px) {
  .metrics {
    grid-template-columns: 1fr 1fr;
  }

  .classification-key {
    display: none;
  }
}

@media (max-width: 780px) {
  .command-header,
  header {
    padding: 15px 4%;
  }

  .system-identity,
  .mod-title {
    display: none;
  }

  .command-nav {
    gap: 16px;
  }

  .readiness-bar span:not(:first-child),
  .readiness-bar > span {
    display: none;
  }

  .command-hero,
  .hero {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 38px;
  }

  .command-hero h1,
  .hero h1 {
    font-size: 39px;
  }

  .primary-action {
    width: 100%;
  }
}

@media (max-width: 540px) {
  .metrics {
    grid-template-columns: 1fr;
  }

  .command-nav a:first-child {
    display: none;
  }

  .panel-heading,
  .panel-head,
  .panel-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .login-card {
    padding: 30px 24px;
  }

  .form-actions {
    flex-direction: column-reverse;
  }

  .form-actions a,
  .form-actions button {
    width: 100%;
  }
}

.venture-cross {
  width: 43px;
  height: 43px;
  display: block;
  flex: 0 0 43px;
}

.venture-cross svg {
  display: block;
  width: 100%;
  height: 100%;
}

.login-card .venture-cross {
  width: 48px;
  height: 48px;
  flex-basis: 48px;
}

/* Logo and header contrast correction */

.command-header,
header {
  color: var(--forest);
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.system-identity,
.mod-title {
  border-left-color: var(--line);
}

.system-identity small,
.mod-title span {
  color: var(--muted);
}

.command-nav a {
  color: #60736d;
}

.command-nav a:hover,
.command-nav .nav-active {
  color: var(--forest);
}

.venture-cross {
  width: 48px;
  height: 48px;
  flex-basis: 48px;
}

.venture-name strong,
.brand b {
  color: var(--forest);
  font-size: 17px;
  letter-spacing: 0.1em;
}

.venture-name small,
.brand small {
  margin-top: 1px;
  color: var(--venture);
  font-size: 10px;
  letter-spacing: 0.2em;
}
