/* BOS Login — standalone port of crm.sioniq.com styles_Login.css (no Bootstrap) */

:root {
  --bos-primary: #3464FC;
  --bos-primary-dark: #2450DB;
  --bos-text: #383838;
  --bos-muted: #727272;
  --bos-placeholder: #AEB4BA;
  --bos-input-bg: #F5F6F8;
  --bos-danger: #D93025;
  --bos-font: "Albert Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --bos-font-footer: "Nunito", var(--bos-font);
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  font-family: var(--bos-font);
  color: var(--bos-text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

/* ---------- Layout ---------- */

.login-page { position: relative; min-height: 100vh; overflow: hidden; }

.login-bg {
  position: absolute;
  inset: 0;
  display: flex;
  z-index: 0;
  text-align: center;
}

.login-bg .gradient-bg {
  position: absolute;
  inset: 0;
  opacity: 0.1;
  background: conic-gradient(from 26deg at 47.95% 84.6%, #93AEFF 0deg, #85E5FF 176.5deg, #DBF1FF 360deg);
  filter: blur(200px);
}

.login-bg .login-bg-img {
  position: relative;
  z-index: 1;
  margin: auto;
  height: 100%;
  display: flex;
  align-items: center;
}

.login-bg .login-bg-img img { max-height: 100vh; }

.login-main {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem 3.5rem;
}

/* ---------- Card ---------- */

.login-card {
  width: 100%;
  max-width: 27rem;
  padding: 3.5rem 2.5rem 4rem;
  border-radius: 1.5625rem;
  border: 1px solid #fff;
  background: #fff;
  box-shadow: 0 0 40px -20px rgba(182, 182, 182, 0.6);
  backdrop-filter: blur(30px);
}

.logo-header { text-align: center; }

/* Brand lockup: full SIONIQ logo + a thin divider + the new BOS logo. */
.brand-lockup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
}
.brand-lockup .brand-sioniq { width: 8.5rem; height: auto; display: block; }
.brand-lockup .brand-bos { width: 5.75rem; height: auto; display: block; }
.brand-lockup .brand-divider {
  width: 1px;
  align-self: stretch;
  min-height: 2.4rem;
  background: rgba(15, 23, 42, 0.15);
}

.logo-header img {
  display: block;
  height: auto;
}

.logo-header h1 {
  margin: 0.75rem 0 0;
  font-size: 1.4375rem;
  line-height: 1.6875rem;
  font-weight: 700;
  color: var(--bos-text);
}

/* ---------- Form ---------- */

.form-group { margin-top: 1.125rem; }

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--bos-muted);
}

.form-control {
  width: 100%;
  height: 2.765rem;
  padding: 0 0.75rem;
  font: 500 0.875rem var(--bos-font);
  color: var(--bos-text);
  background: var(--bos-input-bg);
  border: 1px solid transparent;
  border-radius: 0.3125rem;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.form-control::placeholder {
  color: var(--bos-placeholder);
  font-size: 0.75rem;
  font-weight: 500;
}

.form-control:focus {
  border-color: var(--bos-primary);
  box-shadow: 0 0 0 3px rgba(52, 100, 252, 0.15);
}

.form-control[aria-invalid="true"] { border-color: var(--bos-danger); }

.input-group { position: relative; }
.input-group .form-control { padding-right: 2.75rem; }

.toggle-password {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 0 0.3125rem 0.3125rem 0;
}
.toggle-password svg { width: 18px; height: 12px; }
.toggle-password:focus-visible { outline: 2px solid var(--bos-primary); outline-offset: -2px; }

.field-error, .field-hint {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
  font-weight: 500;
}
.field-error { color: var(--bos-danger); }
.field-hint { color: #B7791F; }

.form-alert {
  margin-top: 1.25rem;
  padding: 0.65rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--bos-danger);
  background: #FDECEA;
  border-radius: 0.3125rem;
}

.form-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.form-check-input {
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--bos-primary);
  cursor: pointer;
}

.form-check-label,
.forgot-password {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--bos-muted);
}

.forgot-password { text-decoration: none; }
.forgot-password:hover { color: var(--bos-primary); }
.forgot-password:focus-visible,
.form-check-input:focus-visible { outline: 2px solid var(--bos-primary); outline-offset: 2px; }

/* ---------- Button ---------- */

.btn-primary {
  position: relative;
  width: 100%;
  margin-top: 1.125rem;
  padding: 0.8375rem;
  font: 500 0.875rem var(--bos-font);
  color: #fff;
  background: var(--bos-primary);
  border: 0;
  border-radius: 0.3125rem;
  box-shadow: 0 5px 25px -10px var(--bos-primary);
  cursor: pointer;
  transition: background .15s;
}
.btn-primary:hover { background: var(--bos-primary-dark); }
.btn-primary:focus-visible { outline: 2px solid var(--bos-primary); outline-offset: 3px; }
.btn-primary:disabled { opacity: .75; cursor: progress; }

.btn-spinner {
  display: none;
  position: absolute;
  right: 1rem;
  top: 50%;
  width: 1rem;
  height: 1rem;
  margin-top: -0.5rem;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: bos-spin .7s linear infinite;
}
.btn-primary.is-loading .btn-spinner { display: block; }

@keyframes bos-spin { to { transform: rotate(360deg); } }

/* ---------- Social ---------- */

.social-media-icons {
  display: flex;
  justify-content: center;
  gap: 0.4375rem;
  margin-top: 2.375rem;
}

.social-media-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  color: #000;
  background: #EBF0FF;
  transition: background .15s, color .15s;
}
.social-media-icons a:hover { background: var(--bos-primary); color: #fff; }
.social-media-icons a:focus-visible { outline: 2px solid var(--bos-primary); outline-offset: 2px; }
.social-media-icons svg { width: 0.8rem; height: 0.8rem; fill: currentColor; }

/* ---------- Footer ---------- */

.footer {
  position: absolute;
  left: 0; right: 0;
  bottom: 1.25rem;
}
.footer p {
  margin: 0;
  text-align: center;
  font: 600 0.6875rem var(--bos-font-footer);
  color: var(--bos-placeholder);
}

/* ---------- Responsive ---------- */

@media (max-width: 1400px) {
  .login-card { padding: 2.5rem 2rem; }
  .social-media-icons { margin-top: 1.75rem; }
  .login-bg .login-bg-img img { max-height: 95vh; }
}

@media (max-width: 768px) {
  .login-bg .login-bg-img { display: none; }
  .login-card { padding: 3.5rem 1.75rem 4rem; }
}

@media (max-width: 576px) {
  .footer { bottom: 0.75rem; }
  .form-row { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation-duration: 1.5s !important; }
}
