/* Volyntrix brand layer: split-screen sign-in page and the app-wide status bar. */

:root {
    --vx-status-bar-height: 2.5rem;
    --vx-navy: #161950;
    --vx-blue: #465fff;
    --vx-blue-hover: #3641f5;
}

/* ---------- Status bar (all panels) ---------- */

html.fi .fi-body:has(.vx-status-bar) {
    padding-bottom: var(--vx-status-bar-height);
}

.vx-status-bar {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    height: var(--vx-status-bar-height);
    padding-inline: 1rem;
    border-top: 1px solid #e4e7ec;
    background: #fff;
    color: #667085;
    font-size: 0.8125rem;
    line-height: 1.25rem;
}

.vx-status-bar__copyright {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vx-status-bar__version {
    flex-shrink: 0;
    color: #98a2b3;
}

html.fi.dark .vx-status-bar {
    border-top-color: #344054;
    background: #101828;
    color: #98a2b3;
}

html.fi.dark .vx-status-bar__version {
    color: #667085;
}

@media (min-width: 640px) {
    .vx-status-bar {
        padding-inline: 1.5rem;
    }
}

/* ---------- Sign-in page ---------- */

html.fi .fi-body:has(.vx-login) {
    overflow: hidden;
}

.vx-login {
    min-height: calc(100dvh - var(--vx-status-bar-height));
    background: #fff;
    font-family: Outfit, ui-sans-serif, system-ui, sans-serif;
    /* The sign-in page is always light, even when the app or the device is in dark mode. */
    color-scheme: light;
}

.vx-login-grid {
    display: flex;
    flex-direction: column;
    min-height: calc(100dvh - var(--vx-status-bar-height));
}

.vx-login-form-panel {
    position: relative;
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: calc(100dvh - var(--vx-status-bar-height));
    overflow: hidden;
    background: #fff;
}

.vx-login-main {
    position: relative;
    z-index: 1;
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    max-width: 28rem;
    margin-inline: auto;
    padding: 2.5rem 1.5rem;
}

.vx-login-mobile-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.vx-login-mobile-logo img {
    display: block;
    width: 10.75rem;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.vx-login-mobile-divider {
    width: 10.75rem;
    max-width: 100%;
    height: 1px;
    margin: 0 auto 1.5rem;
    border: 0;
    background: linear-gradient(90deg, transparent, #e4e7ec 15% 85%, transparent);
}

.vx-login-decoration {
    position: absolute;
    z-index: 0;
    width: 100%;
    max-width: 15.625rem;
    pointer-events: none;
}

.vx-login-decoration img {
    display: block;
    width: 100%;
    height: auto;
}

.vx-login-decoration--top {
    top: 0;
    right: 0;
}

.vx-login-decoration--bottom {
    bottom: 0;
    left: 0;
    transform: rotate(180deg);
}

.vx-login-brand-panel {
    position: relative;
    display: none;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--vx-navy);
}

.vx-login-logo-card {
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 400px;
    max-width: min(400px, 100% - 3rem);
    height: 400px;
    max-height: min(400px, 100% - 3rem);
    padding: 5px;
    border-radius: 8px;
    background: #fff;
}

.vx-login-logo-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@media (min-width: 1024px) {
    .vx-login-grid {
        flex-direction: row;
    }

    .vx-login-brand-panel {
        display: flex;
        width: 50%;
    }

    .vx-login-mobile-logo,
    .vx-login-mobile-divider {
        display: none;
    }
}

@media (min-width: 1280px) {
    .vx-login-decoration {
        max-width: 28.125rem;
    }
}

@media (max-width: 1023px) {
    html.fi .fi-body:has(.vx-login) {
        overflow: hidden auto;
    }

    .vx-login-form-panel {
        overflow: visible;
    }

    .vx-login-main {
        flex: none;
        justify-content: flex-start;
        padding-top: 2.5rem;
        padding-bottom: 1.5rem;
    }
}

/* Filament components inside the sign-in page */

.vx-login .fi-simple-page {
    width: 100%;
}

.vx-login .fi-simple-page-content {
    gap: 1.75rem;
}

.vx-login .fi-simple-header {
    align-items: flex-start;
    text-align: left;
}

.vx-login .fi-simple-header-heading {
    color: #1d2939;
    font-size: 1.875rem;
    font-weight: 600;
    line-height: 1.25;
}

.vx-login .fi-simple-header-subheading {
    margin-top: 0.5rem;
    color: #667085;
    font-size: 0.875rem;
    line-height: 1.5;
}

.vx-login .fi-fo-field-label-content {
    color: #344054;
    font-size: 0.875rem;
    font-weight: 500;
}

.vx-login .fi-input-wrp {
    border: 1px solid #d0d5dd !important;
    border-radius: 0.5rem !important;
    background-color: #fff;
    box-shadow: none !important;
    --tw-ring-shadow: 0 0 #0000 !important;
    --tw-ring-offset-shadow: 0 0 #0000 !important;
}

.vx-login .fi-input-wrp:focus-within {
    border-color: var(--vx-blue) !important;
    box-shadow: 0 0 0 1px var(--vx-blue) !important;
}

.vx-login .fi-input-wrp .fi-input {
    border: 0 !important;
    outline: none;
    box-shadow: none !important;
    /* Filament's dark mode makes input text near-white; this page keeps its white inputs. */
    color: #1d2939 !important;
    -webkit-text-fill-color: #1d2939;
    caret-color: #1d2939;
    background-color: transparent !important;
}

.vx-login .fi-input-wrp .fi-input::placeholder {
    color: #98a2b3 !important;
    -webkit-text-fill-color: #98a2b3;
    opacity: 1;
}

/* Browser autofill (saved emails and passwords) keeps the light colours too. */
.vx-login .fi-input-wrp .fi-input:-webkit-autofill,
.vx-login .fi-input-wrp .fi-input:-webkit-autofill:hover,
.vx-login .fi-input-wrp .fi-input:-webkit-autofill:focus {
    -webkit-text-fill-color: #1d2939;
    -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
    caret-color: #1d2939;
}

.vx-login .fi-input-wrp .fi-icon,
.vx-login .fi-input-wrp .fi-icon-btn {
    color: #667085 !important;
}

.vx-login .fi-checkbox-input {
    background-color: #fff;
    border-color: #d0d5dd;
}

.vx-login .fi-checkbox-input:checked {
    background-color: var(--vx-blue);
    border-color: var(--vx-blue);
}

.vx-login .fi-fo-checkbox-list-option-label,
.vx-login .fi-fo-field-wrp-label,
.vx-login label {
    color: #344054;
}

.vx-login .fi-fo-field-wrp-error-message {
    color: #d92d20;
}

.vx-login .fi-input-wrp .fi-input-wrp-prefix,
.vx-login .fi-input-wrp .fi-input-wrp-suffix {
    border-color: #d0d5dd;
}

.vx-login .fi-btn.fi-color-primary {
    padding-block: 0.75rem;
    border-radius: 0.5rem;
    background-color: var(--vx-blue) !important;
    color: #fff !important;
    font-size: 0.875rem;
    font-weight: 500;
}

.vx-login .fi-btn.fi-color-primary:hover {
    background-color: var(--vx-blue-hover) !important;
}

.vx-login .fi-btn.fi-color-primary span,
.vx-login .fi-btn.fi-color-primary .fi-icon {
    color: #fff !important;
}

.vx-login .vx-login-help-text {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    color: #667085;
    font-size: 0.8125rem;
    line-height: 1.5;
    text-align: center;
}
