/* ============================================================
   Ticketverteiler — Login
   Corporate Identity: SCHÄFER GROUP
   Petrol #10484C · Verlauf #10634C · Montserrat · Streifen-Motiv
   Alles scoped unter .sg-login — greift in keine andere Seite ein.
   ============================================================ */

@font-face {
  font-family: 'Montserrat';
  src: url('/fonts/montserrat-var.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

.sg-login {
  --p:        #10484C;   /* Leitfarbe */
  --p2:       #10634C;   /* Verlaufszwilling / Active */
  --p-deep:   #0B3134;
  --p-ink:    #072225;
  --ink:      #0C2A2D;   /* Text auf Hell */
  --body:     #45514F;   /* Fließtext, AA-konform */
  --muted:    #6B7877;
  --paper:    #F1F5F4;
  --surface:  #FFFFFF;
  --line:     #DCE4E2;
  --line-2:   #C9D5D2;
  --ring:     #10634C;
  --danger:   #A2473A;
  --danger-bg:#FBEDEA;
  --mint:     #7FC9A9;

  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  color: var(--body);
  background: var(--paper);
  padding: 0;
  overflow: hidden;
}

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

/* ---------------------------------------------------------------
   BRAND PANEL (links)
   --------------------------------------------------------------- */
.sg-brand {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(120% 90% at 12% 8%, rgba(16,99,76,.42) 0%, rgba(16,99,76,0) 55%),
    linear-gradient(152deg, var(--p-ink) 0%, var(--p) 54%, #0E5450 100%);
  color: #fff;
  padding: clamp(32px, 4.4vw, 64px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
}

/* Feines Diagonal-Raster als Textur */
.sg-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: repeating-linear-gradient(
    -32deg,
    rgba(255,255,255,.05) 0px,
    rgba(255,255,255,.05) 1px,
    transparent 1px,
    transparent 26px
  );
  mask-image: radial-gradient(90% 80% at 30% 40%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(90% 80% at 30% 40%, #000 40%, transparent 100%);
  pointer-events: none;
}

/* Großes aufsteigendes Streifen-Motiv */
.sg-motif {
  position: absolute;
  right: -6%;
  bottom: -8%;
  width: min(62%, 460px);
  height: auto;
  z-index: 0;
  color: #fff;
  opacity: .10;
  pointer-events: none;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,.25));
}
.sg-motif .bar { transform-origin: bottom; }

/* Weicher Lichtschein, der langsam driftet */
.sg-brand::after {
  content: "";
  position: absolute;
  z-index: 0;
  width: 46%;
  aspect-ratio: 1;
  left: 8%;
  top: 24%;
  background: radial-gradient(circle, rgba(127,201,169,.30) 0%, transparent 68%);
  filter: blur(30px);
  pointer-events: none;
}

.sg-brand > * { position: relative; z-index: 1; }

.sg-brand-top {
  display: flex;
  align-items: center;
  gap: 14px;
}
.sg-brand-logo {
  height: 34px;
  width: auto;
  display: block;
}

.sg-brand-body { max-width: 20ch; }
.sg-eyebrow {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--mint);
  margin: 0 0 18px;
}
.sg-brand-body h2 {
  font-size: clamp(1.9rem, 3.3vw, 2.9rem);
  line-height: 1.06;
  letter-spacing: -.02em;
  font-weight: 800;
  color: #fff;
  margin: 0;
  white-space: nowrap;
}
.sg-brand-body p {
  margin: 18px 0 0;
  font-size: clamp(.95rem, 1.2vw, 1.08rem);
  line-height: 1.55;
  color: rgba(255,255,255,.72);
  max-width: 34ch;
}

.sg-brand-foot {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.sg-club-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .82rem;
  color: rgba(255,255,255,.66);
  font-weight: 500;
}
.sg-club-row .dot {
  width: 9px; height: 9px; border-radius: 50%;
  flex: none;
  box-shadow: 0 0 0 3px rgba(255,255,255,.08);
}
.sg-club-row .dot.arm,
.sg-club-row .dot.roe { background: var(--mint); }
.sg-endorse {
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.42);
  font-weight: 600;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.12);
}

/* ---------------------------------------------------------------
   FORM PANEL (rechts)
   --------------------------------------------------------------- */
.sg-form {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 4vw, 56px);
  background: var(--paper);
  position: relative;
}
.sg-card {
  width: 100%;
  max-width: 384px;
}

.sg-kicker {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--p2);
  margin: 0 0 14px;
}
.sg-card h1 {
  font-size: clamp(1.7rem, 2.4vw, 2rem);
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--ink);
  margin: 0 0 6px;
  line-height: 1.05;
}
.sg-card .sg-sub {
  margin: 0 0 26px;
  font-size: .92rem;
  color: var(--muted);
}

/* Alert */
.sg-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--danger-bg);
  border: 1px solid rgba(162,71,58,.28);
  color: #8A3A2F;
  border-radius: 11px;
  padding: 11px 14px;
  font-size: .88rem;
  font-weight: 500;
  margin-bottom: 20px;
  line-height: 1.4;
}
.sg-alert svg { flex: none; }

/* Fields */
.sg-field { margin-bottom: 16px; }
.sg-field label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 7px;
  letter-spacing: .005em;
}
.sg-input {
  position: relative;
  display: flex;
  align-items: center;
}
.sg-input .ic {
  position: absolute;
  left: 13px;
  color: var(--muted);
  display: inline-flex;
  pointer-events: none;
  transition: color .18s ease;
}
.sg-input input {
  width: 100%;
  font-family: inherit;
  font-size: .96rem;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 11px;
  padding: 13px 14px 13px 42px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
  -webkit-appearance: none;
  appearance: none;
}
.sg-input input::placeholder { color: #A9B4B2; }
.sg-input input:hover { border-color: var(--line-2); }
.sg-input input:focus {
  outline: none;
  border-color: var(--p2);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(16,99,76,.13);
}
.sg-input input:focus + .sg-toggle,
.sg-input input:focus ~ .ic { color: var(--p2); }
.sg-input:focus-within .ic { color: var(--p2); }

/* Passwort-Umschalter */
.sg-toggle {
  position: absolute;
  right: 6px;
  width: 34px; height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  border-radius: 8px;
  transition: color .15s ease, background .15s ease;
}
.sg-toggle:hover { color: var(--ink); background: rgba(16,72,76,.06); }
.sg-toggle:focus-visible { outline: 2px solid var(--p2); outline-offset: 2px; }
.sg-toggle .eye-off { display: none; }
.sg-toggle.is-on .eye-on { display: none; }
.sg-toggle.is-on .eye-off { display: inline-flex; }

/* CapsLock-Hinweis */
.sg-caps {
  display: none;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: .76rem;
  font-weight: 600;
  color: #8A6417;
}
.sg-caps.show { display: flex; }

/* Submit */
.sg-submit {
  position: relative;
  width: 100%;
  margin-top: 6px;
  border: 0;
  border-radius: 11px;
  background: var(--p);
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .01em;
  padding: 14px 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  overflow: hidden;
  transition: background .2s ease, transform .12s ease, box-shadow .2s ease;
  box-shadow: 0 6px 18px -8px rgba(16,72,76,.6);
}
.sg-submit::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.18) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .6s ease;
}
.sg-submit:hover {
  background: var(--p2);
  box-shadow: 0 12px 26px -10px rgba(16,99,76,.65);
  transform: translateY(-1px);
}
.sg-submit:hover::before { transform: translateX(120%); }
.sg-submit:active { transform: translateY(0); }
.sg-submit:focus-visible { outline: 2px solid var(--p2); outline-offset: 3px; }
.sg-submit .arrow { transition: transform .2s ease; }
.sg-submit:hover .arrow { transform: translateX(4px); }
.sg-submit .label { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 9px; }

/* Ladezustand */
.sg-submit .spinner {
  display: none;
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
}
.sg-submit.is-loading { pointer-events: none; background: var(--p2); }
.sg-submit.is-loading .label { display: none; }
.sg-submit.is-loading .spinner { display: inline-block; animation: sg-spin .7s linear infinite; }
@keyframes sg-spin { to { transform: rotate(360deg); } }

.sg-card-foot {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: .78rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.sg-card-foot .lock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ---------------------------------------------------------------
   ENTRANCE ANIMATIONS
   --------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .sg-reveal { opacity: 0; transform: translateY(14px); animation: sg-rise .7s cubic-bezier(.2,.7,.2,1) forwards; }
  .sg-delay-1 { animation-delay: .06s; }
  .sg-delay-2 { animation-delay: .14s; }
  .sg-delay-3 { animation-delay: .22s; }
  .sg-delay-4 { animation-delay: .30s; }
  .sg-delay-5 { animation-delay: .38s; }
  .sg-delay-6 { animation-delay: .46s; }

  .sg-motif .bar { opacity: 0; transform: translateY(30px); animation: sg-barrise .9s cubic-bezier(.2,.7,.2,1) forwards; }
  .sg-motif .bar:nth-child(1) { animation-delay: .15s; }
  .sg-motif .bar:nth-child(2) { animation-delay: .27s; }
  .sg-motif .bar:nth-child(3) { animation-delay: .39s; }
  .sg-motif .bar:nth-child(4) { animation-delay: .51s; }
  .sg-motif .bar:nth-child(5) { animation-delay: .63s; }

  .sg-brand::after { animation: sg-drift 14s ease-in-out infinite alternate; }
  .sg-shake { animation: sg-shake .5s cubic-bezier(.36,.07,.19,.97); }
}
@keyframes sg-rise { to { opacity: 1; transform: translateY(0); } }
@keyframes sg-barrise { to { opacity: 1; transform: translateY(0); } }
@keyframes sg-drift {
  0%   { transform: translate(0,0) scale(1); opacity: .9; }
  100% { transform: translate(14%, -8%) scale(1.14); opacity: .55; }
}
@keyframes sg-shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}

/* ---------------------------------------------------------------
   RESPONSIVE
   --------------------------------------------------------------- */
@media (max-width: 860px) {
  .sg-login {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    overflow: visible;
    min-height: 100vh;
    min-height: 100dvh;
  }
  .sg-brand {
    padding: 26px 22px 30px;
    gap: 24px;
    min-height: 210px;
  }
  .sg-brand-body { max-width: none; }
  .sg-brand-body h2 { font-size: 1.6rem; }
  .sg-brand-body p { display: none; }
  .sg-brand-foot { display: none; }
  .sg-motif { width: 220px; right: -20px; bottom: -20px; opacity: .13; }
  .sg-form { padding: 30px 22px 44px; align-items: flex-start; }
  .sg-card { max-width: 420px; margin: 0 auto; }
}

@media (max-width: 400px) {
  .sg-brand { min-height: 170px; }
  .sg-brand-body h2 { font-size: 1.4rem; }
}

@media (hover: none) and (pointer: coarse) {
  .sg-input input { font-size: 16px; }   /* verhindert iOS-Zoom */
  .sg-submit { min-height: 48px; }
}
