:root {
    --brand-primary: #18c8fe;
    --brand-accent: #eeae37;
    --neutral-white: #FFFFFF;
    --text-dark: #333333;
    --neutral-grey: #E5E7EB;
    --font-family: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-family);
    color: var(--text-dark);
    background-color: var(--neutral-white);
    min-height: 100vh;
    /* Allow grow on mobile */
}

.container {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

/* --- Login Section (Left/Bottom) --- */
.login-section {
    background-color: var(--neutral-white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    position: relative;
    order: 2;
    /* Mobile: Bottom */
    flex: 1;
}

.login-content {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
    text-align: center;
}

.logo-text-container {
    margin-bottom: 2.5rem;
    display: flex;
    justify-content: center;
}

.logo-text {
    height: 5rem;
    /* Increased for mobile */
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    text-align: left;
}

.input-group {
    position: relative;
}

.input-icon {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
    padding-left: 1rem;
    color: #9ca3af;
    /* Gray-400 */
    transition: color 0.3s;
    pointer-events: none;
}

.input-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.input-field {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 1px solid var(--neutral-grey);
    border-radius: 9999px;
    /* Pill shape */
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

/* Focus States */
.input-group:focus-within .input-icon {
    color: var(--brand-accent);
}

.input-field:focus {
    border-color: var(--brand-primary);
}

.login-button {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--brand-primary);
    color: var(--neutral-white);
    font-weight: bold;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    transition: background-color 0.3s, box-shadow 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.login-button:hover {
    background-color: #14b3e3;
    /* Darker Cyan */
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.footer {
    position: absolute;
    bottom: 1rem;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.75rem;
    color: #9ca3af;
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 1rem;
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #9ca3af;
    transition: color 0.3s;
}

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

.password-toggle svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* Support Text */
.support-text {
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: #6b7280;
    text-align: center;
}

.support-text a {
    color: var(--brand-primary);
    text-decoration: none;
    font-weight: 500;
}

.support-text a:hover {
    text-decoration: underline;
}

/* --- Instructions Section (Right/Top) --- */
.instructions-section {
    background-color: var(--brand-primary);
    color: var(--neutral-white);
    order: 1;
    /* Mobile: Top */
    transition: max-height 0.5s ease-in-out;
    overflow: hidden;
    cursor: pointer;
    box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.1);
}

/* Mobile Accordion State */
.instructions-section.closed {
    max-height: 4rem;
    /* Height of header */
}

.instructions-section.open {
    max-height: 800px;
    /* Increased to ensure content fits */
}

.instructions-content-wrapper {
    padding: 1.5rem;
    width: 100%;
    max-width: 32rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mobile-header {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

.mobile-header h2 {
    font-size: 1.125rem;
    font-weight: bold;
    margin-right: 0.5rem;
}

.arrow {
    transition: transform 0.3s;
}

.instructions-section.open .arrow {
    transform: rotate(180deg);
}

.instructions-content {
    opacity: 0;
    margin-top: 2rem;
    transition: opacity 0.5s;
    text-align: center;
    display: none;
    /* Hidden when closed on mobile */
}

.instructions-section.open .instructions-content {
    opacity: 1;
    display: block;
}

.logo-icon-container {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}

.logo-icon {
    height: 6rem;
    width: auto;

}

.instructions-content h2 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.instructions-content p {
    margin-bottom: 2rem;
    font-size: 1rem;
    opacity: 0.9;
    line-height: 1.6;
}

.instructions-list {
    list-style: none;
    text-align: left;
    display: inline-block;
    width: 100%;
}

.instructions-list li {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    backdrop-filter: blur(4px);
}

.bullet {
    color: var(--brand-accent);
    font-weight: bold;
    font-size: 1.5rem;
    margin-right: 0.75rem;
    line-height: 1;
}

/* Spinner */
.spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 3px solid var(--brand-accent);
    width: 1.5rem;
    height: 1.5rem;
    animation: spin 1s linear infinite;
}

.hidden {
    display: none;
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* --- Desktop View (Min-width: 768px) --- */
@media (min-width: 768px) {
    body {
        overflow: hidden;
        /* Restore fixed layout for desktop */
        height: 100vh;
    }

    .container {
        flex-direction: row;
    }

    /* Left Column (Login) */
    .login-section {
        width: 40%;
        order: 1;
        flex: none;
    }

    .logo-text {
        height: 10rem;
        /* Increased for desktop */
    }

    /* Right Column (Instructions) */
    .instructions-section {
        width: 60%;
        order: 2;
        flex: none;
        cursor: default;
        max-height: none !important;
        /* Always full height */
        display: flex;
        justify-content: center;
        align-items: center;
        box-shadow: none;
    }

    .instructions-section.closed,
    .instructions-section.open {
        max-height: none;
    }

    .mobile-header {
        display: none;
    }

    .instructions-content {
        opacity: 1;
        display: block;
        margin-top: 0;
        text-align: left;
    }

    .instructions-content-wrapper {
        align-items: flex-start;
        max-width: 32rem;
    }

    .logo-icon-container {
        justify-content: center;
    }

    .logo-icon {
        height: 8rem;

    }

    .instructions-content h2 {
        font-size: 2.25rem;
    }

    .instructions-content p {
        font-size: 1.25rem;
    }

    .instructions-list {
        font-size: 1.125rem;
    }
}

/* Password Requirements Checklist */
.password-requirements {
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    padding-left: 1rem;
    margin-top: -1rem;
    /* Pull closer to password field */
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* Two columns */
    gap: 0.5rem;
}

.requirement-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #9ca3af;
    /* Gray default */
    transition: color 0.3s ease;
}

.requirement-item.valid {
    color: #10b981;
    /* Green */
}

.requirement-item.invalid {
    color: #ef4444;
    /* Red */
}

.requirement-item .icon {
    font-weight: bold;
    width: 1rem;
    display: inline-block;
    text-align: center;
}

/* Removed pseudo-elements to avoid double icons since JS sets textContent */