/*
 * Auth shell — login, password flows and the company picker.
 * These pages render on _BlankLayout, which deliberately loads no theme css, so everything they
 * need lives here. Linked after bootstrap.min.css on purpose: .btn-ems-primary collides with
 * Bootstrap's .btn base (background-color:transparent) at the same specificity, so source order
 * is what makes it win.
 */

.ems-auth {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1rem;
    background:
        radial-gradient(1100px 540px at 82% -12%, rgba(94, 138, 182, .30), transparent 60%),
        radial-gradient(900px 520px at -12% 112%, rgba(12, 24, 42, .55), transparent 58%),
        linear-gradient(158deg, #16283F 0%, #274C77 58%, #33608F 100%);
}

.ems-auth-brand { text-align: center; margin-bottom: 1.75rem; }
.ems-auth-brand img { height: 56px; }
.ems-auth-tagline {
    margin-top: .8rem;
    color: #A9C0DC;
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .42em;
    text-indent: .42em; /* balance the trailing letter-spacing */
    text-transform: uppercase;
}

.ems-auth-card {
    width: 100%;
    max-width: 430px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 24px 70px rgba(8, 18, 34, .5);
    overflow: hidden;
    animation: emsAuthIn .45s ease-out both;
}
@keyframes emsAuthIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ems-auth-card { animation: none; } }

.ems-auth-accent { height: 4px; background: linear-gradient(90deg, #274C77, #5E8AB6 55%, #A9C0DC); }
.ems-auth-body { padding: 2.1rem 2.2rem 1.9rem; }
.ems-auth-body h4 { color: #1E2A3A; font-weight: 600; margin-bottom: .3rem; }
.ems-auth-sub { color: #74788d; margin-bottom: 1.6rem; }

.ems-auth .form-label { color: #495057; font-weight: 500; }
.ems-auth .form-control {
    padding: .6rem .8rem;
    border-color: #D7DFE9;
    background-color: #F4F7FA;
}
.ems-auth .form-control:focus {
    border-color: #274C77;
    box-shadow: 0 0 0 .18rem rgba(39, 76, 119, .18);
    background-color: #fff;
}
.ems-auth .form-check-input:checked { background-color: #274C77; border-color: #274C77; }

.btn-ems-primary {
    background-color: #274C77;
    border-color: #274C77;
    color: #fff;
    padding: .62rem 1rem;
    font-weight: 500;
}
.btn-ems-primary:hover, .btn-ems-primary:focus { background-color: #1D3A5C; border-color: #1D3A5C; color: #fff; }

.ems-auth a.ems-muted-link { color: #74788d; text-decoration: none; }
.ems-auth a.ems-muted-link:hover { color: #274C77; }

.ems-auth-footer { margin-top: 1.9rem; color: rgba(255, 255, 255, .62); font-size: .8rem; text-align: center; }

/* Company picker (SelectDatabase): identity strip + selectable company rows. */
.ems-auth-user {
    display: flex;
    align-items: center;
    gap: .45rem;
    padding: .7rem .9rem;
    margin-bottom: 1.2rem;
    border-radius: .5rem;
    background: #F4F7FA;
    color: #74788d;
    font-size: .875rem;
}
.ems-auth-user strong { color: #1E2A3A; }

.company-option {
    display: flex;
    align-items: center;
    width: 100%;
    padding: .75rem 1rem;
    margin-bottom: .5rem;
    border: 1px solid #D7DFE9;
    border-radius: .5rem;
    cursor: pointer;
    transition: border-color .15s ease-in-out, background-color .15s ease-in-out;
}
.company-option:hover { background-color: #F4F7FA; }
.company-option.selected { border-color: #274C77; background-color: rgba(39, 76, 119, .06); }
.company-option input[type="radio"] { margin-right: .75rem; accent-color: #274C77; }
.company-option .company-name { font-weight: 600; color: #1E2A3A; }
.company-option i { color: #274C77; }

/* Language switch in the top-right corner of the sign-in pages. */
.auth-language {
    position: absolute;
    top: .9rem;
    right: 1rem;
    z-index: 2;
    display: flex;
    gap: .2rem;
    padding: .2rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
}
.auth-language-option {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .28rem .7rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #A9C0DC;
    font-size: .78rem;
    font-weight: 600;
    line-height: 1.2;
}
.auth-language-option:hover,
.auth-language-option:focus-visible { color: #fff; }
.auth-language-option.active { background: rgba(255, 255, 255, .16); color: #fff; }
.auth-language-option img { border-radius: 2px; }
@media (max-width: 575.98px) { .ems-auth { padding-top: 4rem; } }
