/* Pinpoint - Gemeinsame Styles
   ============================ */

:root {
  --bg: #FAFAF7;
  --bg-soft: #F5F5F7;
  --panel: #FFFFFF;
  --ink: #1F2937;
  --ink-2: #4B5563;
  --muted: #6B7280;
  --line: #E5E7EB;
  --line-soft: #F0F1F3;
  --brand: #2461E8;
  --brand-dark: #1F4FC4;
  --brand-soft: #EAF1FE;
  --orange: #F08A1F;
  --green: #16A34A;
  --red: #DC2626;
  --red-soft: #FEE2E2;
  --green-soft: #DCFCE7;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

::selection { background: var(--brand); color: #fff; }

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header für eingeloggte Seiten */
.app-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
.app-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
}
.logo-mark {
  width: 22px;
  height: 22px;
  border-radius: 50% 50% 50% 0;
  background: #f63d3e;
  transform: rotate(-45deg);
  position: relative;
}
.logo-mark::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 7px;
  height: 7px;
  background: #fff;
  border-radius: 50%;
}
/* Logo-Schriftzug: zweifarbig wie das offizielle picpins-Logo.
   "pic" = dunkles Anthrazit, "pins" = signal-rot.
   Wrapper .logo-text fasst beide Hälften zu EINEM Flex-Kind zusammen,
   damit zwischen "pic" und "pins" keine Lücke (gap) entsteht. */
.logo-text { display: inline-flex; }
.logo-pic  { color: #23262e; }
.logo-pins { color: #f63d3e; }
.logo:hover { text-decoration: none; }

.user-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  color: var(--ink-2);
}
.user-meta .user-email {
  font-weight: 500;
  color: var(--ink);
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Auth-Karte (Login / Register) */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.auth-wrap .logo { margin-bottom: 32px; }

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 36px 32px;
}
.auth-card h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 6px;
}
.auth-card .lead {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 24px;
}

.field {
  margin-bottom: 14px;
}
.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.field input {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 11px 14px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color .12s, background .12s;
}
.field input:hover { background: #EFF0EC; }
.field input:focus {
  background: #fff;
  border-color: var(--brand);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, color .15s, border-color .15s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--brand);
  color: #fff;
  width: 100%;
  margin-top: 8px;
}
.btn-primary:hover {
  background: var(--brand-dark);
  text-decoration: none;
  color: #fff;
}
.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-outline:hover {
  border-color: var(--ink);
  text-decoration: none;
}

.auth-foot {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

/* Flash-Messages */
.flash {
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
  line-height: 1.45;
}
.flash-error {
  background: var(--red-soft);
  color: #7F1D1D;
  border: 1px solid #FCA5A5;
}
.flash-success {
  background: var(--green-soft);
  color: #14532D;
  border: 1px solid #86EFAC;
}

/* Dashboard */
.dashboard {
  padding: 60px 0;
}
.dashboard h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.dashboard .lead {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 32px;
}

.empty-state {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 60px 32px;
  text-align: center;
}
.empty-state h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
}
.empty-state p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 18px;
}

/* Plain-Link für Header-User-Bereich */
.auth-link-plain {
  font-size: 14px;
  color: var(--ink-2);
  text-decoration: none;
  transition: color .12s;
}
.auth-link-plain:hover {
  color: var(--ink);
  text-decoration: none;
}

/* Sprach-Wechsler im Header */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
}
.lang-switch a {
  color: var(--muted);
  text-decoration: none;
  padding: 2px 4px;
  transition: color .12s;
}
.lang-switch a.active {
  color: var(--ink);
  font-weight: 600;
}
.lang-switch a:hover {
  color: var(--ink);
}
.lang-sep {
  color: var(--muted);
  user-select: none;
}

/* Sprach-Wechsler in der Auth-Card (Login/Register) */
.auth-lang {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border-soft);
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.auth-lang a {
  color: var(--muted);
  text-decoration: none;
  padding: 0 6px;
  transition: color .12s;
}
.auth-lang a.active {
  color: var(--ink);
  font-weight: 600;
}
.auth-lang a:hover {
  color: var(--ink);
}

/* =============================================
   SPRACH-DROPDOWN
   ============================================= */
.lang-dropdown {
  position: relative;
  display: inline-block;
}
.lang-current {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2, #4B5563);
  font-family: inherit;
  transition: background .12s, color .12s;
}
.lang-current:hover {
  background: rgba(0,0,0,0.04);
  color: var(--ink);
}
.lang-current .flag {
  font-size: 16px;
  line-height: 1;
  display: inline-block;
}
.lang-current .lang-chevron {
  width: 10px;
  height: 10px;
  opacity: 0.7;
  transition: transform .15s ease;
}
.lang-dropdown.open .lang-current .lang-chevron {
  transform: rotate(180deg);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 140px;
  background: #fff;
  border: 1px solid var(--line, #E5E7EB);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
  padding: 4px;
  z-index: 200;
  display: none;
}
.lang-dropdown.open .lang-menu { display: block; }

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  transition: background .1s;
}
.lang-option:hover {
  background: rgba(0,0,0,0.04);
  text-decoration: none;
}
.lang-option.active {
  background: #EEF2FF;
  color: #2461E8;
  font-weight: 600;
}
.lang-option .flag {
  font-size: 18px;
  line-height: 1;
}

/* Auth-Lang (Login/Register) - Flaggen-Position */
.auth-lang .flag {
  font-size: 14px;
  vertical-align: middle;
  margin-right: 2px;
}

/* Icon-only Variante in der User-Meta-Zeile */
.user-meta .auth-link-plain svg {
  display: block;
}
.user-meta .auth-link-plain[aria-label] {
  display: inline-flex;
  align-items: center;
  padding: 6px;
  border-radius: 6px;
  transition: background .12s, color .12s;
}
.user-meta .auth-link-plain[aria-label]:hover {
  background: rgba(0,0,0,0.04);
}
