:root {
  color-scheme: dark;
  --blue: #3260ec;
  --blue-light: #4f8fff;
  --muted: rgba(255, 255, 255, 0.64);
  --card: rgba(255, 255, 255, 0.055);
  --border: rgba(79, 143, 255, 0.32);
  --bg: #05070d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: white;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(ellipse 75% 55% at 8% 0%, rgba(50, 96, 236, 0.28), transparent 70%),
    radial-gradient(ellipse 50% 40% at 92% 24%, rgba(79, 70, 229, 0.16), transparent 68%),
    var(--bg);
}

a {
  color: inherit;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 80px;
}

.brand {
  font-weight: 900;
  letter-spacing: 0.12em;
}

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

.card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 18px 80px rgba(0, 0, 0, 0.25);
}

.login-card {
  width: min(460px, calc(100% - 32px));
  margin: 12vh auto;
  padding: 32px;
}

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

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

.stat {
  padding: 20px;
}

.stat strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(1.7rem, 4vw, 2.8rem);
}

.panel {
  grid-column: span 12;
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.035);
  font-weight: 700;
}

.button-primary,
.pill.active {
  color: white;
  border-color: rgba(79, 143, 255, 0.58);
  background: rgba(50, 96, 236, 0.22);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 16px 22px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  vertical-align: top;
}

th {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.status {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.08);
}

.status-new {
  color: #9ec1ff;
  background: rgba(50, 96, 236, 0.18);
}

.status-in_progress {
  color: #ffe09e;
  background: rgba(236, 174, 50, 0.15);
}

.status-done {
  color: #9effbf;
  background: rgba(50, 236, 122, 0.14);
}

.status-archived {
  color: rgba(255, 255, 255, 0.5);
}

.form-stack {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.92rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: white;
  padding: 14px 16px;
  outline: none;
}

.detail {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1fr);
  gap: 18px;
}

.detail .card {
  padding: 24px;
}

.message-box {
  white-space: pre-wrap;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.78);
}

.error {
  color: #ffb4b4;
  background: rgba(220, 50, 50, 0.1);
  border: 1px solid rgba(220, 50, 50, 0.28);
  padding: 12px;
  border-radius: 12px;
}

@media (max-width: 760px) {
  .stats,
  .detail {
    grid-template-columns: 1fr;
  }

  .panel {
    overflow-x: auto;
  }

  th,
  td {
    padding: 14px;
  }
}
