html, body {
  height: 100%;
}

/* make main/content area grow to push footer down */
main {
  flex: 1 0 auto;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

main {
  min-height: calc(100vh - 250px);
  display: flex;
  align-items: center;
  padding: 2rem 0 2rem 0;
  background-color: #f8f9fa;
}

main #main-content {
  background-color: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.custom-container {
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  margin: 2rem auto;
}

h1 {
  font-size: 2rem;
  font-weight: bold;
  color: #333;
  margin-bottom: 0.5rem;
}

h2 {
  color: #333;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.container-shadowed {
  background-color: #ffffff; /* White background inside */
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  margin-bottom: 2rem;
  margin-top: 2rem;
}

.divider {
  position: relative;
  text-align: center;
  margin: 1.5rem 0;
}

.divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background-color: rgba(0, 0, 0, 0.12);
}

.divider span {
  position: relative;
  background-color: white;
  padding: 0 1rem;
  color: #6c757d;
  font-size: 0.9rem;
}

.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 1rem;
  transition: all 0.3s;
}

.btn-primary {
  background: linear-gradient(to right, #4986ff, #5d93ff);
  border: none;
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(to right, #5d93ff, #7ba8ff);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(73, 134, 255, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(to right, #5d93ff, #7ba8ff);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(73, 134, 255, 0.3);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-success {
  background: linear-gradient(to right, #28a745, #22b444);
  border: none;
}

.btn-success:hover:not(:disabled) {
  background: linear-gradient(to right, #529c63, #529c63);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(73, 134, 255, 0.3);
}

.btn-success:hover {
  background: linear-gradient(to right, #529c63, #529c63);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(73, 134, 255, 0.3);
}

.btn-success:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-outline-secondary:hover {
  background-color: #6c757d;
  color: white;
  transform: translateY(-2px);
}

.btn-outline-secondary {
  border: 2px solid #6c757d;
  color: #6c757d;
}

.btn-outline-danger:hover {
  transform: translateY(-2px);
}

.btn-secondary {
  background: linear-gradient(to right, #6c757d, #6c757d);
  border: none;
}

.btn-secondary:hover:not(:disabled) {
  background: linear-gradient(to right, #9a9da0, #6c757d);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(73, 134, 255, 0.3);
}

.btn-secondary:hover {
  background: linear-gradient(to right, #9a9da0, #6c757d);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(73, 134, 255, 0.3);
}

.btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-info {
  background: linear-gradient(to right, #4bcadd, #4bcadd);
  border: none;
}

.btn-info:hover:not(:disabled) {
  background: linear-gradient(to right, #69c2cf, #69c2cf);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(73, 134, 255, 0.3);
}

.btn-info:hover {
  background: linear-gradient(to right, #69c2cf, #69c2cf);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(73, 134, 255, 0.3);
}

.btn-info:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

a {
  color: #4986ff;
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #5d93ff;
  text-decoration: underline;
}

input[type="checkbox"]:checked {
  background-color: #4986ff;
  border-color: #4986ff;
}

input[type="checkbox"]:focus {
  border-color: #4986ff;
  box-shadow: 0 0 0 0.2rem rgba(73, 134, 255, 0.25);
}

input:not([type="checkbox"]) {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  font-size: 1rem;
  transition: all 0.2s;
}

input:focus:not([type="checkbox"]) {
  border-color: #4986ff;
  box-shadow: 0 0 0 0.2rem rgba(73, 134, 255, 0.25);
  outline: none;
}

.form-select {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  font-size: 1rem;
  transition: all 0.2s;
}

.form-select:focus {
  border-color: #4986ff;
  box-shadow: 0 0 0 0.2rem rgba(73, 134, 255, 0.25);
  outline: none;
} 

form .form-label {
  font-weight: 500;
  color: #555;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.password-wrapper {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #6c757d;
  cursor: pointer;
  padding: 0.5rem;
  transition: color 0.2s;
}

.password-toggle:hover {
  color: #4986ff;
}

.password-toggle:focus {
  outline: 2px solid rgba(73, 134, 255, 0.5);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Input validation states */
input:invalid:not(:placeholder-shown) {
  border-color: #dc3545;
}

input:valid:not(:placeholder-shown) {
  border-color: #28a745;
}

small {
  font-size: 0.8rem;
  margin-top: 0.15rem;
}

.badge {
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
}

.card {
  border-radius: 12px !important;
}

@media (max-width: 768px) {
  body.has-header.has-footer main {
    padding: 0 !important;
    min-height: 100vh;
    background-color: #ffffff;
    display: block !important;
  }

  .custom-container {
    padding: 1.5rem 1rem;
    margin: 0 !important;
    border-radius: 0;
    box-shadow: none;
    max-width: 100% !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .container {
    padding: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  .row {
    margin: 0 !important;
  }

  .col-md-6, .col-lg-5 {
    padding: 0 !important;
    max-width: 100% !important;
  }

  .row .col-md-6,
  .row .col-md-4,
  .row .col-md-8 {
    margin-bottom: 1rem;
  }

  .col-md-8, .col-lg-7 {
    padding: 0 !important;
    max-width: 100% !important;
  }

  .col-12, .col-lg-10 {
    padding: 0 !important;
    max-width: 100% !important;
  }

  .justify-content-center {
    justify-content: flex-start !important;
  }

  .auth-header i {
    font-size: 3rem;
  }

  .btn {
    margin-bottom: 0.5rem;
  }
}

@media (max-width: 576px) {
  .custom-container {
    padding: 1rem;
  }

  .btn {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
  }

  form .form-label {
    font-size: 0.9rem;
  }

  .form-text {
    font-size: 0.8rem;
  }

  .badge {
    margin-top: 0.5rem
  }
}
