:root {
  --primary-blue: #004494;
  --secondary-blue: #0078d7;
  --light-grey: #f4f4f4;
  --medium-grey: #e0e0e0;
  --dark-grey: #333333;
  --text-color: #333;
  --background-color: #ffffff;
  --error-red: #d9534f;
  --error-background: #f2dede;
  --info-pink: #ffeef0;
  --info-pink-alt: #fff5f6;
  --info-red: #c4132f;
  --info-red-dark: #8b0e1f;
  --dark-bg: #2d3e50;
  --input-border: #d1d1d1;
}

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

body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.5;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

.container {
  max-width: 100%;
  margin: 0 auto;
  background-color: var(--background-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #e5e5e5;
}

.logo {
  height: 32px;
  width: auto;
}

.header-icons {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.icon {
  color: var(--primary-blue);
  width: 22px;
  height: 22px;
  cursor: pointer;
}

.main-content {
  padding: 2.5rem 1.5rem 2rem;
  flex: 1;
}

.page-content {
  max-width: 100%;
  margin: 0 auto;
  width: 100%;
}

h1 {
  font-size: 1.625rem;
  color: var(--primary-blue);
  margin-bottom: 1.5rem;
  font-weight: 400;
  text-align: center;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.3rem;
  color: var(--primary-blue);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.input-group {
  margin-bottom: 1.375rem;
}

.input-group label {
  display: block;
  font-size: 0.875rem;
  color: #004494;
  margin-bottom: 0.5rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.input-group input[type="text"],
.input-group input[type="password"],
.input-group input[type="email"],
.input-group input[type="tel"] {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid #d5d5d5;
  border-radius: 6px;
  font-size: 1rem;
  background-color: #ffffff;
  font-family: inherit;
  line-height: 1.5;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-group input:focus {
  outline: none;
  border-color: #004494;
  box-shadow: 0 0 0 3px rgba(0, 68, 148, 0.08);
}

.input-group input.error,
.input-group input:invalid:not(:placeholder-shown) {
  border-color: #dc3545;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.input-group input::placeholder {
  color: #9a9a9a;
  font-size: 0.9375rem;
}

.input-group input:focus {
  outline: none;
  border-color: var(--secondary-blue);
  box-shadow: 0 0 0 2px rgba(0, 120, 215, 0.2);
}

.remember-me {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  padding: 0.25rem 0;
}

.remember-me label:first-child {
  color: #2d2d2d;
  font-weight: 400;
  margin-bottom: 0;
  line-height: 1.5;
  letter-spacing: -0.01em;
  cursor: pointer;
  user-select: none;
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cccccc;
  transition: .25s ease;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .25s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

input:checked + .slider {
  background-color: var(--secondary-blue);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

.slider.round {
  border-radius: 24px;
}

.slider.round:before {
  border-radius: 50%;
}

.switch:hover .slider {
  background-color: #b8b8b8;
}

.switch:hover input:checked + .slider {
  background-color: #0066c4;
}

.btn-primary {
  width: 100%;
  padding: 1rem;
  background-color: var(--primary-blue);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
  margin-top: 0;
  font-family: inherit;
  letter-spacing: 0.01em;
}

.btn-primary:hover {
  background-color: #003375;
}

.btn-primary:active {
  background-color: #002856;
}

.btn-primary:disabled {
  background-color: var(--medium-grey);
  cursor: not-allowed;
}

.link {
  display: block;
  text-align: center;
  margin-top: 1.5rem;
  color: var(--primary-blue);
  text-decoration: underline;
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Information Alert Box */
.info-alert {
  background-color: #fef2f3;
  border-radius: 8px;
  padding: 1rem 1.125rem 1rem 1rem;
  margin-bottom: 1.5rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  box-shadow: 0 0 0 1px rgba(196, 19, 47, 0.05);
}

.info-alert-icon {
  background-color: #c4132f;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  min-width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.info-alert-icon svg {
  width: 12px;
  height: 12px;
  stroke-width: 3;
}

.info-alert-content {
  flex: 1;
  color: #2d2d2d;
  font-size: 0.875rem;
  line-height: 1.55;
  letter-spacing: -0.01em;
}

.info-alert-content p {
  margin: 0;
  color: #2d2d2d;
  line-height: 1.55;
  font-size: 0.875rem;
}

.info-alert-content strong {
  color: #8b0e1f;
  font-weight: 700;
  margin-right: 0.25rem;
}

/* Footer */
.footer {
  background-color: var(--primary-blue);
  color: white;
  padding: 1.5rem;
  text-align: center;
  margin-top: auto;
  display: none;
}

.footer p {
  margin: 0;
  font-size: 0.875rem;
}

.error-message {
  background-color: #f8d7da;
  color: #721c24;
  padding: 0.875rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  text-align: center;
  display: none;
  border: 1px solid #f5c6cb;
}

/* Password Page Specifics */
.identifier-display-input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid #d5d5d5;
  border-radius: 6px;
  font-size: 1rem;
  background-color: #ffffff;
  font-family: inherit;
  line-height: 1.5;
  letter-spacing: 0.15em;
  color: #666;
  cursor: default;
}

.password-circles {
  display: flex;
  gap: 0.875rem;
  justify-content: center;
  align-items: center;
  margin: 0.875rem 0 1.75rem;
  padding: 0.5rem 0;
  position: relative;
}

.password-circles {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin: 0.875rem 0 1.75rem;
  padding: 0.5rem 0;
}

.password-circles-wrapper {
  display: flex;
  gap: 0.625rem;
  align-items: center;
}

.password-circle {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: #ffffff;
  border: 1.5px solid #004494;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  flex-shrink: 0;
}

.password-circle.filled {
  background-color: #004494;
  border-color: #004494;
}

.password-circle.filled::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #ffffff;
  display: block;
  position: absolute;
}

.password-clear-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background-color: #e8f0ff;
  border: 1px solid #d0d8ff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  padding: 0;
}

.password-clear-btn:hover {
  background-color: #d8e8ff;
  border-color: #004494;
}

.password-clear-btn:active {
  background-color: #c8d8ff;
  transform: scale(0.95);
}

.keypad {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.625rem;
  margin: 2rem 0 1.5rem;
}

.key {
  padding: 1rem 0.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  border: 1px solid #d0d8ff;
  border-radius: 8px;
  background-color: #e8f0ff;
  color: #004494;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px rgba(0, 68, 148, 0.1);
}

.key:hover {
  background-color: #d8e8ff;
  border-color: #004494;
  box-shadow: 0 2px 4px rgba(0, 68, 148, 0.15);
}

.key:active {
  background-color: #c8d8ff;
  transform: scale(0.98);
  box-shadow: 0 1px 2px rgba(0, 68, 148, 0.1);
}

/* Welcome & Processing Page */
.welcome-container,
.processing-container {
  text-align: center;
}

.welcome-spinner,
.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--light-grey);
  border-top-color: var(--primary-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 2rem auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Home Page */
.alert-card {
  border: 1px solid var(--error-red);
  background-color: var(--error-background);
  padding: 1.5rem;
  border-radius: 4px;
  margin-bottom: 2rem;
}

.alert-card h2 {
  color: var(--error-red);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.transaction-details {
  margin: 1rem 0;
}

.transaction-details p {
  margin-bottom: 0.5rem;
}

/* Verification Pages */
.step-indicator {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.step {
  width: 30px;
  height: 8px;
  background-color: var(--medium-grey);
  border-radius: 4px;
}

.step.active {
  background-color: var(--primary-blue);
}

@media (min-width: 768px) {
  body {
    background-color: #ffffff;
    padding: 0;
  }
  
  .container {
    max-width: 480px;
    margin: 3rem auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--background-color);
    min-height: auto;
  }
  
  .main-content {
    padding: 2.5rem 2rem 2.5rem;
  }
  
  .header {
    padding: 1.5rem 2rem;
  }
  
  .page-content {
    max-width: 100%;
  }
  
  h1 {
    font-size: 1.75rem;
    margin-bottom: 1.75rem;
  }
}
