@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&display=swap");

:root {
  --bg: #f0f4f8;
  --ink: #1d2939;
  --muted: #667085;
  --surface: #ffffff;
  --line: #d0d5dd;
  --primary: #0b7285;
  --primary-strong: #074f5c;
  --personal: #7c3aed;
  --work: #0f766e;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--ink);
}

.app-page {
  background:
    radial-gradient(1000px 500px at 0% 0%, #cce9ff 0%, rgba(240, 244, 248, 0) 70%),
    radial-gradient(800px 400px at 100% 20%, #d4f7e4 0%, rgba(240, 244, 248, 0) 70%),
    var(--bg);
}

.login-page {
  background:
    linear-gradient(145deg, #eaf3ff 0%, #dff6ec 100%),
    var(--bg);
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.layout {
  width: min(1100px, calc(100% - 2rem));
  margin: 2rem auto 3rem;
  display: grid;
  gap: 1rem;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.2rem);
  letter-spacing: -0.04em;
}

.eyebrow {
  margin: 0;
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
}

.subtitle {
  margin: 0.5rem 0 0;
  color: var(--muted);
}

.panel {
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem;
  box-shadow: 0 10px 30px rgba(16, 24, 40, 0.08);
}

.app-profile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.profile-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

#user-picture {
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid #d0d5dd;
}

.user-name,
.user-email {
  margin: 0;
}

.user-name {
  font-weight: 700;
}

.user-email {
  color: var(--muted);
  font-size: 0.9rem;
}

.login-layout {
  width: min(980px, calc(100% - 2rem));
  display: grid;
  gap: 1rem;
  grid-template-columns: 1.25fr 1fr;
  align-items: stretch;
}

.login-hero,
.login-card {
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid #dbe5ee;
  border-radius: 24px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
}

.login-hero {
  padding: 2.2rem;
}

.login-hero h1 {
  margin: 0.35rem 0 0.75rem;
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.feature-list {
  margin: 1.3rem 0 0;
  padding-left: 1rem;
  color: #344054;
  display: grid;
  gap: 0.55rem;
}

.login-card {
  padding: 2rem 1.6rem;
  display: grid;
  align-content: center;
  gap: 0.9rem;
}

.login-card-title {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
}

.login-card-text {
  margin: 0;
  color: var(--muted);
}

.login-google-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  padding: 0.78rem 1rem;
  text-decoration: none;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #1a73e8, #1557b0);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.login-google-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(26, 115, 232, 0.28);
}

.login-note {
  margin: 0.4rem 0 0;
  min-height: 1.35rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.todo-form {
  display: grid;
  grid-template-columns: 1fr 180px auto;
  gap: 0.6rem;
}

input,
select,
button {
  font: inherit;
}

input[type="text"],
select {
  border: 1px solid #bcc5d0;
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  background: #fff;
}

button {
  border: none;
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
}

button:hover {
  background: var(--primary-strong);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.actions {
  margin-top: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

#plan-status {
  margin: 0;
  color: var(--muted);
}

.panel-header,
.calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.panel-header h2,
.calendar-head h2 {
  margin: 0;
}

#task-count {
  margin: 0;
  color: var(--muted);
}

.todo-list {
  list-style: none;
  margin: 0.8rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.todo-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem;
  border-radius: 12px;
  border: 1px solid #e4e7ec;
  background: #fff;
}

.todo-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.todo-title {
  font-weight: 600;
}

.todo-item.done .todo-title {
  text-decoration: line-through;
  color: #98a2b3;
}

.tag,
.plan-tag {
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
}

.tag.personal {
  background: rgba(124, 58, 237, 0.14);
  color: var(--personal);
}

.tag.trabajo {
  background: rgba(15, 118, 110, 0.14);
  color: var(--work);
}

.plan-tag {
  background: #eef2f6;
  color: #344054;
}

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

.todo-actions button {
  padding: 0.45rem 0.65rem;
  font-size: 0.85rem;
}

.todo-actions .danger {
  background: var(--danger);
}

.weekday-row {
  margin-top: 0.8rem;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.weekday-row span {
  text-align: center;
}

.calendar-grid {
  margin-top: 0.4rem;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.35rem;
}

.day-cell {
  min-height: 110px;
  border: 1px solid #dbe3ec;
  border-radius: 10px;
  background: #fff;
  padding: 0.35rem;
}

.day-cell.muted {
  opacity: 0.48;
}

.day-label {
  margin: 0 0 0.25rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.plan-chip {
  margin: 0 0 0.2rem;
  border-radius: 8px;
  padding: 0.2rem 0.35rem;
  font-size: 0.72rem;
  line-height: 1.2;
}

.plan-chip.personal {
  background: rgba(124, 58, 237, 0.15);
  color: #5b21b6;
}

.plan-chip.trabajo {
  background: rgba(15, 118, 110, 0.15);
  color: #115e59;
}

.plan-chip.done {
  text-decoration: line-through;
  opacity: 0.6;
}

@media (max-width: 900px) {
  .app-profile {
    flex-direction: column;
    align-items: flex-start;
  }

  .login-layout {
    grid-template-columns: 1fr;
  }

  .todo-form {
    grid-template-columns: 1fr;
  }

  .calendar-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 700px) {
  .todo-item {
    flex-direction: column;
  }

  .day-cell {
    min-height: 85px;
  }
}
