@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&family=Lora:ital@0;1&display=swap');

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

body {
  font-family: 'Nunito', sans-serif;
  background: #fdf6ee;
  color: #3d2c1e;
  min-height: 100vh;
  background-image: radial-gradient(circle at 20% 20%, #fde8d0 0%, transparent 50%),
                    radial-gradient(circle at 80% 80%, #fce4e4 0%, transparent 50%);
}

.container { max-width: 620px; margin: 0 auto; padding: 24px 20px; }

h1 { font-size: 1.6rem; font-weight: 800; color: #3d2c1e; letter-spacing: -0.5px; }
h3 {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.12em; color: #b08060; margin-bottom: 14px;
}

/* Cards */
.card {
  background: rgba(255,255,255,0.85);
  border: 1.5px solid #f0ddd0;
  border-radius: 20px;
  padding: 22px;
  margin-bottom: 14px;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 12px rgba(180,120,80,0.07);
  transition: box-shadow 0.2s;
}
.card:hover { box-shadow: 0 4px 20px rgba(180,120,80,0.12); }

/* Inputs */
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=datetime-local] {
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1.5px solid #f0ddd0;
  background: #fffaf6;
  color: #3d2c1e;
  width: 100%;
  margin-bottom: 9px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus {
  outline: none;
  border-color: #e8956d;
  box-shadow: 0 0 0 3px rgba(232,149,109,0.15);
}

/* Buttons */
.btn {
  font-family: 'Nunito', sans-serif;
  font-size: 0.92rem;
  padding: 11px 16px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-weight: 700;
  width: 100%;
  margin-top: 4px;
  transition: all 0.15s;
}
.btn-primary { background: #e8956d; color: #fff; }
.btn-primary:hover { background: #d97d52; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-sm { font-size: 0.8rem; padding: 6px 14px; border-radius: 9px; width: auto; margin-top: 0; }
.btn-ghost { background: transparent; border: 1.5px solid #f0ddd0; color: #b08060; }
.btn-ghost:hover { background: #fdf0e8; color: #3d2c1e; }
.btn-danger { background: transparent; border: 1.5px solid #f5c0b8; color: #c0392b; }
.btn-danger:hover { background: #fdf0ee; }

/* Tabs */
.tab-bar {
  display: flex; gap: 6px; margin-bottom: 18px;
  background: #fdf0e8; border: 1.5px solid #f0ddd0;
  border-radius: 14px; padding: 5px;
}
.tab {
  flex: 1; text-align: center; padding: 9px;
  border-radius: 10px; cursor: pointer;
  font-size: 0.88rem; font-weight: 700; color: #b08060;
  transition: all 0.15s;
}
.tab.active { background: #e8956d; color: #fff; box-shadow: 0 2px 8px rgba(232,149,109,0.3); }

.section-tabs {
  display: flex; gap: 6px; margin-bottom: 16px;
  background: #fdf0e8; border: 1.5px solid #f0ddd0;
  border-radius: 14px; padding: 5px;
}
.section-tab {
  flex: 1; text-align: center; padding: 10px;
  border-radius: 10px; cursor: pointer;
  font-size: 0.92rem; font-weight: 700; color: #b08060;
  transition: all 0.15s;
}
.section-tab.active { background: #e8956d; color: #fff; box-shadow: 0 2px 8px rgba(232,149,109,0.3); }

/* Reminder items */
.reminder-item {
  padding: 14px 0; border-bottom: 1.5px dashed #f0ddd0;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 10px;
}
.reminder-item:last-child { border: none; padding-bottom: 0; }
.reminder-what { font-size: 0.97rem; color: #3d2c1e; line-height: 1.4; font-weight: 600; }
.reminder-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.time-badge {
  background: #fde8d0; color: #c0622a;
  font-size: 0.78rem; font-weight: 700;
  padding: 4px 10px; border-radius: 20px; white-space: nowrap;
}
.reminder-actions { display: flex; gap: 6px; margin-top: 4px; }
.btn-edit {
  background: #fdf0e8; border: 1.5px solid #f0ddd0;
  color: #b08060; font-size: 0.75rem; font-weight: 700;
  padding: 3px 10px; border-radius: 8px; cursor: pointer;
  transition: all 0.15s; font-family: 'Nunito', sans-serif;
}
.btn-edit:hover { background: #fde8d0; color: #e8956d; }

/* Edit form inline */
.edit-form {
  background: #fffaf6; border: 1.5px solid #f0ddd0;
  border-radius: 14px; padding: 14px; margin-top: 8px;
}
.edit-form input { margin-bottom: 8px; }
.edit-form-actions { display: flex; gap: 8px; }
.edit-form-actions .btn { margin-top: 0; }

/* Stats */
.stats-row { display: flex; gap: 10px; margin-bottom: 16px; }
.stat-box {
  flex: 1; background: rgba(255,255,255,0.9);
  border: 1.5px solid #f0ddd0; border-radius: 16px;
  padding: 16px; text-align: center;
  box-shadow: 0 2px 8px rgba(180,120,80,0.06);
}
.stat-num { font-size: 2rem; font-weight: 800; color: #e8956d; line-height: 1; }
.stat-label { font-size: 0.7rem; color: #b08060; text-transform: uppercase; letter-spacing: 0.1em; margin-top: 4px; font-weight: 700; }

/* Mic button */
.input-wrap { position: relative; }
.input-wrap input { padding-right: 54px; }
.btn-mic {
  position: absolute; right: 8px; top: 50%; transform: translateY(-60%);
  width: 38px; height: 38px; border-radius: 50%;
  background: #f5c0a0; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; transition: all 0.15s;
  box-shadow: 0 2px 6px rgba(180,120,80,0.2);
}
.btn-mic:hover { background: #e8956d; transform: translateY(-60%) scale(1.08); }
.btn-mic.recording { animation: pulse 1s infinite; background: #e05a3a; }
@keyframes pulse { 0%,100% { opacity: 1; box-shadow: 0 0 0 0 rgba(224,90,58,0.4); } 50% { opacity: 0.85; box-shadow: 0 0 0 6px rgba(224,90,58,0); } }

/* Status messages */
.status-msg { font-size: 0.83rem; color: #b08060; margin-top: 8px; min-height: 18px; font-style: italic; }

/* List items */
.list-group { margin-bottom: 20px; }
.list-group-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.list-group-title { font-size: 1rem; font-weight: 800; color: #3d2c1e; }
.list-badge {
  background: #fde8d0; color: #c0622a;
  font-size: 0.72rem; font-weight: 700;
  padding: 3px 10px; border-radius: 20px;
}
.list-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1.5px dashed #f0ddd0;
}
.list-item:last-child { border: none; }
.list-item input[type=checkbox] { width: 19px; height: 19px; accent-color: #e8956d; cursor: pointer; flex-shrink: 0; }
.list-item span { flex: 1; font-size: 0.93rem; color: #3d2c1e; font-weight: 600; }
.list-item.done span { text-decoration: line-through; color: #c0a090; font-weight: 400; }
.btn-remove {
  background: transparent; border: none; cursor: pointer;
  color: #d4b0a0; font-size: 15px; padding: 3px 6px;
  border-radius: 6px; transition: color 0.15s; flex-shrink: 0;
}
.btn-remove:hover { color: #e05a3a; }

/* Inline add to list */
.list-add-row { display: flex; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1.5px dashed #f0ddd0; }
.list-add-row input { margin-bottom: 0; flex: 1; padding: 8px 12px; font-size: 0.88rem; }
.list-add-row button { width: auto; margin-top: 0; padding: 8px 16px; font-size: 0.88rem; border-radius: 10px; }

/* Auth */
.auth-logo { font-size: 2.5rem; margin-bottom: 8px; }
.auth-title { font-size: 1.8rem; font-weight: 800; margin-bottom: 4px; color: #3d2c1e; }
.auth-sub { font-size: 0.88rem; color: #b08060; margin-bottom: 22px; font-family: 'Lora', serif; font-style: italic; }

/* Header */
.app-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }

.hidden { display: none; }
.empty-state { color: #c0a090; font-size: 0.88rem; text-align: center; padding: 18px 0; font-style: italic; }

/* Upcoming date group */
.upcoming-date {
  font-size: 0.72rem; font-weight: 700; color: #e8956d;
  text-transform: uppercase; letter-spacing: 0.1em;
  margin: 16px 0 8px; display: flex; align-items: center; gap: 8px;
}
.upcoming-date::after { content: ''; flex: 1; height: 1px; background: #f0ddd0; }
.upcoming-date:first-child { margin-top: 0; }