/* ── Admin layout ─────────────────────────────────── */
.admin-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 1rem 1rem 4rem;
}

/* ── Password screen ──────────────────────────────── */
.password-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
}

.password-card {
  width: 100%;
  max-width: 380px;
  text-align: center;
}

.password-emoji {
  font-size: 3.5rem;
  margin-bottom: 0.4rem;
  animation: bounce 2s ease infinite;
  display: block;
}

.password-title {
  font-size: 2.2rem;
  color: var(--purple);
  margin-bottom: 0.25rem;
}

.password-subtitle {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

/* ── Form elements ────────────────────────────────── */
.form-group {
  margin-bottom: 1rem;
  text-align: left;
}

.form-group label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 3px solid #e0e0e0;
  border-radius: var(--radius);
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  transition: border-color 0.2s;
  background: #fff;
  color: var(--text);
}

.form-input:focus {
  outline: none;
  border-color: var(--purple);
}

.form-input.error {
  border-color: var(--coral);
  animation: wiggle 0.35s ease;
}

.error-msg {
  color: var(--coral);
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: 0.4rem;
  display: block;
  min-height: 1.2em;
}

/* ── Admin dashboard ──────────────────────────────── */
.admin-dashboard { display: none; }
.admin-dashboard.active { display: block; }

.admin-header {
  text-align: center;
  padding: 1.5rem 1rem;
}

.admin-title {
  font-size: 2.2rem;
  color: var(--purple);
}

.admin-nav {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Admin sections ───────────────────────────────── */
.admin-section {
  margin-bottom: 1.25rem;
}

.admin-section-title {
  font-size: 1.4rem;
  color: var(--text);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ── Date row ─────────────────────────────────────── */
.date-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.date-input {
  flex: 1;
  min-width: 160px;
}

/* ── Task list ────────────────────────────────────── */
.task-list-admin {
  list-style: none;
  margin-bottom: 0.75rem;
}

.task-item-admin {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  background: #f8f9fa;
  border-radius: 14px;
  border-left: 5px solid var(--green);
  transition: background 0.15s;
}

.task-item-admin.negative {
  border-left-color: var(--orange);
}

.task-type-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.task-item-label {
  flex: 1;
  font-weight: 700;
  font-size: 0.95rem;
}

.task-item-meta {
  font-size: 0.8rem;
  color: var(--text-light);
  white-space: nowrap;
}

.task-item-actions {
  display: flex;
  gap: 0.3rem;
  flex-shrink: 0;
}

.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 5px 8px;
  border-radius: 8px;
  transition: background 0.15s;
  line-height: 1;
}

.btn-icon:hover { background: rgba(0, 0, 0, 0.08); }

/* ── Add/Edit task form ───────────────────────────── */
.add-task-form {
  background: #f4f6f8;
  border-radius: 14px;
  padding: 1.1rem;
  border: 2px dashed #d0d5dd;
}

.add-task-form-title {
  font-size: 1rem;
  font-family: 'Fredoka One', cursive;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.form-row-inline {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

/* ── Type toggle ──────────────────────────────────── */
.type-toggle {
  display: flex;
  border-radius: 12px;
  overflow: hidden;
  border: 2.5px solid #d0d5dd;
  background: #fff;
}

.type-toggle input[type="radio"] { display: none; }

.type-toggle label {
  padding: 8px 14px;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  background: transparent;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.type-toggle input[value="positive"]:checked + label {
  background: var(--green);
  color: #fff;
}

.type-toggle input[value="negative"]:checked + label {
  background: var(--orange);
  color: #fff;
}

.target-input {
  width: 75px;
  text-align: center;
  padding: 10px 8px;
}

.form-btns {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ── Danger zone ──────────────────────────────────── */
.btn-reset {
  background: #fee2e2;
  color: var(--coral);
  border: 2.5px solid var(--coral);
  box-shadow: none;
  font-size: 0.95rem;
}

.btn-reset:hover {
  background: #fecaca;
  transform: translateY(-1px);
}

/* ── Admin toast ──────────────────────────────────── */
.admin-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #2D3436;
  color: #fff;
  padding: 10px 24px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.9rem;
  z-index: 500;
  white-space: nowrap;
  animation: slideUp 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.admin-toast.hidden { display: none; }

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 480px) {
  .form-row-inline {
    flex-direction: column;
    align-items: stretch;
  }
  .target-input {
    width: 100%;
  }
}
