:root {
  --auth-navy: #12315f;
  --auth-blue: #2563eb;
  --auth-blue-dark: #1d4ed8;
  --auth-red: #dc2626;
  --auth-text: #0f172a;
  --auth-muted: #64748b;
  --auth-line: #d7e0ed;
  --auth-soft: #f6f8fb;
  --auth-panel: #ffffff;
  --auth-shadow: 0 20px 48px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  background-color: #f5f8fc;
}

.auth-page {
  min-height: 100vh;
  margin: 0;
  color: var(--auth-text);
  font-family: "Inter", "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: #f5f8fc;
  background-image:
    radial-gradient(circle, rgba(37, 99, 235, 0.18) 1px, transparent 1.4px),
    linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(226, 232, 240, 0.42));
  background-position: 0 0, center;
  background-size: 22px 22px, cover;
  overflow-x: hidden;
}

.auth-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  width: 100%;
  padding: 34px;
}

.auth-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
}

.auth-card {
  width: min(100%, 560px);
  padding: 34px;
  border: 1px solid var(--auth-line);
  border-radius: 8px;
  background: var(--auth-panel);
  box-shadow: var(--auth-shadow);
}

.auth-breadcrumb,
.auth-card-badge,
.auth-security-note,
.auth-meta-row span {
  display: flex;
  align-items: center;
}

.auth-breadcrumb {
  gap: 8px;
  width: fit-content;
  min-height: 30px;
  padding: 5px 10px;
  color: #49617f;
  font-size: 0.76rem;
  font-weight: 800;
  border: 1px solid #dce6f3;
  border-radius: 999px;
  background: #f8fbff;
}

.auth-breadcrumb svg,
.auth-card-badge svg,
.auth-security-note svg,
.auth-meta-row svg {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
}

.login-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.auth-card-badge {
  gap: 7px;
  width: fit-content;
  min-height: 30px;
  margin-bottom: 12px;
  padding: 5px 10px;
  color: #075985;
  font-size: 0.74rem;
  font-weight: 900;
  border: 1px solid #bae6fd;
  border-radius: 999px;
  background: #f0f9ff;
}

.auth-breadcrumb-card {
  margin-bottom: 14px;
}

.login-header h2 {
  margin: 0;
  color: var(--auth-navy);
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  font-size: 1.85rem;
  font-weight: 900;
  letter-spacing: 0;
}

.login-header p {
  margin: 8px 0 0;
  color: var(--auth-muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

.auth-security-note {
  gap: 10px;
  margin-bottom: 22px;
  padding: 12px 14px;
  color: #28506a;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.45;
  border: 1px solid #bde7f3;
  border-radius: 8px;
  background: #ecfeff;
}

.auth-security-note svg {
  color: #0891b2;
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  color: var(--auth-navy);
  font-size: 0.88rem;
  font-weight: 900;
}

.required-marker {
  color: var(--auth-red);
}

.auth-input-group {
  min-height: 42px;
  overflow: hidden;
  border: 1px solid var(--auth-line);
  border-radius: 8px;
  background: #ffffff;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.auth-input-group:focus-within {
  border-color: var(--auth-blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
  background: #ffffff;
}

.auth-input-group .input-group-text {
  min-width: 44px;
  justify-content: center;
  color: var(--auth-muted);
  border: 0;
  background: transparent;
}

.auth-input-group .input-group-text svg {
  width: 18px;
  height: 18px;
}

.auth-input-group .form-control {
  min-height: 42px;
  padding: 9px 10px;
  color: var(--auth-text);
  font-size: 0.95rem;
  font-weight: 700;
  border: 0;
  background: transparent;
}

.auth-input-group .form-control:focus {
  box-shadow: none;
}

.auth-input-group .form-control::placeholder {
  color: #94a3b8;
  font-weight: 500;
}

.form-hint {
  display: block;
  margin-top: 7px;
  color: var(--auth-muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

.cursor-pointer {
  cursor: pointer;
}

.toggle-password {
  position: relative;
  z-index: 2;
}

.toggle-password:hover {
  color: var(--auth-blue);
}

.captcha-container {
  display: flex;
  justify-content: center;
  margin: 20px 0;
  padding: 12px;
  overflow-x: auto;
  border: 1px solid var(--auth-line);
  border-radius: 8px;
  background: var(--auth-soft);
}

.btn-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  margin-top: 4px;
  padding: 11px 16px;
  color: #ffffff;
  font-size: 0.96rem;
  font-weight: 900;
  border: 0;
  border-radius: 8px;
  background: var(--auth-blue);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.24);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.btn-login svg {
  width: 18px;
  height: 18px;
}

.btn-login:hover,
.btn-login:focus {
  color: #ffffff;
  background: var(--auth-blue-dark);
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.3);
}

.btn-login:disabled {
  background: #94a3b8;
  box-shadow: none;
  transform: none;
  cursor: not-allowed;
}

.btn-loading {
  position: relative;
  color: transparent !important;
}

.btn-loading svg,
.btn-loading span {
  opacity: 0;
}

.btn-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  border: 3px solid rgba(255, 255, 255, 0.38);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: authSpin 0.8s linear infinite;
}

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

.auth-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  padding-top: 18px;
  color: var(--auth-muted);
  font-size: 0.78rem;
  font-weight: 800;
  border-top: 1px solid var(--auth-line);
}

.auth-meta-row span {
  gap: 7px;
}

.auth-meta-row svg {
  color: var(--auth-blue);
}

.login-footer {
  margin-top: 14px;
  color: var(--auth-muted);
  font-size: 0.78rem;
  text-align: center;
}

.swal2-popup {
  border-radius: 8px !important;
}

.swal2-confirm,
.swal2-cancel {
  border-radius: 8px !important;
  font-weight: 800 !important;
}

@media (max-width: 991.98px) {
  .auth-shell {
    padding: 24px;
  }

  .auth-card {
    width: min(100%, 520px);
    padding: 28px;
  }
}

@media (max-width: 480px) {
  .auth-shell {
    padding: 14px;
  }

  .auth-card {
    padding: 22px 18px;
  }

  .login-header h2 {
    font-size: 1.55rem;
  }

  .auth-meta-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .auth-breadcrumb-card {
    max-width: 100%;
  }
}
