*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'Roboto', 'Segoe UI', system-ui, sans-serif;
  background: url('/images/login-bg.jpg') center/cover no-repeat fixed;
  padding: 2rem 1rem;
}

/* ── Card ── */
.login-card {
  width: 100%;
  max-width: 624px;
  min-height: 778px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, .08);
  padding: 2.75rem 2.5rem 2rem;
  box-shadow: 0 8px 40px rgba(0, 0, 0, .18);
  display: flex;
  flex-direction: column;
}

/* ── Brand ── */
.brand-wrap {
  text-align: center;
  margin-bottom: 1.75rem;
}

.brand-logo {
  width: 206px;
  height: 128px;
  object-fit: contain;
  display: block;
  margin: 0 auto .5rem;
  opacity: 1;
}

.brand-tagline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  font-size: .72rem;
  color: #94a3b8;
  letter-spacing: .06em;
  margin-top: .25rem;
}

.brand-tagline-line {
  flex: 1;
  max-width: 60px;
  height: 1px;
  background: #d1d5db;
}

/* ── Heading ── */
.login-heading {
  text-align: center;
  margin-bottom: 1.75rem;
}

.login-heading h2 {
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 30px;
  line-height: 36px;
  letter-spacing: 0;
  color: #1e293b;
  margin-bottom: .4rem;
}

.login-heading p {
  font-size: .85rem;
  color: #94a3b8;
  font-weight: 400;
}

/* ── Alert ── */
.alert {
  display: none;
  padding: .6rem .9rem;
  border-radius: 8px;
  font-size: .82rem;
  margin-bottom: 1rem;
}
.alert.show     { display: block; }
.alert-error    { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-success  { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }

/* ── Form ── */
.form-group { margin-bottom: 1.1rem; }

.form-group label {
  display: block;
  font-size: .82rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: .4rem;
}

.input-wrap { position: relative; }

.input-icon {
  position: absolute;
  left: .9rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
  display: flex;
  align-items: center;
}

.input-wrap input {
  width: 100%;
  height: 48px;
  padding: 0 1rem 0 2.6rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: .9rem;
  font-family: 'Roboto', sans-serif;
  color: #1e293b;
  background: #f9fafb;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}

.input-wrap input::placeholder { color: #9ca3af; }

.input-wrap input:focus {
  border-color: #f5a623;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(245, 166, 35, .12);
}

.eye-btn {
  position: absolute;
  right: .85rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  padding: 0;
  display: flex;
  align-items: center;
  transition: color .15s;
}
.eye-btn:hover { color: #6b7280; }

/* ── Forgot row ── */
.forgot-row {
  text-align: right;
  margin-top: .35rem;
  margin-bottom: 1.5rem;
}

.forgot-row a {
  font-family: 'Roboto', sans-serif;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: 0;
  color: #1E4ED8;
  text-decoration: none;
}
.forgot-row a:hover { text-decoration: underline; }

/* ── Sign In button ── */
.btn-signin {
  width: 100%;
  height: 50px;
  background: #f5a623;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  font-family: 'Roboto', sans-serif;
  letter-spacing: .02em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  transition: background .18s, transform .12s, box-shadow .18s;
  box-shadow: 0 2px 8px rgba(245, 166, 35, .4);
}
.btn-signin:hover:not(:disabled) {
  background: #e8960e;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(245, 166, 35, .45);
}
.btn-signin:active:not(:disabled) { transform: translateY(0); }
.btn-signin:disabled { opacity: .6; cursor: not-allowed; }

/* ── Store badges ── */
.store-badges {
  display: flex;
  gap: .75rem;
  justify-content: center;
  margin-top: 1.75rem;
}

.badge-store {
  display: flex;
  align-items: center;
  gap: .55rem;
  background: #1a1a1a;
  color: #fff;
  border-radius: 8px;
  padding: .55rem 1.1rem;
  text-decoration: none;
  min-width: 140px;
  transition: background .15s;
  border: 1px solid #333;
}
.badge-store:hover { background: #2d2d2d; }

.badge-store-icon { flex-shrink: 0; width: 22px; height: 22px; }

.badge-store-text { line-height: 1.3; }
.badge-store-text .get  { font-size: .58rem; color: #d1d5db; letter-spacing: .04em; display: block; }
.badge-store-text .name { font-size: .82rem; font-weight: 700; display: block; }

/* ── Phone ── */
.login-phone {
  text-align: center;
  padding-top: 1.5rem;
  font-size: .8rem;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
}

/* ── Footer copyright ── */
.login-footer {
  text-align: center;
  margin-top: .9rem;
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.85);
}

/* ── Spinner ── */
.spinner {
  display: inline-block;
  width: 15px; height: 15px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .65s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Inline field validation ── */
.input-wrap input.invalid {
  border-color: #ef4444;
  background: #fff5f5;
}
.input-wrap input.invalid:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .12);
}
.field-error {
  display: none;
  margin-top: .35rem;
  font-size: .78rem;
  color: #b91c1c;
  line-height: 1.3;
}
.field-error.show { display: block; }

/* ── Login Alert modal (active-session takeover) ─────────────────────────────── */
.session-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .55);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.session-modal-overlay.open { display: flex; }

.session-modal {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
  overflow: hidden;
  animation: session-pop .16s ease-out;
}
@keyframes session-pop {
  from { transform: translateY(8px) scale(.98); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

.session-modal-header {
  background: #1a2b45;
  padding: 1rem 1.5rem;
}
.session-modal-header h2 {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
}

.session-modal-body {
  padding: 1.5rem;
}
.session-modal-body p {
  color: #334155;
  font-size: .92rem;
  line-height: 1.5;
}

.session-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: .6rem;
  padding: 0 1.5rem 1.5rem;
}
.btn-session-cancel,
.btn-session-ok {
  padding: .55rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.btn-session-cancel {
  background: #e5e7eb;
  color: #374151;
}
.btn-session-cancel:hover { background: #d1d5db; }
.btn-session-ok {
  background: #f5a623;
  color: #fff;
}
.btn-session-ok:hover { background: #e8960e; }
