:root {
  color-scheme: light;
  --ink: #172026;
  --muted: #61707a;
  --line: #d8dee4;
  --panel: #ffffff;
  --bg: #f4f6f7;
  --accent: #176b87;
  --accent-strong: #0f4c5c;
  --ok: #2f7d32;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

a {
  color: inherit;
}

.topbar {
  min-height: 72px;
  padding: 14px 28px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: sticky;
  top: 0;
  z-index: 5;
}

.brand {
  font-size: 20px;
  font-weight: 750;
}

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

nav {
  display: flex;
  gap: 6px;
}

nav a {
  text-decoration: none;
  padding: 9px 12px;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 650;
}

nav a.active,
nav a:hover {
  color: var(--accent-strong);
  background: #eaf3f5;
}

main {
  width: min(1260px, calc(100vw - 32px));
  margin: 24px auto 48px;
}

.toolbar {
  margin-bottom: 16px;
}

.workflow-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  margin-bottom: 14px;
  padding: 14px 22px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  text-decoration: none;
}

.workflow-cta:hover {
  background: var(--accent-strong);
}

.search {
  display: flex;
  gap: 10px;
}

input,
textarea,
select {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

textarea {
  resize: vertical;
}

button {
  border: 0;
  border-radius: 6px;
  padding: 10px 14px;
  background: var(--accent);
  color: #fff;
  font-weight: 750;
  cursor: pointer;
  white-space: nowrap;
}

button:hover {
  background: var(--accent-strong);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.danger-button {
  background: #b42318;
}

.danger-button:hover {
  background: #8f1d14;
}

.danger-panel {
  border-color: #e4b3ae;
}

.button-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-weight: 750;
  text-decoration: none;
}

.button-link:hover {
  background: var(--accent-strong);
}

.error {
  padding: 10px 12px;
  border: 1px solid #d47c7c;
  border-radius: 6px;
  background: #fff2f2;
  color: #8a1f1f;
  font-weight: 700;
}

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

.inline-form input {
  min-width: 180px;
}

.client-card small,
td span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

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

.metrics div,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metrics div {
  padding: 18px;
}

.metrics strong {
  display: block;
  font-size: 28px;
}

.metrics span,
.muted,
.job-title p,
.activity span,
.client-card span,
.files-list span {
  color: var(--muted);
}

.panel {
  padding: 18px;
  margin-bottom: 16px;
}

.panel h1,
.panel h2 {
  margin: 0 0 14px;
}

.list-head,
.job-row {
  display: grid;
  grid-template-columns: 2fr 1.2fr .8fr 1fr;
  gap: 12px;
  align-items: center;
}

.list-head {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0 10px 10px;
  border-bottom: 1px solid var(--line);
}

.job-row {
  min-height: 64px;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.job-row:last-child {
  border-bottom: 0;
}

.job-row:hover {
  background: #f8fafb;
}

.job-row strong,
.job-row span {
  display: block;
}

.job-row span {
  color: var(--muted);
  margin-top: 3px;
}

.job-title,
.client-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.job-title h1,
.client-hero h1 {
  margin: 6px 0 4px;
  font-size: 34px;
}

.back {
  color: var(--muted);
  text-decoration: none;
  font-weight: 650;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 999px;
  background: #e7f4ec;
  color: var(--ok);
  font-weight: 800;
}

.grid.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.details {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px 14px;
}

dt {
  color: var(--muted);
  font-weight: 750;
}

dd {
  margin: 0;
}

label {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
  font-weight: 750;
}

label input,
label textarea,
label select {
  margin-top: 5px;
  color: var(--ink);
  font-weight: 450;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
}

.check input {
  width: auto;
  margin: 0;
}

.split {
  display: grid;
  grid-template-columns: 1fr 90px 130px;
  gap: 10px;
}

.split.two {
  grid-template-columns: 1fr 1fr;
}

.narrow {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}

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

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.file-picks {
  display: grid;
  gap: 8px;
  max-height: 230px;
  overflow: auto;
  border: 1px solid var(--line);
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 12px;
}

.file-picks label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  color: var(--ink);
  font-weight: 500;
}

.file-picks input {
  width: auto;
  margin-top: 3px;
}

.shares {
  padding-left: 20px;
}

.activity {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}

.activity:first-of-type {
  border-top: 0;
}

.activity div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.activity p {
  max-width: 920px;
  margin: 8px 0 0;
  color: #2d3940;
  line-height: 1.45;
}

.client-card {
  display: block;
  text-decoration: none;
  border-top: 1px solid var(--line);
  padding: 14px 0;
}

.client-card strong,
.client-card span {
  display: block;
}

.files-list {
  padding-left: 20px;
}

.files-list li {
  margin: 9px 0;
}

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

@media (max-width: 760px) {
  .topbar,
  .job-title,
  .client-hero,
  .search {
    align-items: stretch;
    flex-direction: column;
  }

  nav {
    overflow-x: auto;
  }

  .metrics,
  .grid.two,
  .list-head,
  .job-row,
  .split {
    grid-template-columns: 1fr;
  }

  .list-head {
    display: none;
  }

  .job-title h1,
  .client-hero h1 {
    font-size: 26px;
  }

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