* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 60px;
  background: #f2f4f7;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Malgun Gothic", sans-serif;
}

.container {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

h1 {
  margin: 0 0 20px;
  font-size: 22px;
  text-align: center;
  color: #222;
}

#todo-form {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

#todo-input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  font-size: 15px;
}

#todo-input:focus {
  outline: none;
  border-color: #6366f1;
}

#todo-form button {
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  background: #6366f1;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
}

#todo-form button:hover {
  background: #4f46e5;
}

#todo-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

#todo-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 4px;
  border-bottom: 1px solid #eef0f3;
}

#todo-list li:last-child {
  border-bottom: none;
}

#todo-list li input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  flex-shrink: 0;
}

#todo-list li span {
  flex: 1;
  font-size: 15px;
  color: #222;
  word-break: break-all;
}

#todo-list li.completed span {
  text-decoration: line-through;
  color: #9aa0a6;
}

#todo-list li button {
  border: none;
  background: transparent;
  color: #9aa0a6;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
}

#todo-list li button:hover {
  color: #ef4444;
}

.login-error {
  display: none;
  margin: 12px 0 0;
  font-size: 13px;
  color: #ef4444;
  text-align: center;
}

.admin-container {
  max-width: 480px;
}

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

.admin-header h1 {
  margin: 0;
}

.logout-btn {
  padding: 6px 12px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #fff;
  color: #444;
  font-size: 13px;
  cursor: pointer;
}

.logout-btn:hover {
  background: #f2f4f7;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 8px;
  border-radius: 10px;
  background: #f7f8fa;
}

.stat-value {
  font-size: 22px;
  font-weight: 600;
  color: #222;
}

.stat-label {
  font-size: 12px;
  color: #6b7280;
  margin-top: 2px;
}

#admin-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}

#admin-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 4px;
  border-bottom: 1px solid #eef0f3;
}

#admin-list li.completed span:first-child {
  text-decoration: line-through;
  color: #9aa0a6;
}

.admin-status {
  flex-shrink: 0;
  font-size: 12px;
  color: #6b7280;
}

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

.admin-actions button {
  flex: 1;
  padding: 10px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  cursor: pointer;
}

.admin-actions button:hover {
  background: #f2f4f7;
}

.admin-actions button.danger {
  border-color: #fecaca;
  color: #ef4444;
}

.admin-actions button.danger:hover {
  background: #fef2f2;
}
