:root {
  color-scheme: light dark;
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  background: #f7fafc;
  color: #1a202c;
}

body {
  margin: 0;
  padding: 0;
  display: flex;
  min-height: 100vh;
  background: linear-gradient(180deg, #ffffff 0%, #edf2f7 100%);
}

.app {
  width: min(960px, 92vw);
  margin: 32px auto;
  padding: 32px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
  backdrop-filter: blur(12px);
}

header {
  text-align: center;
  margin-bottom: 32px;
}

h1 {
  margin: 0;
  font-size: 2.5rem;
  letter-spacing: 0.04em;
}

.subtitle {
  color: #4a5568;
  margin-top: 8px;
}

main {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

section {
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 35px -10px rgba(148, 163, 184, 0.35);
}

section h2 {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 1.35rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}

.form-row label {
  font-weight: 600;
  margin-bottom: 8px;
}

input,
textarea,
button {
  font: inherit;
}

input[type="text"],
input[type="password"],
textarea,
input[type="file"] {
  border: 1px solid #cbd5f5;
  border-radius: 12px;
  padding: 10px 14px;
  background: #f8fafc;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: #3182ce;
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.25);
}

textarea {
  resize: vertical;
}

button {
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
  padding: 12px 20px;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 15px 25px -5px rgba(59, 130, 246, 0.35);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.checkbox {
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.form-hint {
  color: #718096;
  font-size: 0.9rem;
}

.form-error {
  color: #e53e3e;
  margin-top: 12px;
  min-height: 1em;
}

.form-success {
  color: #38a169;
  margin-top: 12px;
  min-height: 1em;
}

.hidden {
  display: none !important;
}

.tabs {
  display: flex;
  margin-bottom: 16px;
  background: #edf2f7;
  border-radius: 14px;
  padding: 4px;
}

.tab-button {
  flex: 1;
  background: transparent;
  border-radius: 12px;
  color: #4a5568;
  padding: 10px;
}

.tab-button.active {
  background: #fff;
  color: #1a202c;
  box-shadow: 0 8px 20px -8px rgba(79, 70, 229, 0.5);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.tasks-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.tasks-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.task-card {
  border: 1px solid #cbd5e0;
  border-radius: 16px;
  padding: 16px;
  background: #f8fafc;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.task-info h3 {
  margin: 0 0 4px;
}

.task-meta {
  font-size: 0.85rem;
  color: #4a5568;
  margin: 0;
}

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

.status-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
}

.status-pending {
  background: rgba(237, 137, 54, 0.15);
  color: #c05621;
}

.status-running {
  background: rgba(66, 153, 225, 0.18);
  color: #2b6cb0;
}

.status-succeeded {
  background: rgba(56, 161, 105, 0.18);
  color: #2f855a;
}

.status-failed {
  background: rgba(245, 101, 101, 0.18);
  color: #c53030;
}

.task-actions {
  display: flex;
  gap: 8px;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #fff;
  text-decoration: none;
  border: none;
  font-weight: 600;
  box-shadow: 0 10px 20px -10px rgba(16, 185, 129, 0.45);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}

.button-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 30px -12px rgba(16, 185, 129, 0.6);
}

.dashboard-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.secondary-button {
  background: linear-gradient(135deg, #64748b, #475569);
  padding: 10px 18px;
}

.welcome-text {
  color: #475569;
  font-weight: 500;
}

.empty-state {
  text-align: center;
  padding: 32px;
  color: #718096;
  background: #f1f5f9;
  border-radius: 16px;
  border: 1px dashed #cbd5e0;
}

@media (max-width: 768px) {
  .app {
    padding: 20px;
    margin: 16px auto;
  }

  .task-card {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .dashboard-bar {
    flex-direction: column;
    gap: 12px;
  }

  .task-actions {
    justify-content: flex-start;
  }
}

