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

:root {
  --bg: #0f0f0f;
  --surface: #1a1a1a;
  --surface2: #242424;
  --border: #333;
  --text: #e0e0e0;
  --text2: #888;
  --accent: #6c5ce7;
  --accent2: #a29bfe;
  --urgent: #ff6b6b;
  --important: #feca57;
  --normal: #54a0ff;
  --done: #00d2d3;
  --green: #00b894;
  --radius: 12px;
}

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

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

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

header h1 { font-size: 24px; font-weight: 700; }
header h1 span { color: var(--accent2); }
header .date { color: var(--text2); font-size: 14px; }

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.tab {
  padding: 8px 20px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text2);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.tab:hover { border-color: var(--accent); color: var(--text); }
.tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.panel { display: none; }
.panel.active { display: block; }

/* Stats row */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.stat-card .label { font-size: 12px; color: var(--text2); text-transform: uppercase; letter-spacing: 1px; }
.stat-card .value { font-size: 32px; font-weight: 700; margin-top: 4px; }
.stat-card .sub { font-size: 12px; color: var(--text2); margin-top: 4px; }

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.card h3 { font-size: 16px; margin-bottom: 12px; }

/* Task list */
.task-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface2);
  border-radius: 8px;
  margin-bottom: 8px;
  transition: all 0.2s;
}

.task-item:hover { background: #2a2a2a; }

.task-item .checkbox {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
}

.task-item .checkbox:hover { border-color: var(--green); }
.task-item.done .checkbox { background: var(--green); border-color: var(--green); }
.task-item.done .task-title { text-decoration: line-through; color: var(--text2); }

.task-title { flex: 1; font-size: 14px; }
.task-meta { font-size: 12px; color: var(--text2); }

.priority-badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.priority-badge.urgent { background: rgba(255,107,107,0.2); color: var(--urgent); }
.priority-badge.important { background: rgba(254,202,87,0.2); color: var(--important); }
.priority-badge.normal { background: rgba(84,160,255,0.2); color: var(--normal); }

/* Meeting */
.meeting-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--surface2);
  border-radius: 8px;
  margin-bottom: 8px;
  border-left: 3px solid var(--accent);
}

.meeting-time {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent2);
  min-width: 80px;
}

.meeting-info { flex: 1; }
.meeting-info .title { font-size: 14px; font-weight: 600; }
.meeting-info .location { font-size: 12px; color: var(--text2); margin-top: 2px; }

/* Habit tracker */
.habit-grid {
  display: grid;
  gap: 16px;
}

.habit-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--surface2);
  border-radius: 8px;
}

.habit-emoji { font-size: 24px; }
.habit-info { flex: 1; }
.habit-info .name { font-size: 14px; font-weight: 600; }
.habit-info .target { font-size: 12px; color: var(--text2); }

.habit-days {
  display: flex;
  gap: 4px;
}

.habit-day {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--text2);
  cursor: pointer;
  transition: all 0.2s;
}

.habit-day.completed { background: var(--green); border-color: var(--green); color: #fff; }
.habit-day:hover { border-color: var(--green); }
.habit-day .day-label { font-size: 9px; }

.streak { font-size: 13px; font-weight: 700; color: var(--green); min-width: 60px; text-align: right; }

/* Form */
.add-form {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.add-form input, .add-form select {
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-size: 14px;
  outline: none;
}

.add-form input:focus, .add-form select:focus { border-color: var(--accent); }
.add-form input { flex: 1; }

.btn {
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn:hover { background: var(--accent2); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-danger { background: var(--urgent); }
.btn-danger:hover { background: #ee5a5a; }

.delete-btn {
  background: none;
  border: none;
  color: var(--text2);
  cursor: pointer;
  padding: 4px;
  font-size: 16px;
  opacity: 0;
  transition: all 0.2s;
}

.task-item:hover .delete-btn,
.meeting-item:hover .delete-btn { opacity: 1; }
.delete-btn:hover { color: var(--urgent); }

.empty { text-align: center; padding: 40px; color: var(--text2); font-size: 14px; }

@media (max-width: 768px) {
  .container { padding: 12px; }
  header h1 { font-size: 18px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .habit-days { flex-wrap: wrap; }
  .add-form { flex-wrap: wrap; }
  .add-form input { min-width: 100%; }
}
