* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(33, 150, 243, 0.10), transparent 28%),
    radial-gradient(circle at bottom right, rgba(9, 22, 79, 0.12), transparent 32%),
    #f4f7fa;
  color: #1f2937;
  font-family: Arial, sans-serif;
}

.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-box {
  width: 100%;
  max-width: 430px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 22px;
  padding: 28px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(8px);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.login-badge {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #09164f;
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(9, 22, 79, 0.18);
}

.login-brand h1 {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.15;
  color: #09164f;
}

.login-brand p {
  margin: 4px 0 0;
  color: #6b7280;
  font-size: 0.95rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-label {
  font-size: 0.94rem;
  font-weight: 600;
  color: #374151;
}

.input-group input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #d6dbe6;
  border-radius: 14px;
  background: #fff;
  color: #111827;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.input-group input:focus {
  border-color: #09164f;
  box-shadow: 0 0 0 4px rgba(9, 22, 79, 0.10);
}

.input-group input::placeholder {
  color: #9ca3af;
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 52px;
}

.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}

.password-toggle:hover {
  background: rgba(9, 22, 79, 0.06);
}

.password-toggle:focus-visible {
  outline: 2px solid rgba(9, 22, 79, 0.35);
  outline-offset: 2px;
}

.password-toggle-icon {
  position: relative;
  width: 20px;
  height: 20px;
}

.password-toggle-icon::before,
.password-toggle-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
}

.password-toggle-icon::before {
  width: 18px;
  height: 12px;
  border: 2px solid #64748b;
  border-radius: 12px / 8px;
}

.password-toggle-icon::after {
  width: 4px;
  height: 4px;
  background: #64748b;
  border-radius: 50%;
}

.password-toggle.is-active .password-toggle-icon::before {
  width: 18px;
  height: 2px;
  border: none;
  background: #64748b;
  transform: rotate(-32deg);
  border-radius: 999px;
}

.password-toggle.is-active .password-toggle-icon::after {
  width: 12px;
  height: 8px;
  border: 2px solid #64748b;
  border-top: none;
  border-radius: 0 0 12px 12px;
  background: transparent;
  transform: translateY(2px);
}

.submit-btn {
  margin-top: 4px;
  padding: 14px 16px;
  border: none;
  border-radius: 14px;
  background: #09164f;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  box-shadow: 0 14px 28px rgba(9, 22, 79, 0.18);
}

.submit-btn:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

.error {
  min-height: 0;
  padding: 0;
  border-radius: 12px;
  color: #b91c1c;
  font-size: 0.93rem;
  line-height: 1.35;
  text-align: center;
  background: transparent;
  visibility: hidden;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.2s ease, max-height 0.2s ease, padding 0.2s ease;
}

.error.is-visible {
  visibility: visible;
  opacity: 1;
  max-height: 120px;
  padding: 12px 14px;
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.not-found-copy {
  margin: 2px 0 0;
  color: #6b7280;
  font-size: 0.98rem;
  line-height: 1.5;
}

.not-found-code {
  margin: 8px 0 0;
  font-size: 3.4rem;
  line-height: 1;
  font-weight: 800;
  color: #09164f;
  letter-spacing: -0.04em;
}

.not-found-title {
  margin: 12px 0 0;
  font-size: 1.15rem;
  line-height: 1.35;
  font-weight: 700;
  color: #111827;
}

.not-found-text {
  margin: 10px 0 0;
  color: #6b7280;
  font-size: 0.96rem;
  line-height: 1.6;
}

.not-found-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 22px;
}

.home-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

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

  .login-box {
    padding: 22px 18px;
    border-radius: 18px;
  }

  .login-brand h1 {
    font-size: 1.32rem;
  }

  .login-brand p {
    font-size: 0.9rem;
  }

  .input-group input,
  .submit-btn {
    font-size: 16px;
  }
}


.login-badge-icon {
  width: 28px;
  height: 28px;
  display: block;
}

.password-toggle {
  overflow: visible;
}

.password-toggle-icon {
  width: 22px;
  height: 22px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 22px 22px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M2 12s3.5-6 10-6 10 6 10 6-3.5 6-10 6-10-6-10-6Z'/%3E%3Ccircle cx='12' cy='12' r='3' fill='none' stroke='%2364748b' stroke-width='2'/%3E%3C/svg%3E");
}

.password-toggle-icon::before,
.password-toggle-icon::after {
  content: none !important;
}

.password-toggle.is-active .password-toggle-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M3 3l18 18'/%3E%3Cpath fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M10.6 10.7A3 3 0 0 0 12 15a3 3 0 0 0 2.3-5.2'/%3E%3Cpath fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M9.9 5.2A11.5 11.5 0 0 1 12 5c6.5 0 10 7 10 7a17.7 17.7 0 0 1-4 4.9'/%3E%3Cpath fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M6.6 6.7C3.8 8.2 2 12 2 12s3.5 7 10 7a10.7 10.7 0 0 0 4.1-.8'/%3E%3C/svg%3E");
}

/* --- 404 page refinements --- */
.not-found-box {
  max-width: 520px;
}

.not-found-brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.not-found-copy {
  margin: 0;
  color: #6b7280;
  font-size: 0.95rem;
  line-height: 1.45;
}

.not-found-code {
  margin: 8px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(9, 22, 79, 0.06);
  color: #09164f;
  font-size: 0.95rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.not-found-title {
  margin: 14px 0 0;
  font-size: 1.3rem;
  line-height: 1.28;
  font-weight: 800;
  color: #111827;
}

.not-found-text {
  margin: 12px 0 0;
  color: #6b7280;
  font-size: 0.98rem;
  line-height: 1.62;
}

.not-found-note {
  margin: 16px 0 0;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(9, 22, 79, 0.04);
  color: #475569;
  font-size: 0.93rem;
  line-height: 1.55;
  border: 1px solid rgba(9, 22, 79, 0.07);
}

.not-found-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.home-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  text-decoration: none;
}

.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #d6dbe6;
  color: #09164f;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.secondary-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
  border-color: #bfc8da;
}

@media (max-width: 520px) {
  .not-found-box {
    max-width: 100%;
  }

  .not-found-title {
    font-size: 1.16rem;
  }

  .not-found-text {
    font-size: 0.95rem;
  }

  .not-found-actions {
    flex-direction: column;
  }

  .home-link,
  .secondary-link {
    width: 100%;
    min-width: 0;
  }
}

/* --- Universal InspektorBot ID login refinements --- */
.auth-form-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 6px 0 6px;
  padding: 13px 14px;
  border-radius: 16px;
  border: 1px solid rgba(9, 22, 79, 0.07);
  background:
    linear-gradient(135deg, rgba(9, 22, 79, 0.04), rgba(33, 150, 243, 0.045)),
    #fff;
}

.auth-form-heading-icon {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background-color: rgba(9, 22, 79, 0.08);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 18px 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%2309164f' stroke-width='2.05' stroke-linecap='round' stroke-linejoin='round' d='M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z'/%3E%3Cpath fill='none' stroke='%2309164f' stroke-width='2.05' stroke-linecap='round' stroke-linejoin='round' d='M4.5 20.5a7.5 7.5 0 0 1 15 0'/%3E%3C/svg%3E");
}

.auth-form-heading h2 {
  margin: 0;
  color: #09164f;
  font-size: 1.04rem;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.auth-form-heading p {
  margin: 4px 0 0;
  color: #6b7280;
  font-size: 0.91rem;
  line-height: 1.42;
}

.service-context {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 0 18px;
  padding: 13px 14px;
  border-radius: 16px;
  border: 1px solid rgba(9, 22, 79, 0.08);
  background: linear-gradient(135deg, rgba(9, 22, 79, 0.055), rgba(33, 150, 243, 0.06));
  color: #1f2937;
}

.service-context-label {
  color: #6b7280;
  font-size: 0.86rem;
  line-height: 1.35;
}

.service-context strong {
  color: #09164f;
  font-size: 1rem;
  line-height: 1.3;
}


@media (max-width: 520px) {
  .auth-form-heading {
    padding: 11px 12px;
    gap: 10px;
  }

  .auth-form-heading-icon {
    flex-basis: 32px;
    width: 32px;
    height: 32px;
    background-size: 17px 17px;
  }
}
