/* ==========================================================================
   Universe Unity — space background + dark theme for the Odoo auth pages
   (login, reset password, signup — everything using web.login_layout).

   Everything is scoped to body.o_uus_space_login so no other frontend or
   backend page is touched.
   ========================================================================== */

body.o_uus_space_login{
  background:#03040c !important;
  color:#f5f4ff;
  min-height:100vh;
}

/* Odoo's website chrome. web.login_layout asks for no_header/no_footer, but the
   website module's layout ignores those flags, so hide them here instead. */
body.o_uus_space_login header#top,
body.o_uus_space_login footer#bottom,
body.o_uus_space_login #o_shared_blocks,
body.o_uus_space_login .o_skip_to_content{ display:none !important; }

body.o_uus_space_login #wrapwrap{ background:transparent !important; min-height:100vh; }
body.o_uus_space_login main{ position:relative; z-index:2; }

/* ---- background layers ---- */
body.o_uus_space_login #bg-canvas-wrap{ position:fixed; inset:0; z-index:0; }
body.o_uus_space_login #bg-canvas-wrap canvas{ display:block; width:100%; height:100%; }
body.o_uus_space_login .vignette{
  position:fixed; inset:0; z-index:1; pointer-events:none;
  background:radial-gradient(ellipse at 50% 42%, transparent 0%, transparent 45%, rgba(3,4,12,0.55) 100%);
}

/* ---- centre the card without locking scroll: a tall user list or a stack of
       error alerts must still be reachable, so this is min-height, not fixed ---- */
body.o_uus_space_login main{
  position:relative; z-index:2;
  min-height:100vh;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:18px;
  padding:32px 16px;
}

/* ---- the login card.
       website.login_layout strips Odoo's default .o_database_list card, so
       .oe_website_login_container is the only wrapper left to style. ---- */
body.o_uus_space_login .oe_website_login_container{
  max-width:420px;
  width:100%;
  background:rgba(8,10,26,0.72);
  border:1px solid rgba(124,92,255,0.3);
  border-radius:16px;
  backdrop-filter:blur(10px);
  box-shadow:0 20px 60px rgba(0,0,0,0.5);
  padding:34px 30px;
  color:#f5f4ff;
}
body.o_uus_space_login .oe_website_login_container .border-bottom,
body.o_uus_space_login .oe_website_login_container .border-top{
  border-color:rgba(255,255,255,0.12) !important;
}

/* ---- back-to-site link, sits just under the card ---- */
body.o_uus_space_login .o_uus_login_home{
  position:relative; z-index:2;
  flex:none; text-align:center;
}
body.o_uus_space_login .o_uus_login_home a{
  display:inline-flex; align-items:center; gap:9px;
  padding:9px 20px; border-radius:999px;
  font-size:0.87rem; font-weight:500;
  color:#c3c8e6; text-decoration:none;
  white-space:nowrap;   /* a pill button must never wrap its label */
  border:1px solid rgba(255,255,255,0.16);
  background:rgba(8,10,26,0.55);
  backdrop-filter:blur(8px);
  transition:color .2s ease, border-color .2s ease, background .2s ease;
}
body.o_uus_space_login .o_uus_login_home a:hover,
body.o_uus_space_login .o_uus_login_home a:focus-visible{
  color:#4fe3e0;
  border-color:rgba(79,227,224,0.5);
  background:rgba(8,10,26,0.82);
}
body.o_uus_space_login .o_uus_login_home svg{ width:15px; height:15px; }

/* Odoo leaves this div empty unless an SSO/OAuth provider is configured */
body.o_uus_space_login .o_login_auth:empty{ display:none; }

/* ---- form fields ---- */
body.o_uus_space_login .form-control{
  background:rgba(255,255,255,0.04);
  border:1px solid rgba(255,255,255,0.12);
  color:#f5f4ff;
  border-radius:10px;
  padding:11px 14px;
}
body.o_uus_space_login .form-control:focus{
  background:rgba(255,255,255,0.07);
  border-color:#7c5cff;
  color:#f5f4ff;
  box-shadow:0 0 0 0.2rem rgba(124,92,255,0.25);
}
body.o_uus_space_login .form-control::placeholder{ color:#8b93b8; }
body.o_uus_space_login .form-label,
body.o_uus_space_login label,
body.o_uus_space_login .col-form-label{ color:#c3c8e6; font-weight:500; }

/* Chrome autofill repaints fields white — force them back to the dark theme */
body.o_uus_space_login .form-control:-webkit-autofill,
body.o_uus_space_login .form-control:-webkit-autofill:hover,
body.o_uus_space_login .form-control:-webkit-autofill:focus{
  -webkit-text-fill-color:#f5f4ff;
  -webkit-box-shadow:0 0 0 1000px #12152e inset;
  caret-color:#f5f4ff;
}

/* ---- buttons ---- */
body.o_uus_space_login .btn-primary{
  background:linear-gradient(135deg,#f0b429,#ffce6b);
  border:none; color:#231400; font-weight:600;
  border-radius:999px; padding:11px 24px;
}
body.o_uus_space_login .btn-primary:hover{
  background:linear-gradient(135deg,#ffce6b,#f0b429);
  color:#231400;
  box-shadow:0 10px 30px rgba(240,180,41,0.35);
}
body.o_uus_space_login .btn-secondary{
  background:rgba(124,92,255,0.2); border:1px solid rgba(124,92,255,0.5); color:#f5f4ff;
}
body.o_uus_space_login .btn-link,
body.o_uus_space_login a{ color:#4fe3e0; }
body.o_uus_space_login .btn-link:hover,
body.o_uus_space_login a:hover{ color:#8ff3f1; }

/* ---- user switcher (web.user_switch: the "Choose a user" list) ---- */
body.o_uus_space_login .o_user_switch p{ color:#c3c8e6; }
body.o_uus_space_login .list-group{ background:transparent; }
body.o_uus_space_login .list-group-item{
  background:rgba(255,255,255,0.04);
  border:1px solid rgba(255,255,255,0.1);
  color:#f5f4ff;
  border-radius:10px !important;
  margin-bottom:10px;
  padding:12px 14px;
}
body.o_uus_space_login .list-group-item:hover,
body.o_uus_space_login .list-group-item:focus{
  background:rgba(124,92,255,0.18);
  border-color:rgba(124,92,255,0.45);
  color:#fff;
}
body.o_uus_space_login .o_user_avatar{ width:32px; height:32px; object-fit:cover; }

/* ---- alerts (bad password, etc.) ---- */
body.o_uus_space_login .alert-danger{
  background:rgba(220,53,69,0.14); border:1px solid rgba(220,53,69,0.45); color:#ffb3bb;
}
body.o_uus_space_login .alert-success{
  background:rgba(79,227,224,0.12); border:1px solid rgba(79,227,224,0.4); color:#a9f2f0;
}
body.o_uus_space_login .alert-info,
body.o_uus_space_login .alert-warning{
  background:rgba(240,180,41,0.12); border:1px solid rgba(240,180,41,0.4); color:#ffd98a;
}
body.o_uus_space_login .text-muted,
body.o_uus_space_login .small{ color:#9aa3c7 !important; }

@media (prefers-reduced-motion: reduce){
  body.o_uus_space_login #bg-canvas-wrap{ opacity:0.85; }
}
