*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #0f172a;
  color: #e5e7eb;
}

.app-header {
  padding: 1.5rem 1rem;
  text-align: center;
  background: radial-gradient(circle at top, #1d4ed8, #020617);
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
}

.app-header h1 {
  margin: 0;
  font-size: 2rem;
}

.subtitle {
  margin-top: 0.25rem;
  color: #9ca3af;
  font-size: 0.95rem;
}

.container {
  max-width: 960px;
  margin: 2rem auto;
  padding: 0 1rem 3rem;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.3fr);
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .container {
    grid-template-columns: minmax(0, 1fr);
  }
}

.card {
  background: rgba(15, 23, 42, 0.9);
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem 1.5rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.8);
}

.card h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.85rem;
}

label {
  font-size: 0.9rem;
  color: #e5e7eb;
}

input[type='text'],
input[type='date'],
select,
textarea {
  background: #020617;
  border-radius: 0.5rem;
  border: 1px solid rgba(148, 163, 184, 0.6);
  padding: 0.55rem 0.65rem;
  color: #e5e7eb;
  font: inherit;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.6);
}

textarea {
  resize: vertical;
  min-height: 72px;
}

.btn-primary,
.btn-secondary,
.btn-icon {
  border-radius: 999px;
  border: none;
  font: inherit;
  cursor: pointer;
  padding: 0.45rem 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: background 0.15s ease, transform 0.05s ease, box-shadow 0.1s ease,
    color 0.15s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: white;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.55);
}

.btn-secondary {
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  border: 1px solid rgba(148, 163, 184, 0.7);
}

.btn-secondary:hover {
  background: rgba(30, 64, 175, 0.8);
  color: white;
  border-color: transparent;
}

.btn-icon {
  padding-inline: 0.65rem;
  font-size: 0.8rem;
  background: rgba(15, 23, 42, 0.9);
  color: #9ca3af;
  border: 1px solid rgba(148, 163, 184, 0.6);
}

.btn-icon:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #fecaca;
  border-color: rgba(239, 68, 68, 0.8);
}

.message {
  min-height: 1.1rem;
  font-size: 0.85rem;
  margin-top: 0.4rem;
}

.message.error {
  color: #fecaca;
}

.message.success {
  color: #bbf7d0;
}

.tasks-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-height: 480px;
  overflow: auto;
}

.task-item {
  padding: 0.75rem 0.8rem;
  background: rgba(15, 23, 42, 0.95);
  border-radius: 0.6rem;
  border: 1px solid rgba(51, 65, 85, 0.9);
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr) auto;
  gap: 0.5rem 0.75rem;
  align-items: center;
}

@media (max-width: 768px) {
  .task-item {
    grid-template-columns: minmax(0, 1fr);
  }
}

.task-main {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

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

.task-description {
  font-size: 0.85rem;
  color: #9ca3af;
}

.task-meta {
  font-size: 0.8rem;
  color: #9ca3af;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-todo {
  background: rgba(59, 130, 246, 0.15);
  color: #bfdbfe;
}

.status-in-progress {
  background: rgba(234, 179, 8, 0.2);
  color: #fef3c7;
}

.status-done {
  background: rgba(34, 197, 94, 0.15);
  color: #bbf7d0;
}

.task-actions {
  display: flex;
  gap: 0.4rem;
  justify-content: flex-end;
}

.empty-state {
  font-size: 0.9rem;
  color: #9ca3af;
  text-align: center;
  padding: 0.75rem 0.4rem;
}

.app-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.3);
  padding: 0.9rem 1rem 1.1rem;
  font-size: 0.8rem;
  color: #9ca3af;
  text-align: center;
  background: #020617;
}

.app-footer code {
  background: rgba(15, 23, 42, 0.9);
  padding: 0.15rem 0.35rem;
  border-radius: 0.3rem;
  border: 1px solid rgba(55, 65, 81, 0.9);
}

.hint {
  margin-top: 0.25rem;
}


