:root {
  --ink: #111827;
  --muted: #64748b;
  --soft: #e8eef6;
  --blue: #005eb8;
  --blue-2: #0b77d7;
  --navy: #003087;
  --cyan: #21c7d9;
  --green: #00a35b;
  --amber: #ffb020;
  --red: #e13d3d;
  --surface: #ffffff;
  --surface-2: #f7fafc;
  --line: #d8e1ea;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.11);
  --radius: 8px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(0, 94, 184, 0.08), rgba(33, 199, 217, 0.05) 45%, rgba(0, 48, 135, 0.08)),
    #f5f8fb;
  font-family: "Manrope", Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

a { color: var(--blue); }

.app-header {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(216, 225, 234, 0.86);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(18px);
}

.app-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 900;
}

.app-brand span {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 14px;
  background: linear-gradient(135deg, var(--blue), var(--navy));
  color: #fff;
  font-style: italic;
  box-shadow: 0 10px 24px rgba(0, 94, 184, 0.22);
}

.app-brand strong { font-size: 1.05rem; }

.app-header nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.app-header nav a {
  color: var(--ink);
  font-weight: 850;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 999px;
}

.app-header nav a:hover {
  background: #eef6ff;
  color: var(--blue);
}

.app-shell {
  width: min(1480px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 72px;
}

h1, h2, h3, p { overflow-wrap: anywhere; }
h1, h2, h3 { margin: 0; line-height: 1.05; letter-spacing: 0; }
h1 { font-size: clamp(2.4rem, 5vw, 5.6rem); }
h2 { font-size: clamp(1.35rem, 2.4vw, 2rem); }
h3 { font-size: 1.05rem; }

.eyebrow {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.login-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.66fr);
  gap: 28px;
  align-items: center;
  min-height: calc(100vh - 160px);
}

.lead {
  max-width: 650px;
  color: var(--muted);
  font-size: 1.14rem;
}

.panel,
.module-panel,
.workflow-panel,
.focus-panel,
.readiness-card,
.signal-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(216, 225, 234, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel {
  padding: 24px;
  margin-bottom: 22px;
}

.panel.narrow { max-width: 680px; }

.login-form {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 7px;
  color: #334155;
  font-weight: 850;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #cbd7e3;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 650;
}

textarea { resize: vertical; }

input:focus,
select:focus,
textarea:focus,
button:focus,
a:focus {
  outline: 3px solid rgba(33, 199, 217, 0.42);
  outline-offset: 2px;
}

.button,
.ghost-button,
.small-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  font-weight: 900;
  cursor: pointer;
  text-decoration: none;
}

.button {
  min-height: 46px;
  padding: 12px 18px;
  background: linear-gradient(135deg, var(--green), #008047);
  color: #fff;
  box-shadow: 0 14px 24px rgba(0, 127, 59, 0.2);
}

.ghost-button {
  min-height: 46px;
  padding: 12px 18px;
  background: #fff;
  color: var(--blue);
  border: 1px solid #bdd8f4;
}

.small-button {
  min-height: 38px;
  padding: 8px 12px;
  width: 100%;
  background: var(--green);
  color: #fff;
}

.text-button {
  width: max-content;
  padding: 8px 0;
  background: transparent;
  color: var(--blue);
}

.alert {
  padding: 12px;
  background: #ffe9e7;
  border-left: 5px solid var(--red);
}

.success {
  padding: 12px;
  background: #e8f6ee;
  border-left: 5px solid var(--green);
}

.small {
  color: var(--muted);
  font-size: 0.92rem;
}

.product-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.42fr);
  gap: 26px;
  align-items: stretch;
  margin-bottom: 18px;
}

.hero-copy {
  min-height: 310px;
  padding: clamp(28px, 5vw, 58px);
  border-radius: var(--radius);
  color: #fff;
  background:
    linear-gradient(135deg, rgba(0, 48, 135, 0.95), rgba(0, 94, 184, 0.92) 52%, rgba(33, 199, 217, 0.86)),
    var(--blue);
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: 0 24px 70px rgba(0, 48, 135, 0.24);
}

.hero-copy .eyebrow { color: #d7edff; }
.hero-copy h1 { max-width: 880px; }

.hero-lede {
  max-width: 680px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  font-weight: 700;
}

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

.readiness-card {
  min-height: 310px;
  padding: 30px;
  display: grid;
  place-items: center;
  text-align: center;
  background:
    linear-gradient(180deg, #fff, #f7fbff);
}

.score-ring {
  width: 176px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #fff 58%, transparent 59%),
    conic-gradient(var(--green) calc(var(--score) * 1%), #e2eaf2 0);
  box-shadow: inset 0 0 0 1px var(--line);
}

.score-ring span {
  color: var(--blue);
  font-size: 3.2rem;
  font-weight: 950;
  letter-spacing: 0;
}

.readiness-card h2 { margin-top: 20px; }
.readiness-card p { margin: 8px 0 0; color: var(--muted); font-weight: 850; }

.signal-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.signal-card {
  position: relative;
  overflow: hidden;
  padding: 18px;
}

.signal-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--cyan);
}

.signal-card.urgent::before { background: var(--red); }

.signal-card span {
  display: block;
  color: var(--navy);
  font-size: 2.15rem;
  font-weight: 950;
  line-height: 1;
}

.signal-card strong {
  display: block;
  margin-top: 10px;
  font-size: 1rem;
}

.signal-card p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.34fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

.workflow-panel,
.focus-panel,
.module-panel {
  padding: 22px;
}

.section-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.section-title.compact { margin-bottom: 14px; }

.hint {
  padding: 8px 10px;
  border-radius: 999px;
  background: #eef6ff;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
}

.kanban-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(230px, 1fr));
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.lane {
  min-height: 420px;
  border-radius: var(--radius);
  background: #f2f6fa;
  border: 1px solid #e0e8f0;
}

.lane.is-over {
  outline: 3px solid rgba(33, 199, 217, 0.35);
  outline-offset: -3px;
}

.lane-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px;
}

.lane-head strong { font-size: 0.95rem; }

.lane-head span {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #fff;
  color: var(--blue);
  font-weight: 950;
}

.lane-drop {
  display: grid;
  gap: 12px;
  padding: 0 12px 12px;
}

.work-card {
  border: 1px solid #dce5ee;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
  cursor: grab;
}

.work-card:active { cursor: grabbing; }
.work-card.is-dragging { opacity: 0.55; transform: rotate(1deg); }
.work-card.save-failed { outline: 3px solid rgba(225, 61, 61, 0.35); }
.work-card.due-over { border-left: 5px solid var(--red); }
.work-card.due-set { border-left: 5px solid var(--amber); }

.card-form {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.card-title-input {
  padding: 0;
  border: 0;
  border-radius: 0;
  font-size: 1rem;
  font-weight: 950;
}

.card-title-input:focus { outline-offset: 5px; }

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.priority {
  padding: 3px 8px;
  border-radius: 999px;
  color: #fff;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.priority.high { background: var(--red); }
.priority.medium { background: var(--amber); color: #3b2600; }
.priority.low { background: var(--green); }

.card-controls {
  display: grid;
  gap: 8px;
}

.card-controls label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.quick-create {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(140px, 0.22fr) auto;
  gap: 10px;
  margin-top: 16px;
  padding: 12px;
  border-radius: var(--radius);
  background: #eef6ff;
}

.focus-stack {
  display: grid;
  gap: 12px;
}

.focus-stack article {
  padding: 14px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff, #f7fbff);
  border: 1px solid #dfebf5;
}

.focus-stack span,
.person-card span {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e6f3ff;
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.focus-stack p {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.notification-preview {
  margin-top: 16px;
  padding: 16px;
  border-radius: var(--radius);
  color: #fff;
  background:
    linear-gradient(135deg, rgba(0, 48, 135, 0.96), rgba(0, 94, 184, 0.9)),
    var(--navy);
}

.notification-preview .eyebrow {
  color: #bcecff;
}

.notification-preview p {
  color: rgba(255, 255, 255, 0.84);
  font-weight: 700;
}

.notification-preview .ghost-button {
  margin-top: 8px;
  opacity: 0.85;
  cursor: not-allowed;
}

.module-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

.module-grid.lower {
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
}

.people-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.person-card,
.evidence-card,
.supplier-row {
  border: 1px solid #dfe8f1;
  border-radius: var(--radius);
  background: #fff;
}

.summary-card {
  min-height: 162px;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
}

.evidence-list,
.compact-list {
  display: grid;
  gap: 10px;
}

.clean-list {
  gap: 12px;
}

.evidence-card {
  min-height: 150px;
}

.summary-main {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 8px;
}

.summary-card h3,
.summary-row h3 {
  max-width: 100%;
  font-size: 1.04rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.summary-card p,
.summary-row p {
  margin: 0;
  color: var(--muted);
  font-weight: 750;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.summary-card small {
  color: var(--muted);
  font-weight: 800;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 2px;
}

.chip,
.date-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  width: fit-content;
  max-width: 100%;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eaf6ff;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: capitalize;
  white-space: nowrap;
}

.chip.muted {
  background: #eef2f7;
  color: #475569;
}

.chip.owner {
  background: #eaf8ef;
  color: #006b3a;
}

.date-chip {
  background: #fff7e7;
  color: #795000;
}

.supplier-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto auto;
  gap: 12px;
  align-items: center;
  min-height: 82px;
  padding: 14px;
}

.summary-row > div {
  min-width: 0;
}

.coverage-bars {
  display: grid;
  gap: 18px;
}

.coverage-bars div {
  display: grid;
  grid-template-columns: minmax(110px, 0.45fr) 52px minmax(120px, 1fr);
  gap: 12px;
  align-items: center;
}

.coverage-bars span,
.coverage-bars strong {
  font-weight: 950;
}

.coverage-bars span { color: #334155; }
.coverage-bars strong { color: var(--blue); text-align: right; }

.coverage-bars i {
  height: 12px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, var(--blue), var(--cyan)) 0 / calc(var(--value) * 1%) 100% no-repeat,
    #e4edf5;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(4px);
}

.edit-drawer {
  position: fixed;
  z-index: 50;
  inset: 0 0 0 auto;
  width: min(520px, 100vw);
  overflow-y: auto;
  padding: 24px;
  background: #fff;
  box-shadow: -24px 0 60px rgba(15, 23, 42, 0.2);
}

.edit-drawer form {
  display: grid;
  gap: 14px;
}

.drawer-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}

.drawer-head h2 {
  font-size: clamp(1.3rem, 4vw, 2rem);
}

.data-section {
  padding: 0;
  overflow: hidden;
}

.data-section > .panel-head {
  padding: 22px 24px 0;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 18px;
  margin-bottom: 18px;
}

.panel-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

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

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

th,
td {
  padding: 10px;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

td input,
td select,
td textarea {
  min-width: 130px;
  font-size: 0.94rem;
}

@media (max-width: 1180px) {
  .workspace-grid,
  .module-grid,
  .module-grid.lower,
  .product-hero {
    grid-template-columns: 1fr;
  }
}

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

  .signal-grid,
  .people-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .supplier-row {
    grid-template-columns: 1fr auto;
  }

  .quick-create {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .app-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px;
  }

  .app-shell {
    width: min(100% - 22px, 1480px);
  }

  .signal-grid,
  .people-grid {
    grid-template-columns: 1fr;
  }

  .kanban-board {
    grid-template-columns: repeat(3, minmax(250px, 82vw));
  }

  .supplier-row {
    grid-template-columns: 1fr;
  }

  .summary-card {
    min-height: 0;
    flex-direction: column;
  }

  .coverage-bars div {
    grid-template-columns: 1fr 48px;
  }

  .coverage-bars i {
    grid-column: 1 / -1;
  }
}
