/* ── Feedbackspinne – Auth UI ── */

:root {
  --green:    #7ab800;
  --green-2:  #5e9800;
  --green-bg: rgba(122,184,0,.08);
  --red:      #dc2626;
  --red-bg:   #fef2f2;
  --red-bdr:  #fecaca;
  --blue:     #075985;
  --blue-bg:  #f0f9ff;
  --blue-bdr: #bae6fd;
  --text:     #0f172a;
  --muted:    #64748b;
  --border:   #e5e7eb;
  --card:     #ffffff;
  --shadow:   0 10px 30px rgba(15,23,42,.07);
  --radius:   16px;
  --trans:    .18s ease;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(160deg, #f0f7e6 0%, #f8fafc 40%, #ffffff 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* ── Layout ── */
.auth-wrap {
  width: 100%;
  max-width: 440px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  justify-content: center;
}
.brand img   { width: 80px; height: 80px; }
.brand span  { font-size: 22px; font-weight: 700; color: var(--green-2); letter-spacing: -.5px; }

/* ── Card ── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px 32px;
}

.card h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text);
}
.card .subtitle {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 28px;
}

/* ── Form ── */
.form-group {
  margin-bottom: 18px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

input[type=text],
input[type=email],
input[type=password] {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color var(--trans), box-shadow var(--trans);
}
input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(122,184,0,.16);
}
input::placeholder { color: #b0bec5; }

/* Password complexity bar */
.pw-meter {
  margin-top: 6px;
  height: 4px;
  border-radius: 99px;
  background: #e5e7eb;
  overflow: hidden;
}
.pw-meter-fill {
  height: 100%;
  border-radius: 99px;
  transition: width .3s, background .3s;
}
.pw-hint {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 20px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--trans), transform var(--trans), opacity var(--trans);
}
.btn:active    { transform: translateY(1px); }
.btn:disabled  { opacity: .6; cursor: not-allowed; }

.btn-primary {
  background: var(--green);
  color: #fff;
}
.btn-primary:hover:not(:disabled) { background: var(--green-2); }

.btn-ghost {
  background: transparent;
  color: var(--green-2);
  border: 1.5px solid var(--green);
}
.btn-ghost:hover:not(:disabled) { background: var(--green-bg); }

/* ── Alerts ── */
.alert {
  padding: 18px 22px !important;
  border-radius: 17px;
  font-size: 16px;
  font-weight: 600;
  font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  line-height: 1.55;
  margin-bottom: 28px !important;
  display: none;
}
.alert.show { display: block; }

.alert-success {
  background: #f3ec9b;
  border: 7px solid #f3dc44;
  color: #075985;
}

/* ── Nav links ── */
.nav-links {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}
.nav-links a, .nav-link {
  font-size: 13px;
  color: var(--green-2);
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
}
.nav-links a:hover, .nav-link:hover { text-decoration: underline; }

/* ── View transitions ── */
.auth-view { display: none; }
.auth-view.active { display: block; }

/* ── User menu (logged in) ── */
.user-bar {
  background: var(--green-bg);
  border: 1px solid rgba(122,184,0,.25);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.user-bar .name {
  font-weight: 600;
  font-size: 15px;
}
.user-bar .email {
  font-size: 12px;
  color: var(--muted);
}
.btn-sm {
  padding: 7px 14px;
  font-size: 13px;
  border-radius: 8px;
  width: auto;
}

/* ── Spinner ── */
.spinner {
  width: 18px; height: 18px;
  border: 2.5px solid rgba(255,255,255,.5);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Divider ── */
.divider {
  display: flex; align-items: center; gap: 12px;
  margin: 22px 0;
  color: var(--muted); font-size: 12px;
}
.divider::before, .divider::after {
  content: ''; flex: 1; border-top: 1px solid var(--border);
}

/* ── Info Popup ── */
.h2-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.h2-wrapper h2 { margin-bottom: 0; }
.info-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  border: none;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
  transition: background var(--trans);
}
.info-btn:hover { background: var(--green-2); }
.info-popup {
  display: none;
  position: absolute;
  top: 30px;
  left: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15,23,42,.12);
  padding: 14px 16px;
  width: 260px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
  z-index: 100;
}
.info-popup.open { display: block; }
.info-popup strong {
  display: block;
  margin-bottom: 4px;
  color: var(--green-2);
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .card { padding: 28px 20px; }
  .brand span { font-size: 19px; }
}
