/**
 * Bizmart POS — Login Page Styles
 * Dark theme, glassmorphism card, animated orbs.
 */

/* ─── Variables ──────────────────────────────────────────────────────── */
:root {
  --bpos-login-bg: #0B0F1A;
  --bpos-login-surface: rgba(255,255,255,.06);
  --bpos-login-border: rgba(255,255,255,.1);
  --bpos-login-primary: #3B82F6;
  --bpos-login-primary-dark: #2563EB;
  --bpos-login-text: #F1F5F9;
  --bpos-login-text-muted: #94A3B8;
  --bpos-login-danger: #EF4444;
  --bpos-login-radius: 16px;
  --bpos-login-radius-sm: 10px;
  --bpos-login-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --bpos-login-transition: 200ms cubic-bezier(.4,0,.2,1);
}

/* ─── Reset ──────────────────────────────────────────────────────────── */
.bpos-login-body {
  margin: 0; padding: 0;
  font-family: var(--bpos-login-font);
  background: var(--bpos-login-bg);
  color: var(--bpos-login-text);
  min-height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
.bpos-login-body *, .bpos-login-body *::before, .bpos-login-body *::after {
  box-sizing: border-box;
}

/* ─── Container ──────────────────────────────────────────────────────── */
.bpos-login {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  position: relative;
}

/* ─── Animated background orbs ───────────────────────────────────────── */
.bpos-login__bg {
  position: fixed; inset: 0;
  overflow: hidden;
  z-index: 0;
}
.bpos-login__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.3;
}
.bpos-login__orb--1 {
  width: 500px; height: 500px;
  background: #3B82F6;
  top: -15%; left: -10%;
  animation: bposOrb1 15s ease-in-out infinite alternate;
}
.bpos-login__orb--2 {
  width: 400px; height: 400px;
  background: #8B5CF6;
  bottom: -10%; right: -5%;
  animation: bposOrb2 18s ease-in-out infinite alternate;
}
.bpos-login__orb--3 {
  width: 350px; height: 350px;
  background: #06B6D4;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  animation: bposOrb3 20s ease-in-out infinite alternate;
}
@keyframes bposOrb1 { 0% { transform: translate(0,0) scale(1); } 100% { transform: translate(80px,60px) scale(1.15); } }
@keyframes bposOrb2 { 0% { transform: translate(0,0) scale(1); } 100% { transform: translate(-60px,-80px) scale(1.2); } }
@keyframes bposOrb3 { 0% { transform: translate(-50%,-50%) scale(1); opacity:.2; } 100% { transform: translate(-40%,-60%) scale(1.3); opacity:.35; } }

/* ─── Login card ─────────────────────────────────────────────────────── */
.bpos-login__card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  margin: 1.5rem;
  padding: 40px 36px 32px;
  background: rgba(15,23,42,.75);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid var(--bpos-login-border);
  border-radius: var(--bpos-login-radius);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.04),
    0 20px 60px rgba(0,0,0,.5),
    0 0 80px rgba(59,130,246,.08);
  animation: bposCardIn 0.5s ease-out;
}
@keyframes bposCardIn {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ─── Header / Brand ─────────────────────────────────────────────────── */
.bpos-login__header {
  text-align: center;
  margin-bottom: 28px;
}
.bpos-login__logo {
  width: 64px; height: 64px;
  margin: 0 auto 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--bpos-login-primary), #8B5CF6);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  color: #fff;
  box-shadow: 0 8px 24px rgba(59,130,246,.3);
}
.bpos-login__logo img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 18px;
}
.bpos-login__title {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px;
  letter-spacing: -0.02em;
}
.bpos-login__subtitle {
  font-size: 13px;
  color: var(--bpos-login-text-muted);
  margin: 0;
  font-weight: 400;
}

/* ─── Alert ──────────────────────────────────────────────────────────── */
.bpos-login__alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--bpos-login-radius-sm);
  background: rgba(239,68,68,.12);
  border: 1px solid rgba(239,68,68,.25);
  color: #fca5a5;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 20px;
  animation: bposShake 0.4s ease-in-out;
}
@keyframes bposShake {
  0%,100% { transform: translateX(0); }
  20%     { transform: translateX(-6px); }
  40%     { transform: translateX(6px); }
  60%     { transform: translateX(-4px); }
  80%     { transform: translateX(4px); }
}

/* ─── Form ───────────────────────────────────────────────────────────── */
.bpos-login__form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.bpos-login__field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--bpos-login-text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.bpos-login__field label i {
  margin-right: 4px;
  font-size: 11px;
}
.bpos-login__field input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--bpos-login-border);
  border-radius: var(--bpos-login-radius-sm);
  background: rgba(255,255,255,.05);
  color: #fff;
  font-size: 15px;
  font-family: var(--bpos-login-font);
  transition: all var(--bpos-login-transition);
  outline: none;
}
.bpos-login__field input::placeholder {
  color: rgba(148,163,184,.5);
}
.bpos-login__field input:focus {
  border-color: var(--bpos-login-primary);
  background: rgba(59,130,246,.06);
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}

/* Password toggle */
.bpos-login__password-wrap {
  position: relative;
}
.bpos-login__password-wrap input {
  padding-right: 44px;
}
.bpos-login__eye {
  position: absolute;
  right: 4px; top: 50%;
  transform: translateY(-50%);
  width: 36px; height: 36px;
  border: none; background: none;
  color: var(--bpos-login-text-muted);
  cursor: pointer;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--bpos-login-transition);
}
.bpos-login__eye:hover {
  color: #fff;
  background: rgba(255,255,255,.08);
}

/* ─── Submit ─────────────────────────────────────────────────────────── */
.bpos-login__submit {
  width: 100%;
  padding: 14px; margin-top: 4px;
  border: none;
  border-radius: var(--bpos-login-radius-sm);
  background: linear-gradient(135deg, var(--bpos-login-primary), var(--bpos-login-primary-dark));
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--bpos-login-font);
  cursor: pointer;
  transition: all var(--bpos-login-transition);
  position: relative;
  overflow: hidden;
}
.bpos-login__submit:hover {
  background: linear-gradient(135deg, #4F8EF7, var(--bpos-login-primary));
  box-shadow: 0 8px 20px rgba(59,130,246,.35);
  transform: translateY(-1px);
}
.bpos-login__submit:active {
  transform: translateY(0);
}
.bpos-login__submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* ─── Footer ─────────────────────────────────────────────────────────── */
.bpos-login__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--bpos-login-border);
  font-size: 12px;
  color: var(--bpos-login-text-muted);
}
.bpos-login__footer i {
  margin-right: 4px;
  font-size: 11px;
}
.bpos-login__back {
  color: var(--bpos-login-text-muted);
  text-decoration: none;
  transition: color var(--bpos-login-transition);
}
.bpos-login__back:hover {
  color: #fff;
}

/* ─── Version badge ──────────────────────────────────────────────────── */
.bpos-login__version {
  position: fixed;
  bottom: 16px; right: 20px;
  font-size: 11px;
  color: rgba(148,163,184,.3);
  z-index: 1;
}

/* ─── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .bpos-login__card {
    margin: 1rem;
    padding: 28px 24px 24px;
  }
  .bpos-login__title { font-size: 19px; }
  .bpos-login__orb--1 { width: 300px; height: 300px; }
  .bpos-login__orb--2 { width: 250px; height: 250px; }
  .bpos-login__orb--3 { width: 200px; height: 200px; }
}
