:root {
    /* ELMA UI - estrutura protegida */
    --elma-bg: #f3f7fb;
    --elma-surface: #ffffff;
    --elma-text: #07133f;
    --elma-muted: #53658d;
    --elma-border: #e4ebf3;

    /* Tema personalizável */
    --elma-primary: #096fc0;
    --elma-primary-dark: #064b91;
    --elma-primary-soft: #e8f4ff;
    --elma-accent: #19d7e8;

    /* Semânticas protegidas */
    --elma-success: #10b981;
    --elma-danger: #ff3b4e;
    --elma-warning: #ffae1a;
    --elma-info: #1687f8;

    /* Estrutura */
    --elma-topbar-height: 72px;
    --elma-radius: 12px;
    --elma-radius-sm: 9px;
    --elma-shadow: 0 8px 28px rgba(29, 54, 92, .07);
}

* {
    box-sizing: border-box;
}

html {
    background: var(--elma-bg);
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 48% 0%, rgba(190, 222, 245, .28), transparent 35%),
        var(--elma-bg);
    color: var(--elma-text);
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

button,
input,
select,
textarea {
    font: inherit;
}

/* TOPBAR */

.elma-topbar {
    min-height: var(--elma-topbar-height);
    display: flex;
    align-items: stretch;
    background: linear-gradient(
        90deg,
        var(--elma-primary-dark),
        var(--elma-primary)
    );
    color: #fff;
    position: relative;
    z-index: 20;
    overflow: hidden;
}

.elma-topbar::after {
    content: "";
    position: absolute;
    inset: 0 20% 0 45%;
    opacity: .16;
    pointer-events: none;
    background-image:
        linear-gradient(90deg, transparent 49%, rgba(255,255,255,.42) 50%, transparent 51%),
        linear-gradient(0deg, transparent 49%, rgba(255,255,255,.30) 50%, transparent 51%);
    background-size: 80px 80px;
    transform: skewX(-12deg);
}

.elma-brand {
    width: 215px;
    flex: 0 0 215px;
    background: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 26px;
    color: var(--elma-text);
    position: relative;
    z-index: 2;
}

.elma-brand-mark {
    width: 48px;
    height: 42px;
    position: relative;
}

.elma-brand-mark span {
    position: absolute;
    left: 0;
    height: 9px;
    border-radius: 3px 10px 10px 3px;
    background: linear-gradient(90deg, #28b6f6, #0569f0);
}

.elma-brand-mark span:nth-child(1) {
    width: 43px;
    top: 2px;
}

.elma-brand-mark span:nth-child(2) {
    width: 34px;
    top: 16px;
    left: 8px;
}

.elma-brand-mark span:nth-child(3) {
    width: 24px;
    top: 30px;
    left: 18px;
}

.elma-brand-name {
    line-height: .86;
    font-weight: 900;
    font-size: 23px;
    letter-spacing: -.7px;
}

.elma-topbar-main {
    min-width: 0;
    flex: 1;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 2;
}

.elma-nav {
    display: flex;
    height: 100%;
    align-items: stretch;
    padding-left: 18px;
}

.elma-nav a {
    color: rgba(255,255,255,.92);
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 0 15px;
    font-size: 14px;
    white-space: nowrap;
    position: relative;
}

.elma-nav a.active {
    color: var(--elma-accent);
    font-weight: 700;
}

.elma-nav a.active::after {
    content: "";
    height: 4px;
    border-radius: 4px 4px 0 0;
    background: var(--elma-accent);
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 0;
}

.elma-top-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 11px;
    padding-right: 20px;
}

.elma-company-switcher {
    min-width: 186px;
    height: 42px;
    padding: 0 14px;
    background: #fff;
    color: var(--elma-text);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
}

.elma-company-logo {
    width: 27px;
    height: 27px;
    border-radius: 50%;
    background: #ed3237;
    color: #fadd7b;
    display: grid;
    place-items: center;
    font-size: 8px;
    font-weight: 900;
}

.elma-top-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    font-size: 18px;
    position: relative;
}

.elma-notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 17px;
    height: 17px;
    display: grid;
    place-items: center;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--elma-danger);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
}

.elma-user {
    display: flex;
    align-items: center;
    gap: 9px;
}

.elma-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #e7eff8;
    color: #ffffff;
    font-weight: 800;
}

.elma-user-text strong,
.elma-user-text span {
    display: block;
}

.elma-user-text strong {
    font-size: 13px;
}

.elma-user-text span {
    font-size: 12px;
    opacity: .86;
}

/* MAIN */

.elma-main {
    padding: 20px 40px 30px;
}

.elma-page-heading {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.elma-title h1 {
    font-size: 34px;
    line-height: 1;
    margin: 0 0 6px;
    letter-spacing: -1px;
}

.elma-title p {
    margin: 0;
    color: var(--elma-muted);
    font-size: 17px;
}

.elma-heading-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.elma-btn {
    min-height: 48px;
    border: 0;
    border-radius: 9px;
    padding: 0 20px;
    font-weight: 700;
    cursor: pointer;
}

.elma-btn-primary {
    background: var(--elma-primary);
    color: #fff;
}

.elma-btn-light {
    background: #fff;
    color: var(--elma-text);
    box-shadow: var(--elma-shadow);
}

.elma-date {
    min-height: 48px;
    padding: 0 18px;
    border-radius: 9px;
    background: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 650;
    font-size: 13px;
    box-shadow: var(--elma-shadow);
}

/* GRID */

.elma-grid {
    display: grid;
    gap: 12px;
}

.elma-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.elma-grid-dashboard {
    grid-template-columns: 1.55fr .9fr .9fr;
}

.elma-grid-bottom {
    grid-template-columns: 1.05fr 1fr .8fr;
}

.elma-card {
    background: var(--elma-surface);
    border-radius: var(--elma-radius);
    box-shadow: var(--elma-shadow);
    padding: 16px;
    min-width: 0;
}

.elma-card-title {
    margin: 0;
    font-size: 17px;
    font-weight: 850;
    letter-spacing: -.3px;
}

.elma-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.elma-link {
    color: var(--elma-primary);
    font-weight: 750;
    font-size: 13px;
    text-decoration: none;
}

/* KPI */

.elma-kpi {
    display: grid;
    grid-template-columns: 74px 1fr 90px;
    align-items: center;
    min-height: 116px;
    gap: 14px;
}

.elma-kpi-icon {
    width: 66px;
    height: 66px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    font-weight: 900;
    font-size: 25px;
}

.elma-kpi-icon.blue {
    background: #e8f3ff;
    color: #0978ed;
}

.elma-kpi-icon.green {
    background: #e4faf1;
    color: #0ab77c;
}

.elma-kpi-icon.violet {
    background: #f2e9ff;
    color: #8237ed;
}

.elma-kpi-icon.orange {
    background: #fff1df;
    color: #ff8500;
}

.elma-kpi-label {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 4px;
}

.elma-kpi-value {
    font-size: 25px;
    line-height: 1;
    font-weight: 900;
    margin-bottom: 7px;
}

.elma-kpi-trend {
    color: var(--elma-success);
    font-weight: 800;
    font-size: 13px;
}

.elma-kpi-sub {
    font-size: 11px;
    color: var(--elma-muted);
}

.elma-mini-bars {
    height: 64px;
    display: flex;
    align-items: flex-end;
    gap: 5px;
}

.elma-mini-bars span {
    width: 8px;
    border-radius: 2px 2px 0 0;
    background: linear-gradient(to top, rgba(22,135,248,.18), var(--elma-info));
}

/* FAKE CHART */

.elma-chart {
    height: 180px;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid #e7eef5;
    background:
        repeating-linear-gradient(
            to bottom,
            transparent,
            transparent 43px,
            #edf2f7 44px
        );
}

.elma-chart-line {
    position: absolute;
    left: 22px;
    right: 20px;
    bottom: 28px;
    height: 118px;
}

.elma-chart-line svg {
    width: 100%;
    height: 100%;
}

/* TABLE */

.elma-table {
    width: 100%;
    border-collapse: collapse;
}

.elma-table th {
    text-align: left;
    background: #f0f5fa;
    color: #53658d;
    font-weight: 500;
    padding: 7px 10px;
    font-size: 12px;
}

.elma-table td {
    padding: 9px 10px;
    border-bottom: 1px solid #edf1f5;
    font-size: 12px;
}

.elma-status {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 11px;
}

.elma-status.success {
    color: #079b61;
    background: #dcf8eb;
}

.elma-status.warning {
    color: #c47c00;
    background: #fff0cf;
}

.elma-status.info {
    color: #0878dc;
    background: #e0f1ff;
}

.elma-status.danger {
    color: #dc2639;
    background: #ffe1e5;
}

/* QUICK ACTIONS */

.elma-quick-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 9px;
}

.elma-quick {
    background: #f2f6fa;
    border-radius: 9px;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 9px;
    text-align: center;
    font-weight: 750;
    font-size: 12px;
    color: var(--elma-text);
    text-decoration: none;
}

.elma-quick strong {
    color: var(--elma-primary);
    font-size: 25px;
}

/* LIST */

.elma-list {
    display: grid;
    gap: 0;
}

.elma-list-row {
    min-height: 44px;
    border-bottom: 1px solid #edf1f5;
    display: grid;
    grid-template-columns: 34px 1fr auto;
    align-items: center;
    gap: 8px;
}

.elma-list-icon {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: var(--elma-primary-soft);
    color: var(--elma-primary);
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 900;
}

.elma-list-title {
    font-size: 12px;
    font-weight: 750;
}

.elma-list-sub,
.elma-list-meta {
    color: var(--elma-muted);
    font-size: 11px;
}

/* PRODUCT USAGE */

.elma-product-row {
    display: grid;
    grid-template-columns: 145px 1fr 35px 40px;
    align-items: center;
    gap: 8px;
    min-height: 31px;
    font-size: 12px;
}

.elma-progress {
    height: 10px;
    border-radius: 999px;
    background: #eaf0f5;
    overflow: hidden;
}

.elma-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--elma-primary);
}

/* MOBILE */

.elma-mobile-header,
.elma-mobile-nav {
    display: none;
}

@media (max-width: 1180px) {
    .elma-nav a {
        padding: 0 9px;
        font-size: 12px;
    }

    .elma-company-switcher {
        display: none;
    }

    .elma-main {
        padding-inline: 22px;
    }
}

@media (max-width: 900px) {
    .elma-topbar {
        display: none;
    }

    .elma-mobile-header {
        display: flex;
        position: sticky;
        top: 0;
        z-index: 70;

        width: 100%;
        margin: 0;

        min-height: 64px;
        max-height: 64px;

        padding:
            calc(8px + env(safe-area-inset-top, 0px))
            16px
            8px;

        align-items: center;
        gap: 12px;

        border-radius: 0;

        color: #ffffff;

        background:
            linear-gradient(
                90deg,
                var(--elma-primary-dark),
                var(--elma-primary)
            );

        border: 0;

        box-shadow:
            0 8px 24px rgba(8, 40, 80, 0.16);

        overflow: hidden;

        transform: translateY(0);
        opacity: 1;

        transition:
            transform .28s cubic-bezier(.2,.8,.2,1),
            opacity .20s ease,
            min-height .28s cubic-bezier(.2,.8,.2,1),
            max-height .28s cubic-bezier(.2,.8,.2,1),
            padding .28s cubic-bezier(.2,.8,.2,1),
            border-radius .28s cubic-bezier(.2,.8,.2,1),
            box-shadow .28s ease;
    }

    .elma-mobile-header .elma-mobile-brand {
        color: #ffffff;

        font-weight: 900;
        line-height: .88;

        flex: 0 0 auto;

        transition:
            font-size .28s cubic-bezier(.2,.8,.2,1),
            transform .28s cubic-bezier(.2,.8,.2,1);
    }

    .elma-mobile-header .elma-mobile-company {
        margin-left: auto;

        max-width: 170px;

        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;

        color: #ffffff;

        font-size: 12px;
        font-weight: 750;

        opacity: 1;
        transform: translateY(0);

        transition:
            max-width .24s cubic-bezier(.2,.8,.2,1),
            opacity .18s ease,
            transform .24s cubic-bezier(.2,.8,.2,1),
            margin .24s ease;
    }

    .elma-mobile-header .elma-avatar {
        margin-left: 0;

        background: rgba(255, 255, 255, 0.18);
        color: #ffffff;

        border: 1px solid rgba(255, 255, 255, 0.22);

        box-shadow:
            inset 0 1px 0 rgba(255,255,255,.24);

        flex: 0 0 auto;
    }

    /* Estado intermediário:
       usuário rolou para cima, mas ainda não chegou ao topo. */
    .elma-mobile-header.is-compact {
        min-height: 52px;
        max-height: 52px;

        padding:
            calc(5px + env(safe-area-inset-top, 0px))
            16px
            5px;

        border-radius: 0;

        box-shadow:
            0 6px 18px rgba(8, 40, 80, 0.13);
    }

    .elma-mobile-header.is-compact .elma-mobile-company {
        max-width: 0;
        margin-left: auto;
        margin-right: 0;

        opacity: 0;
        transform: translateY(-5px);

        pointer-events: none;
    }

    .elma-mobile-header.is-compact .elma-avatar {
        margin-left: auto;
    }

    /* Rolando para baixo:
       a topbar desaparece e libera espaço. */
    .elma-mobile-header.is-hidden {
        min-height: 0;
        max-height: 0;

        padding-top: 0;
        padding-bottom: 0;

        transform: translateY(-110%);
        opacity: 0;

        border-radius: 0;

        box-shadow: none;

        pointer-events: none;
    }

    .elma-mobile-brand {
        font-weight: 900;
        line-height: .9;
    }

    .elma-mobile-company {
        margin-left: auto;
        max-width: 145px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 12px;
        font-weight: 700;
    }

    .elma-main {
        padding: 20px 14px 98px;
    }

    .elma-page-heading {
        display: block;
    }

    .elma-title h1 {
        font-size: 28px;
    }

    .elma-heading-actions {
        margin-top: 14px;
    }

    .elma-date {
        width: 100%;
    }

    .elma-btn {
        flex: 1;
    }

    .elma-grid-4,
    .elma-grid-dashboard,
    .elma-grid-bottom {
        grid-template-columns: 1fr;
    }

    .elma-grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .elma-kpi {
        grid-template-columns: 54px 1fr;
        min-height: 94px;
    }

    .elma-kpi-icon {
        width: 48px;
        height: 48px;
        font-size: 18px;
    }

    .elma-kpi-value {
        font-size: 21px;
    }

    .elma-mini-bars {
        display: none;
    }

    .elma-table-wrap {
        overflow: hidden;
    }

    .elma-table thead {
        display: none;
    }

    .elma-table,
    .elma-table tbody,
    .elma-table tr,
    .elma-table td {
        display: block;
        width: 100%;
    }

    .elma-table tr {
        position: relative;
        padding: 12px 4px;
        border-bottom: 1px solid #edf1f5;
    }

    .elma-table td {
        border: 0;
        padding: 3px 4px;
    }

    .elma-mobile-nav {
        display: grid;
        grid-template-columns: repeat(5, 1fr);

        position: fixed;
        z-index: 60;

        left: 16px;
        right: 16px;
        bottom: 14px;

        min-height: 72px;
        padding: 7px;

        border-radius: 28px;

        background: rgba(255, 255, 255, 0.72);

        backdrop-filter: blur(12px) saturate(125%);
        -webkit-backdrop-filter: blur(12px) saturate(125%);

        border: 1px solid rgba(255, 255, 255, 0.78);

        box-shadow:
            0 10px 30px rgba(15, 20, 30, 0.14),
            inset 0 1px 0 rgba(255, 255, 255, 0.84);

        overflow: hidden;
        isolation: isolate;

        transition:
            left .28s cubic-bezier(.2,.8,.2,1),
            right .28s cubic-bezier(.2,.8,.2,1),
            min-height .28s cubic-bezier(.2,.8,.2,1),
            padding .28s cubic-bezier(.2,.8,.2,1),
            border-radius .28s cubic-bezier(.2,.8,.2,1),
            background .28s ease,
            box-shadow .28s ease;
    }

    .elma-mobile-nav::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: 0;

        pointer-events: none;
        border-radius: inherit;

        background:
            linear-gradient(
                180deg,
                rgba(255,255,255,.26),
                rgba(255,255,255,.04)
            );
    }

    .elma-mobile-nav::after {
        content: "";
        position: absolute;

        top: 0;
        left: 30px;
        right: 30px;

        height: 1px;
        z-index: 1;

        pointer-events: none;

        background:
            linear-gradient(
                90deg,
                transparent,
                rgba(255,255,255,.95) 30%,
                rgba(255,255,255,.95) 70%,
                transparent
            );

        transition:
            left .28s ease,
            right .28s ease,
            opacity .28s ease;
    }

    .elma-mobile-nav a {
        position: relative;
        z-index: 2;

        color: var(--elma-primary);
        text-decoration: none;

        display: flex;
        flex-direction: column;
        gap: 4px;

        justify-content: center;
        align-items: center;

        min-height: 56px;

        font-size: 10px;
        font-weight: 750;

        border-radius: 20px;

        transition:
            min-height .28s cubic-bezier(.2,.8,.2,1),
            gap .28s ease,
            background .18s ease,
            color .18s ease,
            transform .18s ease;
    }

    .elma-mobile-nav a.active {
        color: var(--elma-primary);

        background: rgba(255, 255, 255, 0.48);

        border: 1px solid rgba(255, 255, 255, 0.82);

        box-shadow:
            inset 0 1px 0 rgba(255,255,255,.92),
            0 4px 14px rgba(15,20,30,.07);
    }

    .elma-mobile-nav a:active {
        transform: scale(.94);
    }

    .elma-mobile-nav strong {
        font-size: 20px;
        line-height: 1;

        transition:
            font-size .28s cubic-bezier(.2,.8,.2,1),
            transform .28s cubic-bezier(.2,.8,.2,1);
    }

    .elma-mobile-nav-label {
        display: block;

        max-height: 18px;
        opacity: 1;
        transform: translateY(0);

        overflow: hidden;
        white-space: nowrap;

        transition:
            max-height .24s cubic-bezier(.2,.8,.2,1),
            opacity .18s ease,
            transform .24s cubic-bezier(.2,.8,.2,1);
    }

    .elma-mobile-nav.is-compact {
        left: 52px;
        right: 52px;

        min-height: 56px;
        padding: 5px;

        border-radius: 24px;

        background: rgba(255, 255, 255, 0.68);

        box-shadow:
            0 8px 24px rgba(15,20,30,.13),
            inset 0 1px 0 rgba(255,255,255,.82);
    }

    .elma-mobile-nav.is-compact::after {
        left: 24px;
        right: 24px;
        opacity: .78;
    }

    .elma-mobile-nav.is-compact a {
        min-height: 44px;
        gap: 0;
    }

    .elma-mobile-nav.is-compact strong {
        font-size: 19px;
        transform: translateY(0);
    }

    .elma-mobile-nav.is-compact .elma-mobile-nav-label {
        max-height: 0;
        opacity: 0;
        transform: translateY(4px);
    }
}

@media (max-width: 560px) {
    .elma-grid-4 {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .elma-card {
        padding: 13px;
    }

    .elma-kpi {
        display: block;
    }

    .elma-kpi-icon {
        margin-bottom: 10px;
    }

    .elma-quick-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .elma-product-row {
        grid-template-columns: 115px 1fr 32px;
    }

    .elma-product-row > :last-child {
        display: none;
    }
}

/* =========================================================
   ELMA UI - MOBILE APP TOPBAR
   Produto | Empresa ativa | Usuario
   ========================================================= */

@media (max-width: 900px) {

    .elma-mobile-header {
        position: sticky;
        top: 0;
        z-index: 70;

        display: flex;
        align-items: center;

        width: 100%;
        min-height: 64px;

        margin: 0;

        padding:
            calc(8px + env(safe-area-inset-top, 0px))
            16px
            8px;

        background: var(--elma-primary);

        border: 0;
        border-radius: 0;

        color: #ffffff;

        box-sizing: border-box;

        box-shadow:
            0 6px 18px rgba(12, 34, 60, 0.14);

        transform: translateY(0);
        opacity: 1;

        transition:
            transform .28s cubic-bezier(.2,.8,.2,1),
            opacity .20s ease,
            min-height .28s cubic-bezier(.2,.8,.2,1),
            padding .28s cubic-bezier(.2,.8,.2,1),
            box-shadow .28s ease;
    }

    /* -------------------------
       LOGO DO PRODUTO
       ------------------------- */

    .elma-mobile-product {
        position: relative;
        z-index: 3;

        display: flex;
        align-items: center;
        justify-content: flex-start;

        width: 78px;
        min-width: 78px;
    }

    .elma-mobile-product-logo {
        display: flex;
        align-items: center;

        max-width: 72px;
        height: 34px;

        color: #ffffff;

        font-size: 17px;
        line-height: .84;
        font-weight: 900;
        letter-spacing: -.4px;
    }

    .elma-mobile-product-logo img {
        display: block;

        width: auto;
        max-width: 72px;
        height: auto;
        max-height: 34px;

        object-fit: contain;
        object-position: left center;
    }

    /* -------------------------
       EMPRESA / TENANT ATIVO
       ------------------------- */

    .elma-mobile-company-switcher {
        position: absolute;

        left: 50%;
        top: 50%;

        transform: translate(-50%, -50%);

        z-index: 2;

        display: flex;
        align-items: center;
        justify-content: center;

        gap: 7px;

        max-width: min(52vw, 205px);

        padding: 5px 7px;

        appearance: none;
        border: 0;
        background: transparent;

        color: #ffffff;

        cursor: pointer;

        white-space: nowrap;
    }

    .elma-mobile-company-logo {
        flex: 0 0 28px;

        width: 28px;
        height: 28px;

        display: flex;
        align-items: center;
        justify-content: center;

        border-radius: 50%;

        background: rgba(255,255,255,.92);
        color: var(--elma-primary);

        font-size: 9px;
        font-weight: 900;

        overflow: hidden;
    }

    .elma-mobile-company-logo img {
        display: block;

        width: 100%;
        height: 100%;

        object-fit: contain;
    }

    .elma-mobile-company-name {
        display: block;

        max-width: 145px;

        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;

        font-size: 13px;
        line-height: 1.1;
        font-weight: 750;

        color: #ffffff;
    }

    .elma-mobile-company-chevron {
        flex: 0 0 auto;

        font-size: 12px;
        line-height: 1;

        color: rgba(255,255,255,.88);
    }

    /* -------------------------
       USUARIO
       ------------------------- */

    .elma-mobile-user {
        position: relative;
        z-index: 3;

        margin-left: auto;

        width: 42px;
        height: 42px;

        display: flex;
        align-items: center;
        justify-content: center;

        padding: 0;

        appearance: none;
        border: 0;
        background: transparent;

        cursor: pointer;
    }

    .elma-mobile-user-photo {
        width: 38px;
        height: 38px;

        display: flex;
        align-items: center;
        justify-content: center;

        border-radius: 50%;

        overflow: hidden;

        background: rgba(255,255,255,.17);
        color: #ffffff;

        border: 1px solid rgba(255,255,255,.28);

        font-size: 14px;
        font-weight: 800;
    }

    .elma-mobile-user-photo img {
        display: block;

        width: 100%;
        height: 100%;

        object-fit: cover;
    }

    /* -------------------------
       TOPBAR COMPACTA
       ------------------------- */

    .elma-mobile-header.is-compact {
        min-height: 54px;

        padding:
            calc(6px + env(safe-area-inset-top, 0px))
            16px
            6px;
    }

    .elma-mobile-header.is-compact
    .elma-mobile-company-switcher {
        opacity: 0;
        pointer-events: none;

        transform:
            translate(-50%, calc(-50% - 7px));

        transition:
            opacity .16s ease,
            transform .22s ease;
    }

    .elma-mobile-header.is-compact
    .elma-mobile-product-logo {
        transform: scale(.92);
        transform-origin: left center;
    }

    .elma-mobile-header.is-compact
    .elma-mobile-user-photo {
        width: 34px;
        height: 34px;
    }

    /* -------------------------
       TOPBAR OCULTA
       ------------------------- */

    .elma-mobile-header.is-hidden {
        transform: translateY(-120%);
        opacity: 0;

        pointer-events: none;

        box-shadow: none;
    }
}

/* ==========================================================
   ELMA CORE — TOPBAR SEM EMPRESA ATIVA
   ========================================================== */

@media (max-width: 900px) {

    .elma-mobile-header {
        grid-template-columns: 1fr auto;
    }

    .elma-mobile-product {
        justify-self: start;
    }

    .elma-mobile-user {
        justify-self: end;
    }

}
