/*
 * Zlix Shared Application Shell
 * v0.21.2e2a4n3
 *
 * Shared structural presentation for Customer Portal and Zlix Admin.
 * Requires zlix-application-tokens.css.
 *
 * Not loaded by any application during e2a4n3.
 */

.zlix-app-shell {
    width:
        min(
            calc(
                100% -
                (
                    var(--zlix-app-shell-gutter, 20px)
                    * 2
                )
            ),
            var(--zlix-app-shell-max-width, 1180px)
        );

    margin-inline: auto;
}

.zlix-app-header {
    position: relative;
    z-index: 40;
    background:
        var(
            --zlix-app-header-bg,
            rgba(255, 255, 255, .96)
        );
    border-bottom:
        1px solid
        var(--zlix-app-border, #d7e2ec);
    box-shadow:
        0 4px 20px rgba(17, 46, 70, .035);
}

.zlix-app-header--admin {
    box-shadow:
        0 4px 22px rgba(15, 49, 77, .055);
}

.zlix-app-header-inner {
    min-height:
        var(--zlix-app-header-height, 72px);

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.zlix-app-brand {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    gap: 10px;
    color:
        var(--zlix-app-brand-ink, #0f1c35);
    text-decoration: none;
}

.zlix-app-brand-mark {
    display: block;
    width:
        var(--zlix-app-brand-mark-size, 42px);
    height:
        var(--zlix-app-brand-mark-size, 42px);
    max-width: none;
    flex:
        0 0
        var(--zlix-app-brand-mark-size, 42px);
}

.zlix-app-brand-wordmark {
    display: grid;
    gap: 0;
    min-width: 0;
    line-height: 1;
}

.zlix-app-brand-wordmark strong {
    color:
        var(--zlix-app-brand-ink, #0f1c35);
    font-size:
        var(--zlix-app-wordmark-primary-size, 1.20rem);
    font-weight: 800;
    letter-spacing: -.025em;
}

.zlix-app-brand-wordmark span {
    margin-top: 3px;
    color:
        var(--zlix-app-text-muted, #5d7083);
    font-size:
        var(--zlix-app-wordmark-secondary-size, .60rem);
    font-weight: 800;
    letter-spacing:
        var(
            --zlix-app-wordmark-secondary-tracking,
            .11em
        );
    text-transform: uppercase;
}

.zlix-app-header-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
    gap: 10px;
    flex-wrap: nowrap;
}

.zlix-app-product-name {
    color:
        var(--zlix-app-text-muted, #5d7083);
    font-size:
        var(--zlix-app-product-label-size, .90rem);
    font-weight: 750;
    white-space: nowrap;
}

html[data-zlix-app-shell="admin"]
.zlix-app-product-name {
    color:
        var(--zlix-app-admin-navy, #103957);
    font-weight: 800;
}

.zlix-app-environment {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 9px;
    border: 1px solid transparent;
    border-radius:
        var(--zlix-app-radius-pill, 999px);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .055em;
    text-transform: uppercase;
    white-space: nowrap;
}

.zlix-app-environment--development {
    border-color:
        var(
            --zlix-environment-development-border,
            #bfd3e4
        );
    background:
        var(
            --zlix-environment-development-bg,
            #f4f9fd
        );
    color:
        var(
            --zlix-environment-development,
            #1b5682
        );
}

.zlix-app-environment--production {
    border-color:
        var(
            --zlix-environment-production-border,
            #b9dac3
        );
    background:
        var(
            --zlix-environment-production-bg,
            #eef8f1
        );
    color:
        var(
            --zlix-environment-production,
            #146b32
        );
}

.zlix-app-account-chip {
    display: block;
    max-width: 220px;
    overflow: hidden;
    padding: 6px 11px;
    border:
        1px solid
        var(--zlix-app-border, #d7e2ec);
    border-radius:
        var(--zlix-app-radius-pill, 999px);
    background:
        var(--zlix-app-surface-soft, #f7fafc);
    color:
        var(--zlix-app-text, #14283b);
    font-size: .82rem;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.zlix-app-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 6px 11px;
    border:
        1px solid
        var(--zlix-app-border, #d7e2ec);
    border-radius:
        var(--zlix-app-radius-sm, 8px);
    background:
        var(--zlix-app-surface, #ffffff);
    color:
        var(--zlix-app-accent, #1b5682);
    font-size: .80rem;
    font-weight: 750;
    text-decoration: none;
    transition:
        border-color var(--zlix-app-transition-fast, 140ms ease),
        background var(--zlix-app-transition-fast, 140ms ease);
}

.zlix-app-logout:hover {
    border-color:
        var(--zlix-app-border-strong, #bdcddd);
    background:
        var(--zlix-app-accent-soft, #f4f9fd);
}

.zlix-app-header-action {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    color:
        var(--zlix-app-text-muted, #5d7083);
    font-size: .80rem;
    font-weight: 700;
}

.zlix-app-header-action.is-healthy {
    color:
        var(--zlix-semantic-success, #146b32);
}

.zlix-app-header-action.is-warning {
    color:
        var(--zlix-semantic-warning, #7a5312);
}

.zlix-app-header-action.is-failed {
    color:
        var(--zlix-semantic-danger, #a83232);
}

.zlix-app-footer {
    flex: 0 0 auto;
    border-top:
        1px solid
        var(--zlix-app-border, #d7e2ec);
    background:
        var(
            --zlix-app-footer-bg,
            rgba(255, 255, 255, .82)
        );
}

.zlix-app-footer-inner {
    min-height: 94px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding-block: 20px;
}

.zlix-app-footer-legal {
    display: grid;
    gap: 3px;
    color:
        var(--zlix-app-text-subtle, #75889a);
    font-size: .76rem;
    line-height: 1.4;
}

.zlix-app-footer-legal strong {
    color:
        var(--zlix-app-text, #14283b);
    font-size: .82rem;
}

.zlix-app-footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 9px 18px;
}

.zlix-app-footer-nav a {
    color:
        var(--zlix-app-text-muted, #5d7083);
    font-size: .80rem;
    font-weight: 700;
    text-decoration: none;
}

.zlix-app-footer-nav a:hover {
    color:
        var(--zlix-app-accent, #1b5682);
}

.zlix-app-brand:focus-visible,
.zlix-app-logout:focus-visible,
.zlix-app-footer-nav a:focus-visible {
    outline:
        3px solid
        color-mix(
            in srgb,
            var(--zlix-app-accent, #1b5682)
            35%,
            transparent
        );
    outline-offset: 3px;
}

@media (max-width: 700px) {
    .zlix-app-header-inner {
        min-height:
            var(
                --zlix-app-header-height-mobile,
                64px
            );
        gap: 12px;
    }

    .zlix-app-brand {
        gap: 7px;
    }

    .zlix-app-brand-mark {
        width:
            var(
                --zlix-app-brand-mark-size-mobile,
                36px
            );
        height:
            var(
                --zlix-app-brand-mark-size-mobile,
                36px
            );
        flex-basis:
            var(
                --zlix-app-brand-mark-size-mobile,
                36px
            );
    }

    .zlix-app-product-name {
        display: none;
    }

    .zlix-app-account-chip {
        max-width: 130px;
    }

    .zlix-app-footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .zlix-app-footer-nav {
        justify-content: flex-start;
    }
}

@media (max-width: 430px) {
    .zlix-app-header-meta {
        gap: 6px;
    }

    .zlix-app-environment {
        padding-inline: 7px;
        font-size: .66rem;
    }

    .zlix-app-account-chip {
        display: none;
    }
}


/* ==================================================================
   ZLIX_SHARED_SHELL_NORMALIZATION_v0212e2a4n7

   Portal is the visual baseline for all Zlix application shells.

   Portal/Admin differentiation belongs in application identity and
   application-specific controls, not in different global header/footer
   canvases.

   Critical shell typography uses fixed pixel equivalents so application
   root-font differences cannot make Portal/Admin branding or footer text
   appear to be different sizes.
   ================================================================== */

.zlix-app-header,
.zlix-app-footer {
    --zlix-shell-text: #14283b;
    --zlix-shell-muted: #5d7083;
    --zlix-shell-subtle: #75889a;
    --zlix-shell-border: #d7e2ec;
    --zlix-shell-border-strong: #bdcddd;
    --zlix-shell-accent: #1b5682;
    --zlix-shell-accent-soft: #f4f9fd;
    --zlix-shell-surface: #ffffff;
    --zlix-shell-surface-soft: #f7fafc;
}

.zlix-app-header {
    background: rgba(255, 255, 255, .96);
    border-bottom-color: var(--zlix-shell-border);
    box-shadow:
        0 4px 20px rgba(17, 46, 70, .035);
}

.zlix-app-header--admin {
    box-shadow:
        0 4px 20px rgba(17, 46, 70, .035);
}

.zlix-app-brand-wordmark strong {
    font-size: 19.2px;
}

.zlix-app-brand-wordmark span {
    color: var(--zlix-shell-muted);
    font-size: 9.6px;
}

.zlix-app-product-name {
    color: var(--zlix-shell-muted);
    font-size: 14.4px;
}

/*
 * Deliberately subtle Admin differentiation.
 * Geometry and type size remain identical.
 */
html[data-zlix-app-shell="admin"]
.zlix-app-header
.zlix-app-product-name {
    color: #103957;
    font-size: 14.4px;
}

.zlix-app-environment {
    font-size: 11.52px;
}

.zlix-app-account-chip {
    border-color: var(--zlix-shell-border);
    background: var(--zlix-shell-surface-soft);
    color: var(--zlix-shell-text);
    font-size: 13.12px;
}

.zlix-app-logout {
    border-color: var(--zlix-shell-border);
    background: var(--zlix-shell-surface);
    color: var(--zlix-shell-accent);
    font-size: 12.8px;
}

.zlix-app-logout:hover {
    border-color: var(--zlix-shell-border-strong);
    background: var(--zlix-shell-accent-soft);
}

.zlix-app-footer {
    border-top-color: var(--zlix-shell-border);
    background: rgba(255, 255, 255, .82);
}

.zlix-app-footer-legal {
    color: var(--zlix-shell-subtle);
    font-size: 12.16px;
    line-height: 1.4;
}

.zlix-app-footer-legal strong {
    color: var(--zlix-shell-text);
    font-size: 13.12px;
}

.zlix-app-footer-nav a {
    color: var(--zlix-shell-muted);
    font-size: 12.8px;
}

.zlix-app-footer-nav a:hover {
    color: var(--zlix-shell-accent);
}

/* ==================================================================
   ZLIX_SHARED_APP_CLOCK_v0212e2a4n8
   Shared authoritative application footer clock.
   ================================================================== */

.zlix-app-footer-inner {
    display: grid;
    grid-template-columns:
        minmax(230px, 1fr)
        auto
        minmax(230px, 1fr);
    align-items: center;
    gap: 28px;
}

.zlix-app-footer-legal {
    justify-self: start;
}

.zlix-app-footer-nav {
    justify-self: end;
}

.zlix-app-footer-clock {
    display: inline-flex;
    align-items: center;
    justify-self: center;
    gap: 8px;

    color: var(--zlix-shell-muted);
    font-size: 12.64px;
    line-height: 1.3;
    letter-spacing: .01em;
    white-space: nowrap;

    opacity: 0;
    transition: opacity 160ms ease;
}

.zlix-app-footer-clock.is-ready {
    opacity: .92;
}

.zlix-app-footer-clock-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 25px;
    height: 25px;
    flex: 0 0 25px;

    border:
        1px solid
        var(--zlix-shell-border-strong);

    border-radius: 999px;

    background:
        var(--zlix-shell-surface-soft);

    color:
        var(--zlix-shell-accent);
}

.zlix-app-footer-clock-icon svg {
    display: block;
    width: 14px;
    height: 14px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.zlix-app-footer-clock-desktop,
.zlix-app-footer-clock-mobile {
    align-items: baseline;
    gap: 5px;
}

.zlix-app-footer-clock-desktop {
    display: inline-flex;
}

.zlix-app-footer-clock-mobile {
    display: none;
}

.zlix-app-footer-clock strong {
    color: var(--zlix-shell-text);
    font-size: 11.52px;
    font-weight: 800;
    letter-spacing: .07em;
}

.zlix-app-footer-clock time {
    color: var(--zlix-shell-text);
    font-variant-numeric: tabular-nums;
}

.zlix-app-footer-clock-divider {
    margin-inline: 5px;
    color: var(--zlix-shell-border-strong);
}

.zlix-app-footer-clock-dot {
    color: var(--zlix-shell-subtle);
}

@media (max-width: 1180px) {
    .zlix-app-footer-clock-desktop {
        display: none;
    }

    .zlix-app-footer-clock-mobile {
        display: inline-flex;
    }
}

@media (max-width: 820px) {
    .zlix-app-footer-inner {
        grid-template-columns: minmax(0, 1fr);
        align-items: start;
        gap: 10px;
    }

    .zlix-app-footer-clock {
        grid-row: 1;
        justify-self: start;
        margin-bottom: 2px;
    }

    .zlix-app-footer-legal {
        grid-row: 2;
        justify-self: start;
    }

    .zlix-app-footer-nav {
        grid-row: 3;
        justify-self: start;
        justify-content: flex-start;
    }
}

@media (max-width: 430px) {
    .zlix-app-footer-clock {
        gap: 7px;
        font-size: 12.32px;
    }

    .zlix-app-footer-clock-icon {
        width: 23px;
        height: 23px;
        flex-basis: 23px;
    }

    .zlix-app-footer-clock-icon svg {
        width: 13px;
        height: 13px;
    }

    .zlix-app-footer-clock strong {
        font-size: 11.04px;
    }
}

/* ==================================================================
   ZLIX_SHARED_APP_CLOCK_POLISH_v0212e2a4n8p1

   Small visual refinement only:
   - slightly stronger clock presence
   - slightly larger clock icon
   - modestly stronger UTC/LOCAL labels
   - preserves compact application-footer height
   ================================================================== */

.zlix-app-footer-clock {
    gap: 9px;
    padding-inline: 3px;

    font-size: 13.12px;

    opacity: 0;
}

.zlix-app-footer-clock.is-ready {
    opacity: .96;
}

.zlix-app-footer-clock-icon {
    width: 27px;
    height: 27px;
    flex-basis: 27px;
}

.zlix-app-footer-clock-icon svg {
    width: 15px;
    height: 15px;
}

.zlix-app-footer-clock strong {
    font-size: 12px;
}

.zlix-app-footer-clock-desktop,
.zlix-app-footer-clock-mobile {
    gap: 6px;
}

@media (max-width: 430px) {
    .zlix-app-footer-clock {
        gap: 7px;
        padding-inline: 0;
        font-size: 12.32px;
    }

    .zlix-app-footer-clock-icon {
        width: 23px;
        height: 23px;
        flex-basis: 23px;
    }

    .zlix-app-footer-clock-icon svg {
        width: 13px;
        height: 13px;
    }

    .zlix-app-footer-clock strong {
        font-size: 11.04px;
    }
}
