﻿body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.w-100 {
  width: 100%;
}

.m-b-6 {
  margin-bottom: 6px !important;
}

.main-header {
  height: 60px;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  padding: 15px 20px;
}
.main-header .navbar-brand {
  margin: 0 0 0 20px !important;
  line-height: 60px;
  padding: 0 !important;
}
.main-header .version-text {
  font-size: 10px;
  color: #6c757d;
  font-weight: 500;
  letter-spacing: 0.5px;
  background-color: rgba(108, 117, 125, 0.1);
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid rgba(108, 117, 125, 0.2);
}
.main-header .navbar-brand-link {
  text-decoration: none;
  margin-right: 30px;
}
.main-header .navbar-logo {
  height: 30px;
  width: 128px;
}
.main-header .user-dropdown {
  display: inline-block;
}
.main-header .user-dropdown .dropdown-toggle {
  color: #007bff;
  text-decoration: none;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 4px;
  transition: background-color 0.2s;
  display: inline-block;
}
.main-header .user-dropdown .dropdown-toggle:hover {
  background-color: rgba(0, 123, 255, 0.1);
}
.main-header .user-dropdown .dropdown-menu {
  min-width: 120px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid #e9ecef;
  border-radius: 4px;
}
.main-header .user-dropdown .dropdown-menu .dropdown-item {
  padding: 8px 16px;
  color: #dc3545;
  text-decoration: none;
  display: block;
  transition: background-color 0.2s;
}
.main-header .user-dropdown .dropdown-menu .dropdown-item:hover {
  background-color: rgba(220, 53, 69, 0.1);
}

.site-footer {
  width: 100%;
  background: #56625c;
  color: #fff;
  font-size: 0.95rem;
  padding: 6px 0;
  position: relative;
  bottom: 0;
  left: 0;
  z-index: 10;
  margin-top: auto;
}
.site-footer .container {
  max-width: 100vw;
  margin: 0;
  padding-left: 16px;
}
.site-footer .footer-text {
  color: #e0e0e0;
  font-size: 0.98rem;
}

.login-page {
  min-height: 75vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.login-page .row {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.login-container {
  text-align: center;
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  padding: 30px 45px;
  max-width: 410px;
  min-width: 320px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.login-container .form-control {
  margin-bottom: 14px;
  border-radius: 10px;
  border: 0.5px solid #d1d5db;
  font-size: 1rem;
  padding: 12px 16px;
  width: 100%;
  box-sizing: border-box;
}
.login-container .has-error .form-control {
  border-color: #dc3545;
}
.login-container .form-check-input {
  margin-top: 6px;
}
.login-container .btn-primary,
.login-container .login-btn,
.login-container .btn-google,
.login-container .login-btn-cancel {
  width: 100%;
  max-width: 400px;
  min-width: 240px;
  border-radius: 10px;
  font-size: 1rem;
  text-decoration: none;
}
.login-container .btn-primary,
.login-container .login-btn,
.login-container .btn-google {
  padding: 8px 0;
}
.login-container .btn-primary,
.login-container .login-btn-cancel {
  font-weight: 600;
}
.login-container .btn-google,
.login-container .login-btn-cancel {
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-container .btn-primary,
.login-container .login-btn,
.login-container .btn-google {
  border: none;
  background: linear-gradient(90deg, #1976d2 0%, #42a5f5 100%);
  box-shadow: 0 2px 8px rgba(25, 118, 210, 0.08);
}
.login-container .btn-primary {
  margin-bottom: 9px;
  margin-top: 15px;
  border-radius: 10px;
}
.login-container .btn-primary:hover {
  background: linear-gradient(90deg, #1565c0 0%, #1e88e5 100%);
}
.login-container .btn-google {
  background: #fff;
  color: #444;
  border: 0.5px solid #e0e0e0;
  font-weight: 400;
  box-shadow: 0 1px 4px rgba(60, 64, 67, 0.08);
  margin-bottom: 18px;
}
.login-container .btn-google:hover {
  border-color: #bdbdbd;
  box-shadow: 0 2px 8px rgba(60, 64, 67, 0.12);
  text-decoration: none;
}
.login-container .btn-google .google-icon {
  display: inline-block;
  width: 22px;
  height: 22px;
  margin-left: 10px;
  background-size: contain;
}
.login-container .btn-google .external-provider {
  width: 100%;
  text-align: center;
}
.login-container .text-danger {
  font-size: 0.95rem;
  margin-bottom: 8px;
  display: block;
}
.login-container .login-validation-message {
  color: #dc3545;
  text-align: left;
  font-size: 12px;
}
.login-container .login-validation-message ul {
  padding-left: 0;
  list-style: none;
}
.login-container .login-validation-message.validation-summary-valid {
  display: none;
}
.login-container .login-validation-message.validation-summary-errors ul {
  display: flex;
  align-items: flex-start;
}
.login-container .login-validation-message.validation-summary-errors ul::before {
  content: "";
  width: 16px;
  height: 16px;
  margin-right: 5px;
  margin-top: 2px;
  flex-shrink: 0;
  background: url("/error-icon.svg") no-repeat center;
  background-size: contain;
}
.login-container .form-check-label {
  margin-left: 8px;
  font-size: 0.98rem;
  color: #555;
}
.login-container .forgot-password-link {
  color: #1976d2;
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  display: inline-block;
}
.login-container .forgot-password-link:hover {
  text-decoration: underline;
}

.login-form-actions {
  display: flex;
  gap: 20px;
  width: 100%;
  height: 40px;
}
.login-form-actions .login-btn {
  margin: 0;
}

.login-container .login-btn,
.login-container .login-btn-cancel {
  min-width: 0;
}

.login-container .login-btn-cancel {
  border: 1px solid #696969;
  color: #696969;
  background: #fff;
}
.login-container .login-btn-cancel:hover {
  background: #ebedf0;
  border-color: #c4c9cf;
  color: #374151;
  text-decoration: none;
}

.login-logo img {
  margin-bottom: 20px;
  filter: none;
  width: 192px;
  height: 45px;
}

.welcome-text {
  font-weight: 600;
  margin-bottom: 15px;
}

.pin-strong {
  color: #1976d2;
}

.pin-slots {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  justify-items: center;
  align-items: end;
  margin: 6px auto 14px;
  width: 100%;
}

.pin-slot {
  width: 100%;
  min-width: 44px;
  display: grid;
  gap: 8px;
  justify-items: center;
}

.pin-badge {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  background: #1976d2;
  padding: 6px 12px;
  border-radius: 999px;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(25, 118, 210, 0.18);
  position: relative;
}
.pin-badge::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -7px;
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 7px solid #1976d2;
}
.pin-badge.pin-badge--spacer {
  opacity: 0;
  box-shadow: none;
}
.pin-badge.pin-badge--spacer::after {
  display: none;
}

.pin-input,
.pin-mask {
  height: 56px;
  width: 100%;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  display: grid;
  place-items: center;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.pin-input {
  text-align: center;
  font-size: 26px;
  font-weight: 700;
  color: #1f2937;
  outline: none;
  padding: 0 !important;
  margin-bottom: 0 !important;
  background-image: none !important;
}
.pin-input:focus {
  border-color: #1976d2;
  box-shadow: 0 0 0 0.2rem rgba(25, 118, 210, 0.22);
}
.pin-input:hover {
  border-color: #9ca3af;
}

.pin-mask {
  background: #f8f9fa;
  border-color: #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pin-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #9ca3af;
}

.pin-position {
  font-size: 14px;
  color: #6c757d;
  font-weight: 600;
  line-height: 1;
  padding-top: 2px;
}

@media (max-width: 768px) {
  .pin-slots {
    gap: 8px;
  }
  .pin-slot {
    min-width: 40px;
  }
  .pin-input, .pin-mask {
    height: 52px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pin-input {
    transition: none;
  }
}
.or-separator {
  display: flex;
  align-items: center;
  text-align: center;
  color: #aaa;
  font-size: 1rem;
  margin: 15px 0;
}
.or-separator span {
  padding: 0 10px;
}
.or-separator:before, .or-separator:after {
  content: "";
  flex: 1;
  border-bottom: 1px solid #e0e0e0;
  margin: 0 10px;
}

.logout-page .btn-primary {
  border-radius: 10px;
}

.welcome-page .logo {
  width: 64px;
}
.welcome-page li {
  list-style: none;
  padding: 4px;
}

.home-page {
  min-height: 70vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px 0;
}

.home-container {
  text-align: left;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  padding: 26px 28px;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
}

.home-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.home-logo img {
  width: 160px;
  height: auto;
}

.home-title {
  font-size: 1.75rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 10px 0;
  text-align: center;
}

.home-lead {
  font-size: 1.1rem;
  font-weight: 500;
  color: #1976d2;
  margin-bottom: 12px;
  text-align: center;
}

.home-text {
  font-size: 1rem;
  line-height: 1.55;
  margin-bottom: 10px;
}

.home-actions {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

.home-container .btn-primary.home-login-btn {
  border-radius: 10px;
  padding: 10px 28px;
}

.home-separator {
  margin: 22px 0 12px 0;
}

.home-dev-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #6c757d;
  margin-bottom: 8px;
}

.home-dev-list {
  margin: 0;
  padding-left: 18px;
}
.home-dev-list li {
  padding: 2px 0;
}

.icon-banner {
  width: 32px;
}

.body-container {
  margin-top: 60px;
  padding-bottom: 40px;
}

.logged-out-page iframe {
  display: none;
  width: 0;
  height: 0;
}

.grants-page .card {
  margin-top: 20px;
  border-bottom: 1px solid lightgray;
}
.grants-page .card .card-title {
  font-size: 120%;
  font-weight: bold;
}
.grants-page .card .card-title img {
  width: 100px;
  height: 100px;
}
.grants-page .card label {
  font-weight: bold;
}

@media (max-width: 600px) {
  .container {
    padding-left: 0;
    padding-right: 0;
  }
  .login-container {
    padding: 15px;
    min-width: 0;
  }
  .login-container input.form-control,
  .login-container .login-btn,
  .login-container .btn-google,
  .login-container .login-btn-cancel {
    width: 100%;
    min-width: 0;
    font-size: 1rem;
  }
  .welcome-text {
    font-size: 1rem;
  }
  .home-container {
    padding: 18px 16px;
    border-radius: 10px;
  }
  .home-title {
    font-size: 1.5rem;
  }
  .home-lead {
    font-size: 1.02rem;
  }
}
.sso-modal {
  padding: 0 !important;
}

.sso-modal-content {
  border-radius: 15px;
  box-shadow: 0 20px 36px rgba(17, 24, 39, 0.24);
  padding: 30px;
  width: 444px;
}

.sso-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.sso-modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.sso-modal-title-icon {
  width: 45px;
  height: 45px;
}

.sso-modal-title {
  margin: 0;
  font-size: 20px;
  line-height: 1.15;
  font-weight: 700;
  color: #111827;
}

.sso-modal-close {
  background: transparent;
  border: none;
  margin-top: 15px;
}

.sso-modal-close-icon {
  width: 16px;
  height: 16px;
  display: block;
}

.sso-modal-body {
  padding: 12px 0 0;
  font-size: 14px;
}

.sso-modal-text {
  margin: 0;
  color: #1f2937;
}

.sso-modal-body .sso-modal-text:first-of-type {
  margin-bottom: 14px;
}

.sso-modal-body .sso-modal-text:nth-of-type(2) {
  margin-bottom: 6px;
}

.sso-modal-account-text {
  margin: 0;
  margin-bottom: 3px;
  font-size: 14px;
}

.sso-modal-account {
  background: #EEF0F7;
  border-radius: 15px;
  padding: 13px 14px;
  margin-top: 14px;
}

.sso-modal-account-main {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.sso-modal-account-icon {
  margin-top: 4px;
  width: 14px;
  height: 14px;
}

.sso-modal-account-details {
  display: flex;
  flex-direction: column;
}

.sso-modal-account-email {
  font-weight: 600;
  color: #1f2937;
}

.sso-modal-account-note {
  margin: 0;
  color: #696969;
  font-size: 10px;
}

.sso-modal-footer {
  margin-top: 15px;
  display: flex;
  justify-content: end;
}

.sso-modal-button {
  border: 0;
  border-radius: 15px;
  height: 40px;
  min-width: 182px;
  font-weight: 600;
  color: #ffffff;
  background: #468BC9;
}

.sso-modal-button:hover {
  color: #ffffff;
  background: linear-gradient(90deg, #3277bc 0%, #468ad0 100%);
}

@media (max-width: 600px) {
  .sso-modal-content {
    padding: 18px 16px 14px;
  }
  .sso-modal-title {
    font-size: 26px;
  }
  .sso-modal-account-email {
    font-size: 20px;
  }
  .sso-modal-button {
    width: 100%;
    font-size: 28px;
  }
}
