.card {
  background: var(--panel);
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 14px;
  display: grid;
  gap: 8px;
  animation: rise 0.35s ease;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-1px);
  border-color: rgba(163, 107, 255, 0.35);
}

@media (prefers-color-scheme: light) {
  .card:hover {
    border-color: rgba(255, 0, 110, 0.6);
    box-shadow: 0 0 16px rgba(255, 0, 110, 0.2);
  }
}

.card-title {
  font-weight: 600;
}

.card-title.priority-high {
  color: #ff9cf5;
}

.card-title.priority-medium {
  color: #c3a5ff;
}

.card-title.priority-low {
  color: #9aa5ff;
}

@media (prefers-color-scheme: light) {
  .card-title.priority-high {
    color: #ff006e;
    text-shadow: 0 0 10px rgba(255, 0, 110, 0.4);
  }

  .card-title.priority-medium {
    color: #00d9ff;
    text-shadow: 0 0 10px rgba(0, 217, 255, 0.3);
  }

  .card-title.priority-low {
    color: #7928ca;
    text-shadow: 0 0 10px rgba(121, 40, 202, 0.2);
  }
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}

@media (max-width: 480px) {
  .card-actions {
    flex-direction: row;
    gap: 4px;
    align-items: stretch;
  }

  .card-actions .pill-btn,
  .card-actions .muted-btn {
    min-width: auto;
    padding: 6px 8px;
    font-size: 0.75rem;
    white-space: nowrap;
  }
}

.card-complete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.card-complete-btn .btn-text {
  display: inline;
}

.card-complete-btn .btn-icon {
  display: none;
}

@media (max-width: 360px) {
  .card-complete-btn {
    width: 42px;
    padding: 6px !important;
    flex: 0 !important;
    gap: 0;
  }

  .card-complete-btn .btn-text {
    display: none;
  }

  .card-complete-btn .btn-icon {
    display: block;
    width: 18px;
    height: 18px;
    margin: 0;
  }
}

/* Light mode overrides */
html.light-mode {
  .card:hover {
    border-color: rgba(255, 0, 128, 1);
    box-shadow: 0 0 41px rgba(255, 0, 128, 0.5);
  }

  .card-title.priority-high {
    color: #ff0080;
    text-shadow: 0 0 27px rgba(255, 0, 128, 1);
  }

  .card-title.priority-medium {
    color: #00e5ff;
    text-shadow: 0 0 27px rgba(0, 229, 255, 0.85);
  }

  .card-title.priority-low {
    color: #7928ca;
    text-shadow: 0 0 20px rgba(121, 40, 202, 0.59);
  }
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.85rem;
}


.empty {
  text-align: center;
  color: var(--muted);
  padding: 28px 10px;
  border: 1px dashed var(--border);
  border-radius: 14px;
}
