/* ============ Auth UI (sportlich, hell, responsive) ============ */
:root{
  --bg: #f7fafc;
  --card: #ffffff;
  --text: #0f172a;            /* slate-900 */
  --muted: #64748b;           /* slate-500 */
  --border: #e2e8f0;          /* slate-200 */
  --accent: #16a34a;          /* green-600 (sportlich) */
  --accent-600: #15803d;      /* green-700 */
  --accent-soft: #dcfce7;     /* green-50/100 */
  --danger: #dc2626;
  --info: #2563eb;
  --success: #16a34a;
  --shadow: 0 10px 25px rgba(2, 6, 23, 0.08);
  --radius: 18px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body{
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: radial-gradient(1200px 600px at 80% -10%, #e6ffe6 0%, rgba(255,255,255,0) 60%), var(--bg);
  display: grid;
  place-items: center;
  padding: 24px;
}

/* Layout */
.auth-wrap{
  width: 100%;
  max-width: 880px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: stretch;
}
@media (max-width: 900px){
  .auth-wrap{ grid-template-columns: 1fr; max-width: 560px; }
}

.brand{
  background: linear-gradient(135deg, var(--card), #fafafa);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.brand::after{
  content:"";
  position:absolute;
  inset:auto -40% -40% auto;
  width: 65%;
  aspect-ratio: 1/1;
  background: radial-gradient(closest-side, var(--accent-soft), rgba(22,163,74,0.08) 60%, transparent 70%);
  filter: blur(10px);
  transform: rotate(-18deg);
}
.logo{
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: .5px;
  font-size: 20px;
  color: var(--text);
}
.logo-badge{
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--accent);
  color: #fff; font-weight: 900;
  box-shadow: 0 8px 18px rgba(22,163,74,.35);
}
.brand h1{
  margin: 20px 0 10px;
  font-size: clamp(26px, 3.5vw, 34px);
  line-height: 1.1;
}
.brand p{
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

/* Card / Form */
.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}
.card h2{
  margin: 0 0 16px;
  font-size: 22px;
}
.help{
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
}
a{ color: var(--accent-600); text-decoration: none; }
a:hover{ text-decoration: underline; }

/* Flash messages */
.alert{ 
  border: 1px solid var(--border); 
  border-left: 4px solid var(--accent);
  background: #fff; 
  padding: 12px 14px; 
  border-radius: 10px; 
  font-size: 14px; 
  margin-bottom: 14px;
}
.alert.error{ border-left-color: var(--danger); color: #7f1d1d; background: #fee2e2; }
.alert.info{ border-left-color: var(--info); color: #1e3a8a; background: #dbeafe; }
.alert.success{ border-left-color: var(--success); color: #065f46; background: #d1fae5; }

/* Form controls */
.form{
  display: grid;
  gap: 14px;
}
.field{
  display: grid;
  gap: 6px;
}
.label{
  font-size: 13px;
  color: var(--muted);
}
.input, .select, .password{
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 16px;
  outline: none;
  background: #fff;
  transition: border-color .2s, box-shadow .2s, transform .05s;
}
.input:focus, .select:focus, .password:focus{
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(22,163,74, .12);
}
input::placeholder{ color: #98a2b3; }

/* Method switch (Tabs/Segmented) */
.segment{
  display: flex; background: #f1f5f9; border: 1px solid var(--border); border-radius: 12px; padding: 4px;
}
.segment input{ display:none; }
.segment label{
  flex:1; text-align:center; padding:10px 12px; border-radius: 10px; cursor:pointer; font-weight:600; font-size:14px; color:#334155;
  transition: background .2s, color .2s, transform .05s;
}
.segment input:checked + label{
  background:#fff; color: var(--accent-600); border: 1px solid var(--border);
  box-shadow: 0 6px 12px rgba(2,6,23,.06);
}

/* Button */
.btn{
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--accent);
  color: #fff; border: none; border-radius: 12px;
  padding: 12px 16px; font-weight: 700; font-size: 16px;
  cursor: pointer; box-shadow: 0 10px 18px rgba(22,163,74,.28);
  transition: transform .05s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover{ background: var(--accent-600); }
.btn:active{ transform: translateY(1px); box-shadow: 0 8px 14px rgba(22,163,74,.22); }
.btn.secondary{
  background: #0ea5e9;
  box-shadow: 0 10px 18px rgba(14,165,233,.22);
}
.btn.link{
  background: transparent;
  color: var(--accent-600);
  box-shadow: none;
  padding: 0; border-radius: 6px;
}

/* Footer / small */
.meta{
  margin-top: 16px; display:flex; gap:12px; flex-wrap: wrap; align-items:center;
  font-size: 13px; color: var(--muted);
}
.meta a{ color: var(--accent-600); }

/* Small utilities */
.row{ display:flex; gap:10px; }
@media (max-width: 480px){ .row{ flex-direction: column; } }

.divider{
  height:1px; background: var(--border); margin: 12px 0;
}

/* Accessibility */
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
