.logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 900;
  background: linear-gradient(160deg, #ff6b5f 0%, var(--accent) 70%, #bd2f24 100%);
}

.sidebar-title {
  margin: 10px 0 16px;
  color: var(--muted);
  font-weight: 700;
}

.phase-nav {
  display: grid;
  gap: 8px;
}

.phase-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--muted);
  background: rgba(17, 24, 39, 0.7);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.topbar h1 {
  margin: 0;
  font-size: 28px;
}

.topbar p {
  margin: 4px 0 0;
  color: var(--muted);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.metric {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
}

.metric h3 {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.metric p {
  margin: 6px 0 0;
  font-size: 22px;
  font-weight: 800;
}

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

.panel h2,
.panel h3 {
  margin: 0;
}

.panel h3 {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

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

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

.inline-form.compact input,
.inline-form.compact select {
  min-width: 130px;
}

input,
select,
button {
  width: auto;
  max-width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0d1627;
  color: var(--text);
  padding: 8px 10px;
  font: inherit;
}

button {
  cursor: pointer;
  border-color: #8a2f26;
  background: linear-gradient(180deg, #ff6b5f, var(--accent));
  font-weight: 700;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

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

th {
  color: var(--muted);
}

.status {
  display: inline-block;
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 2px 8px;
  font-size: 12px;
}

.status.open {
  color: #fbbf24;
}

.status.in_progress {
  color: #60a5fa;
}

.status.waiting {
  color: #f59e0b;
}

.status.closed,
.status.done {
  color: #4ade80;
}

@media (max-width: 1180px) {
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .panel-head {
    flex-direction: column;
    align-items: stretch;
  }

  .inline-form {
    width: 100%;
  }

  .inline-form input,
  .inline-form select,
  .inline-form button {
    width: 100%;
  }
}

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

  .topbar h1 {
    font-size: 24px;
  }

  .main-shell {
    padding: 12px;
  }

  th,
  td {
    font-size: 12px;
    white-space: nowrap;
  }
}
