/* assets/css/login.css */

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

:root {
  --bg:      #0e0e10;
  --surf:    #18181b;
  --surf2:   #232328;
  --border:  rgba(255,255,255,0.08);
  --accent:  #0D6EFD;
  --glow:    rgba(13,110,253,0.22);
  --hover:   #3d8bfd;
  --text:    #f4f4f5;
  --muted:   #71717a;
  --danger:  #f87171;
  --success: #4ade80;
}

html, body {
  min-height: 100svh;
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px env(safe-area-inset-bottom);
  background-image:
    radial-gradient(ellipse 600px 400px at 20% 0%,   rgba(13,110,253,0.07) 0%, transparent 70%),
    radial-gradient(ellipse 400px 300px at 80% 100%, rgba(13,110,253,0.05) 0%, transparent 70%);
}

/* ── Card ── */
.card {
  width: 360px;
  max-width: 100%;
  background: var(--surf);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px 28px 32px;
  position: relative; overflow: hidden;
}
.card::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(13,110,253,0.5), transparent);
}

/* ── Logo ── */
.logo { 
    display: flex; 
    align-items: center;
    justify-content: center; 
    gap: 10px; 
    margin-bottom: 28px; 
}
.logo img {
    height: 15px;
    width: auto;
    object-fit: contain;
}
.logo-mark  {
  width: 36px; height: 36px; background: var(--accent);
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-family: 'DM Mono', monospace; font-size: 13px; font-weight: 500; color: #fff;
}
.logo-name { font-size: 17px; font-weight: 600; letter-spacing: -.3px; }
.logo-sub  { font-size: 12px; color: var(--muted); }

/* ── Screens ── */
.screen { display: none; animation: fadeIn .2s ease; }
.screen.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.text-white { color: var(--text); }
.title { font-size: 20px; font-weight: 600; letter-spacing: -.4px; margin-bottom: 6px; }
.sub   { font-size: 14px; color: var(--muted); line-height: 1.55; margin-bottom: 20px; }
.hint  { font-size: 13px; color: var(--muted); }
.divider { height: 1px; background: var(--border); margin: 20px 0; }

/* ── Field ── */
.field       { margin-bottom: 8px; }
.field input {
  width: 100%; background: var(--surf2);
  border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; font-size: 15px;
  font-family: 'DM Sans', sans-serif; color: var(--text); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field input::placeholder { color: var(--muted); }
.field input:focus        { border-color: rgba(13,110,253,.5); box-shadow: 0 0 0 3px var(--glow); }
.field input.has-error    { border-color: rgba(248,113,113,.5); box-shadow: 0 0 0 3px rgba(248,113,113,.12); }
.field-error { font-size: 13px; color: var(--danger); min-height: 18px; margin-top: 5px; }

/* ── Button ── */
.btn {
  width: 100%; background: var(--accent); color: #fff;
  border: none; border-radius: 10px; padding: 13px;
  font-size: 15px; font-family: 'DM Sans', sans-serif; font-weight: 600;
  cursor: pointer; transition: background .15s, transform .1s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn:hover    { background: var(--hover); }
.btn:active   { transform: scale(.985); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.link-btn {
  background: none; border: none; color: var(--accent); font-size: 14px;
  font-family: 'DM Sans', sans-serif; cursor: pointer; padding: 0; text-decoration: underline;
}
.link-btn:hover { color: var(--hover); }

/* ── Icons ── */
.icon-wrap {
  width: 56px; height: 56px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center; margin-bottom: 20px;
}
.icon-blue  { background: rgba(13,110,253,.1); border: 1px solid rgba(13,110,253,.3); }
.icon-green { background: rgba(74,222,128,.1); border: 1px solid rgba(74,222,128,.3); border-radius: 50%; margin: 0 auto 20px; animation: popIn .4s cubic-bezier(.175,.885,.32,1.275); }
@keyframes popIn { from { transform: scale(.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ── Steps ── */
.steps { display: flex; gap: 6px; margin-bottom: 20px; }
.step  { width: 6px; height: 6px; border-radius: 50%; background: #3f3f46; transition: background .2s, width .2s; }
.step.active { background: var(--accent); width: 18px; border-radius: 3px; }
.step.done   { background: var(--success); }

/* ── Greeting ── */
.greeting { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.avatar   {
  width: 40px; height: 40px; border-radius: 50%; background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 600; color: #fff; flex-shrink: 0;
}
.greeting-text { flex: 1; }
.greeting-name { font-size: 15px; font-weight: 600; }
.greeting-hint { font-size: 13px; color: var(--muted); }
.not-you {
  font-size: 12px; color: var(--muted); background: none; border: none;
  cursor: pointer; text-decoration: underline; font-family: 'DM Sans', sans-serif;
}
.not-you:hover { color: var(--text); }

/* ── Dots ── */
.dots { display: flex; justify-content: center; gap: 16px; margin: 4px 0 28px; }
.dot  {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid #3f3f46; background: transparent;
  transition: background .15s, border-color .15s, transform .1s;
}
.dot.filled { background: var(--accent); border-color: var(--accent); transform: scale(1.1); }
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%     { transform: translateX(-6px); }
  40%     { transform: translateX(6px); }
  60%     { transform: translateX(-3px); }
  80%     { transform: translateX(3px); }
}
.dot.shake { animation: shake .4s ease; }

/* ── Keypad ── */
.keypad { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.key {
  background: var(--surf2); border: 1px solid var(--border);
  border-radius: 12px; height: 64px;
  font-size: 22px; font-family: 'DM Mono', monospace; font-weight: 500;
  color: var(--text); cursor: pointer;
  transition: background .1s, transform .08s;
  display: flex; align-items: center; justify-content: center;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.key:hover        { background: #2e2e35; border-color: rgba(255,255,255,.13); }
.key:active       { background: #1a1a20; transform: scale(.93); }
.key-special      { background: var(--surf); font-size: 18px; }
.key-ok           { background: var(--accent); border-color: transparent; font-size: 14px; font-family: 'DM Sans',sans-serif; font-weight: 600; color: #fff; }
.key-ok:hover     { background: var(--hover); }
.key-ok:active    { background: #0b5ed7; }
.key-ok:disabled  { opacity: .4; cursor: not-allowed; transform: none; }

/* ── Foutberichten ── */
.pin-error    { font-size: 13px; color: var(--danger); text-align: center; margin-top: 14px; min-height: 18px; font-weight: 500; }
.pin-attempts { font-size: 12px; color: var(--muted); text-align: center; margin-top: 4px; }

/* ── Spinner ── */
.spinner {
  display: inline-block; width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.3); border-top-color: #fff;
  border-radius: 50%; animation: spin .7s linear infinite;
}
.spinner-sm { width: 14px; height: 14px; }
@keyframes spin { to { transform: rotate(360deg); } }
