:root {
  --yellow: #e8d631;
  --blue: #2596be;
  --ink: #1c2a33;
  --muted: #667781;
  --line: #dbe4e8;
  --surface: #ffffff;
  --background: #f5f8f9;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font-family: Arial, sans-serif;
}

a { color: var(--blue); }
h1, h2, p { margin-top: 0; }

.topbar {
  align-items: center;
  background: var(--ink);
  display: flex;
  justify-content: space-between;
  padding: 1rem 4vw;
}

.topbar a,
.link-button {
  color: white;
  text-decoration: none;
}

.topbar nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.topbar form { margin: 0; }

.link-button {
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.brand { font-weight: 700; }

.container {
  margin: 0 auto;
  max-width: 1280px;
  padding: 2.5rem 4vw;
}

.page-heading,
.section-title,
.task-row,
.correction-item {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.eyebrow {
  color: var(--blue);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.button,
button {
  background: var(--yellow);
  border: 0;
  border-radius: .4rem;
  color: var(--ink);
  cursor: pointer;
  display: inline-block;
  font-weight: 700;
  padding: .75rem 1rem;
  text-decoration: none;
}

.button.small { margin-top: .75rem; padding: .5rem .75rem; }

.metrics,
.cards,
.two-columns {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0;
}

.metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cards { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.metrics article,
.project-card,
.panel,
.form-card,
.auth-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: .75rem;
  padding: 1.25rem;
}

.metrics strong {
  display: block;
  font-size: 2rem;
  margin-top: .3rem;
}

.project-card {
  color: var(--ink);
  text-decoration: none;
  transition: transform .2s ease;
}

.project-card:hover { transform: translateY(-3px); }
.project-code { color: var(--blue); font-weight: 700; }

.task-row,
.correction-row,
.correction-item {
  border-bottom: 1px solid var(--line);
  padding: 1rem 0;
}

.task-row:last-child,
.correction-row:last-child,
.correction-item:last-child {
  border-bottom: 0;
}

.task-row p,
.correction-row p,
.correction-item p {
  color: var(--muted);
  margin: .3rem 0;
}

.badge {
  background: #e9f4f8;
  border-radius: 999px;
  color: var(--blue);
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  padding: .35rem .65rem;
}

.gantt-date-row {
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.gantt-row {
  align-items: center;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(140px, 30%) 1fr;
  margin-bottom: .75rem;
}

.gantt-label {
  font-size: .9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gantt-track {
  background: #edf2f4;
  border-radius: 999px;
  height: 1.75rem;
  overflow: hidden;
  position: relative;
}

.gantt-bar {
  align-items: center;
  background: var(--blue);
  border-radius: 999px;
  color: white;
  display: flex;
  font-size: .7rem;
  height: 100%;
  justify-content: center;
  min-width: 2.5rem;
  position: absolute;
}

.priority-high,
.priority-urgent { background: #d8514b; }

.priority-low { background: #53a680; }

.form-card,
.auth-card {
  margin-top: 1.5rem;
  max-width: 720px;
}

.auth-card { margin: 8vh auto; max-width: 430px; }

.form-card p { display: grid; gap: .4rem; }

input,
select,
textarea {
  border: 1px solid #b9c7cd;
  border-radius: .35rem;
  font: inherit;
  padding: .65rem;
  width: 100%;
}

input[type="checkbox"] { width: auto; }

.message {
  border-radius: .5rem;
  margin-bottom: 1rem;
  padding: .9rem 1rem;
}

.message.success { background: #dff4e8; }
.message.error { background: #fde4e2; }

.filter-form {
  align-items: end;
  display: flex;
  gap: .75rem;
  margin: 1rem 0;
}

.filter-form select { max-width: 220px; }

@media (max-width: 720px) {
  .topbar,
  .page-heading,
  .two-columns,
  .metrics,
  .correction-item {
    display: block;
  }

  .topbar nav { margin-top: 1rem; }

  .two-columns > * { margin-bottom: 1rem; }

  .metrics article { margin-bottom: 1rem; }

  .gantt-row { grid-template-columns: 1fr; gap: .35rem; }

  .filter-form { align-items: stretch; flex-direction: column; }
  .filter-form select { max-width: none; }
}

.project-items {
  margin-top: 1.5rem;
}

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

.itemized-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
}

.itemized-table th,
.itemized-table td {
  padding: 1rem;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid #dce4e8;
}

.itemized-table th {
  color: #587080;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.itemized-table tbody tr:last-child td {
  border-bottom: 0;
}

.itemized-subtitle,
.muted {
  display: block;
  margin-top: 0.25rem;
  color: #637789;
  font-size: 0.9rem;
}