/* Centralized theme for the app - used across all views */
:root {
  --brand: #2563eb; /* blue-600 */
  --brand-600: #1d4ed8;
  --muted: #6b7280;
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --success: #10b981;
  --danger: #ef4444;
  --shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  --radius: 10px;
  --accent-1: #7c3aed; /* purple */
  --accent-2: #06b6d4; /* teal */
  --glass: rgba(255, 255, 255, 0.6);
}

body {
  background: radial-gradient(
      circle at 10% 10%,
      rgba(37, 99, 235, 0.06),
      transparent 20%
    ),
    linear-gradient(180deg, var(--bg), #ffffff 60%);
  color: #0f172a;
  font-family: "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

/* Animated gradient header */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  padding: 2rem 1.25rem;
  margin-bottom: 1.25rem;
  background: linear-gradient(
    135deg,
    rgba(37, 99, 235, 0.08),
    rgba(124, 58, 237, 0.06)
  );
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    60deg,
    rgba(37, 99, 235, 0.04),
    rgba(6, 182, 212, 0.03)
  );
  transform-origin: center;
  animation: slow-spin 14s linear infinite;
}

@keyframes slow-spin {
  from {
    transform: rotate(0deg) scale(1.02);
  }
  to {
    transform: rotate(360deg) scale(1.02);
  }
}

/* Background image utility */
.bg-decor {
  background-position: center right;
  background-repeat: no-repeat;
  background-size: contain;
}

/* Use as: <div class="hero bg-decor" style="background-image:url('/images/bg-blob.svg')"> */

/* Floating entrance */
.enter-fade {
  animation: enter-fade 600ms ease both;
}
@keyframes enter-fade {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.995);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Decorative SVG placement */
.decor-svg {
  position: absolute;
  right: -40px;
  top: -30px;
  width: 320px;
  height: auto;
  opacity: 0.9;
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: 960px;
}

.navbar-brand {
  font-weight: 700;
  color: var(--brand) !important;
}

.header-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.card-app {
  background: var(--card-bg);
  border: 1px solid rgba(2, 6, 23, 0.04);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.task-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid rgba(2, 6, 23, 0.04);
}

.task-title {
  font-weight: 600;
}

.task-desc {
  color: var(--muted);
  font-size: 0.95rem;
}

.badge-completed {
  background: linear-gradient(90deg, #d1fae5, #bbf7d0);
  color: #064e3b;
  border-radius: 999px;
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
}

.btn-primary-custom {
  background: linear-gradient(90deg, var(--brand), var(--brand-600));
  border: none;
  color: white;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.14);
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.btn-primary-custom:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.18);
}

.form-label {
  font-weight: 600;
}

.form-card {
  padding: 1rem;
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #fbfdff);
  border: 1px solid rgba(2, 6, 23, 0.03);
}

.hero-buttons {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* Image utility: blurred backdrop */
.backdrop-blur {
  background-clip: padding-box;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  background-color: rgba(255, 255, 255, 0.6);
  border-radius: 12px;
}

.empty-state {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--muted);
}

/* Responsive tweaks */
@media (max-width: 576px) {
  .task-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
}
