:root{
  --bg: radial-gradient(circle at top left, #ffffff 0, #f8f7f4 40%, #ece9e0 100%);
  --card-1: #fffbea;
  --card-2: #f0f6ff;
  --border: #e0ded7;
  --text: #222;
  --muted: #777;
  --primary: #4a6cf7;
  --danger: #ff6b6b;
  --radius: 18px;
  --shadow: 0 10px 25px rgba(0,0,0,.08);
}

*, *::before, *::after {
  box-sizing: border-box;
}

body.tasks-body{
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 12px;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.wrap{
  width: 100%;
  max-width: 600px;
  background: #f8f7f4;
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(0,0,0,.12);
  padding: 14px 14px 12px;
  overflow: hidden;
}

#h{ display:none; }

.auth-topbar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.brand{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}
.brand-dots{ display: inline-flex; gap: 4px; }
.brand-dot{
  width: 12px;
  height: 12px;
  border-radius: 999px;
  box-shadow: 0 2px 4px rgba(0,0,0,.18);
  display: inline-block;
}
.brand-dot-1{ background: #4a6cf7; }
.brand-dot-2{ background: #ffc447; }
.brand-dot-3{ background: #ff6b6b; }
.brand-title{
  font-weight: 800;
  font-size: 16px;
  letter-spacing: .04em;
  text-transform: lowercase;
  color: var(--text);
}

.auth-header-link{
  border: none;
  background: #fff;
  box-shadow: 0 4px 10px rgba(0,0,0,.05);
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.auth-header-link .icon{ font-size: 15px; }

.auth-intro{ margin-bottom: 10px; }
.auth-intro .greeting{
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 4px;
}
.auth-intro .title-main{
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
  color: var(--text);
}
.auth-intro .title-sub{
  font-size: 13px;
  color: var(--muted);
  line-height: 1.35;
  max-width: 520px;
}

.section-label{
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
  margin: 12px 2px 6px;
}

.auth-card{
  border-radius: var(--radius);
  box-shadow: 0 6px 16px rgba(0,0,0,.06);
  padding: 14px 14px 12px;
  border: 1px solid rgba(0,0,0,.03);
  background: var(--card-1);
  animation: fadeUp .35s ease-out both;
}

@keyframes fadeUp{
  from{ opacity: 0; transform: translateY(6px); }
  to{ opacity: 1; transform: translateY(0); }
}

.card-title{
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.card-subtitle{
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 10px;
  line-height: 1.35;
}

.form-row{ margin-bottom: 8px; }
.form-label{ font-size: 12px; margin-bottom: 3px; display:block; color: var(--text); }

.form-input{
  width: 100%;
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 999px;
  border: 1px solid var(--border);
  outline: none;
  background: #fff;
  color: var(--text);
  box-sizing: border-box;
}
.form-input:focus{
  border-color: var(--primary);
  box-shadow: 0 0 0 1px rgba(74,108,247,.25);
}

.form-inline{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 4px 0 6px;
  font-size: 12px;
  flex-wrap: wrap;
}

.checkbox-row{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  user-select: none;
}
.checkbox-row input{ accent-color: var(--primary); }

.forgot-link, .toggle-link, .back-link{
  font-size: 12px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}

.pill-btn{
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  background: linear-gradient(135deg, var(--primary), #8a9eff);
  box-shadow: 0 4px 12px rgba(74,108,247,.45);
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.pill-btn:active{
  transform: scale(.99);
  box-shadow: 0 3px 10px rgba(74,108,247,.35);
}

.auth-note{
  font-size: 11px;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.4;
}

#errorMsg{
  margin-top: 8px;
  font-size: 12px;
  color: #b91c1c;
  line-height: 1.35;
  min-height: 18px;
}
#forgotMsg{
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
  min-height: 18px;
}

.auth-bottom-link{
  font-size: 12px;
  margin-top: 10px;
  text-align: center;
  color: var(--text);
}

.auth-footer{
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(0,0,0,.06);
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 520px){
  body.tasks-body{ padding: 0; }
  .wrap{
    max-width: 100%;
    min-height: 100vh;
    border-radius: 0;
    box-shadow: none;
  }
}
