* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  background:
    linear-gradient(135deg, #f5cec7 0%, #ffcabc 35%, #fabb92 68%, #a4bda8 100%);
  color: #5f5a4f;
  min-height: 100vh;
  padding: 30px;
  background-attachment: fixed;
}

.container {
  max-width: 1100px;
  margin: auto;
}

.header {
  text-align: center;
  margin-bottom: 34px;
  padding: 34px 24px 28px;
  border-radius: 28px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.42),
    rgba(255, 255, 255, 0.22)
  );
  border: 1px solid rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow:
    0 14px 40px rgba(126, 108, 101, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.header::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.45), transparent 34%),
    radial-gradient(circle at bottom right, rgba(235, 165, 165, 0.18), transparent 30%);
  pointer-events: none;
}

.header h1 {
  position: relative;
  z-index: 1;
  margin-bottom: 10px;
  font-family: "Playfair Display", serif;
  font-size: 3.4rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #7c6666;
  text-shadow: 0 2px 10px rgba(255, 255, 255, 0.35);
}

.header p {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.7;
  color: #7a7068;
}

.dashboard {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.card {
  background: rgba(255, 255, 255, 0.72);
  padding: 20px;
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(126, 108, 101, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.card h2 {
  margin-bottom: 15px;
  color: #7c6b63;
  font-size: 2rem;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.form input {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(199, 193, 157, 0.6);
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.82);
  color: #6d625c;
}

.form input:focus {
  outline: none;
  border-color: #eba5a5;
  box-shadow: 0 0 0 4px rgba(235, 165, 165, 0.18);
}

.form button[type="submit"] {
  padding: 14px 16px;
  border-radius: 14px;
  border: none;
  font-size: 1rem;
  background: linear-gradient(135deg, #eba5a5, #fabb92);
  color: white;
  cursor: pointer;
  transition: 0.25s ease;
  font-weight: 600;
}

.form button[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(235, 165, 165, 0.24);
}

.task-stats {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  color: #7c746b;
  font-size: 0.95rem;
  font-weight: 600;
}

.list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.list li {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(199, 193, 157, 0.35);
  padding: 14px;
  border-radius: 12px;
}

.task-item,
.event-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.task-info,
.event-info {
  flex: 1;
}

.task-check-label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.task-check-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #a4bda8;
}

.task-title {
  font-size: 1rem;
  font-weight: 600;
  color: #6c605a;
}

.task-title.completed {
  text-decoration: line-through;
  color: #9a9485;
}

.completed-task-item {
  opacity: 0.82;
}

.task-date,
.event-date,
.countdown {
  font-size: 0.9rem;
  color: #867971;
  margin-top: 5px;
  font-weight: 500;
}

.actions {
  display: flex;
  gap: 8px;
}

.actions button {
  border: none;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
}

.delete-btn {
  background: #f5cec7;
  color: #9a6666;
}

.edit-btn {
  background: #c7c19d;
  color: #675f45;
}

/* Event controls row */
.event-form-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: nowrap;
}

.compact-date-row {
  display: flex;
  gap: 10px;
  flex: 1;
}

.picker-field {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.picker-field label {
  font-size: 0.9rem;
  font-weight: 700;
  color: #71675f;
}

.small-field {
  flex: 0 0 auto;
  min-width: 78px;
}

.month-field {
  min-width: 98px;
}

.year-field {
  min-width: 88px;
}

.picker-toggle {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 14px;
  background: linear-gradient(135deg, #eba5a5, #fabb92);
  color: white;
  cursor: pointer;
  font-size: 0.95rem;
  text-align: center;
  transition: 0.2s ease;
  font-weight: 600;
}

.picker-toggle:hover {
  transform: translateY(-1px);
}

.picker-toggle:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(235, 165, 165, 0.18);
}

.picker-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 100%;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(199, 193, 157, 0.35);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(126, 108, 101, 0.12);
  padding: 10px;
  z-index: 50;
}

.hidden {
  display: none;
}

.picker-options {
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.picker-option {
  border: none;
  background: rgba(255, 255, 255, 0.75);
  padding: 10px 12px;
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
  font-size: 0.92rem;
  transition: 0.2s ease;
  color: #6d625c;
  font-weight: 500;
}

.picker-option:hover {
  background: #ffe2dc;
}

.picker-option.active {
  background: linear-gradient(135deg, #eba5a5, #fabb92);
  color: white;
}

/* Digital time */
.digital-time-picker {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 0 0 auto;
}

.digital-time-picker label {
  font-size: 0.9rem;
  font-weight: 700;
  color: #71675f;
}

.digital-time-box {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid rgba(199, 193, 157, 0.42);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
}

.time-unit.horizontal {
  display: flex;
  align-items: center;
  gap: 6px;
}

.time-btn {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #eba5a5, #fabb92);
  color: white;
  font-size: 1rem;
  cursor: pointer;
  line-height: 1;
  transition: 0.2s ease;
  font-weight: 700;
}

.time-btn:hover {
  transform: scale(1.05);
}

.time-value {
  min-width: 30px;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: #6d625c;
}

.time-separator {
  font-size: 1.2rem;
  font-weight: 700;
  color: #6d625c;
}

.ampm-box {
  display: flex;
  align-items: center;
}

.ampm-toggle {
  border: none;
  background: linear-gradient(135deg, #c7c19d, #a4bda8);
  color: white;
  border-radius: 10px;
  padding: 7px 12px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}

.ampm-toggle:hover {
  transform: translateY(-1px);
}

@media (max-width: 980px) {
  .dashboard {
    grid-template-columns: 1fr;
  }

  .event-form-row {
    flex-wrap: wrap;
  }
}

@media (max-width: 700px) {
  .compact-date-row {
    width: 100%;
    flex-wrap: wrap;
  }

  .digital-time-picker {
    width: 100%;
  }

  .digital-time-box {
    justify-content: center;
    flex-wrap: wrap;
  }
}

.full-width-card {
  grid-column: 1 / -1;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 14px 40px rgba(126, 108, 101, 0.12);
}

.full-width-card h2 {
  color: #7b6764;
}

.calendar-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.calendar-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.calendar-nav-btn {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.28);
  color: #7c6666;
  font-size: 1.2rem;
  cursor: pointer;
  backdrop-filter: blur(12px);
  font-weight: 700;
}

.calendar-month-label {
  min-width: 150px;
  text-align: center;
  font-weight: 700;
  color: #7c6666;
  font-size: 1rem;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}

.calendar-weekdays div {
  text-align: center;
  font-size: 0.9rem;
  color: #7c6666;
  font-weight: 700;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}

.calendar-day {
  min-height: 110px;
  background: rgba(255, 255, 255, 0.26);
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 14px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  cursor: pointer;
  transition: 0.2s ease;
}

.calendar-day:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(126, 108, 101, 0.1);
}

.calendar-day.other-month {
  opacity: 0.45;
}

.calendar-day.today {
  border: 2px solid #eba5a5;
  background: rgba(235, 165, 165, 0.18);
}

.calendar-day.selected-day {
  border: 2px solid #a4bda8;
  background: rgba(164, 189, 168, 0.2);
}

.calendar-day-number {
  font-weight: 700;
  font-size: 0.95rem;
  color: #6f615f;
}

.calendar-events {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.calendar-event-pill,
.calendar-task-pill {
  font-size: 0.75rem;
  padding: 5px 8px;
  border-radius: 8px;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}

.calendar-event-pill {
  background: #eba5a5;
  color: white;
}

.calendar-task-pill {
  background: #a4bda8;
  color: white;
}

.calendar-task-pill.completed-pill {
  background: #c7c19d;
  color: white;
  text-decoration: line-through;
}

.calendar-more {
  font-size: 0.75rem;
  color: #8a736d;
  font-weight: 700;
}

@media (max-width: 900px) {
  .calendar-grid {
    gap: 8px;
  }

  .calendar-day {
    min-height: 90px;
    padding: 8px;
  }

  .calendar-event-pill,
  .calendar-task-pill {
    font-size: 0.7rem;
  }
}

@media (max-width: 700px) {
  .calendar-header-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .calendar-grid,
  .calendar-weekdays {
    gap: 6px;
  }

  .calendar-day {
    min-height: 80px;
    padding: 6px;
  }

  .calendar-day-number {
    font-size: 0.85rem;
  }
}

.selected-date-panel {
  margin-top: 18px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.34);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.selected-date-panel h3 {
  margin-bottom: 12px;
  color: #7b6764;
  font-size: 1.05rem;
}

.selected-date-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.selected-date-card {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 12px;
  padding: 12px;
}

.selected-date-type {
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.selected-date-type.event {
  color: #cf7f7f;
}

.selected-date-type.task {
  color: #75927a;
}

.selected-date-title {
  font-weight: 700;
  color: #6d625c;
  margin-bottom: 4px;
}

.selected-date-meta {
  font-size: 0.88rem;
  color: #867971;
}

.empty-day-message {
  color: #867971;
  font-size: 0.92rem;
}