*, *::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.5rem;
}

.brand-logo {
  width: 206px;
  height: 128px;
  object-fit: contain;
  display: block;
  margin: 0 auto .5rem;
}

.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;
}

/* ── Illustration ── */
.illustration-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: .75rem;
}

.illustration-wrap img {
  width: 240px;
  height: 160px;
  object-fit: contain;
}

/* ── Subtitle ── */
.fp-subtitle {
  text-align: center;
  font-size: .82rem;
  color: #94a3b8;
  margin-bottom: 1.5rem;
}

/* ── 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: .5rem; }

.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);
}

/* ── Back to login row ── */
.back-row {
  text-align: right;
  margin-top: .4rem;
  margin-bottom: 1.25rem;
}

.back-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;
}
.back-row a:hover { text-decoration: underline; }

/* ── Reset 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; }

/* ── 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; }
