/* ========================================
   Login Page - Matching Admin (Inspinia) Theme
   ======================================== */

@import url("//fonts.googleapis.com/css?family=Open+Sans:300,400,600,700&lang=en");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background: #2f4050;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-font-smoothing: antialiased;
}

/* Page Container */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
  padding: 20px;
}

/* Card */
.login-card {
  background: #ffffff;
  border-radius: 4px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 440px;
  padding: 48px 44px;
  animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Logo */
.login-logo {
  text-align: center;
  margin-bottom: 8px;
}

.login-logo img {
  height: 70px;
  width: auto;
  object-fit: contain;
}

/* Title & Subtitle */
.login-title {
  font-size: 22px;
  font-weight: 300;
  color: #2f4050;
  text-align: center;
  margin-bottom: 6px;
}

.login-subtitle {
  font-size: 13px;
  color: #999c9e;
  text-align: center;
  margin-bottom: 28px;
  font-weight: 400;
}

/* Form Groups */
.form-group-modern {
  margin-bottom: 18px;
}

.input-form-group {
  position: relative;
  margin-bottom: 0;
}

/* Materialize Input Styles */
.mat-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #676a6c;
  margin-bottom: 5px;
  transform: none;
  transition: color 0.2s ease;
  height: auto;
  letter-spacing: 0;
}

.mat-input {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  color: #2f4050;
  background: #ffffff;
  border: 1px solid #e5e6e7;
  border-radius: 2px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  height: auto;
  font-family: inherit;
}

.mat-input:focus {
  border-color: #1ab394;
  box-shadow: 0 0 0 2px rgba(26, 179, 148, 0.15);
}

.mat-input::placeholder {
  color: #b3b3b3;
}

/* Override materialize underline */
.mat-div {
  padding: 0;
  position: relative;
}

.mat-div:after,
.mat-div:before {
  display: none;
}

/* Active/Completed states for materialize labels */
.is-active .mat-label,
.is-completed .mat-label {
  font-size: 13px;
  transform: none;
  padding-left: 0;
  color: #1ab394;
}

.is-completed .mat-label {
  color: #676a6c;
}

.mat-div.error .mat-input {
  border-color: #ed5565;
  background: #fff5f5;
}

.mat-div.error .mat-label {
  color: #ed5565;
}

.mat-div.error.is-active::after {
  display: none;
}

/* Autofill fix */
.input-form-group input[type='email']:-webkit-autofill,
.input-form-group input[type='email']:-webkit-autofill:hover,
.input-form-group input[type='email']:-webkit-autofill:focus,
.input-form-group .password-input:-webkit-autofill,
.input-form-group .password-input:-webkit-autofill:hover,
.input-form-group .password-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 30px #ffffff inset;
  -webkit-text-fill-color: #2f4050;
  font-size: 14px;
}

/* Password toggle */
.password-input {
  padding-right: 40px;
}

.show-password-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #b3b3b3;
  cursor: pointer;
  font-size: 14px;
  transition: color 0.2s ease;
  margin-top: 10px;
}

.show-password-icon:hover {
  color: #676a6c;
}

/* Error messages */
.error-messages {
  min-height: 20px;
  margin-bottom: 4px;
}

.error-message {
  display: none;
  color: #ed5565;
  font-size: 12px;
  margin: 4px 0 0 2px;
  font-weight: 600;
}

/* Alerts */
.alert {
  border-radius: 2px;
  padding: 12px 16px;
  font-size: 13px;
  margin-bottom: 16px;
  border: none;
}

.alert-danger {
  background: #fff0f0;
  color: #ed5565;
  border-left: 3px solid #ed5565;
}

.alert-errors {
  display: none;
}

/* Primary Button */
.submitContainer {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.loginButtons {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 46px;
  margin-top: 8px;
  border-radius: 3px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  outline: none;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  font-family: inherit;
  letter-spacing: 0.5px;
}

.btn-primary-modern {
  background: #1ab394;
  color: #ffffff;
}

.btn-primary-modern:hover {
  background: #18a689;
  color: #ffffff;
}

.btn-primary-modern:active {
  background: #159c80;
}

/* Loader */
.spinner-wrapper .loader {
  display: none;
  width: 100%;
  height: 44px;
  line-height: 44px;
  font-size: 13px;
  color: #676a6c;
  text-align: center;
}

.spinner-wrapper .loader i {
  margin-right: 8px;
  color: #1ab394;
}

.spinner-wrapper.loading .loader {
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner-wrapper.loading .element-loading {
  display: none;
}

/* Links */
.links {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

.btn-reset-password {
  font-size: 13px;
  color: #1ab394;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s ease;
}

.btn-reset-password:hover {
  color: #18a689;
  text-decoration: none;
}

/* Social Divider */
.social-divider {
  display: flex;
  align-items: center;
  margin: 24px 0 18px;
}

.social-divider::before,
.social-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e5e6e7;
}

.social-divider span {
  padding: 0 14px;
  font-size: 12px;
  color: #999c9e;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Social Buttons */
.social-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 3px;
  border: 1px solid #e5e6e7;
  background: #ffffff;
  color: #676a6c;
  font-size: 16px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.social-btn:hover {
  color: #ffffff;
}

.facebook-btn:hover {
  background: #4a67ad;
  border-color: #4a67ad;
}

.google-btn:hover {
  background: #d85140;
  border-color: #d85140;
}

/* Register CTA */
.register-cta {
  text-align: center;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #e5e6e7;
}

.register-cta span {
  font-size: 13px;
  color: #999c9e;
}

.register-cta a {
  font-size: 13px;
  color: #1ab394;
  font-weight: 600;
  text-decoration: none;
  margin-left: 4px;
  transition: color 0.15s ease;
}

.register-cta a:hover {
  color: #18a689;
}

/* General link hover override */
a:hover {
  color: inherit;
}

a.btn-reset-password:hover {
  color: #18a689;
}

/* Form input override */
form input[type=text] {
  text-transform: none;
}

/* Responsive */
@media (max-width: 480px) {
  .login-page {
    padding: 0;
    align-items: stretch;
  }

  .login-card {
    max-width: 100%;
    border-radius: 0;
    min-height: 100vh;
    padding: 40px 24px;
    box-shadow: none;
    display: flex;
    align-items: center;
  }

  .login__content {
    width: 100%;
  }

  .links {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
}
