@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

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

:root {
  --bg: #F0F2F5;
  --surface: #FFFFFF;
  --surface2: #E8EBF0;
  --border: #CBD2DC;
  --border-light: #DFE3EA;
  --text: #141720;
  --text-secondary: #505870;
  --text-dim: #858DA0;
  --accent: #4F5FD9;
  --accent-hover: #3D4DB8;
  --accent-light: #E8EAFC;
  --green: #1B9C5A;
  --green-light: #DFFAED;
  --yellow: #C08C00;
  --yellow-light: #FEF6DC;
  --orange: #D06820;
  --orange-light: #FDE9D8;
  --red: #D63B3B;
  --red-light: #FDE5E5;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(20, 23, 32, 0.06), 0 1px 2px rgba(20, 23, 32, 0.04);
  --shadow-md: 0 4px 12px rgba(20, 23, 32, 0.08), 0 2px 4px rgba(20, 23, 32, 0.04);
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.app {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 24px;
}

header { margin-bottom: 36px; }

h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
}

.subtitle {
  color: var(--text-dim);
  margin-top: 6px;
  font-size: 14px;
}

/* --- Input --- */
#task-form { margin-bottom: 24px; }

.input-row { display: flex; gap: 10px; }

#task-input {
  flex: 1;
  padding: 13px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow);
}

#task-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
#task-input::placeholder { color: var(--text-dim); font-size: 13.5px; }

#submit-btn {
  padding: 13px 24px;
  border-radius: var(--radius);
  border: none;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 14px;
  box-shadow: var(--shadow);
}

#submit-btn:hover { background: var(--accent-hover); }
#submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }

#parsing-indicator {
  margin-top: 12px;
  font-size: 13px;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 8px;
}

.spinner {
  width: 14px; height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}

@keyframes spin { to { transform: rotate(360deg); } }

.hidden { display: none !important; }

/* --- Controls --- */
.controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
}

.controls-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.controls-row.view-row {
  align-items: center;
}

.controls-left {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toggle-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.toggle-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mode-toggle {
  display: flex;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.mode-btn {
  padding: 7px 14px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s;
}

.mode-btn:not(:last-child) {
  border-right: 1px solid var(--border-light);
}

.mode-btn.active {
  background: var(--accent);
  color: #fff;
}

.mode-btn:not(.active):hover {
  background: var(--surface2);
  color: var(--text);
}

/* --- View toggle (List / Calendar) --- */
.view-toggle {
  display: flex;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.view-btn {
  padding: 7px 14px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s;
}

.view-btn:not(:last-child) {
  border-right: 1px solid var(--border-light);
}

.view-btn.active {
  background: var(--accent);
  color: #fff;
}

.view-btn:not(.active):hover {
  background: var(--surface2);
  color: var(--text);
}

/* --- View / Calendar range toggle --- */
.view-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* --- Custom dropdown --- */
.custom-dropdown {
  position: relative;
}

.dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: all 0.2s;
}

.dropdown-trigger:hover {
  border-color: var(--accent);
}

.custom-dropdown.open .dropdown-trigger {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-light);
}

.dropdown-chevron {
  color: var(--text-dim);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.custom-dropdown.open .dropdown-chevron {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  padding: 6px;
  z-index: 100;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: all 0.15s ease;
}

.custom-dropdown.open .dropdown-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.dropdown-item {
  display: block;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: none;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.12s;
}

.dropdown-item:hover {
  background: var(--bg);
  color: var(--text);
}

.dropdown-item.active {
  background: var(--accent);
  color: #fff;
}

.dropdown-item.active:hover {
  background: var(--accent-hover);
  color: #fff;
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 8px;
}

.range-context {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  padding: 4px 0;
  white-space: nowrap;
}

/* --- Range group --- */
.range-group {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.range-sub {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* --- Custom date range picker --- */
.date-range-picker {
  display: flex;
  align-items: center;
  gap: 10px;
}

.date-range-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.date-range-field label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.date-range-field input[type="date"] {
  padding: 7px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  outline: none;
  box-shadow: var(--shadow);
  transition: all 0.2s;
}

.date-range-field input[type="date"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-light);
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

#filter-project {
  padding: 7px 28px 7px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  box-shadow: var(--shadow);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23858DA0' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
}

.checkbox-label {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
}

.checkbox-label input[type="checkbox"] { accent-color: var(--accent); }

/* --- Project manager --- */
.project-manager { margin-bottom: 16px; }

.toggle-projects-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.toggle-projects-btn:hover { color: var(--text-secondary); }

.project-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 10px;
  box-shadow: var(--shadow);
}

.project-add-row { display: flex; gap: 8px; margin-bottom: 12px; }

.project-add-row input {
  flex: 1;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  outline: none;
}

.project-add-row input:focus { border-color: var(--accent); }

.btn-primary {
  padding: 9px 22px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.2s;
}

.btn-primary:hover { background: var(--accent-hover); }
.btn-sm { padding: 7px 14px; font-size: 12px; }

#project-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#project-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text);
}

#project-list li:hover { background: var(--surface2); }

#project-list li small { color: var(--text-dim); margin-left: 4px; }

.delete-project-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 16px;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1;
}

.delete-project-btn:hover { background: var(--red-light); color: var(--red); }

/* --- Day groups --- */
#task-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.day-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 24px;
}

.day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 2px;
  border-bottom: 1px solid var(--border-light);
}

.day-label {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

.day-header.deadline-overdue .day-label { color: var(--red); }
.day-header.deadline-today .day-label { color: var(--orange); font-weight: 600; }

.day-time {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 500;
  background: var(--surface2);
  padding: 2px 10px;
  border-radius: 4px;
}

/* --- Task cards --- */
.task-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-left: 4px solid transparent;
  transition: all 0.15s;
  box-shadow: var(--shadow);
  cursor: default;
}

.task-card:hover { box-shadow: var(--shadow-md); }

.task-card.expanded {
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: var(--shadow-md);
}

.task-card.urgency-0 { border-left-color: var(--border); }
.task-card.urgency-1 { border-left-color: var(--yellow); }
.task-card.urgency-2 { border-left-color: var(--orange); }
.task-card.urgency-3 { border-left-color: var(--red); }

.task-card.completed { opacity: 0.45; }
.task-card.completed .task-subject { text-decoration: line-through; color: var(--text-dim); }

.task-check {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  background: transparent;
  color: transparent;
  font-size: 11px;
}

.task-check:hover { border-color: var(--green); background: var(--green-light); }

.task-card.completed .task-check {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.task-body { flex: 1; min-width: 0; }

.task-subject {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 5px;
  color: var(--text);
  cursor: pointer;
}

.task-subject:hover { text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 3px; }

.task-meta {
  display: flex;
  gap: 8px;
  font-size: 12px;
  color: var(--text-dim);
  flex-wrap: wrap;
  align-items: center;
}

/* Editable meta fields */
.project-tag, .urgency-badge, .time-estimate, .deadline-display {
  cursor: pointer;
  transition: all 0.15s;
}

.project-tag:hover, .time-estimate:hover, .deadline-display:hover {
  background: var(--surface2);
  outline: 1px dashed var(--border);
  outline-offset: 1px;
}

.urgency-badge:hover {
  outline: 1px dashed var(--border);
  outline-offset: 1px;
}

.urgency-badge {
  font-weight: 600;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.3px;
}

.urgency-badge.u0 { color: var(--text-dim); background: var(--surface2); }
.urgency-badge.u1 { background: var(--yellow-light); color: var(--yellow); }
.urgency-badge.u2 { background: var(--orange-light); color: var(--orange); }
.urgency-badge.u3 { background: var(--red-light); color: var(--red); }

.project-tag {
  background: var(--surface2);
  padding: 2px 9px;
  border-radius: 4px;
  font-weight: 500;
  color: var(--text-secondary);
}

.time-estimate {
  padding: 2px 6px;
  border-radius: 4px;
}

.deadline-display {
  padding: 2px 6px;
  border-radius: 4px;
}

.task-actions {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
  align-items: center;
}

.task-actions .delete-btn { opacity: 0; transition: opacity 0.15s; }
.task-card:hover .task-actions .delete-btn { opacity: 1; }

.task-actions button {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 5px 9px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.15s;
}

.task-actions .expand-btn { font-size: 10px; color: var(--text-dim); }
.task-actions .expand-btn:hover { background: var(--surface2); color: var(--accent); }
.task-card.expanded .task-actions .expand-btn { color: var(--accent); }
.task-actions .delete-btn:hover { background: var(--red-light); color: var(--red); }

/* --- Inline editing --- */
.inline-edit-input,
.inline-edit-select {
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--accent);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 12px;
  outline: none;
  box-shadow: 0 0 0 2px var(--accent-light);
}

.inline-edit-subject {
  font-size: 15px;
  font-weight: 500;
  width: 100%;
  padding: 4px 8px;
}

/* --- Task detail / description --- */
.task-detail {
  background: var(--surface);
  border-top: 1px solid var(--border-light);
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 14px 18px;
  margin-top: -6px;
  box-shadow: var(--shadow-md);
}

.desc-textarea {
  width: 100%;
  min-height: 60px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  resize: vertical;
  transition: border-color 0.2s;
}

.desc-textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-light); }
.desc-textarea::placeholder { color: var(--text-dim); }

/* --- Empty state --- */
.empty-state { text-align: center; padding: 56px 20px; color: var(--text-dim); }
.empty-state p { font-size: 14px; }

/* --- Deadline helpers --- */
.deadline-overdue { color: var(--red) !important; font-weight: 600; }
.deadline-today { color: var(--orange) !important; font-weight: 600; }

/* --- Overdue task cards --- */
.task-card.overdue {
  background: var(--red-light);
  border-left-color: var(--red) !important;
}

.task-card.overdue .task-subject { color: var(--red); }

.day-header.deadline-overdue { background: var(--red-light); border-radius: var(--radius-sm); padding: 6px 10px; }
.day-header.deadline-overdue .day-label { font-weight: 700; }
.day-header.deadline-overdue .day-time { background: rgba(214, 59, 59, 0.15); color: var(--red); }

/* --- Emoji shower --- */
.emoji-particle {
  position: fixed;
  font-size: 48px;
  pointer-events: none;
  z-index: 9999;
  animation: emoji-fly 1.1s ease-out forwards;
}

@keyframes emoji-fly {
  0% { opacity: 1; transform: translate(0, 0) scale(0.3) rotate(0deg); }
  30% { opacity: 1; transform: translate(calc(var(--dx) * 0.3), calc(var(--dy) * 0.3)) scale(1.2) rotate(20deg); }
  70% { opacity: 0.8; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.8) rotate(calc(var(--dx) * 0.5)); }
}

/* --- Calendar mode --- */
.app.calendar-mode { max-width: 1060px; }
.app.calendar-mode .range-group { display: none; }

.cal-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}

.cal-nav-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-secondary);
  transition: all 0.15s;
  font-family: inherit;
}

.cal-nav-btn:hover { background: var(--surface2); color: var(--text); border-color: var(--accent); }

.cal-nav-label {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  min-width: 160px;
  text-align: center;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: 24px;
}

.cal-day {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  min-height: 140px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cal-day.cal-today {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.cal-day.cal-past { opacity: 0.7; }

.cal-day-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 10px 6px;
  border-bottom: 1px solid var(--border-light);
}

.cal-day-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.cal-day-date {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.cal-today .cal-day-date {
  background: var(--accent);
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.cal-day-time {
  font-size: 10px;
  color: var(--text-dim);
  margin-left: auto;
  background: var(--surface2);
  padding: 1px 6px;
  border-radius: 4px;
}

.cal-day-tasks {
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  overflow-y: auto;
}

/* Compact calendar task card */
.cal-task {
  padding: 8px 8px !important;
  gap: 8px !important;
  border-radius: var(--radius-sm) !important;
  align-items: flex-start !important;
}

.cal-check {
  width: 16px !important;
  height: 16px !important;
  font-size: 9px !important;
  margin-top: 2px;
}

.cal-task .task-subject {
  font-size: 12px;
  line-height: 1.3;
  margin-bottom: 3px;
}

.cal-task-body { flex: 1; min-width: 0; }

.cal-task-meta {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.cal-task-meta .project-tag {
  font-size: 10px;
  padding: 1px 5px;
}

.cal-task-meta .time-estimate {
  font-size: 10px;
  padding: 1px 4px;
}

.cal-unscheduled {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cal-unscheduled .task-card {
  /* Use normal full-width cards for unscheduled section */
}

/* --- Drag and drop --- */
.task-card[draggable="true"] { cursor: grab; }
.task-card[draggable="true"]:active { cursor: grabbing; }
.task-card.dragging { opacity: 0.4; }

.drop-highlight {
  outline: 2px dashed var(--accent) !important;
  outline-offset: -2px;
  background: var(--accent-light) !important;
}

.cal-day.drop-highlight { border-color: var(--accent) !important; }
.day-group.drop-highlight { border-radius: var(--radius); }

/* --- Auth screen --- */
.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 48px 36px;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow-md);
  text-align: center;
}

.auth-card h1 { margin-bottom: 4px; }
.auth-card .subtitle { margin-bottom: 32px; }

.auth-heading {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.auth-sub {
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 28px;
}

.auth-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-full { width: 100%; padding: 13px; font-size: 15px; }

.btn-outline {
  padding: 13px 22px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  font-size: 15px;
  transition: all 0.2s;
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

#login-form,
#signup-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#login-form input,
#signup-form input {
  padding: 13px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#login-form input:focus,
#signup-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

#login-form .btn-primary,
#signup-form .btn-primary {
  margin-top: 8px;
}

.auth-toggle {
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-dim);
}

.auth-toggle button {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.auth-toggle button:hover { color: var(--accent-hover); }

.auth-error {
  margin-top: 16px;
  font-size: 13px;
  color: var(--red);
  font-weight: 500;
}

/* --- Header row with logout --- */
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logout-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}

.logout-btn:hover {
  background: var(--red-light);
  color: var(--red);
  border-color: var(--red);
}
