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

:root {
  --primary: #F97316;
  --primary-dark: #EA580C;
  --primary-light: #FED7AA;
  --bg: #F8F9FB;
  --surface: #FFFFFF;
  --text: #111827;
  --text-muted: #6B7280;
  --border: #E5E7EB;
  --danger: #EF4444;
  --radius: 16px;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
}

body {
  font-family: 'Sora', sans-serif;
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.auth-wrap {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border-radius: 24px;
  padding: 36px 28px;
  box-shadow: var(--shadow);
}

.auth-top { text-align: center; margin-bottom: 28px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.brand-logo {
  width: 44px; height: 44px;
  background: var(--primary);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; color: #fff;
}

.brand-name { font-size: 22px; font-weight: 700; color: var(--text); }

.auth-top h1 { font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.auth-top p  { font-size: 14px; color: var(--text-muted); }

.alert {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  margin-bottom: 20px;
  font-weight: 500;
}
.alert svg { width: 18px; height: 18px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 2; }
.alert-error { background: #FEF2F2; color: var(--danger); border: 1px solid #FECACA; }
.alert-success { background: #F0FDF4; color: #16A34A; border: 1px solid #BBF7D0; }

.auth-form { display: flex; flex-direction: column; gap: 18px; }

.field-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

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

.input-wrap input {
  width: 100%;
  height: 52px;
  padding: 0 44px 0 44px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  font-family: 'Sora', sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}

.input-wrap input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(249,115,22,.12);
  background: #fff;
}

.input-icon {
  position: absolute;
  left: 14px;
  width: 18px; height: 18px;
  stroke: var(--text-muted); fill: none; stroke-width: 2;
  pointer-events: none;
}

.eye-btn {
  position: absolute; right: 12px;
  background: none; border: none; cursor: pointer; padding: 4px;
  display: flex; align-items: center;
}
.eye-btn svg { width: 18px; height: 18px; stroke: var(--text-muted); fill: none; stroke-width: 2; }

.forgot-row { text-align: right; }
.forgot-row a { font-size: 13px; color: var(--primary); text-decoration: none; font-weight: 500; }

.btn-primary {
  width: 100%; height: 52px;
  background: var(--primary);
  color: #fff; border: none;
  border-radius: 14px;
  font-family: 'Sora', sans-serif;
  font-size: 15px; font-weight: 600;
  cursor: pointer;
  transition: background .2s, transform .1s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); }
.btn-primary:active:not(:disabled) { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.7; cursor: not-allowed; }

.btn-loader { display: inline-flex; }
.spin { width: 20px; height: 20px; stroke: #fff; fill: none; stroke-width: 2;
        animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.auth-switch {
  text-align: center; font-size: 14px; color: var(--text-muted);
}
.auth-switch a { color: var(--primary); font-weight: 600; text-decoration: none; }

/* PIN modal */
.pin-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 1000; padding: 0;
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.pin-modal-overlay.open { opacity: 1; pointer-events: all; }
.pin-modal {
  width: 100%; max-width: 420px;
  background: #fff; border-radius: 24px 24px 0 0;
  padding: 28px 24px 40px;
  transform: translateY(100%); transition: transform .35s cubic-bezier(.32,0,.15,1);
}
.pin-modal-overlay.open .pin-modal { transform: translateY(0); }
.pin-modal h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.pin-modal p  { font-size: 13px; color: var(--text-muted); margin-bottom: 24px; }
.pin-dots { display: flex; gap: 12px; justify-content: center; margin-bottom: 28px; }
.pin-dot {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--border); background: transparent;
  transition: background .2s, border-color .2s;
}
.pin-dot.filled { background: var(--primary); border-color: var(--primary); }
.pin-keypad { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.key-btn {
  height: 60px; border-radius: 14px; border: 1.5px solid var(--border);
  background: var(--bg); font-family: 'Sora', sans-serif;
  font-size: 20px; font-weight: 600; color: var(--text);
  cursor: pointer; transition: background .15s;
}
.key-btn:active { background: var(--primary-light); }
.key-btn.del { font-size: 14px; color: var(--danger); border-color: #FECACA; }
.key-btn.empty { border: none; background: transparent; cursor: default; }
