:root {
  --brand: #1f559f;
  --brand-strong: #163f76;
  --brand-accent: #4cb1ff;
  --brand-soft: #e8f4ff;
  --ink: #172033;
  --muted: #667085;
  --line: #c9ddf2;
  --line-subtle: #e3effa;
  --field-line: #b6d1eb;
  --bg: #f4f8fd;
  --panel: #fff;
  --danger: #b42318;
  --success: #067647;
  --shadow: 0 8px 30px rgba(23, 32, 51, 0.08);
  font-family: Tahoma, Verdana, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}
a {
  color: var(--brand);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
.shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: 100vh;
}
aside {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  background: var(--brand);
  color: #fff;
  display: flex;
  flex-direction: column;
}
.brand,
.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}
.brand img,
.login-brand img {
  display: block;
  width: 72px;
  height: 46px;
  border-radius: 7px;
  object-fit: cover;
  object-position: center;
}
.brand span,
.login-brand span {
  font-weight: 700;
}
.brand small,
.login-brand small {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 500;
  opacity: 0.72;
}
aside nav {
  display: grid;
  gap: 4px;
  margin-top: 32px;
}
aside nav a {
  padding: 10px 12px;
  border-radius: 7px;
  color: #dce8f8;
  font-weight: 600;
}
aside nav a:hover,
aside nav a.active {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  text-decoration: none;
}
.account {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  padding: 18px 8px 0;
}
.account small {
  display: block;
  margin: 3px 0 12px;
  text-transform: capitalize;
  opacity: 0.72;
}
.account button {
  width: 100%;
  background: transparent;
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}
main {
  min-width: 0;
  padding: 28px 34px 60px;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
header p {
  margin: 0 0 3px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
h1 {
  margin: 0;
  font-size: 30px;
  letter-spacing: -0.02em;
}
h2 {
  margin: 0 0 16px;
  font-size: 19px;
}
h3 {
  margin: 20px 0 10px;
  font-size: 14px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.panel {
  margin-bottom: 20px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 14px;
}
.panel-head h2 {
  margin: 0;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.metrics article {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--brand-accent);
  border-radius: 9px;
  background: #fff;
  box-shadow: var(--shadow);
}
.metrics span,
.metrics small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.metrics strong {
  display: block;
  margin: 7px 0 4px;
  font-size: 25px;
  letter-spacing: -0.03em;
}
.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px;
  margin-bottom: 20px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand-strong), var(--brand));
  color: #fff;
  box-shadow: var(--shadow);
}
.hero h2 {
  margin: 7px 0 4px;
  font-size: 26px;
}
.hero p {
  margin: 0;
  opacity: 0.8;
}
.milestones {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
  background: var(--line);
}
.milestones div {
  padding: 14px;
  background: #fff;
}
.milestones span,
.milestones strong {
  display: block;
}
.milestones span {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
}
.milestones strong {
  font-size: 13px;
}
.table {
  max-width: 100%;
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th {
  padding: 11px 12px;
  border-bottom: 2px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
td {
  padding: 12px;
  border-bottom: 1px solid var(--line-subtle);
  vertical-align: top;
}
tbody tr:hover {
  background: var(--brand-soft);
}
tr[data-row-href] {
  cursor: pointer;
}
tr[data-row-href]:focus-visible {
  outline: 2px solid var(--brand-accent);
  outline-offset: -2px;
  background: var(--brand-soft);
}
#bulk-jobs-form th:first-child,
#bulk-jobs-form td:first-child {
  width: 46px;
  text-align: center;
}
#bulk-jobs-form input[type="checkbox"] {
  margin: 0;
}
#bulk-jobs-form .actions {
  margin-top: 16px;
}
td small,
td strong {
  display: block;
}
td small {
  margin-top: 3px;
  color: var(--muted);
}
.mono {
  font-family: "SFMono-Regular", Consolas, monospace;
}
.pill {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 11px;
  font-weight: 800;
  text-transform: capitalize;
  white-space: nowrap;
}
.pill.paid,
.pill.verified,
.pill.completed,
.pill.won {
  background: #dcfae6;
  color: #067647;
}
.pill.cancelled,
.pill.urgent,
.pill.overdue,
.pill.lost,
.pill.withdrawn {
  background: #fee4e2;
  color: #b42318;
}
.pill.high,
.pill.needs_review,
.pill.part_paid {
  background: #fef0c7;
  color: #93370d;
}
.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.button:hover,
button:hover {
  border-color: var(--brand);
  color: var(--brand);
  text-decoration: none;
}
.primary {
  border-color: var(--brand) !important;
  background: var(--brand) !important;
  color: #fff !important;
}
.actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.filters {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}
.filters label {
  min-width: 130px;
  flex: 1;
}
.filters label:first-child {
  min-width: 240px;
  flex: 2;
}
.filters > a {
  padding: 10px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}
.grid.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.span {
  grid-column: 1/-1;
}
.checklist {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.checklist > label {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fafc;
}
.checklist > label.span {
  display: block;
  background: transparent;
  border: 0;
  padding: 0;
}
label {
  display: block;
  color: #344054;
  font-size: 12px;
  font-weight: 700;
}
label[hidden] { display: none; }
input:not([type="checkbox"]),
select,
textarea {
  display: block;
  width: 100%;
  min-height: 42px;
  margin-top: 6px;
  padding: 9px 11px;
  border: 1px solid var(--field-line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}
input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin: 0 9px 0 0;
  accent-color: var(--brand);
}
textarea {
  min-height: 110px;
  resize: vertical;
}
input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(76, 177, 255, 0.22);
  border-color: var(--brand);
}
dl {
  margin: 0;
}
dl div {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(0, 1.2fr);
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-subtle);
}
dt {
  color: var(--muted);
}
dd {
  margin: 0;
  font-weight: 650;
}
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
}
.timeline li {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-subtle);
}
.timeline span {
  color: var(--muted);
  font-size: 12px;
}
.timeline p {
  margin: 4px 0;
  color: #475467;
}
.empty {
  padding: 24px;
  color: var(--muted);
  text-align: center;
}
.error,
.success {
  margin-bottom: 18px;
  padding: 13px 15px;
  border-radius: 7px;
}
.error {
  border: 1px solid #fecdca;
  background: #fef3f2;
  color: var(--danger);
}
.success {
  border: 1px solid #abefc6;
  background: #ecfdf3;
  color: var(--success);
}
.stack {
  display: grid;
  gap: 14px;
}
.login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  background: linear-gradient(135deg, var(--brand-strong), #102a4d);
}
.login-shell main {
  width: min(430px, calc(100% - 30px));
  padding: 0;
}
.login {
  padding: 34px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}
.login-brand {
  margin-bottom: 30px;
  color: var(--brand-strong);
}
.login h1 {
  margin-bottom: 22px;
}
.public-shell {
  min-height: 100vh;
  padding: 32px 16px;
  background: linear-gradient(135deg, var(--brand-strong), #102a4d);
}
.public-shell main {
  width: min(900px, 100%);
  margin: 0 auto;
  padding: 0;
}
.public-shell .login {
  width: 100%;
}
.client-project-row {
  display: block;
  padding: 14px;
  margin: 6px 0;
  border: 1px solid #c9d9eb;
  border-radius: 8px;
  text-decoration: none;
}
.client-project-row:hover, .client-project-row:focus-visible { background: #eef6ff; }
@media (max-width: 1050px) {
  .shell {
    grid-template-columns: 210px minmax(0, 1fr);
  }
  main {
    padding: 24px;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .milestones {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .grid.compact,
  .checklist {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .shell {
    display: block;
  }
  aside {
    position: relative;
    width: 100%;
    height: auto;
    padding: 14px;
  }
  aside nav {
    display: flex;
    overflow: auto;
    margin-top: 14px;
  }
  .account {
    display: none;
  }
  main {
    padding: 18px 14px 50px;
  }
  header,
  .hero {
    align-items: flex-start;
    flex-direction: column;
  }
  .metrics,
  .two,
  .grid,
  .grid.compact,
  .checklist {
    grid-template-columns: 1fr;
  }
  .milestones {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .span {
    grid-column: auto;
  }
  .filters {
    align-items: stretch;
    flex-direction: column;
  }
  .filters label,
  .filters label:first-child {
    width: 100%;
  }
  h1 {
    font-size: 25px;
  }
  .public-shell {
    padding: 0;
  }
  .public-shell .login {
    min-height: 100vh;
    padding: 24px 18px 40px;
    border-radius: 0;
  }
}
