:root {
  --bg-1: #1e3c72;
  --bg-2: #2a5298;
  --card: rgba(255, 255, 255, 0.12);
  --muted: #d1d5db;
  --text: #ffffff;
  --accent: #f59e0b;
  --danger: #ef4444;
  --ok: #10b981;
}
* {
  box-sizing: border-box;
}
body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px;
  color: var(--text);
  background: linear-gradient(135deg, var(--bg-1), var(--bg-2));
  border-radius: 0;
  box-shadow: none;
}
h1 {
  margin: 12px 0;
  font-size: 1.6rem;
  letter-spacing: 0.5px;
  text-align: center;
}
.container {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.panel {
  flex: 1 1 480px;
  background: var(--card);
  border-radius: 12px;
  padding: 18px;
  backdrop-filter: blur(10px);
}
.row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
input,
select,
button {
  border: none;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
}
input,
select {
  background: rgba(255, 255, 255, 0.95);
  color: #222;
}
button {
  background: #ff6b6b;
  color: #fff;
  cursor: pointer;
  transition: 0.2s;
}
button:hover {
  background: #ff8686;
}

/* Add task input row */
.add-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr auto;
  gap: 8px;
}
@media (max-width: 900px) {
  .add-grid {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: auto;
  }
  .add-grid button {
    grid-column: 1 / -1;
  }
}
@media (max-width: 600px) {
  .add-grid {
    grid-template-columns: 1fr;
  }
  .add-grid input,
  .add-grid select,
  .add-grid button {
    width: 100%;
  }
}

.filters {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 10px;
}
.chip {
  background: #6b7280;
}
.chip.active {
  background: var(--accent);
  color: #222;
}
.muted {
  color: var(--muted);
  font-size: 0.9rem;
}
ul {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  max-height: 460px;
  overflow: auto;
}
li.task {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.15s;
}
li.task:hover {
  transform: translateX(3px);
}
.task-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.title {
  font-weight: 600;
  word-break: break-word;
}
.badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.85rem;
}
.badge {
  padding: 4px 8px;
  border-radius: 999px;
  color: #111;
  background: #e5e7eb;
}
.badge.low {
  background: #e5f7ed;
}
.badge.medium {
  background: #fff7e6;
}
.badge.high {
  background: #fee2e2;
}
.badge.overdue {
  background: #fecaca;
  color: #7f1d1d;
  font-weight: 600;
}
.meta {
  font-size: 0.85rem;
  color: #e5e7eb;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.btn-small {
  padding: 6px 10px;
  font-size: 0.85rem;
  border-radius: 8px;
}
.btn-grey {
  background: #6b7280;
}
.btn-ok {
  background: var(--ok);
}
.btn-danger {
  background: var(--danger);
}
.completed .title {
  text-decoration: line-through;
  color: #cbd5e1;
}
.progress-wrap {
  margin-top: 10px;
}
.progress-bar {
  height: 10px;
  width: 100%;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #34d399, #fbbf24);
  transition: width 0.3s;
}
.right-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.empty {
  padding: 18px;
  text-align: center;
  opacity: 0.8;
}
.search-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-left: auto;
}
.search-row input,
.search-row select {
  flex: 1 1 120px;
}
@media (max-width: 600px) {
  .search-row {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  .search-row input,
  .search-row select {
    width: 100%;
  }
}

.snack {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: #111827;
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: 0.25s;
}
.snack.show {
  opacity: 1;
}
