:root {
  --background: 210 40% 97%;
  --foreground: 214 28% 15%;
  --primary: 226 50% 27%;
  --primary-foreground: 210 40% 98%;
  --muted: 210 30% 94%;
  --muted-foreground: 215 16% 45%;
  --border: 215 28% 85%;
  --input: 215 28% 85%;
  --ring: 202 92% 40%;
}

* {
  outline: none !important;
}

*:focus {
  outline: none !important;
}

button,
button:focus,
button:active {
  outline: none !important;
  box-shadow: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom shadow for panel */
.shadow-panel {
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
}

/* Background image */
.bg-login {
  background-image: url("/assets/login_background.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Error message style */
.error-message {
  color: #dc2626;
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

/* Button loading spinner */
.spinner {
  border: 2px solid hsl(var(--primary-foreground));
  border-top-color: transparent;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  animation: spin 0.6s linear infinite;
}

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

/* reCAPTCHA container */
.g-recaptcha {
  display: inline-block;
}

/* Center reCAPTCHA on mobile */
@media (max-width: 640px) {
  .g-recaptcha {
    transform: scale(0.9);
    transform-origin: center;
  }
}

.anticon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.anticon svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}
/* Modal animation keyframes */
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes slideInUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}
@keyframes slideOutDown {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(120%);
    opacity: 0;
  }
}
.modal-panel-base {
  will-change: transform, opacity;
}
.slide-in-desktop {
  animation: slideInRight 0.35s cubic-bezier(0.16, 0.84, 0.44, 1);
}
.slide-in-mobile {
  animation: slideInUp 0.35s cubic-bezier(0.16, 0.84, 0.44, 1);
}
.slide-out-desktop {
  animation: slideOutRight 0.3s ease forwards;
}
.slide-out-mobile {
  animation: slideOutDown 0.3s ease forwards;
}
/* Initial offscreen positioning before animation applies */
@media (min-width: 768px) {
  .modal-start {
    transform: translateX(100%);
    opacity: 0;
  }
}
@media (max-width: 767px) {
  .modal-start {
    transform: translateY(100%);
    opacity: 0;
  }
}
/* MFA panel sizing & rounding (mobile) */
@media (max-width: 767px) {
  /* Mobile: container no special layout; panel itself is fixed */

  .mfaPanel {
    min-height: 50vh;
    max-height: 90vh;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    z-index: 60;
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
    top: auto;
    margin: 0;
    padding-bottom: env(safe-area-inset-bottom, 0);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.15);
    border-radius: 15px 15px 0 0;
  }
  .modal-flex-wrapper {
    height: 100%;
    align-items: flex-end;
    justify-content: center;
  }
  #mfaModal {
    overflow: hidden;
  }
}

/* Force full hide when hidden class applied */
#mfaModal.hidden {
  display: none !important;
}
@media (min-width: 768px) {
  #mfaPanel {
    border-radius: 0;
  }
}
/* Tab styles */
.tab-button {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  border-bottom: 3px solid transparent;
  background: transparent;
  cursor: pointer;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  transition: all 0.3s;
}
.tab-button:hover {
  color: hsl(var(--foreground));
  background: hsl(var(--muted));
}
.tab-button.active {
  color: hsl(var(--primary));
  border-bottom-color: hsl(var(--primary));
  background: transparent;
}
.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
}
.spinner-large {
  border: 4px solid hsl(var(--muted));
  border-top-color: hsl(var(--primary));
  border-radius: 50%;
  width: 48px;
  height: 48px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
