:root {
  --lu-green: #1b5e20;
  --lu-green-light: #2e7d32;
  --lu-green-soft: #e8f5e9;
  --lu-bg: #f4f7f4;
  --lu-card: #ffffff;
  --lu-border: #dfe7df;
  --lu-text: #1a2e1a;
  --lu-muted: #5f6f5f;
}

* { box-sizing: border-box; }

body.lu-auth-body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--lu-text);
}

/* ── Split login layout ── */
body.lu-auth-split {
  background: #fff;
}

.lu-auth-split-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.lu-auth-brand-panel {
  background: linear-gradient(160deg, var(--lu-green-dark, #0d3d12) 0%, var(--lu-green) 45%, var(--lu-green-light) 100%);
  color: #fff;
  padding: 40px 48px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.lu-auth-brand-panel::before {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  top: -80px;
  right: -80px;
}

.lu-auth-back {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  position: relative;
  z-index: 1;
}

.lu-auth-back:hover { color: #fff; }

.lu-auth-brand-content {
  margin: auto 0;
  position: relative;
  z-index: 1;
  max-width: 400px;
}

.lu-auth-brand-badge {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 24px;
}

.lu-auth-brand-content h1 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  line-height: 1.2;
  margin: 0 0 16px;
  font-weight: 800;
}

.lu-auth-brand-content > p {
  opacity: 0.9;
  line-height: 1.6;
  margin: 0 0 28px;
}

.lu-auth-features {
  list-style: none;
  padding: 0;
  margin: 0;
}

.lu-auth-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  font-size: 0.95rem;
  opacity: 0.92;
}

.lu-auth-features i {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lu-auth-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  background: var(--lu-bg);
}

.lu-auth-card-flat {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border: 1px solid var(--lu-border);
  border-radius: 20px;
  box-shadow: 0 16px 48px rgba(27, 94, 32, 0.1);
  overflow: hidden;
}

.lu-auth-form-header {
  padding: 28px 28px 0;
}

.lu-auth-form-header h2 {
  margin: 0 0 6px;
  font-size: 1.5rem;
  font-weight: 800;
}

.lu-auth-form-header p {
  margin: 0;
  color: var(--lu-muted);
  font-size: 0.92rem;
}

/* ── Centered card (legacy fallback) ── */
.lu-auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(135deg, #e8f5e9 0%, #f4f7f4 45%, #ffffff 100%);
}

.lu-auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--lu-card);
  border: 1px solid var(--lu-border);
  border-radius: 18px;
  box-shadow: 0 18px 48px rgba(27, 94, 32, 0.12);
  overflow: hidden;
}

.lu-auth-header {
  background: linear-gradient(135deg, var(--lu-green), var(--lu-green-light));
  color: #fff;
  padding: 28px 28px 22px;
  text-align: center;
}

.lu-auth-body-inner { padding: 28px; }

.lu-form-label {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.lu-form-control {
  border-radius: 10px;
  border: 1px solid var(--lu-border);
  padding: 11px 12px;
}

.lu-form-control:focus {
  border-color: var(--lu-green-light);
  box-shadow: 0 0 0 0.2rem rgba(46, 125, 50, 0.15);
}

.lu-btn-primary {
  background: var(--lu-green);
  border: none;
  border-radius: 10px;
  padding: 12px;
  font-weight: 700;
  width: 100%;
  margin-top: 8px;
  color: #fff;
}

.lu-btn-primary:hover {
  background: var(--lu-green-light);
  color: #fff;
}

.lu-demo-box {
  margin-top: 22px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--lu-green-soft);
  border: 1px dashed #a5d6a7;
  font-size: 0.85rem;
}

.lu-demo-box strong {
  display: block;
  margin-bottom: 10px;
  color: var(--lu-green);
}

.lu-demo-accounts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.lu-demo-box code {
  background: #fff;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.82rem;
}

.flash-success, .alert-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.flash-error, .alert-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.flash-info, .alert-info {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.form-error {
  color: #c62828;
  font-size: 0.85rem;
  margin-top: 4px;
}

@media (max-width: 900px) {
  .lu-auth-split-wrap {
    grid-template-columns: 1fr;
  }
  .lu-auth-brand-panel {
    padding: 28px 24px;
    min-height: auto;
  }
  .lu-auth-brand-content h1 { font-size: 1.5rem; }
  .lu-auth-features { display: none; }
}
