/* /assets/css/login.php — clean login with email password + email OTP */

* { -webkit-tap-highlight-color: transparent; box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  margin: 0;
  background: #0a0a0f;
  color: #fff;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============ HELP BAR ============ */
.help-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10,10,15,.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.06);
  padding: 11px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.help-bar .text {
  font-size: 13px;
  color: #8a8a9a;
}
.help-bar .wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  background: #25D366;
  color: #fff;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity .15s;
}
.help-bar .wa-btn:hover { opacity: .9; }
.help-bar .wa-btn svg { width: 15px; height: 15px; }

/* ============ PAGE ============ */
.auth-page {
  min-height: calc(100vh - 50px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  position: relative;
}
.auth-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 700px 500px at 50% 0%, rgba(229,9,20,.08), transparent 60%);
  pointer-events: none;
}

/* ============ CARD ============ */
.auth-card {
  width: 100%;
  max-width: 420px;
  background: #111118;
  border: 1px solid #1e1e2a;
  border-radius: 16px;
  padding: 40px 32px 32px;
  position: relative;
  z-index: 1;
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
}

/* ============ HEAD ============ */
.auth-head {
  text-align: center;
  margin-bottom: 30px;
}
.auth-head .logo-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.auth-head .logo-slot img {
  max-height: 56px;
  max-width: 200px;
  width: auto;
  border-radius: 10px;
  display: block;
}
.auth-head .logo-slot .mark {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, #e50914, #ff3b30);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 24px;
  box-shadow: 0 10px 30px rgba(229,9,20,.35);
}
.auth-head h1 {
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  margin: 0;
  letter-spacing: -.01em;
  line-height: 1.4;
}

/* ============ TABS ============ */
.auth-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: #0d0d14;
  border: 1px solid #1e1e2a;
  border-radius: 10px;
  margin-bottom: 24px;
}
.auth-tabs button {
  flex: 1;
  padding: 9px 12px;
  font-size: 13.5px;
  font-weight: 500;
  background: transparent;
  color: #8a8a9a;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
}
.auth-tabs button.active {
  background: #1a1a24;
  color: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.3);
}
.auth-tabs button:hover:not(.active) { color: #c2c2d2; }

/* ============ FORM ============ */
.auth-form .field { margin-bottom: 16px; }
.auth-form label {
  display: block;
  font-size: 13px;
  color: #a4a4b8;
  margin-bottom: 8px;
  font-weight: 500;
}
.auth-form input {
  width: 100%;
  padding: 13px 16px;
  font-size: 14.5px;
  background: #0d0d14;
  border: 1px solid #1e1e2a;
  border-radius: 10px;
  color: #fff;
  transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
}
.auth-form input::placeholder { color: #454555; }
.auth-form input:focus {
  outline: none;
  border-color: #e50914;
  box-shadow: 0 0 0 3px rgba(229,9,20,.12);
}
.auth-form .pw-wrap { position: relative; }
.auth-form .pw-wrap input { padding-right: 46px; }
.auth-form .pw-toggle {
  position: absolute;
  right: 8px; top: 50%;
  transform: translateY(-50%);
  width: 32px; height: 32px;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: #54546a;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all .15s;
}
.auth-form .pw-toggle:hover {
  background: rgba(255,255,255,.05);
  color: #a4a4b8;
}
.auth-form .pw-toggle svg { width: 17px; height: 17px; }

/* ============ OPTIONS ============ */
.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 20px;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
}
.auth-options .remember {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #a4a4b8;
  cursor: pointer;
  user-select: none;
  margin: 0;
}
.auth-options .remember input[type="checkbox"] {
  width: 15px; height: 15px;
  margin: 0;
  accent-color: #e50914;
  cursor: pointer;
}
.auth-options a {
  color: #e50914;
  font-size: 13px;
  text-decoration: none;
  font-weight: 500;
}
.auth-options a:hover { text-decoration: underline; }

/* ============ SUBMIT ============ */
.auth-submit {
  width: 100%;
  padding: 13px;
  font-size: 14.5px;
  font-weight: 600;
  border-radius: 10px;
  background: #e50914;
  color: #fff;
  border: none;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: -.005em;
  transition: all .15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.auth-submit:hover:not(:disabled) { background: #c80812; }
.auth-submit:disabled { opacity: .55; cursor: not-allowed; }
.auth-submit svg { width: 15px; height: 15px; }

/* Secondary button for OTP flow */
.auth-btn-secondary {
  width: 100%;
  padding: 12px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 10px;
  background: transparent;
  color: #c2c2d2;
  border: 1px solid #1e1e2a;
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.auth-btn-secondary:hover:not(:disabled) {
  background: #1a1a24;
  color: #fff;
  border-color: #2a2a3a;
}
.auth-btn-secondary:disabled { opacity: .55; cursor: not-allowed; }
.auth-btn-secondary svg { width: 15px; height: 15px; }

/* ============ ALERT ============ */
.auth-alert {
  margin-top: 14px;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 13px;
  display: none;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.5;
}
.auth-alert.show { display: flex; }
.auth-alert.error   { background: rgba(229,9,20,.08); border: 1px solid rgba(229,9,20,.3); color: #ff8b8b; }
.auth-alert.success { background: rgba(46,204,113,.08); border: 1px solid rgba(46,204,113,.3); color: #7ee0a6; }
.auth-alert.info    { background: rgba(243,156,18,.08); border: 1px solid rgba(243,156,18,.3); color: #f3c45e; }

/* ============ DIVIDER ============ */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: #454555;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #1e1e2a;
}

/* ============ FOOT ============ */
.auth-foot {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #1e1e2a;
  text-align: center;
}
.auth-foot .register-line {
  font-size: 13.5px;
  color: #8a8a9a;
  margin-bottom: 12px;
}
.auth-foot .register-line a {
  color: #e50914;
  font-weight: 600;
  text-decoration: none;
}
.auth-foot .register-line a:hover { text-decoration: underline; }
.auth-foot .legal {
  font-size: 11.5px;
  color: #54546a;
  line-height: 1.6;
}
.auth-foot .legal a {
  color: #8a8a9a;
  text-decoration: underline;
  text-decoration-color: #2a2a3a;
  text-underline-offset: 2px;
}
.auth-foot .legal a:hover { color: #a4a4b8; }

/* ============ HIDDEN PANEL ============ */
.auth-panel { display: none; }
.auth-panel.active { display: block; }

/* OTP panel note */
.otp-note {
  background: rgba(52,152,219,.06);
  border: 1px solid rgba(52,152,219,.2);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 12.5px;
  color: #8ab4e8;
  line-height: 1.55;
  margin-bottom: 18px;
}
.otp-note strong { color: #a8ceff; font-weight: 600; }

/* ============ LOADING ============ */
.auth-loading {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.85);
  backdrop-filter: blur(12px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}
.auth-loading.show { display: flex; }
.auth-loading .ring {
  width: 40px; height: 40px;
  border: 3px solid rgba(255,255,255,.1);
  border-top-color: #e50914;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ SUCCESS ============ */
.auth-success {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.9);
  backdrop-filter: blur(12px);
  z-index: 2100;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.auth-success.show { display: flex; }
.auth-success-card {
  background: #111118;
  border: 1px solid #1e1e2a;
  border-radius: 16px;
  padding: 40px 32px;
  max-width: 320px;
  width: 100%;
  text-align: center;
}
.auth-success-card .tick {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(46,204,113,.12);
  color: #2ecc71;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin: 0 auto 16px;
}
.auth-success-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 6px;
}
.auth-success-card p {
  font-size: 13px;
  color: #8a8a9a;
  margin: 0;
}

/* ============ MOBILE ============ */
@media (max-width: 480px) {
  .auth-page { padding: 24px 16px; }
  .auth-card { padding: 32px 24px 26px; border-radius: 14px; }
  .auth-head h1 { font-size: 15.5px; }
  .auth-head .logo-slot img { max-height: 48px; }
  .auth-head .logo-slot .mark { width: 48px; height: 48px; font-size: 20px; }
}