@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&display=swap');

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

:root {
  --bg-page: #f0f2f5;
  --ink: #0f1a2e;
  --ink-2: #4b5468;
  --ink-3: #8a92a6;
  --line: #e6e9f0;
  --orange: #ff6b1a;
  --orange-2: #ff8a45;
  --orange-soft: rgba(255, 107, 26, 0.12);
  --card-radius: 20px;
  --card-shadow: 0 10px 40px rgba(0, 0, 0, 0.11), 0 2px 8px rgba(0, 0, 0, 0.06);
}

html, body { height: 100%; }

body.bl-login-page {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg-page) !important;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

body.bl-login-page *,
.bl-login-root,
.bl-login-root * {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: inherit; }

/* ============ ANIMATED PAGE BACKGROUND (career login style) ============ */
.bl-login-root {
  position: relative;
  width: 100%;
  min-height: 100vh;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  background: var(--bg-page);
  overflow: hidden;
}

.bl-auth-bg-logos {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bl-auth-bg-logo {
  position: absolute;
  background-image: url('/beto_login_ui/static/src/img/betopia-icon.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center center;
  opacity: 0.11;
  animation-fill-mode: both;
  will-change: transform, opacity;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.bl-auth-bg-logo.l1  { width: 160px; height: 160px; top: 6%;  left: -2%;  animation: bl-logo-f1 14s ease-in-out infinite; }
.bl-auth-bg-logo.l2  { width: 120px; height: 120px; top: 20%; right: 2%;  animation: bl-logo-f2 11s ease-in-out infinite 2s; }
.bl-auth-bg-logo.l3  { width: 200px; height: 200px; top: 52%; left: 20%; animation: bl-logo-f3 17s ease-in-out infinite 1s; }
.bl-auth-bg-logo.l4  { width: 100px; height: 100px; top: 74%; left: 1%;  animation: bl-logo-f4 9s ease-in-out infinite 3s; }
.bl-auth-bg-logo.l5  { width: 140px; height: 140px; top: 80%; right: 6%; animation: bl-logo-f5 13s ease-in-out infinite 0.5s; }
.bl-auth-bg-logo.l6  { width: 110px; height: 110px; top: 38%; right: 22%; animation: bl-logo-f1 16s ease-in-out infinite 4s; }
.bl-auth-bg-logo.l7  { width: 90px;  height: 90px;  top: 4%;  right: 30%; animation: bl-logo-f2 10s ease-in-out infinite 1.5s; }
.bl-auth-bg-logo.l8  { width: 130px; height: 130px; top: 44%; left: 44%; animation: bl-logo-f3 12s ease-in-out infinite 2.5s; }
.bl-auth-bg-logo.l9  { width: 80px;  height: 80px;  top: 14%; left: 52%; animation: bl-logo-f4 15s ease-in-out infinite 0.8s; }
.bl-auth-bg-logo.l10 { width: 170px; height: 170px; top: 63%; right: 28%; animation: bl-logo-f5 18s ease-in-out infinite 3.5s; }
.bl-auth-bg-logo.l11 { width: 95px;  height: 95px;  top: 30%; left: 8%;  animation: bl-logo-f1 10s ease-in-out infinite 1.2s; }
.bl-auth-bg-logo.l12 { width: 115px; height: 115px; top: 88%; left: 48%; animation: bl-logo-f2 13s ease-in-out infinite 4.5s; }

@keyframes bl-logo-f1 {
  0%   { transform: translate3d(0, 0, 0) rotate(-8deg) scale(1); opacity: 0.11; }
  40%  { transform: translate3d(0, -24px, 0) rotate(4deg) scale(1.03); opacity: 0.17; }
  70%  { transform: translate3d(0, 10px, 0) rotate(-2deg) scale(0.98); opacity: 0.09; }
  100% { transform: translate3d(0, 0, 0) rotate(-8deg) scale(1); opacity: 0.11; }
}
@keyframes bl-logo-f2 {
  0%   { transform: translate3d(0, 0, 0) rotate(12deg) scale(1); opacity: 0.10; }
  35%  { transform: translate3d(0, 18px, 0) rotate(-5deg) scale(1.05); opacity: 0.16; }
  65%  { transform: translate3d(0, -14px, 0) rotate(8deg) scale(0.97); opacity: 0.08; }
  100% { transform: translate3d(0, 0, 0) rotate(12deg) scale(1); opacity: 0.10; }
}
@keyframes bl-logo-f3 {
  0%   { transform: translate3d(0, 0, 0) rotate(-20deg) scale(1); opacity: 0.09; }
  50%  { transform: translate3d(0, -28px, 0) rotate(10deg) scale(1.06); opacity: 0.15; }
  100% { transform: translate3d(0, 0, 0) rotate(-20deg) scale(1); opacity: 0.09; }
}
@keyframes bl-logo-f4 {
  0%   { transform: translate3d(0, 0, 0) rotate(5deg) scale(1); opacity: 0.10; }
  45%  { transform: translate3d(0, 24px, 0) rotate(-12deg) scale(1.04); opacity: 0.16; }
  100% { transform: translate3d(0, 0, 0) rotate(5deg) scale(1); opacity: 0.10; }
}
@keyframes bl-logo-f5 {
  0%   { transform: translate3d(0, 0, 0) rotate(-6deg) scale(1); opacity: 0.08; }
  60%  { transform: translate3d(0, -18px, 0) rotate(15deg) scale(1.05); opacity: 0.14; }
  100% { transform: translate3d(0, 0, 0) rotate(-6deg) scale(1); opacity: 0.08; }
}

/* Entry animations */
@keyframes bl-slide-in {
  from { opacity: 0; transform: translate3d(24px, 0, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes bl-fade-up {
  from { opacity: 0; transform: translate3d(0, 10px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

.bl-animate-card {
  animation: bl-slide-in 0.38s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}
.bl-animate-footer {
  animation: bl-fade-up 0.42s 0.22s ease both;
}
.bl-animate-item {
  animation: bl-fade-up 0.32s calc(0.08s + (var(--bl-i, 0) * 0.04s)) ease both;
}

.bl-login-shell {
  position: relative;
  z-index: 1;
  width: min(90vw, 1180px) !important;
  max-width: none !important;
  pointer-events: auto;
}

/* ============ MAIN CARD ============ */
.bl-login-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100% !important;
  min-height: min(62vh, 580px) !important;
  background: #fff;
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  border: 1px solid rgba(15, 26, 46, 0.06);
}

/* ============ LEFT PANEL — full bleed photo ============ */
.bl-panel-left {
  position: relative;
  min-height: 100%;
  overflow: hidden;
}

.bl-panel-bg {
  position: absolute;
  inset: 0;
  background: url('/beto_login_ui/static/src/img/login_img.png') center center / cover no-repeat;
  transform: scale(1.02);
  transition: transform 8s ease-out;
}

.bl-login-card:hover .bl-panel-bg {
  transform: scale(1.05);
}

.bl-panel-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(8, 12, 22, 0.15) 0%,
    rgba(8, 12, 22, 0.35) 45%,
    rgba(8, 12, 22, 0.88) 100%
  );
  pointer-events: none;
}

.bl-panel-copy {
  position: absolute;
  left: 36px;
  right: 36px;
  bottom: 36px;
  z-index: 2;
  animation: bl-fade-up 0.45s 0.2s ease both;
}

.bl-headline {
  font-size: clamp(28px, 2.6vw, 38px);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.02em;
  color: #ffffff;
  text-transform: capitalize;
}

.bl-headline em {
  font-style: normal;
  color: var(--orange);
}

.bl-accent-bar {
  display: block;
  width: 56px;
  height: 4px;
  margin-top: 18px;
  background: var(--orange);
  border-radius: 2px;
}

/* ============ RIGHT PANEL (FORM) ============ */
.bl-panel-right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 44px 52px;
  background: #ffffff;
}

.bl-form-wrap {
  width: 100%;
  max-width: 100%;
}

.bl-login-form {
  background: transparent !important;
}

.bl-login-form h2 {
  font-size: 2.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 6px;
  color: var(--ink);
}

.bl-login-form .lead {
  color: var(--ink-2);
  font-size: 1rem;
  font-weight: 400;
  margin: 0 0 22px;
}

.field { margin-bottom: 16px; }

.field label {
  display: block;
  font-size: 0.98rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 5px;
}

/* Single-tone inputs — fix dual background on icon vs field */
.input-wrap {
  display: flex;
  align-items: stretch;
  background-color: #ffffff !important;
  background-image: none !important;
  border: 1px solid #dbe2ea;
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-wrap:hover {
  border-color: #c5ced9;
}

.input-wrap:focus-within {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-soft);
}

.input-wrap .icn,
.input-wrap .toggle-pass,
.input-wrap input {
  background-color: #ffffff !important;
  background-image: none !important;
}

.input-wrap .icn,
.input-wrap .toggle-pass {
  flex: 0 0 50px;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
  transition: color 0.2s ease;
}

.input-wrap:focus-within .icn,
.input-wrap:focus-within .toggle-pass {
  color: var(--orange);
}

.input-wrap input {
  flex: 1 1 auto;
  min-width: 0;
  height: 42px;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  color: #0f172a !important;
  font-size: 1.05rem;
  padding: 0 12px 0 0;
  -webkit-appearance: none;
  appearance: none;
}

.input-wrap input::placeholder {
  color: var(--ink-3);
  opacity: 1;
}

/* Autofill — keep entire field white (no blue strip) */
.bl-login-form .input-wrap input:-webkit-autofill,
.bl-login-form .input-wrap input:-webkit-autofill:hover,
.bl-login-form .input-wrap input:-webkit-autofill:focus,
.bl-login-form .input-wrap input:-webkit-autofill:active {
  -webkit-text-fill-color: #0f172a !important;
  caret-color: #0f172a;
  transition: background-color 99999s ease-out;
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
  box-shadow: 0 0 0 1000px #ffffff inset !important;
}

.toggle-pass,
.o_show_password {
  cursor: pointer;
  pointer-events: auto !important;
}

.bl-password-wrap .toggle-pass .eye-icon {
  display: block;
}

/* Remember / Forgot */
body.bl-login-page .bl-login-form .bl-login-row {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px;
  width: 100% !important;
  margin: 10px 0 14px !important;
  padding: 0 !important;
  font-size: 1rem;
}

body.bl-login-page .bl-login-form .bl-login-row .checkbox {
  display: inline-flex !important;
  align-items: center;
  margin: 0 !important;
  color: #64748b;
  cursor: pointer;
  white-space: nowrap;
}

.checkbox input { display: none; }

.checkbox .box {
  width: 17px;
  height: 17px;
  border-radius: 5px;
  border: 1.5px solid #cdd3e0;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  transition: all 0.2s ease;
}

.checkbox .box svg {
  opacity: 0;
  transform: scale(0.4);
  transition: all 0.2s ease;
}

.checkbox input:checked + .box {
  background: var(--orange);
  border-color: var(--orange);
}

.checkbox input:checked + .box svg {
  opacity: 1;
  transform: scale(1);
}

body.bl-login-page .bl-login-form a.forgot,
.forgot {
  color: var(--orange);
  font-weight: 700;
  text-decoration: none !important;
  white-space: nowrap;
  margin-left: auto;
}

body.bl-login-page .bl-login-form a.forgot:hover,
.forgot:hover {
  color: var(--orange-2);
}

.bl-login-buttons,
.oe_login_buttons.bl-login-buttons {
  margin: 0;
  padding: 0;
}

.signin-btn {
  width: 100%;
  height: 44px;
  border: none !important;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--orange), #e16e13) !important;
  color: #ffffff !important;
  font-size: 1.1rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 8px 20px -6px rgba(255, 107, 26, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  cursor: pointer;
}

.signin-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
  color: #ffffff !important;
}

.signin-btn:active {
  transform: translateY(0);
}

.signin-btn .arrow {
  flex-shrink: 0;
  stroke: #ffffff !important;
  transition: transform 0.25s ease;
}

.signin-btn:hover .arrow {
  transform: translateX(4px);
}

.bl-security-note {
  display: flex;
  align-items: flex-start;
  flex-wrap: nowrap;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  width: 100%;
}

.bl-security-icon {
  flex-shrink: 0;
  color: var(--orange);
  line-height: 0;
  margin-top: 2px;
}

.bl-security-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.bl-security-text strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
  white-space: nowrap;
}

.bl-security-sub {
  display: block;
  font-size: 0.88rem;
  color: var(--ink-2);
  line-height: 1.35;
  white-space: nowrap;
}

.bl-alert {
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.bl-alert.error {
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.bl-alert.success {
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #14532d;
}

.bl-page-footer {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 14px;
  margin-top: 18px;
  font-size: 0.95rem;
  color: #64748b;
  pointer-events: auto;
}

.bl-footer-sep { opacity: 0.45; }

.bl-footer-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* Odoo layout resets */
html, body.bl-login-page {
  margin: 0 !important;
  padding: 0 !important;
  height: 100% !important;
  overflow: hidden !important;
}

body.bl-login-page #wrapwrap,
body.bl-login-page #wrapwrap > main,
body.bl-login-page .o_frontend_layout {
  margin: 0 !important;
  padding: 0 !important;
  height: 100% !important;
  min-height: 100% !important;
  overflow: hidden !important;
  display: block !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.bl-login-page.bg-100,
body.bl-login-page .bg-100 {
  background-color: var(--bg-page) !important;
}

.o_skip_to_content { display: none !important; }

/* Kill Bootstrap/Odoo overrides on our fields */
body.bl-login-page .bl-login-form .form-control,
body.bl-login-page .bl-login-form input.form-control,
body.bl-login-page .bl-login-form .input-group:not(.input-wrap) {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

body.bl-login-page .bl-login-form .input-wrap,
body.bl-login-page .bl-login-form .bl-password-wrap {
  display: flex !important;
  background-color: #ffffff !important;
  border: 1px solid #dbe2ea !important;
  border-radius: 8px !important;
}

body.bl-login-page .bl-login-form button.signin-btn,
body.bl-login-page .bl-login-form .signin-btn.btn-primary {
  background: linear-gradient(90deg, var(--orange), #e16e13) !important;
  color: #ffffff !important;
  border: none !important;
}

body.bl-login-page .bl-password-wrap {
  flex-wrap: nowrap !important;
}

body.bl-login-page .o_login_auth { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .bl-auth-bg-logo,
  .bl-animate-card,
  .bl-animate-footer,
  .bl-animate-item,
  .bl-panel-copy,
  .bl-panel-bg,
  .signin-btn .arrow {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 860px) {
  .bl-login-card {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .bl-panel-left {
    min-height: 300px;
    order: -1;
  }

  .bl-panel-copy {
    left: 20px;
    right: 20px;
    bottom: 20px;
  }

  .bl-panel-right {
    padding: 28px 24px 32px;
  }
}

@media (max-width: 480px) {
  .bl-login-root { padding: 10px; }
  .bl-login-form h2 { font-size: 1.85rem; }
  .bl-page-footer { font-size: 0.875rem; }
  .bl-headline { font-size: 22px; }
  .bl-auth-bg-logos { display: none; }
  .bl-security-text strong,
  .bl-security-sub {
    white-space: normal;
  }
}
