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

body {
    background-image: url('../images/login_bg.png');
    background-size: cover; /* Hoặc 'contain' */
    background-repeat: no-repeat;
    background-position: center;
    min-height: 690px;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}
a {
    text-decoration: none;
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-form {
    background: transparent;
    padding: 60px 0;
    text-align: center;
}

.logo {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 14px;
    letter-spacing: -2px;
}



.form {
    text-align: left;
    max-width: 400px;
    margin: 0 auto;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #131927;
    font-size: 16px;
}

.form-group input {
    width: 100%;
    padding: 16px 20px;
    border:2px solid #E5E7EA;
    border-radius: 12px;
    font-size: 16px;
    background-color: #F9FAFB;
    transition: all 0.2s ease;
    color: #202124;
}

.form-group input:focus {
    outline: none;
    border-color: #1a73e8;
    background-color: #ffffff;
    box-shadow: 0 1px 6px rgba(32, 33, 36, 0.28);
}

.form-group input::placeholder {
    color: #9aa0a6;
    font-size: 16px;
}

.password-input {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
}

.toggle-password:hover {
    background-color: rgba(95, 99, 104, 0.08);
}
.toggle-password img {
    width: 24px;
    height: 24px;
}
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 23px;
    font-size: 14px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
}

.remember-me input[type="checkbox"] {
    
  width: 24px;
  height: 24px;
  border-radius:8px;
  vertical-align: middle;
  border: 1px solid #007AFF;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  cursor: pointer;
}
.remember-me input[type="checkbox"]:checked {
  appearance: auto;
  background-color: #007AFF
}
.remember-me label {
    margin: 0;
    color: #5f6368;
    cursor: pointer;
    font-size: 14px;
}

.forgot-password {
    color: #1a73e8;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
}

.forgot-password:hover {
    text-decoration: underline;
}

.login-btn {
    width: 100%;
    background: #1a73e8;
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    letter-spacing: 0.25px;
}

.login-btn:hover {
    background: #1557b0;
}

.login-btn:active {
    background: #E5E7EA;
    color: #9EA2AE;
}

.divider {
    position: relative;
    text-align: center;
    margin: 16px 0;
    color: #9aa0a6;
    font-size: 14px;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #dadce0;
    z-index: 1;
}

.divider span {
    background: #ffffff;
    padding: 0 16px;
    position: relative;
    z-index: 2;
}

.social-login {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.social-btn {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 20px;
    transition: all 0.2s ease;
    border: 1px solid #dadce0;
}

.social-btn:hover {
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    border-color: #dadce0;
}
.social-btn img {
   width:  24px;
}

.social-btn:active {
    background: #f1f3f4;
}
/* register */
.password_confirmation {
    display: flex;
    flex-direction: row;
    gap: 12px;
}
.rule {
    display: flex;
    white-space : nowrap;
    flex-wrap: wrap;
}
.have-account {
    position: absolute;     
    bottom: 40px;

}
/* forgot password */
.form-group p {
    font-size: 14px;
    color: #6D717F;
    text-align: center;
}
/* alert */
.cf, .alert {
  /* *zoom : 1; */
}
.cf:before, .alert:before, .cf:after, .alert:after {
  display: table; 
  content: "";
  line-height: 0;
}
.cf:after, .alert:after {
  clear: both;
}

#alerts {
  max-width: 340px;
  top: 12px;
  right: 50px;
  position: fixed;
  z-index: 9999;
  list-style: none;
}

.alert {
  width: 100%;
  margin-bottom: 8px;
  display: block;
  position: relative;
  border-left: 4px solid;
  right: -50px;
  opacity: 0;
  line-height: 1;
  padding: 0;
  transition: right 400ms, opacity 400ms, line-height 300ms 100ms, padding 300ms 100ms;
  display: table;
}

.alert:hover {
  cursor: pointer;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
}

.open {
  right: 0;
  opacity: 1;
  line-height: 2;
  padding: 3px 15px;
  transition: line-height 200ms, padding 200ms, right 350ms 200ms, opacity 350ms 200ms;
}


.alert-block {
  width: 80%;
  width: -webkit-calc(100% - 10px);
  width: calc(100% - 10px);
  text-align: left;
  margin-left: 8px;
}
.alert-block em, .alert-block small {
  font-size: .75em;
  opacity: .75;
  display: block;
}

.alert i {
  font-size: 20px;
  max-height: 48px;
  top: 50%;
  display: table-cell;
  vertical-align: middle;
}

.alert-success {
  color: #43B75D;
  border-color: #fff;
  font-size: 14px;
  border-radius: 8px;
  padding: 12px;
  background-color: #fff;
  box-shadow: 0px 14px 64px -4px #1319271F;

box-shadow: 0px 8px 22px -6px #1319271F;

}
.alert-message {
    white-space: nowrap;
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-form {
        padding: 40px 0;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
    }
    .login-container{
        height: 100%;
    }
    
    .logo {
        font-size: 40px;
    }
    
    .form {
        max-width: 100%;
        padding: 0 20px;
    }
    
    .form-group input {
        padding: 14px 16px;
        font-size: 16px;
    }
    
    .login-btn {
        padding: 14px;
    }
    
    .toggle-password {
        right: 12px;
    }
    .password_confirmation {flex-direction: column;
    }
    .form-group {
        margin-bottom: 12px;
    }
    .form-group label {
        display: none;
    }
    .form-options {
        margin-top: 23px;
    }
    #alerts {
        right: unset;
    }
}

/* Error message styles */
.error-message {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
    margin-left: 5px;
    display: block;
    font-weight: 400;
}

/* Loading button styles */
#loading-spinner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#loading-spinner i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

@media (max-width: 480px) {
    .error-message {
        font-size: 11px;
        margin-top: 3px;
    }
}