/* Auth pages (login.html, setup.html) */

.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  padding: 24px;
  font-family: var(--font, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 16px;
  box-shadow:
    0 1px 3px rgba(0,0,0,0.05),
    0 20px 50px rgba(0,0,0,0.08);
  padding: 40px 36px;
  border: 1px solid #e2e8f0;
}

.auth-logo {
  font-size: 40px;
  text-align: center;
  margin-bottom: 8px;
}

.auth-card h1 {
  font-size: 22px;
  font-weight: 600;
  text-align: center;
  margin: 0 0 8px;
  color: #0f172a;
}

.auth-sub {
  text-align: center;
  color: #64748b;
  margin: 0 0 24px;
  font-size: 14px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #475569;
}

.auth-form label.checkbox {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-weight: 400;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-form input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.auth-form small {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 400;
}

.auth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.btn-block {
  width: 100%;
  padding: 11px;
  font-size: 14px;
  font-weight: 500;
  margin-top: 4px;
}

.auth-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  margin-top: 6px;
}

/* Login/Setup page language-switcher container */
.auth-lang-switch {
  display: flex;
  justify-content: center;
  margin: 0 0 20px;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 16px;
}
.auth-lang-switch .lang-flags {
  display: flex;
  gap: 4px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 3px;
}
.auth-lang-switch .lang-flag-btn {
  background: transparent;
  border: none;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: background 0.12s, color 0.12s;
  min-width: 36px;
  text-align: center;
}
.auth-lang-switch .lang-flag-btn:hover {
  background: #fff;
  color: #0f172a;
}
.auth-lang-switch .lang-flag-btn.active {
  background: #334155;
  color: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

/* Password visibility toggle */
.input-wrap {
  position: relative;
  display: flex;
}
.input-wrap input {
  flex: 1;
  padding-right: 40px !important;
}
.pw-toggle {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 38px;
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0 8px 8px 0;
  transition: color 0.15s;
  padding: 0;
}
.pw-toggle:hover {
  color: #475569;
}
.pw-toggle svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Ensure [hidden] works even when parent sets display:flex/block */
[hidden] { display: none !important; }

/* Auth tab switcher (login / register) */
#auth-tabs {
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 20px;
  display: flex;   /* visible state; hidden attribute suppresses this via [hidden]{display:none!important} */
  gap: 0;
}
.auth-tab {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.auth-tab:hover { color: #0f172a; }
.auth-tab.active {
  color: #3b82f6;
  border-bottom-color: #3b82f6;
}
