* { 
  margin: 0; 
  padding: 0; 
  box-sizing: border-box; 
}

:root {
  --primary: #7c5aa8;
  --primary-dark: #6a4b90;
  --bg: #faf9fb;
  --card: #ffffff;
  --text: #1f2937;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --success: #10b981;
  --error: #ef4444;
  --warning: #f59e0b;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  padding: 2rem 1rem;
}

.container { 
  width: 100%; 
  max-width: 1200px; 
  margin: 0 auto; 
}

.header {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem;
  box-shadow: var(--shadow);
  margin: 0 0 1.25rem;
}

.header h1 { 
  font-size: 1.35rem; 
  letter-spacing: 0.2px; 
  margin-bottom: 0.25rem; 
}

.header p { 
  color: var(--text-muted); 
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.header-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.main-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.create-panel,
.filter-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.create-panel h3,
.filter-panel h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
}

.field.full-width {
  grid-column: 1 / -1;
}

label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

input[type="text"],
textarea,
select {
  width: 100%;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  background: white;
  color: var(--text);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124, 90, 168, 0.15);
}

textarea {
  resize: vertical;
}

.btn-primary,
.btn-secondary {
  padding: 0.75rem 1.1rem;
  border: none;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

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

.btn-primary:hover { 
  background: var(--primary-dark); 
  transform: translateY(-1px); 
  box-shadow: var(--shadow-lg); 
}

.btn-secondary {
  background: var(--card);
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn-secondary:hover { 
  background: #faf5ff; 
}

.btn-secondary.full-width {
  width: 100%;
  margin-top: 1rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.filter-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 400;
  cursor: pointer;
}

.filter-group input[type="checkbox"] {
  cursor: pointer;
}

.status-badge,
.priority-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: lowercase;
}

.status-badge.por-hacer {
  background: #dbeafe;
  color: #1e40af;
}

.status-badge.en-progreso {
  background: #fef3c7;
  color: #92400e;
}

.status-badge.hecho {
  background: #d1fae5;
  color: #065f46;
}

.priority-badge.baja {
  background: #f3f4f6;
  color: #374151;
}

.priority-badge.media {
  background: #fef3c7;
  color: #92400e;
}

.priority-badge.alta {
  background: #fee2e2;
  color: #991b1b;
}

.tasks-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}

.tasks-header {
  margin-bottom: 1rem;
}

.tasks-header h3 {
  font-size: 1rem;
  color: var(--text);
}

.tasks-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.task-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  background: #fbfbfd;
  transition: all 0.2s ease;
}

.task-card:hover {
  box-shadow: var(--shadow);
}

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

.task-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  flex: 1;
}

.task-actions {
  display: flex;
  gap: 0.5rem;
}

.task-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0.25rem;
  transition: opacity 0.2s ease;
}

.task-btn:hover {
  opacity: 0.7;
}

.task-description {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.task-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.task-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.empty-state p {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.branding-badge {
  margin: 1.5rem 0 0.75rem;
  text-align: center;
  color: var(--text);
  font-weight: 600;
}

.branding-badge a {
  color: var(--primary);
  font-weight: 800;
  text-decoration: none;
  transition: color 0.2s ease;
}

.branding-badge a:hover { 
  color: var(--primary-dark); 
}

/* Responsive */
@media (max-width: 768px) {
  body { 
    padding: 1rem 0.75rem; 
  }
  
  .main-panel {
    grid-template-columns: 1fr;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
  }
  
  .field {
    grid-column: 1 / -1;
  }
  
  .task-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .task-actions {
    align-self: flex-end;
  }
}
