:root {
  --bg: #f8fbfd;
  --surface: #ffffff;
  --text: #1f2a37;
  --muted: #5f6f81;
  --line: #e2e8f0;
  --sea: #6baed6;
  --sea-dark: #3f88b9;
  --sand: #f5e6cc;
  --sunset: #e39f7a;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(31, 42, 55, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background:
    linear-gradient(170deg, rgba(107, 174, 214, 0.1), rgba(245, 230, 204, 0.18)),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.is-hidden {
  display: none !important;
}

.topbar {
  width: 100%;
  margin: 0;
  padding: 1.2rem 1.2rem 0.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar-actions {
  display: flex;
  gap: 0.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.brand h1 {
  font-size: 1.1rem;
  margin: 0;
  letter-spacing: 0.3px;
}

.brand-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: linear-gradient(120deg, var(--sea), var(--sunset));
}

.container {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0.8rem 1.2rem 2.2rem;
  flex: 1;
}

.view {
  margin-bottom: 1rem;
}

#view-login,
#view-register {
  width: min(460px, 100%);
  margin-left: auto;
  margin-right: auto;
}

.dashboard-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1rem;
  padding: 0.9rem;
}

.side-menu {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem;
  background: #fcfeff;
  display: grid;
  gap: 0.35rem;
  align-content: start;
}

.side-title {
  margin: 0 0 0.45rem;
}

.menu-group {
  margin: 0.55rem 0 0.2rem;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 600;
}

.menu-item {
  text-align: left;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  padding: 0.5rem 0.55rem;
}

.menu-item:hover {
  background: var(--sand);
}

.menu-item.active {
  border-color: var(--line);
  background: #ecf6fd;
  color: #2f6990;
}

.dashboard-view {
  min-width: 0;
}

.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.15rem;
}

.hero {
  margin-bottom: 1rem;
  border-left: 5px solid var(--sea);
  background: #ffffff;
  border-radius: 10px;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1rem;
}

.hero h2 {
  margin: 0.2rem 0 0.6rem;
  font-size: clamp(1.25rem, 2.3vw, 1.75rem);
  line-height: 1.3;
}

.hero p {
  margin: 0;
  color: var(--muted);
}

.view-description {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--muted);
}

.eyebrow {
  color: var(--sea-dark);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.07em;
  font-weight: 600;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

h3 {
  margin-top: 0;
  margin-bottom: 0.9rem;
}

.form-grid {
  display: grid;
  gap: 0.55rem;
}

label {
  font-size: 0.9rem;
  color: var(--muted);
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.62rem 0.7rem;
  font-size: 0.95rem;
  color: var(--text);
  background: #fffdf9;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--sea);
  outline: 2px solid rgba(107, 174, 214, 0.15);
}

textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.62rem 0.7rem;
  font-size: 0.95rem;
  color: var(--text);
  font-family: inherit;
  background: #fffdf9;
}

button {
  border: 0;
  border-radius: 10px;
  padding: 0.62rem 0.82rem;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(120deg, var(--sea-dark), var(--sea));
  color: #fff;
}

.ghost-btn {
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--text);
}

.ghost-btn:hover {
  background: var(--sand);
}

.task-list {
  margin: 0;
  margin-top: 0.75rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.task-item {
  display: grid;
  gap: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.75rem;
  background: #ffffff;
}

.task-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.task-title {
  margin: 0;
  font-size: 0.98rem;
}

.task-priority {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.priority-alta {
  background: #ffe8dc;
  color: #8f4a2b;
}

.priority-media {
  background: #fff4d6;
  color: #7a5a00;
}

.priority-baja {
  background: #e7f6ed;
  color: #246b3a;
}

.task-title.completed {
  text-decoration: line-through;
  color: var(--muted);
}

.task-meta {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.task-actions {
  display: flex;
  gap: 0.45rem;
}

.task-actions button {
  padding: 0.38rem 0.58rem;
  font-size: 0.85rem;
}

.btn-danger {
  background: #ffe8dc;
  color: #8f4a2b;
}

.btn-soft {
  background: #ecf6fd;
  color: #2f6990;
}

.inline-actions {
  display: flex;
  gap: 0.5rem;
}

.filters {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

.helper-text {
  margin: 0.8rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(31, 42, 55, 0.42);
  display: grid;
  place-items: center;
  padding: 1rem;
  z-index: 20;
}

.modal-card {
  width: min(560px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 1rem;
}

.footer {
  width: 100%;
  margin: 0;
  padding: 0 1.2rem 1.4rem;
  color: var(--muted);
}

@media (max-width: 780px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .dashboard-shell {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.7rem;
  }

  .filters {
    grid-template-columns: 1fr;
  }

  .list-header {
    flex-direction: column;
    align-items: stretch;
  }
}
