:root {
  --labai-bg-deep: #04101b;
  --labai-bg-panel: #081d30;
  --labai-accent: #1b90ff;
  --labai-accent-soft: #38bdf8;
  --labai-text: #f5f9ff;
  --labai-muted: #98afcc;
  --labai-border: #1e3a5f;
  --labai-input: #0a1f32;
  --labai-danger: #ff6b6b;
  --labai-font-display: "Syne", "Segoe UI", sans-serif;
  --labai-font-body: "Source Sans 3", "Segoe UI", sans-serif;
}

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

body {
  background: radial-gradient(700px 400px at 90% 0%, rgba(27, 144, 255, 0.16), transparent 60%), #020617;
  font-family: var(--labai-font-body);
  color: var(--labai-text);
  min-height: 100vh;
  width: 100%;
}

.auth-screen {
  width: 100%;
  min-height: 100vh;
  display: flex;
  overflow: hidden;
}

.form-panel {
  flex: 1;
  background: radial-gradient(circle at top left, var(--labai-bg-panel) 0%, var(--labai-bg-deep) 100%);
  padding: 32px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow-y: auto;
  min-height: 100vh;
}

.header-row {
  position: absolute;
  top: 32px;
  left: 40px;
  right: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
}

.back-link {
  color: #6c86a3;
  text-decoration: none;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 32px;
  transition: all 0.2s;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.back-link:hover {
  background: rgba(27, 144, 255, 0.15);
  border-color: rgba(27, 144, 255, 0.3);
  color: white;
}

.brand {
  display: flex;
  align-items: center;
  gap: 2px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  background: url("../images/branding/labai-mark.png") center / contain no-repeat;
}

.brand-name {
  font-family: var(--labai-font-display);
  font-weight: 700;
  font-size: 24px;
  background: linear-gradient(135deg, #e0f2fe, #9acdff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-left: -2px;
}

.form-container {
  max-width: 420px;
  width: 100%;
  margin: 88px auto 40px;
  animation: fadeInForm 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInForm {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.form-title {
  font-family: var(--labai-font-display);
  font-size: 36px;
  font-weight: 800;
  color: var(--labai-accent);
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.form-subtitle {
  text-align: center;
  color: var(--labai-muted);
  margin-bottom: 28px;
  font-size: 16px;
}

.input-group { margin-bottom: 18px; }

.input-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--labai-text);
}

.input-group input.form-control,
.form-control {
  width: 100%;
  padding: 14px 18px;
  background: var(--labai-input);
  border: 1.5px solid var(--labai-border);
  border-radius: 16px;
  color: white;
  font-size: 16px;
  font-family: var(--labai-font-body);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.form-control:focus {
  border-color: var(--labai-accent-soft) !important;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
  transform: translateY(-1px);
}

.account-type-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.account-type-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 10px;
  border-radius: 14px;
  border: 1.5px solid var(--labai-border);
  background: var(--labai-input);
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: border-color 0.2s, background 0.2s;
}

.account-type-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.account-type-option:has(input:checked) {
  border-color: var(--labai-accent);
  background: rgba(27, 144, 255, 0.16);
  box-shadow: 0 0 0 3px rgba(27, 144, 255, 0.15);
}

.captcha-group .form-control { max-width: 160px; }

.errorlist {
  list-style: none;
  margin-top: 6px;
  font-size: 12px;
  color: var(--labai-danger);
  padding-left: 8px;
}

.help-text, .helptext, ul.helptext, span.helptext { display: none !important; }

.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrapper input { padding-right: 52px; }

.toggle-password-btn {
  position: absolute;
  right: 16px;
  background: none;
  border: none;
  color: #6e8eb0;
  cursor: pointer;
  display: flex;
  padding: 0;
  z-index: 1;
}

.toggle-password-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.submit-btn {
  width: 100%;
  padding: 14px;
  background: var(--labai-accent);
  border: none;
  border-radius: 40px;
  color: white;
  font-size: 17px;
  font-weight: 700;
  font-family: var(--labai-font-body);
  cursor: pointer;
  margin-top: 12px;
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
  box-shadow: 0 6px 14px rgba(27, 144, 255, 0.2);
}

.submit-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.3);
}

.form-footer {
  text-align: center;
  margin-top: 28px;
  color: #9bb2cf;
}

.footer-link-blue {
  color: #3b9bff;
  text-decoration: none;
  font-weight: 600;
}

.footer-link-blue:hover { text-decoration: underline; }

.promo-panel {
  flex: 1.1;
  background: #000;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.promo-glow {
  position: absolute;
  inset: -20% 10% auto;
  height: 55%;
  background: radial-gradient(circle, rgba(27, 144, 255, 0.28), transparent 70%);
  filter: blur(8px);
  animation: glowPulse 6s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.08); }
}

.promo-content {
  text-align: center;
  z-index: 2;
  max-width: 500px;
  padding: 24px;
  animation: fadeInForm 0.7s ease both;
}

.promo-title {
  font-family: var(--labai-font-display);
  font-size: clamp(36px, 5vw, 54px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -1.2px;
  margin-bottom: 24px;
}

.highlight-blue { color: var(--labai-accent); }

.promo-subtitle {
  font-size: 20px;
  color: #b9c8f0;
}

.messages {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  transition: opacity 0.3s;
}

.message {
  padding: 12px 20px;
  border-radius: 12px;
  margin-bottom: 10px;
  animation: slideIn 0.3s ease;
}

.message.success { background: #10b981; color: white; }
.message.error { background: #ef4444; color: white; }
.message.info { background: #3b82f6; color: white; }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@media (max-width: 780px) {
  .promo-panel { display: none; }
  .form-panel { padding: 24px 20px; }
  .header-row { left: 20px; right: 20px; top: 20px; }
  .form-container { margin-top: 72px; }
  .account-type-toggle { grid-template-columns: 1fr; }
}
