.back-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    align-self: flex-start;
    margin-left: 15rem;
}

.back-link i,
.back-link span {
    color: var(--blue);
}

.login-page {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    margin: 0 auto;

    height: 100%;
    width: 100%;
    max-width: 1410px;

    margin-top: 3rem;
}

.login-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: 66%;
    max-width: 928px;

    padding-block: 4rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;

    background-color: white;
    border-radius: 1rem;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.login-form-wrapper {
    width: 100%;
    max-width: 730px;
}

.form-row {
    display: flex;
    flex-direction: row;
    gap: 2rem;
}

.form-header {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.form-title {
    color: black;
}

.form-subtitle {
    color: black;
    font-weight: bold;
    font-size: 1.4rem;
    margin-top: -0.3rem;
}

.form-subtitle span {
    color: var(--blue);
}

.form-fields {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    margin-bottom: 2rem;
    margin-top: 2rem
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    width: 100%;
}

.form-group label {
    color: #2d3748;
    font-weight: 600;
    font-size: 0.95rem;
}

.form-input {
    padding: 0.7rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(29, 45, 77, 0.1);
}

.form-input.is-invalid {
    border-color: #e53e3e;
}

.form-input::placeholder {
    color: #a0aec0;
}

.password-wrapper {
    width: 100%;
}

.password-wrapper .form-input {
    width: 100%;
    padding-right: 3rem;
}

.input-container {
    position: relative;
    width: 100%;
}

.input-container .form-input {
    width: 100%;
    padding-right: 3rem;
}

.toggle-password,
.toggle-passwordAgain {
    position: absolute;
    top: 0.3rem;
    right: 1rem;
    background: none;
    border: none;
    color: #718096;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.3s ease;
}

.toggle-password:hover,
.toggle-passwordAgain:hover {
    color: var(--primary-color);
}

.password-wrapper>.text-danger {
    margin-top: 0.5rem;
}

.text-danger {
    color: #e53e3e;
    font-size: 0.875rem;
}

.terms-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    gap: 0.75rem;
}

.terms-checkbox input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--blue);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.terms-checkbox input[type="checkbox"]:checked {
    background-color: var(--blue);
}

.terms-checkbox input[type="checkbox"]:checked::after {
    content: '\f00c';
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    color: white;
    font-size: 14px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.terms-checkbox span {
    font-size: 0.9rem;
    line-height: 1.5;
}

.terms-link:hover {
    opacity: 0.6;
}

.form-label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.form-label strong {
    font-size: 0.95rem;
    color: #2d3748;
}

.form-hint {
    font-size: 0.85rem;
    color: #718096;
    font-weight: normal;
}

#ie:disabled,
.form-input:disabled {
    background-color: #e7e5e5ae;
    color: #2d3748;
    border-color: #cbd5e0;
    opacity: 1;
    cursor: not-allowed;
}

#ie_div {
    display: none
}

.ie-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ie-wrapper .form-input {
    width: 100%;
}

.ie-exempt {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-checkbox {
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-label {
    font-size: 0.9rem;
    color: #4a5568;
    cursor: pointer;
    margin: 0;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 700px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(128, 128, 128, 0.91);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--blue);
    border-radius: 12px 12px 0px 0px;
}

.modal-header h2 {
    color: white;
    font-size: 1.5rem;
    margin: 0;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.modal-body h3 {
    color: var(--primary-color);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.modal-body h3:first-child {
    margin-top: 0;
}

.modal-body p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.modal-body ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.modal-body li {
    color: #666;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(128, 128, 128, 0.91);
    display: flex;
    justify-content: flex-end;
}

.btn {
    background-color: var(--blue);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-submit {
    flex: 1;
}

.btn:hover {
    background-color: #d40225;
    color: white;
}

.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.terms-link {
    color: var(--blue);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.3s ease;
}

.step-two {
    display: none;
}

.forgot-password {
    align-self: flex-end;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
    margin-top: 0.5rem;
}

.forgot-password:hover {
    color: var(--red);
}

.forgot-password {
    color: var(--blue);
    font-weight: 600;
    margin: 0;
}

.form-footer {
    display: flex;
    flex-direction: column;
    text-align: center;
}

.form-footer-end {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 1rem;
    width: 100%;
    margin-top: 1.5rem;
}

.form-footer button,
.form-footer-end button {
    background-color: var(--blue);
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    border: 0;
    border-radius: 8px;
    padding: 0.7rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.form-footer button::before,
.form-footer-end button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.form-footer button:hover::before,
.form-footer-end button:hover::before {
    left: 100%;
}

.form-footer button:hover,
.form-footer-end button:hover {
    background-color: color-mix(in srgb, var(--blue) 90%, black);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.3);
}

.signup-link {
    margin-top: 1rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.signup-link a {
    color: var(--blue);
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
}

.signup-link a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--blue);
    transition: width 0.3s ease;
}

.signup-link a:hover::after {
    width: 100%;
}

.alert-message {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-message i {
    font-size: 1rem;
    flex-shrink: 0;
}

.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-success i {
    color: #28a745;
}

.alert-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-error i {
    color: #dc3545;
}

@media (max-width: 768px) {
    .back-link {
        margin-left: 10%;
        font-size: 0.8rem;
    }

    .login-page {
        margin-top: 15%;
        margin-bottom: 5rem;
    }

    .login-container {
        width: 85%;
        margin-top: 1rem;
        padding: 2.5rem 2rem;
    }

    .form-title {
        font-size: 1.3rem;
    }

    .form-subtitle {
        font-size: 1.1rem;
        line-height: 1.2 !important;
        margin-top: 0.3rem;
    }

    .form-header {
        gap: 0.4rem;
    }

    .form-group label {
        font-size: 0.85rem;
    }

    .form-input {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
    }

    .form-footer button {
        font-size: 0.8rem
    }

    .together-form {
        margin-top: 1.4rem;
    }

    .terms-checkbox span {
        font-size: 0.8rem;
        line-height: 1.3;
    }

    .modal-header h2 {
        font-size: 1.3rem;
    }
}