/* =========================
   Mobile-friendly auth overrides
   Paste at the very end
========================= */

html,
body {
    height: 100%;
}

body {
    background: linear-gradient(180deg, #f7f9fc 0%, #edf2f8 100%);
    -webkit-text-size-adjust: 100%;
}

.wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    padding:
        max(16px, env(safe-area-inset-top))
        max(16px, env(safe-area-inset-right))
        max(16px, env(safe-area-inset-bottom))
        max(16px, env(safe-area-inset-left));
    box-sizing: border-box;
}

.auth-content {
    position: relative;
    width: 100%;
    max-width: 420px;
    padding: 0;
    z-index: 5;
}

.auth-content .card {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid #eaedf1;
    border-radius: 18px;
    overflow: hidden;
}

.auth-content .card .card-block,
.auth-content .card .card-body {
    padding: 28px 24px;
}

p.text-muted {
    font-size: 14px;
}

.brand {
    display: block;
    width: min(160px, 42vw);
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

.form-control,
.form-select {
    min-height: 48px;
    font-size: 16px; /* helps prevent iPhone zoom */
    padding: 0.75rem 0.9rem;
    border-radius: 12px;
    border: 2px solid #E0E0E0;
    background-color: #FAFAFA !important;
    box-shadow: none !important;
}

.form-control:focus,
.form-select:focus {
    box-shadow: none !important;
    border: 2px solid #1e84c4;
    background-color: #FAFAFA !important;
}

.btn {
    min-height: 48px;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 16px;
    margin-bottom: 0;
    margin-right: 0;
    transition: all 0.3s ease-in-out;
}

@media (max-width: 575.98px) {
    .auth-content {
        max-width: 100%;
    }

    .auth-content .card .card-block,
    .auth-content .card .card-body {
        padding: 22px 16px;
    }

    .brand {
        width: min(140px, 48vw);
    }

    p.text-muted {
        font-size: 13px;
    }
}

@media (max-height: 700px) {
    .wrapper {
        align-items: flex-start;
    }
}