/* Priority Matrix by SWC */
/* Font and base layout */
:root {
  --bg: radial-gradient(
      1200px 600px at 20% 10%,
      rgba(90, 125, 255, 0.25),
      transparent
    ),
    radial-gradient(
      1000px 500px at 80% 20%,
      rgba(255, 90, 150, 0.2),
      transparent
    ),
    radial-gradient(
      1400px 700px at 50% 90%,
      rgba(0, 200, 255, 0.18),
      transparent
    ),
    #0b0f1a;
  --panel: rgba(16, 22, 38, 0.7);
  --card: rgba(18, 24, 42, 0.88);
  --outline: rgba(140, 190, 255, 0.45);
  --brand: #8bc6ff;
  --primary: #a8d1ff;
  --danger: #ff99a3;
  --text: #e9eefc;
  --muted: #9fb2d0;
  --glow: 0 0 1px rgba(168, 209, 255, 0.8), 0 0 16px rgba(90, 180, 255, 0.25),
    inset 0 0 0 1px rgba(168, 209, 255, 0.15);
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial,
    sans-serif;
  background: var(--bg);
  color: var(--text);
}

.app {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-radius: 20px;
  background: var(--panel);
  box-shadow: var(--glow);
  backdrop-filter: blur(8px);
}
.app-header h1 {
  font-weight: 800;
  letter-spacing: 0.3px;
  margin: 0;
}
.app-header .brand {
  font-weight: 600;
  color: var(--brand);
  text-shadow: 0 0 12px rgba(120, 180, 255, 0.35);
}
.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  border: 1px solid var(--outline);
  background: linear-gradient(
    180deg,
    rgba(30, 40, 70, 0.35),
    rgba(20, 26, 44, 0.7)
  );
  color: var(--text);
  padding: 10px 14px;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: var(--glow);
  transition: transform 0.12s ease, box-shadow 0.12s ease,
    border-color 0.12s ease;
}
.btn.primary {
  border-color: rgba(150, 220, 255, 0.7);
}
.btn.danger {
  border-color: rgba(255, 150, 170, 0.7);
  color: #ffd7db;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 2px rgba(168, 209, 255, 0.25), var(--glow);
}

.legend {
  margin: 18px 0;
}
.legend-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px;
}
.legend .dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: 0 0 8px currentColor, inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  margin-right: 8px;
}
.dot.urgent {
  color: #ff6b88;
}
.dot.important {
  color: #85f3c5;
}
.dot.not-urgent {
  color: #a6b8ff;
}
.dot.not-important {
  color: #ffd18b;
}

.matrix {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 18px;
  min-height: 62vh;
}
.quadrant {
  background: var(--card);
  border: 1px solid var(--outline);
  border-radius: 20px;
  padding: 14px;
  box-shadow: var(--glow);
  display: flex;
  flex-direction: column;
}
.quad-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 6px 10px 6px;
  border-bottom: 1px dashed rgba(168, 209, 255, 0.25);
}
.quad-header h2 {
  margin: 0;
  font-size: 22px;
}
.quad-header p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.quad-header .count {
  opacity: 0.9;
  font-weight: 700;
  border: 1px solid var(--outline);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
}

.task-list {
  list-style: none;
  margin: 0;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
}

.task {
  background: linear-gradient(
    180deg,
    rgba(22, 30, 52, 0.85),
    rgba(12, 18, 34, 0.92)
  );
  border: 1px solid rgba(150, 200, 255, 0.25);
  border-radius: 16px;
  box-shadow: var(--glow);
  padding: 10px;
  transition: transform 0.12s ease, border-color 0.12s ease,
    box-shadow 0.12s ease;
}
.task[draggable="true"] {
  cursor: grab;
}
.task:active {
  cursor: grabbing;
}
.task.dragging {
  opacity: 0.85;
  transform: scale(0.995);
}
.task.over {
  outline: 2px dashed rgba(168, 209, 255, 0.5);
}

.task-main {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.task .tick {
  margin-top: 2px;
  width: 18px;
  height: 18px;
}
.task .text {
  flex: 1 1 auto;
}
.task .title {
  font-weight: 700;
  letter-spacing: 0.2px;
}
.task .meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.icon-btn {
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  opacity: 0.9;
}
.icon-btn:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.task.done {
  opacity: 0.7;
  filter: saturate(0.8);
}
.task.done .title {
  text-decoration: line-through;
}

.app-footer {
  margin-top: 18px;
  display: flex;
  justify-content: center;
}
.tips {
  font-size: 13px;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--outline);
  padding: 10px 14px;
  border-radius: 14px;
  box-shadow: var(--glow);
}
.tips ul {
  margin: 4px 0 0 16px;
}

dialog::backdrop {
  background: rgba(5, 8, 16, 0.55);
}
dialog {
  border: 1px solid var(--outline);
  background: var(--card);
  color: var(--text);
  border-radius: 16px;
  box-shadow: var(--glow);
  padding: 0;
}
.task-form {
  padding: 16px;
  min-width: 340px;
}
.task-form h3 {
  margin: 0 0 8px 0;
}
.field {
  display: flex;
  flex-direction: column;
  margin: 8px 0;
}
.field span {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}
.field input,
.field textarea,
.field select {
  background: #0e1425;
  border: 1px solid rgba(150, 200, 255, 0.25);
  border-radius: 10px;
  padding: 10px;
  color: var(--text);
  box-shadow: var(--glow);
}
.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
menu {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin: 10px 0 0 0;
  padding: 0;
}
@media (max-width: 980px) {
  .matrix {
    grid-template-columns: 1fr;
  }
  .legend-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }
}
@media print {
  body {
    background: white;
    color: black;
  }
  .app-header,
  .actions,
  .legend,
  .app-footer {
    display: none;
  }
  .quadrant {
    break-inside: avoid;
  }
}
