/* ═══════════════════════════════════════════════════════════════
   Kasaloma Books – Premium Login Page
   Theme: Dark Navy + White
   ═══════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body.zbooks-fullpage {
  background: #060f1e;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ── Outer wrapper ──────────────────────────────────────────────── */
.kb-login-wrap {
  display: flex;
  min-height: 100vh;
}

/* ── Left branding panel ────────────────────────────────────────── */
.kb-login-left {
  flex: 1.1;
  background: linear-gradient(145deg, #0a1628 0%, #0f2a4e 45%, #0d1f3c 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 48px;
  position: relative;
  overflow: hidden;
}

/* Decorative background circles */
.kb-login-left::before {
  content: '';
  position: absolute;
  top: -120px; right: -120px;
  width: 480px; height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59,130,246,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.kb-login-left::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -80px;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(30,77,140,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.kb-login-left-inner {
  position: relative;
  z-index: 1;
  max-width: 420px;
}

.kb-brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.kb-brand-logo-image {
  height: 42px;
  width: auto;
  display: block;
}

.kb-brand-separator {
  color: rgba(255,255,255,0.45);
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
}

.kb-brand-name {
  font-size: 30px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 1px;
  margin-bottom: 0;
  line-height: 1.15;
}

.kb-brand-tagline {
  font-size: 16px;
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
  margin-bottom: 48px;
}

.kb-feature-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 64px;
}

.kb-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,0.75);
  font-size: 14px;
}

.kb-feature-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(59,130,246,0.2);
  border: 1px solid rgba(59,130,246,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #60a5fa;
}

.kb-login-footer-text {
  font-size: 12px;
  color: rgba(255,255,255,0.25);
}

/* ── Right login panel ──────────────────────────────────────────── */
.kb-login-right {
  flex: 1;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
}

.kb-login-card {
  width: 100%;
  max-width: 420px;
}

.kb-login-card-header {
  text-align: center;
  margin-bottom: 32px;
}

.kb-login-logo-sm {
  margin: 0 auto 16px;
  width: 52px;
  height: 52px;
}

.kb-login-title {
  font-size: 24px;
  font-weight: 800;
  color: #0a1628;
  letter-spacing: -0.4px;
  margin-bottom: 6px;
}

.kb-login-sub {
  font-size: 14px;
  color: #64748b;
}

/* ── Error banner ───────────────────────────────────────────────── */
.kb-login-error {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 20px;
  animation: slideDown 0.2s ease;
}
@keyframes slideDown { from { transform: translateY(-6px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ── Form ───────────────────────────────────────────────────────── */
.kb-login-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.kb-input-group {
  margin-bottom: 18px;
}

.kb-input-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #374151;
  margin-bottom: 7px;
}

.kb-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 7px;
}
.kb-label-row label { margin-bottom: 0; }

.kb-forgot {
  font-size: 12px;
  color: #3b82f6;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}
.kb-forgot:hover { color: #1d4ed8; }

.kb-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.kb-input-icon {
  position: absolute;
  left: 13px;
  color: #94a3b8;
  pointer-events: none;
  flex-shrink: 0;
}

.kb-input-wrap input {
  width: 100%;
  padding: 12px 42px 12px 40px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px;
  color: #0f172a;
  background: #ffffff;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}
.kb-input-wrap input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59,130,246,0.1);
}
.kb-input-wrap input::placeholder { color: #94a3b8; }

.kb-toggle-pw {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: #94a3b8;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}
.kb-toggle-pw:hover { color: #475569; }

/* ── Remember me ────────────────────────────────────────────────── */
.kb-remember {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  color: #475569;
  margin-bottom: 24px;
  user-select: none;
}
.kb-remember input[type="checkbox"] { display: none; }
.kb-checkmark {
  width: 18px; height: 18px; flex-shrink: 0;
  border: 1.5px solid #d1d5db;
  border-radius: 5px;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.kb-remember input:checked ~ .kb-checkmark {
  background: #3b82f6;
  border-color: #3b82f6;
}
.kb-remember input:checked ~ .kb-checkmark::after {
  content: '';
  width: 5px; height: 9px;
  border: 2px solid #fff;
  border-top: none; border-left: none;
  transform: rotate(45deg) translate(-1px, -1px);
  display: block;
}

/* ── Login button ───────────────────────────────────────────────── */
.kb-login-btn {
  width: 100%;
  padding: 14px 24px;
  background: #0f2a4e;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  letter-spacing: 0.2px;
  margin-bottom: 24px;
}
.kb-login-btn:hover {
  background: #1a4a84;
  box-shadow: 0 6px 24px rgba(15,42,78,0.3);
  transform: translateY(-1px);
}
.kb-login-btn:active { transform: none; }
.kb-login-btn.loading {
  background: #475569;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Divider ────────────────────────────────────────────────────── */
.kb-login-divider {
  text-align: center;
  position: relative;
  margin-bottom: 16px;
}
.kb-login-divider::before {
  content: '';
  position: absolute;
  top: 50%; left: 0; right: 0;
  height: 1px;
  background: #e2e8f0;
}
.kb-login-divider span {
  position: relative;
  background: #f8fafc;
  padding: 0 12px;
  font-size: 11px;
  color: #94a3b8;
}

/* ── Secure badge ───────────────────────────────────────────────── */
.kb-login-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11px;
  color: #94a3b8;
}
.kb-login-secure svg { color: #22c55e; }

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .kb-login-left { display: none; }
  .kb-login-right { background: #0a1628; }
  .kb-login-card {
    background: #111e33;
    border-radius: 16px;
    padding: 36px 28px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.4);
  }
  .kb-login-title { color: #ffffff; }
  .kb-login-sub   { color: rgba(255,255,255,0.5); }
  .kb-input-group label { color: rgba(255,255,255,0.7); }
  .kb-remember    { color: rgba(255,255,255,0.5); }
  .kb-input-wrap input { background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.1); color: #fff; }
  .kb-input-wrap input::placeholder { color: rgba(255,255,255,0.3); }
  .kb-login-divider span  { background: #111e33; }
  .kb-checkmark { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.2); }
}
