/* css/login.css — v0.6 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --brand:   #2B2640;
  --accent:  #6C63FF;
  --accent2: #48C9B0;
  --danger:  #e74c3c;
  --success: #27ae60;
  --bg:      #F4F1EA;
  --shadow:  0 16px 48px rgba(43,38,64,.12);
  --radius:  14px;
  --border:  #ddd;
}

body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background-image:
    radial-gradient(circle at 15% 15%, rgba(108,99,255,.09) 0%, transparent 50%),
    radial-gradient(circle at 85% 85%, rgba(72,201,176,.07) 0%, transparent 50%);
  -webkit-font-smoothing: antialiased;
}

.wrapper {
  width: 100%;
  max-width: 390px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── Logo ── */
.logo-box {
  background: #fff;
  border-radius: var(--radius);
  padding: 26px 24px 20px;
  text-align: center;
  box-shadow: var(--shadow);
}
.logo-icon {
  width: 58px; height: 58px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.logo-icon svg { width: 28px; height: 28px; fill: #fff; }
.logo-box h1 { font-size: 19px; color: var(--brand); font-weight: 700; letter-spacing: -.02em; }
.logo-box p  { font-size: 12.5px; color: #aaa; margin-top: 3px; }

/* ── Tab switcher ── */
.tab-box {
  background: #fff;
  border-radius: var(--radius);
  padding: 5px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 4px;
}
.tab-btn {
  flex: 1; padding: 10px;
  border: none; border-radius: 10px;
  font-size: 13.5px; font-weight: 600;
  cursor: pointer;
  transition: all .18s;
  background: transparent; color: #aaa;
  font-family: inherit;
}
.tab-btn.active {
  background: var(--brand); color: #fff;
  box-shadow: 0 4px 12px rgba(43,38,64,.2);
}

/* ── Form box ── */
.form-box {
  background: #fff;
  border-radius: var(--radius);
  padding: 22px 20px;
  box-shadow: var(--shadow);
  display: none;
  flex-direction: column;
  gap: 14px;
  animation: slideUp .22s ease both;
}
.form-box.active { display: flex; }
@keyframes slideUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.form-box h2 { font-size: 16px; color: var(--brand); font-weight: 700; letter-spacing: -.01em; }
.form-box .sub { font-size: 12px; color: #bbb; margin-top: -8px; }

/* ── Fields ── */
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 11.5px; font-weight: 600; color: #666; letter-spacing: .01em; }

.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap .ico {
  position: absolute; left: 12px;
  width: 16px; height: 16px;
  fill: #ccc; pointer-events: none;
}
.input-wrap input {
  width: 100%;
  padding: 11px 42px 11px 36px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 14px; color: #333;
  outline: none;
  background: #fafafa;
  font-family: inherit;
  transition: border-color .18s, box-shadow .18s;
}
.input-wrap input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(108,99,255,.09);
  background: #fff;
}

/* ── Eye toggle ── */
.eye-btn {
  position: absolute; right: 0; top: 0; bottom: 0;
  width: 40px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer; padding: 0;
  border-radius: 0 10px 10px 0;
}
.eye-btn svg { width: 16px; height: 16px; fill: #ccc; transition: fill .18s; pointer-events: none; }
.eye-btn:hover svg, .eye-btn.visible svg { fill: var(--accent); }

/* ── Primary button ── */
.btn-primary {
  width: 100%; padding: 13px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
  color: #fff; border: none; border-radius: 11px;
  font-size: 15px; font-weight: 700; cursor: pointer;
  font-family: inherit;
  transition: opacity .18s, transform .15s;
  letter-spacing: -.01em;
}
.btn-primary:hover  { opacity: .9; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); opacity: 1; }

/* ── Divider ── */
.divider {
  display: flex; align-items: center; gap: 8px;
  color: #ddd; font-size: 11.5px;
}
.divider::before, .divider::after {
  content: ''; flex: 1; height: 1px; background: #eee;
}

/* ── Strength bar ── */
.strength-row { display: flex; gap: 4px; }
.seg { flex: 1; height: 4px; border-radius: 4px; background: #eee; transition: background .3s; }
.s-label { font-size: 11px; color: #bbb; text-align: right; }

/* ── Biometric ── */
.bio-box {
  background: #fff;
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  align-items: center; gap: 9px;
}
.bio-box p { font-size: 12px; color: #bbb; }
.bio-btn {
  width: 58px; height: 58px;
  background: linear-gradient(135deg, var(--accent2) 0%, #2ecc71 100%);
  border: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(72,201,176,.32);
  transition: transform .18s, box-shadow .18s;
}
.bio-btn:hover  { transform: scale(1.07); box-shadow: 0 10px 26px rgba(72,201,176,.42); }
.bio-btn:active { transform: scale(.96); }
.bio-btn svg { width: 28px; height: 28px; fill: #fff; pointer-events: none; }
.bio-label { font-size: 12.5px; font-weight: 600; color: var(--brand); }

/* ── Toast ── */
.toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: var(--brand); color: #fff;
  padding: 11px 22px; border-radius: 22px;
  font-size: 13px; font-weight: 600; font-family: inherit;
  opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s;
  white-space: nowrap; z-index: 999;
  box-shadow: 0 8px 24px rgba(43,38,64,.3);
  max-width: 90vw; text-align: center;
}
.toast.show  { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error   { background: var(--danger); }
.toast.success { background: var(--success); }

/* ── Loader (shared) ── */
#__loader__ {
  position: fixed; inset: 0;
  background: rgba(20,16,40,.52);
  color: #fff;
  display: none;
  flex-direction: column;
  align-items: center; justify-content: center;
  z-index: 2000; gap: 14px;
  backdrop-filter: blur(2px);
}
#__loader__ span { font-size: 15px; font-weight: 600; letter-spacing: .02em; }
#__loader__::before {
  content: '';
  width: 36px; height: 36px;
  border: 3px solid rgba(255,255,255,.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
