.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F5EFFF;
    position: relative;
    overflow: hidden;
    padding: 24px;
}

.login-shell {
    width: 100%;
    max-width: 1120px;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 48px;
}

.login-content {
    width: 100%;
    max-width: 440px;
    flex: 0 1 440px;
}

.login-page.setup-active .login-content {
    max-width: 680px;
    flex-basis: 680px;
}

.login-top {
    text-align: center;
    margin-bottom: 26px;
}

.login-top-icon {
    width: 72px;
    height: 72px;
    border-radius: 8px;
    background: #4F46E5;
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 16px;
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.22);
}

.login-top h1 {
    font-family: 'Sora', 'Plus Jakarta Sans', sans-serif;
    font-size: 28px;
    color: #1E1B3A;
    letter-spacing: 0;
    margin-bottom: 6px;
}

.login-top p {
    font-size: 14px;
    color: #6B7196;
    font-weight: 500;
}

.login-card {
    background: #FFFFFF;
    border: 1px solid #CDC1FF;
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(79, 70, 229, 0.08);
    padding: 32px;
}

.login-card-setup {
    width: min(680px, 100%);
}

.setup-form {
    display: grid;
    gap: 18px;
}

.setup-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.setup-heading h2 {
    margin: 0;
    font-size: 20px;
}

.setup-heading span {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.setup-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.setup-wide {
    grid-column: 1 / -1;
}

.setup-input {
    width: 100%;
    min-width: 0;
    height: 44px;
    padding: 0 12px;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: #fff;
    color: #172033;
    font: inherit;
}

.setup-locked {
    display: grid;
    justify-items: center;
    gap: 12px;
    padding: 20px 0;
    text-align: center;
}

.setup-locked > i {
    color: #dc2626;
    font-size: 32px;
}

.setup-locked h2,
.setup-locked p {
    margin: 0;
}

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

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #3D3A5C;
    margin-bottom: 8px;
}

.input-wrap { position: relative; }

.input-wrap i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #7371FC;
    font-size: 15px;
    pointer-events: none;
    opacity: 0.5;
}

.input-wrap input {
    width: 100%;
    padding: 14px 46px;
    border: 1.5px solid #E4E7F0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    background: #FBFAFF;
    color: #1E1B3A;
    font-family: 'Plus Jakarta Sans', sans-serif;
    transition: all 0.2s ease;
}

.input-wrap input:focus {
    outline: none;
    border-color: #7371FC;
    background: #FFFFFF;
    box-shadow: 0 0 0 4px rgba(115, 113, 252, 0.12);
}

.input-wrap input::placeholder {
    color: #9CA3C2;
    font-weight: 500;
}

.pw-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    color: #6B7196;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.input-wrap .pw-toggle i {
    position: static;
    transform: none;
    color: inherit;
    font-size: inherit;
    pointer-events: none;
    opacity: 1;
}

.pw-toggle:hover { color: #4F46E5; }

.login-btn {
    width: 100%;
    padding: 15px 18px;
    background: #4F46E5;
    color: white;
    font-weight: 800;
    font-size: 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Plus Jakarta Sans', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 4px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.2);
}

.login-btn:hover {
    background: #4338CA;
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(79, 70, 229, 0.28);
}

.login-btn:active { transform: translateY(0); }

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.login-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 12px;
    color: #9CA3C2;
    font-weight: 500;
}

@media (max-width: 820px) {
    .login-page {
        min-height: 100svh;
        align-items: center;
        overflow-y: auto;
        padding: 24px 0;
    }
    .login-shell {
        display: block;
        max-width: none;
        min-width: 0;
    }
    .login-content {
        max-width: none;
        padding: 0 16px 16px;
    }
    .login-page.setup-active {
        align-items: flex-start;
    }
    .login-page.setup-active .login-content {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        flex: none;
    }
    .login-card-setup,
    .setup-form,
    .setup-grid {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }
    .login-top h1 {
        overflow-wrap: anywhere;
    }
    .login-top-icon { display: none; }
}

@media (max-width: 640px) {
    .setup-grid {
        grid-template-columns: 1fr;
    }

    .setup-wide {
        grid-column: auto;
    }
}

@media (max-width: 480px) {
    .login-page { padding: 16px 0; }
    .login-card { padding: 24px 20px; border-radius: 8px; }
    .login-top h1 { font-size: 24px; }
    .login-top {
        margin-bottom: 18px;
    }
}
