/* Dark stage so reversed (white) logos stay visible in the light admin UI. */
.connections-logo-stage-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
}

.connections-logo-stage-text {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    letter-spacing: 0.04em;
    line-height: 1.2;
    text-transform: uppercase;
}

.connections-logo-stage {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 5rem;
    padding: 1.15rem 1.35rem;
    border-radius: 0.75rem;
    background: #17171c;
}

.connections-logo-stage--compact {
    min-height: 0;
    padding: 0.4rem 0.7rem;
    border-radius: 0.5rem;
}

.connections-logo-stage--empty {
    color: #a1a1aa;
    font-size: 0.875rem;
}

.connections-logo-stage img {
    display: block;
    width: auto;
    height: auto;
    max-height: 2.75rem;
    max-width: min(36rem, 100%);
    object-fit: contain;
}

.connections-logo-stage--compact img {
    max-height: 2.25rem;
    max-width: min(18rem, 70vw);
}

.connections-logo-upload .filepond--panel-root {
    background-color: #17171c;
}

.connections-logo-upload .filepond--drop-label {
    color: #d4d4d8;
}

.connections-logo-upload .filepond--image-preview-wrapper,
.connections-logo-upload .filepond--image-preview {
    background-color: #17171c !important;
    background-image: none !important;
}

.fi-main-sidebar {
    display: flex;
    flex-direction: column;
    box-shadow: #000000a8 -30px 30px 40px;
}

.fi-sidebar-nav {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

/* Keep z-index:-1 inside the body so the mark sits on the gray chrome, not on cards. */
.fi-body {
    isolation: isolate;
}

/* World map pinned to the chrome. Multiply drops the black field so only land shows. */
.connections-page-watermark {
    position: fixed;
    left: 0;
    bottom: 0;
    z-index: -1;
    width: min(58rem, 78vw);
    pointer-events: none;
    line-height: 0;
}

.connections-page-watermark__image {
    display: block;
    width: 100%;
    height: auto;
    opacity: 0.16;
    mix-blend-mode: multiply;
}

.fi-header > div:first-child {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 0.7rem;
}

.fi-header .fi-breadcrumbs {
    flex: 1 0 100%;
}

.connections-page-heading-icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    color: var(--connections-secondary, var(--gray-500));
}

.connections-page-heading-icon .fi-icon {
    width: 1.75rem;
    height: 1.75rem;
}

@media (min-width: 640px) {
    .connections-page-heading-icon .fi-icon {
        width: 2.15rem;
        height: 2.15rem;
    }
}

.fi-header-heading {
    flex: 1 1 auto;
}

.fi-header-subheading {
    flex: 1 0 100%;
}

/* Use the exact brand action hex Filament's contrast map would otherwise lighten. */
.fi-btn.fi-color-primary:not(.fi-outlined):not(label) {
    --bg: var(--connections-action, var(--color-600));
    --hover-bg: color-mix(in srgb, var(--connections-action, var(--color-500)) 86%, black);
    --text: var(--connections-action-text, #ffffff);
    --hover-text: var(--connections-action-text, #ffffff);
}

.connections-powered-by {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 0.45rem;
    padding: 0.85rem 1rem 1.1rem;
    align-content: center;
    align-items: center;
    justify-content: space-between;
}

.connections-powered-by__brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
}

.connections-powered-by--sidebar {
    margin-top: auto;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.connections-powered-by--login {
    align-items: center;
    padding: 0.75rem 0 0;
}

.connections-powered-by__logo {
    display: block;
    width: auto;
    height: 2rem;
    max-width: 20vw;
    object-fit: contain;
    filter: grayscale(1) contrast(1.25);
}

.connections-powered-by__text {
    margin: 0;
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: 1.2;
    text-transform: uppercase;
}

.connections-powered-by__version {
    margin: 0;
    color: #94a3b8;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}
