/* ══════════════════════════════════════════════════════════
   AUTH COMPLETE STYLES
   Login, Register, Nav-Buttons, Error/Success Messages
   ──────────────────────────────────────────────────────────
   Einbinden im <head>:
   <link rel="stylesheet" href="css/auth.css">
   ══════════════════════════════════════════════════════════ */

/* ── Link-Reset für Auth-Links ── */
a.nav-auth-login,
a.nav-auth-register,
.auth-footer a,
.auth-remember a,
.auth-forgot {
  text-decoration: none;
}

/* ══════════════════════════════════
   NAV AUTH BUTTONS (Header)
   ══════════════════════════════════ */
.nav-auth {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0.5rem;
}

.nav-auth-login {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary, #8892a8);
  text-decoration: none;
  transition: all 0.3s;
  border: 1px solid transparent;
  white-space: nowrap;
  font-family: 'Outfit', sans-serif;
}

.nav-auth-login:hover {
  color: var(--text-primary, #eef0f6);
  background: rgba(255,255,255,0.04);
}

.nav-auth-register {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1.2rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent-gradient, linear-gradient(135deg, #00d4ff 0%, #3b82f6 50%, #8b5cf6 100%));
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.3s;
  font-family: 'Outfit', sans-serif;
  border: none;
}

.nav-auth-register:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0,212,255,0.2);
  color: #fff;
}

/* Logout-Variante (rot) */
.nav-auth-register--logout {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
}
.nav-auth-register--logout:hover {
  box-shadow: 0 4px 15px rgba(239,68,68,0.2) !important;
}

/* ══════════════════════════════════
   INSIGHTS DROPDOWN (Header)
   ══════════════════════════════════ */
.nav-dropdown {
  position: relative;
  margin-left: 0.5rem;
}

.nav-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent-gradient, linear-gradient(135deg, #00d4ff 0%, #3b82f6 50%, #8b5cf6 100%));
  border: none;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  white-space: nowrap;
  transition: all 0.3s;
}
.nav-dropdown-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0,212,255,0.25);
}
.nav-dropdown-btn svg {
  transition: transform 0.3s;
}
.nav-dropdown.open .nav-dropdown-btn svg {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: rgba(15, 20, 35, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.05);
}
.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  transition: all 0.2s;
  font-family: 'Outfit', sans-serif;
}
.nav-dropdown-item:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}
.nav-dropdown-item svg {
  opacity: 0.5;
  flex-shrink: 0;
  transition: opacity 0.2s;
}
.nav-dropdown-item:hover svg {
  opacity: 1;
}

/* Mobile: Dropdown im Burger-Menü */
@media (max-width: 900px) {
  .nav-dropdown {
    width: 100%;
    margin: 0.25rem 0;
    margin-left: 0;
  }
  .nav-dropdown-btn {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1rem;
  }
  .nav-dropdown-menu {
    position: static;
    min-width: 100%;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
    margin-top: 0.4rem;
  }
  .nav-dropdown.open .nav-dropdown-menu {
    display: block;
  }
  .nav-auth {
    width: 100%;
    margin: 0.25rem 0;
    margin-left: 0;
    justify-content: center;
  }
  .nav-lang {
    margin: 0.5rem 0 0.25rem;
    margin-left: 0;
    align-self: center;
  }
}

/* ══════════════════════════════════
   AUTH PAGES (Login / Register)
   ══════════════════════════════════ */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 60px);
  padding: 6rem 1rem;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  padding: 2.5rem 2rem;
  border-radius: 20px;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border-subtle, rgba(255,255,255,0.06));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-logo {
  height: 36px;
  width: auto;
  margin-bottom: 1.5rem;
}

.auth-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  color: var(--text-primary, #eef0f6);
}

.auth-header p {
  font-size: 0.88rem;
  color: var(--text-secondary, #8892a8);
  margin: 0;
}

/* ── Auth Form ── */
.auth-form .form-group {
  margin-bottom: 1.15rem;
}

.auth-form .form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted, #555d74);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.auth-form .form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border-subtle, rgba(255,255,255,0.06));
  background: rgba(255,255,255,0.03);
  color: var(--text-primary, #eef0f6);
  font-size: 16px; /* Prevent iOS zoom */
  font-family: 'Outfit', sans-serif;
  transition: border-color 0.3s, background 0.3s;
  outline: none;
  box-sizing: border-box;
}

.auth-form .form-input:focus {
  border-color: var(--accent-cyan, #00d4ff);
  background: rgba(0,212,255,0.03);
}

.auth-form .form-input::placeholder {
  color: var(--text-muted, #555d74);
}

.auth-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

/* ── Checkbox, Remember, Forgot ── */
.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.auth-remember {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-secondary, #8892a8);
  cursor: pointer;
}

.auth-remember input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent-cyan, #00d4ff);
  cursor: pointer;
}

.auth-remember a {
  color: var(--accent-cyan, #00d4ff);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-forgot {
  font-size: 0.82rem;
  color: var(--accent-cyan, #00d4ff);
  text-decoration: none;
  transition: color 0.3s;
}

.auth-forgot:hover {
  color: var(--accent-blue, #3b82f6);
}

/* ── Submit Button ── */
.auth-btn {
  display: block;
  width: 100%;
  padding: 0.85rem 1.5rem;
  border-radius: 10px;
  border: none;
  background: var(--accent-gradient, linear-gradient(135deg, #00d4ff 0%, #3b82f6 50%, #8b5cf6 100%));
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s;
  font-family: 'Outfit', sans-serif;
  min-height: 48px;
  text-align: center;
  box-sizing: border-box;
}

.auth-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(0,212,255,0.2);
}

.auth-btn:active {
  transform: translateY(0);
}

/* ── Footer (Already registered? / Sign in) ── */
.auth-footer {
  text-align: center;
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle, rgba(255,255,255,0.06));
}

.auth-footer p {
  font-size: 0.85rem;
  color: var(--text-secondary, #8892a8);
  margin: 0;
}

.auth-footer a {
  color: var(--accent-cyan, #00d4ff);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s;
}

.auth-footer a:hover {
  color: var(--accent-blue, #3b82f6);
}

/* ══════════════════════════════════
   ERROR & NOTICE MESSAGES
   ══════════════════════════════════ */
.auth-error {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.2);
  color: #fca5a5;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.auth-error svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: #ef4444;
}

.auth-dev-notice {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  background: rgba(234,179,8,0.06);
  border: 1px solid rgba(234,179,8,0.15);
  color: #eab308;
  font-size: 0.78rem;
  margin-bottom: 1.25rem;
}

.auth-dev-notice svg {
  flex-shrink: 0;
}

/* ══════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════ */

/* Tablet */
@media (min-width: 768px) {
  .nav-auth {
    margin: 0;
    margin-left: 0.5rem;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .nav-auth-login {
    padding: 0.5rem 1.15rem;
    font-size: 0.85rem;
  }
  .nav-auth-register {
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
  }
}

/* Small Phones */
@media (max-width: 480px) {
  .auth-card {
    padding: 2rem 1.25rem;
    border-radius: 16px;
  }
  .auth-form-row {
    grid-template-columns: 1fr;
  }
  .auth-form-row--zip {
    grid-template-columns: 100px 1fr;
  }
  .auth-header h1 {
    font-size: 1.3rem;
  }
  .auth-actions {
    flex-direction: column;
  }
}

/* ══════════════════════════════════
   REGISTER FORM EXTENSIONS
   ══════════════════════════════════ */

/* Wider card for register */
.auth-card--wide {
  max-width: 540px;
}

/* Select / Dropdown */
.form-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23555d74' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.form-select:focus {
  border-color: var(--accent-cyan, #00d4ff);
  background-color: rgba(0,212,255,0.03);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2300d4ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

.form-select option {
  background: #0e1117;
  color: #eef0f6;
}

/* PLZ / Ort row */
.auth-form-row--zip {
  grid-template-columns: 120px 1fr;
}

/* Checkboxes */
.auth-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1.5rem 0;
}

.auth-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text-secondary, #8892a8);
}

.auth-checkbox input[type="checkbox"] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent-cyan, #00d4ff);
  cursor: pointer;
}

.auth-checkbox a {
  color: var(--accent-cyan, #00d4ff);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-checkbox a:hover {
  color: var(--accent-blue, #3b82f6);
}

/* Action Buttons (Register + Sign In) */
.auth-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.auth-actions .auth-btn {
  flex: 1;
}

.auth-btn--secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  border: 1px solid var(--border-subtle, rgba(255,255,255,0.06)) !important;
  color: var(--text-secondary, #8892a8) !important;
  text-decoration: none;
  box-shadow: none !important;
}

.auth-btn--secondary:hover {
  background: rgba(255,255,255,0.04) !important;
  color: var(--text-primary, #eef0f6) !important;
  border-color: rgba(255,255,255,0.12) !important;
  transform: none !important;
}

/* Date input fix */
input[type="date"].form-input {
  color-scheme: dark;
}

input[type="date"].form-input::-webkit-calendar-picker-indicator {
  filter: invert(0.5);
  cursor: pointer;
}