:root {
  --page: #f8f6f1;
  --panel: #ffffff;
  --ink: #0f1b2d;
  --muted: #8fa0b4;
  --line: #dfe5eb;
  --line-strong: #cbd3dc;
  --green: #0e5332;
  --green-soft: #e8f3ed;
  --amber: #b7791f;
  --amber-soft: #fff3dd;
  --blue: #245f96;
  --blue-soft: #e7f0f8;
  --red: #b83d32;
  --red-soft: #fee5e2;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

a {
  color: var(--green);
  text-decoration: none;
}

.app-shell {
  width: min(100% - 32px, 680px);
  margin: 24px auto 48px;
}

.brand-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #eee7dc;
  padding-bottom: 16px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
  color: var(--ink);
}

.brand-logo {
  display: grid;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 10px;
  background: var(--green);
  color: #fff;
}

.brand-logo svg,
.stat-icon svg,
.icon-btn svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-logo svg {
  fill: none;
  stroke-width: 1.8;
}

.brand-lockup strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.2;
}

.brand-lockup small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.home-btn,
.ghost-btn,
.small-btn {
  min-height: 31px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #5d6e81;
  cursor: pointer;
}

.home-btn {
  min-width: 60px;
  padding: 0 12px;
  font-size: 13px;
}

main {
  padding-top: 24px;
}

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

.login-panel,
.dashboard-panel {
  padding: 20px;
}

.section-title-row,
.dashboard-head,
.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.eyebrow {
  margin: 0 0 12px;
  color: #516273;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  color: var(--ink);
  line-height: 1.1;
}

h1 {
  font-size: 28px;
}

h2 {
  font-size: 18px;
}

.status-chip {
  align-self: center;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 12px;
  margin-top: 22px;
}

.field {
  display: grid;
  gap: 7px;
}

.field span {
  font-size: 14px;
  font-weight: 700;
}

.field input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 8px 12px;
  outline: none;
}

.field input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(14, 83, 50, .1);
}

.field small {
  display: none;
  color: var(--red);
  font-size: 12px;
}

.field.invalid small {
  display: block;
}

.login-options {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #516273;
  font-size: 13px;
}

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

.checkline input {
  accent-color: var(--green);
}

.submit-btn {
  grid-column: 1 / -1;
  min-height: 43px;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
}

.submit-btn:hover,
.ghost-btn:hover,
.small-btn:hover,
.home-btn:hover,
.icon-btn:hover {
  filter: brightness(.96);
}

.helper-text {
  margin: 16px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.dashboard-view {
  display: grid;
  gap: 16px;
}

.dashboard-head {
  align-items: center;
}

.ghost-btn,
.small-btn {
  padding: 0 14px;
  font-size: 13px;
  font-weight: 700;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.stat-icon {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--green);
}

.stat-icon.amber {
  background: var(--amber-soft);
  color: var(--amber);
}

.stat-icon.blue {
  background: var(--blue-soft);
  color: var(--blue);
}

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

.stat-card strong {
  font-size: 24px;
  line-height: 1;
}

.stat-card span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.tab-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 6px;
}

.tab-btn {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #607083;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
}

.tab-btn.active {
  background: var(--green);
  color: #fff;
}

.panel-heading {
  align-items: center;
  margin-bottom: 16px;
}

.work-list {
  display: grid;
  gap: 10px;
}

.work-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 34px;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
}

.work-item strong,
.work-item span {
  display: block;
  min-width: 0;
}

.work-item strong {
  overflow-wrap: anywhere;
  font-size: 14px;
}

.work-item div > span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.pill {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.pill.progress {
  background: var(--green-soft);
  color: var(--green);
}

.pill.new {
  background: var(--blue-soft);
  color: var(--blue);
}

.pill.scheduled {
  background: var(--amber-soft);
  color: var(--amber);
}

.pill.urgent {
  background: var(--red-soft);
  color: var(--red);
}

.icon-btn {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--green);
  cursor: pointer;
}

.hidden {
  display: none;
}

@media (max-width: 620px) {
  .app-shell {
    width: min(100% - 20px, 680px);
    margin-top: 14px;
  }

  .brand-bar,
  .section-title-row,
  .dashboard-head,
  .panel-heading {
    align-items: stretch;
  }

  .form-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .login-options,
  .dashboard-head {
    flex-direction: column;
  }

  .status-chip {
    align-self: flex-start;
  }

  .work-item {
    grid-template-columns: minmax(0, 1fr) 34px;
  }

  .work-item .pill {
    grid-column: 1 / -1;
    grid-row: 2;
    width: fit-content;
  }

  .work-item .icon-btn {
    grid-column: 2;
    grid-row: 1;
  }
}

@media (max-width: 420px) {
  .brand-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .home-btn {
    align-self: flex-end;
  }

  .login-panel,
  .dashboard-panel {
    padding: 16px;
  }

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