:root {
  --bg: #f4f5f7;
  --panel: #ffffff;
  --text: #172b4d;
  --muted: #6b778c;
  --border: #dfe1e6;
  --primary: #0052cc;
  --primary-hover: #0747a6;
  --danger: #de350b;
  --danger-hover: #bf2600;
  --success-bg: #e3fcef;
  --success-text: #006644;
  --error-bg: #ffebe6;
  --error-text: #bf2600;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text);
}

#app {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem;
}

.app-header {
  margin-bottom: 1.5rem;
}

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

.panel {
  background-color: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.hidden {
  display: none !important;
}

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

.list-header h2 {
  margin: 0;
  font-size: 1.25rem;
}

.btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background-color: #fafbfc;
  color: var(--text);
  cursor: pointer;
  font-size: 0.875rem;
}

.btn:hover {
  background-color: #f4f5f7;
}

.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-danger {
  background-color: var(--danger);
  border-color: var(--danger);
  color: #ffffff;
}

.btn-danger:hover {
  background-color: var(--danger-hover);
}

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

.task-table th,
.task-table td {
  text-align: left;
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}

.task-table th {
  color: var(--muted);
  font-weight: 600;
}

.task-table tbody tr {
  cursor: pointer;
}

.task-table tbody tr:hover {
  background-color: #fafbfc;
}

.task-table tbody tr:last-child td {
  border-bottom: none;
}

.empty-state {
  color: var(--muted);
  text-align: center;
  padding: 2rem 0;
  margin: 0;
}

.task-details {
  display: grid;
  grid-template-columns: 1fr 3fr;
  row-gap: 0.75rem;
  margin: 0;
}

.task-details dt {
  color: var(--muted);
  font-weight: 600;
}

.task-details dd {
  margin: 0;
}

.form-field {
  margin-bottom: 1rem;
}

.form-field label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.5rem 0.625rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--text);
  background-color: #ffffff;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(0, 82, 204, 0.2);
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(9, 30, 66, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal {
  background-color: var(--panel);
  border-radius: 6px;
  padding: 1.5rem;
  max-width: 420px;
  width: 90%;
}

.modal h3 {
  margin-top: 0;
}

.modal .form-actions {
  justify-content: flex-end;
}

.toast {
  position: fixed;
  top: 1rem;
  right: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 4px;
  font-size: 0.875rem;
  box-shadow: 0 4px 12px rgba(9, 30, 66, 0.2);
  z-index: 200;
  max-width: 320px;
}

.toast.success {
  background-color: var(--success-bg);
  color: var(--success-text);
  border: 1px solid transparent;
}

.toast.error {
  background-color: var(--error-bg);
  color: var(--error-text);
  border: 1px solid transparent;
}