/* ================================
   Login Page Styling (Full Replacement)
   - Centers the login card
   - Keeps footer full-width
   - Supports sticky footer (footer stays at bottom on tall screens)
   ================================ */

/* === Page root container === */
.login-body {
    background: linear-gradient(180deg, #f5efe6 0%, #eef4fb 100%);
    min-height: 100vh;
    font-family: var(--font-main);

    /* Layout: vertical stack (header/login/footer) */
    display: flex;
    flex-direction: column;
    margin: 0;
}

/* === Main centering wrapper ===
   Wrap your .login-container with a .login-wrapper:
   <div class="login-wrapper">
     <div class="login-container">...</div>
   </div>
*/
.login-wrapper {
    /* Fill remaining height so footer can sit at bottom */
    flex: 1;

    /* Center the login card */
    display: flex;
    justify-content: center;
    align-items: flex-start;

    /* Allow full-width children like footer outside this wrapper */
    width: 100%;

    /* Provide spacing so the card isn't glued to edges */
    padding: 4rem 16px 28px;
    box-sizing: border-box;
}

/* === Login card === */
.login-container {
    background: var(--color-surface);
    padding: 2rem;
    width: 380px;
    max-width: 100%;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    box-shadow: 0 10px 24px rgba(19, 31, 44, 0.1);
    box-sizing: border-box;
}

.login-passkey-panel {
    display: grid;
    gap: 0.55rem;
    margin-bottom: 1rem;
}

@media (max-width: 800px) {
    .login-wrapper {
        padding-top: 2.5rem;
    }
}

/* === Title === */
.login-title {
    text-align: center;
    margin: 0 0 1.5rem;
    font-size: 1.7rem;
    font-weight: bold;
    color: #222;
}

/* === Form layout === */
.login-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.login-field {
    display: flex;
    flex-direction: column;
}

.login-label {
    font-size: var(--text-sm);
    margin-bottom: 0.35rem;
    color: #333;
}

/* === Inputs === */
.login-input {
    min-height: var(--control-height);
    padding: 0.72rem 0.85rem;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-md);
    font-size: var(--text-md);
    box-sizing: border-box;
}

.login-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(8, 35, 70, 0.12);
}

/* === Button === */
.login-button {
    margin-top: 0.5rem;
    min-height: var(--control-height);
    padding: 0.78rem 1rem;
    background-color: var(--color-primary);
    color: white;
    border: 1px solid var(--color-primary);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: var(--text-md);
    font-weight: 700;
}

.login-button:hover {
    background-color: #fff;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.login-button:active {
    background-color: #e9edf3;
}

.login-button-secondary {
    background: linear-gradient(180deg, #f1f5fa 0%, #e4edf7 100%);
    color: var(--color-primary);
    border-color: rgba(24, 42, 64, 0.14);
}

.login-button-secondary:hover {
    background: #fff;
    color: var(--color-primary);
}

.login-passkey-status {
    min-height: 1.35rem;
    margin: 0;
    color: #4b6176;
    text-align: center;
    font-size: var(--text-sm);
}

/* === Footer compatibility ===
   Ensures footer spans full width even in flex layouts.
   Your footer partial can be <footer>...</footer> or a div with class "footer".
*/
footer,
.footer {
    width: 100%;
    align-self: stretch;
}

/* === Optional: if your footer uses an inner container that is constrained elsewhere ===
   Uncomment if needed.
*/
/*
footer .container,
.footer .container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    box-sizing: border-box;
}
*/
