:root {
  --primary: #e64b07;
  --primary-dark: #6a2f02;
  --primary-light: #eef2ff;
  --text: #1f2937;
  --text-muted: #6a0221;
  --border: #e5e7eb;
  --bg: #f9fafb;
  --card-bg: #ffffff;
  --danger: #dc2626;
  --success: #16a34a;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: radial-gradient(circle, rgba(244, 163, 167, 0.8), #fbfafa);
  /* background: radial-gradient(circle,rgba(217, 69, 114, 1) 0%, rgba(237, 166, 186, 1) 31%, rgba(255, 255, 255, 1) 100%); */
  /* background: linear-gradient(#fbfafa, rgba(244, 163, 167, 0.8));*/
  /*background: var(--bg);
  color: var(--text);
  margin: 0;*/
  min-height: 100vh;
}

.hidden {
  display: none !important;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-icon {
  font-size: 1.6rem;
}

.brand h1 {
  font-size: 1.4rem;
  margin: 0;
  color: var(--primary);
}

/* ===================== AUTENTICACIÓN ===================== */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  text-align: center;
}

.auth-card .brand {
  justify-content: center;
  margin-bottom: 0.25rem;
}

.tagline {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0 0 1.5rem;
}

.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.25rem;
}

.auth-tab {
  flex: 1;
  background: none;
  border: none;
  padding: 0.6rem 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.auth-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-align: left;
}

.auth-form label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.auth-form input {
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
}

.auth-form input:focus {
  outline: none;
  border-color: var(--primary);
}

.form-message {
  min-height: 1.2em;
  font-size: 0.82rem;
  margin: 0.4rem 0 0;
}

.form-message.error {
  color: var(--danger);
}

.form-message.success {
  color: var(--success);
}

/* ===================== BOTONES ===================== */
.btn {
  border: none;
  border-radius: var(--radius);
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  margin-top: 1rem;
}

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

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

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

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--bg);
}

.btn-sm {
  padding: 0.4rem 0.7rem;
  font-size: 0.8rem;
}

/* ===================== APP ===================== */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
}

.user-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

main {
  max-width: 640px;
  margin: 1.5rem auto;
  padding: 0 1rem 3rem;
}

.view-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.view-tab {
  flex: 1;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem;
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--text-muted);
}

.view-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.view-tab[data-view="personal"]:hover {
  background-color: var(--primary-dark);
}

.view-tab[data-view="equipo"]:hover {
  background-color: rgb(242, 231, 231);
}

.panel {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
}

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

.panel-header h2 {
  font-size: 1rem;
  margin: 0;
}

#team-select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
}

.inline-form {
  display: flex;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.inline-form input {
  flex: 1;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.task-form {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.form-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.form-row input,
.form-row select {
  flex: 1;
  min-width: 140px;
}

.task-form input,
.task-form select,
.task-form textarea {
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: inherit;
}

.field-label {
  flex: 1;
  min-width: 140px;
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.field-label input {
  width: 100%;
}

.field-hint {
  font-size: 0.72rem;
  color: #9ca3af;
  font-weight: 400;
  line-height: 1.3;
}

.dates-toggle {
  align-self: flex-start;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0.2rem 0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.dates-toggle:hover {
  color: var(--primary);
}

.dates-toggle-icon {
  display: inline-block;
  transition: transform 0.15s ease;
  font-size: 0.7rem;
}

.dates-toggle[aria-expanded="true"] .dates-toggle-icon {
  transform: rotate(90deg);
}

.dates-row {
  padding-top: 0.1rem;
}

/* ===================== LISTA DE TAREAS ===================== */
.task-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.task-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  box-shadow: var(--shadow);
}

.task-card.priority-alta {
  border-left-color: var(--danger);
}

.task-card.priority-media {
  border-left-color: #d97706;
}

.task-card.priority-baja {
  border-left-color: var(--success);
}

.task-card.completed {
  opacity: 0.55;
}

.task-card.completed .task-title {
  text-decoration: line-through;
}

.task-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.task-title {
  font-weight: 600;
  font-size: 0.98rem;
}

.task-desc {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0.3rem 0;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

.tag {
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
}

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

.task-actions button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-muted);
}

.task-actions button:hover {
  color: var(--primary);
}

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


.app-header {
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--card-bg);
  border-bottom: none;
  box-shadow: var(--shadow);
}


#sections-nav-bar {
  background-color: #ffffff;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.8rem 1.2rem;

  /* Alineación a la izquierda y separación sutil del título */
  width: fit-content;        /* Se adapta al ancho de los enlaces para que no ocupe toda la pantalla */
  margin-top: 0.5rem;        /* Pega más el rectángulo hacia la parte de arriba */
  margin-left: 5px;         /* Ajusta este valor según qué tan a la izquierda/derecha lo quieras */

  box-shadow: var(--shadow);
}

.sections-links,
.section-nav {
  display: flex;
  align-items: center;
  gap: 50px;                 /* Mantiene la gran separación que pediste entre ellos */
}

.section-link {
  text-decoration: none;
  color: var(--primary);
  font-weight: 500;
  transition: opacity 0.15s ease;
}

.section-link:hover {
  filter: blur(2px);
}

.section-link.active-section {
  font-weight: 700;
}

#header {
  margin-left: 40px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-link {
  text-decoration: none;
  color: var(--primary);
}

@media (max-width: 480px) {
  .app-header {
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
  }
}
