/*
| Batiwifi self-service auth pages
|--------------------------------------------------------------------------
| Layout & palette ported from the Accountra "Luminous Ledger" login.
| Primary button uses the e-memo brand colour (Tailwind sky-600 / sky-700).
*/

:root {
  --bg: #f8f9ff;
  --surface: #ffffff;
  --ink: #0b1c30;
  --muted: #4a4455;
  --outline: #8a8f9c;
  --border: #dfe3ee;
  --divider: #e5eeff;
  /* e-memo brand button (Tailwind sky) */
  --btn: #0284c7;        /* sky-600 */
  --btn-hover: #0369a1;  /* sky-700 */
  --btn-ring: rgba(2, 132, 199, .18);
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Satoshi', sans-serif;
  -webkit-font-smoothing: antialiased;
}

.auth-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

/* Connectivity "skyline" — light, decorative band along the bottom ~10% */
.net-decor {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 14vh;
  min-height: 88px;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: clamp(10px, 3vw, 34px);
  padding: 0 clamp(12px, 4vw, 48px) 16px;
}
.net-decor i {
  color: var(--ink);
  opacity: .05;
  line-height: 1;
  flex: none;
}
/* Gentle skyline: alternate icon sizes so the tops rise and fall */
.net-decor i:nth-child(3n)   { font-size: 46px; }
.net-decor i:nth-child(3n+1) { font-size: 32px; }
.net-decor i:nth-child(3n+2) { font-size: 39px; }
@media (max-width: 640px) {
  .net-decor { justify-content: space-between; gap: 10px; }
  .net-decor i:nth-child(3n)   { font-size: 34px; }
  .net-decor i:nth-child(3n+1) { font-size: 25px; }
  .net-decor i:nth-child(3n+2) { font-size: 29px; }
}

.auth-col {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Header row: logo + support */
.auth-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.auth-top img { height: 52px; width: auto; }
.auth-support {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 500;
  text-decoration: none;
}
.auth-support i { font-size: 1rem; }
.auth-support:hover { color: var(--ink); }

/* Optional kicker chip */
.auth-kicker {
  display: inline-block;
  margin-top: 34px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--btn);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
}

/* Heading */
.auth-head { margin-top: 34px; }
.auth-head.tight { margin-top: 14px; }
.auth-head h1 {
  margin: 0;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--ink);
  line-height: 1.2;
}
.auth-head p {
  margin: 8px 0 0;
  font-size: .92rem;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.55;
}

.auth-flash { margin-top: 22px; display: flex; flex-direction: column; gap: 12px; }
.auth-flash:empty { display: none; }
.alert-box {
  border-radius: 10px;
  padding: 12px 14px;
  font-size: .86rem;
  font-weight: 500;
  border: 1px solid transparent;
}
.alert-box ul { margin: 0; padding-left: 18px; }
.alert-danger  { background: #fdecea; border-color: #f7c5c0; color: #8f2318; }
.alert-success { background: #effdf5; border-color: #bde6cf; color: #12603a; }
.alert-info    { background: #eef4ff; border-color: #cdddf7; color: #1c3f75; }
.alert-warning { background: #fef9eb; border-color: #f4e2b0; color: #7a5a10; }

/* Form */
.auth-form { margin-top: 26px; display: flex; flex-direction: column; gap: 18px; }
.auth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-label {
  display: block;
  font-size: .82rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 7px;
}
.field {
  position: relative;
  display: flex;
  align-items: center;
}
.field .lead-icon {
  position: absolute;
  left: 14px;
  color: var(--outline);
  font-size: 1.02rem;
  pointer-events: none;
}
.field input {
  width: 100%;
  height: 46px;
  padding: 0 14px 0 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-family: 'Satoshi', sans-serif;
  font-size: .95rem;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field.has-toggle input { padding-right: 44px; }
.field input::placeholder { color: #a2a7b4; }
.field input:focus {
  border-color: var(--btn);
  box-shadow: 0 0 0 3px var(--btn-ring);
}
.field .toggle {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  padding: 4px;
  color: var(--outline);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}
.field .toggle:hover { color: var(--ink); }
.field-error { display: block; margin-top: 6px; font-size: .78rem; color: #c0392b; }

/* Meta row */
.auth-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: -2px;
}
.remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: .84rem;
  color: var(--muted);
}
.remember input {
  width: 16px;
  height: 16px;
  accent-color: var(--btn);
  cursor: pointer;
}
.forgot {
  font-size: .84rem;
  font-weight: 500;
  color: var(--btn);
  text-decoration: none;
}
.forgot:hover { text-decoration: underline; }

/* Button — e-memo sky brand */
.btn-submit {
  position: relative;
  width: 100%;
  height: 46px;
  margin-top: 4px;
  border: none;
  border-radius: 12px;
  background: var(--btn);
  color: #ffffff;
  font-family: 'Satoshi', sans-serif;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(2, 132, 199, .25);
  transition: background .15s ease, transform .12s ease, box-shadow .2s ease;
}
.btn-submit:hover { background: var(--btn-hover); box-shadow: 0 6px 18px rgba(2, 132, 199, .3); }
.btn-submit:active { transform: scale(.99); }
.btn-submit:disabled { opacity: .8; cursor: default; }
.btn-submit .loader {
  width: 18px;
  height: 18px;
  border: 3px solid rgba(255, 255, 255, .4);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Footer */
.auth-foot {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--divider);
  text-align: center;
}
.auth-foot p { margin: 0; font-size: .88rem; color: var(--muted); }
.auth-foot .secure {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--outline);
  font-size: .78rem;
}
.auth-foot a { color: var(--btn); font-weight: 500; text-decoration: none; }
.auth-foot a:hover { text-decoration: underline; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 500;
  text-decoration: none;
}
.back-link:hover { color: var(--ink); }

@media (max-width: 480px) {
  .auth-head h1 { font-size: 1.5rem; }
  .auth-grid { grid-template-columns: 1fr; }
}
