/* === Auth Screens === */
.auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  background: linear-gradient(160deg, var(--cream) 0%, var(--cream-dark) 100%);
}

.auth-card {
  background: var(--white);
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  padding: 48px 40px;
  max-width: 420px;
  width: 100%;
  animation: fadeInUp 0.5s ease both;
}

.auth-brand {
  text-align: center;
  margin-bottom: 32px;
}

.auth-brand .brand-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}

.auth-brand .brand-logo img {
  height: 48px;
}

.auth-brand .brand-subtitle {

  font-size: 15px;
  color: var(--text-mid);
  margin-top: 4px;
}

.auth-card h1 {

  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.auth-card p {
  color: var(--text-mid);
  margin-bottom: 20px;
  font-size: 15px;
}

.auth-card label {
  display: block;
  font-weight: 600;
  font-size: 12px;
  color: var(--text-mid);
  margin-top: 18px;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.auth-card input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: var(--cream);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.auth-card input:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(200,16,46,0.12);
  background: var(--white);
}

.auth-card input::placeholder {
  color: #b0aaa2;
}

.auth-footer {
  text-align: center;
  margin-top: 28px;
  font-size: 12px;
  color: #b0aaa2;
}

.error-msg {
  color: var(--danger);
  font-size: 14px;
  margin-top: 14px;
  min-height: 20px;
  font-weight: 500;
}

/* === Auth intro text === */
.auth-intro {
  font-size: 14px;
  color: var(--text-mid);
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.5;
}

/* === Success message === */
.success-msg {
  font-size: 13px;
  color: var(--green);
  min-height: 18px;
  margin: 4px 0 8px;
}

/* === PIN dots === */
@keyframes pinShake {
  0%, 100% { transform: translateX(0); }
  15%       { transform: translateX(-10px); }
  35%       { transform: translateX(9px); }
  55%       { transform: translateX(-6px); }
  75%       { transform: translateX(4px); }
}

.pin-dots {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin: 16px 0;
}

.pin-dots span {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--cream-border);
  background: transparent;
  transition: background 0.15s, border-color 0.15s;
}

.pin-dots span.filled {
  background: var(--red);
  border-color: var(--red);
}

.pin-dots.shake {
  animation: pinShake 0.45s ease;
}

/* === PIN entry (dots + hidden input) === */
.pin-entry {
  position: relative;
  display: flex;
  justify-content: center;
  cursor: text;
}

.pin-overlay-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: text;
  font-size: 16px;
  border: none;
  background: transparent;
  outline: none;
  -webkit-user-select: none;
}

/* === PIN setup card === */
.pin-setup-card {
  max-width: 360px;
}

.pin-label {
  font-size: 15px;
  font-weight: 500;
  text-align: center;
  color: var(--text);
  margin-bottom: 4px;
}

/* === PIN lock overlay === */
@keyframes pinLockFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pinLockSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.pin-lock-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-pin);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  background: rgba(250, 250, 248, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pinLockFadeIn 0.2s ease;
}

.pin-lock-overlay.pin-lock-exit {
  animation: pinLockFadeIn 0.3s ease reverse forwards;
}

.pin-lock-card {
  background: var(--white);
  border-radius: 20px;
  padding: 36px 32px 28px;
  box-shadow: var(--shadow-lg);
  text-align: center;
  width: 320px;
  animation: pinLockSlideUp 0.25s ease;
}

.pin-lock-logo img {
  height: 36px;
  object-fit: contain;
}

.pin-lock-name {
  font-size: 18px;
  font-weight: 600;
  margin: 12px 0 4px;
  color: var(--text);
}

.pin-lock-label {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 4px;
}

.pin-lock-error {
  min-height: 18px;
  font-size: 13px;
}

.pin-lock-keypad {
  margin-top: 4px;
}

.pin-lock-signout {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 13px;
  cursor: pointer;
  padding: 8px;
  margin-top: 8px;
  font-family: inherit;
  text-decoration: underline;
  transition: color 0.15s;
}

.pin-lock-signout:hover {
  color: var(--red);
}

/* === PIN lock — secure badge === */
.pin-lock-secure-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #eef6ee;
  border: 1px solid #b8d8b8;
  color: #2e6b2e;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  margin: 10px 0 4px;
}

/* === PIN lock — individual boxes === */
.pin-boxes {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 20px 0 8px;
}

.pin-box {
  width: 54px;
  height: 62px;
  border: 2px solid var(--cream-border);
  border-radius: 12px;
  font-size: 24px;
  text-align: center;
  background: var(--cream);
  color: var(--text);
  font-family: inherit;
  outline: none;
  caret-color: transparent;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.pin-box:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.1);
  background: #fff;
}

.pin-boxes.shake {
  animation: pinShake 0.45s ease;
}

/* === Account settings modal === */
.account-modal {
  max-width: 440px;
  width: 100%;
}

.account-section {
  padding: 16px 0 8px;
  border-top: 1px solid var(--cream-border);
}

.account-section:first-of-type {
  border-top: none;
  padding-top: 4px;
}

.account-section-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  margin-bottom: 12px;
}

.account-section-pin {
  margin-top: 4px;
}

.pin-input {
  letter-spacing: 4px;
  font-size: 18px;
  text-align: center;
}

@media (max-width: 768px) {
  .auth-card {
    padding: 32px 24px;
  }
}
