:root {
  --primary: #4F46E5;
  --primary-hover: #4338CA;
  --secondary: #10B981;
  --secondary-light: #34D399;
  --dark: #111827;
  --darker: #0F172A;
  --light: #F9FAFB;
  --gray: #1F2937;
  --light-gray: #374151;
  --muted: #6B7280;
  --success: #10B981;
  --error: #EF4444;
  --info: #60A5FA;
  --warning: #F59E0B;
  --border-radius: 10px;
  --focus-ring: rgba(79, 70, 229, 0.3);
}

* {
  box-sizing: border-box;
}

body {
  background: linear-gradient(135deg, var(--darker), var(--dark));
  color: var(--light);
  font-family: 'Inter', system-ui, sans-serif;
  margin: 0;
  padding: 1rem;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.6;
}

/* === Container & Branding === */
main {
  width: 100%;
  max-width: 420px;
}

.logo {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1.5rem;
  border-radius: var(--border-radius);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.logo svg {
  width: 100%;
  height: 100%;
  color: white;
}

h1 {
  font-weight: 700;
  font-size: 1.625rem;
  margin-bottom: 0.3rem;
  text-align: center;
}

.text-muted.small {
  color: var(--muted) !important;
  font-size: 0.875rem;
  text-align: center;
}

/* === Form === */
form {
  background: transparent;
}

label.form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--light);
  margin-bottom: 0.5rem;
}

input.form-control {
  background-color: var(--gray);
  border: 1px solid var(--light-gray);
  color: var(--light);
  border-radius: 0.5rem;
  font-size: 1rem;
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
}

input.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--focus-ring);
  outline: none;
  background-color: var(--light-gray);
}

.form-control-lg {
  font-size: 1rem;
  height: auto;
}

/* === PIN Input === */
.d-flex.gap-2 {
  gap: 0.75rem !important;
  margin-bottom: 0.5rem;
}

.pin-input {
  border: 1px solid var(--light-gray);
  color: var(--light);
  font-weight: 600;
  font-size: 1.25rem;
  width: 100%;
  height: 3.5rem;
  text-align: center;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  caret-color: var(--primary);
  background-color: var(--gray);
}

.pin-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--focus-ring);
  background-color: var(--light-gray);
  transform: translateY(-1px);
  outline: none;
}

/* === Buttons === */
.btn-primary {
  background-color: var(--primary);
  border: none;
  border-radius: 0.5rem;
  font-weight: 500;
  padding: 0.75rem;
  font-size: 0.9375rem;
  transition: all 0.3s ease;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}

.btn-outline-light {
  background-color: transparent;
  border: 1px solid var(--light-gray);
  color: var(--light);
  border-radius: 0.5rem;
  padding: 0.75rem;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-outline-light:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: var(--secondary-light);
  color: var(--secondary-light);
}

/* === Links === */
a.text-info.small {
  font-size: 0.8125rem;
  color: var(--info);
  text-decoration: none;
}

a.text-info.small:hover {
  color: var(--light);
  text-decoration: underline;
}

.text-muted {
  color: var(--muted) !important;
}

a.text-info.fw-semibold {
  text-decoration: none;
  font-weight: 600;
  color: var(--info);
}

a.text-info.fw-semibold:hover {
  text-decoration: underline;
  color: var(--primary);
}

/* === Toast Container === */
.toast-container {
  z-index: 1055;
}

/* === Animation === */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

.shake {
  animation: shake 0.5s;
}

/* === Responsive === */
@media (max-width: 480px) {
  body {
    padding: 1rem;
  }

  .pin-input {
    height: 3rem;
    font-size: 1rem;
  }

  h1 {
    font-size: 1.375rem;
  }
}
