:root {
    --header-level1-height: 100px;
    --header-level2-height: 52px;
    --header-level3-height: 52px;
    --header-total-height: calc(var(--header-level1-height) + var(--header-level2-height) + var(--header-level3-height));
}

.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
}

.app-header__level1 {
    height: var(--header-level1-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
}

.app-header__brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.app-header__logo {
    height: 70px;
    width: auto;
}

.app-header__title-group {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 0.5rem;
}

.app-header__appname {
    font-size: 1.9rem;
    font-weight: 600;
    color: #5f5e5e;
}

.app-header__version {
    font-size: 1rem;
    color: #5f5e5e;
    opacity: 0.75;
}

.app-header__account {
    display: flex;
    align-items: center;
}

.app-header__level2 {
    position: relative;
    height: var(--header-level2-height);
    display: flex;
    align-items: stretch;
    padding: 0 1rem;
    background-color: var(--ademi-card-bg);
    overflow-x: auto;
    overflow-y: hidden;
    box-sizing: border-box;
}

     .app-header__level2::after {
         content: "";
         position: absolute;
         left: 0;
         right: 0;
         bottom: 0;
         height: 3px;
         background-color: var(--ademi-accent);
         pointer-events: none;    
     }

.app-header__tab {
    position: relative;
    z-index: 1;
    background: transparent;
    border: none;
    border-radius: 8px 8px 0 0;
    padding: 0.55rem 1.2rem;
    margin: 0 2px;
    font-size: 1.1rem;
    color: var(--ademi-text-muted);
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s ease, color 0.15s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    align-self: stretch;
    line-height: 1;
}

    .app-header__tab:hover {
        background-color: var(--ademi-accent-soft);
        color: var(--ademi-accent);
    }

    .app-header__tab.active {
        background-color: var(--ademi-card-bg);
        color: var(--ademi-accent);
        border: 1px solid var(--ademi-accent);
        border-bottom: none;
        font-weight: 700;
        font-size: 1.15rem;
    }

.app-header__level3 {
    height: var(--header-level3-height);
    display: flex;
    align-items: stretch;
    padding: 0 1.5rem;
    background-color: #ffffff;
    overflow-x: auto;
}

    .app-header--no-subtabs .app-header__level3 {
        height: 0;
        min-height: 0;
        padding: 0;
        overflow: hidden;
        border: none;
    }

.app-header__subtab {
    background: none;
    border: none;
    padding: 0 0.85rem;
    font-size: 1.05rem;
    color: #6c757d;
    cursor: pointer;
    white-space: nowrap;
}

    .app-header__subtab:hover {
        color: var(--ademi-accent);
    }

    .app-header__subtab.active {
        color: var(--ademi-accent);
        font-weight: 600;
    }

.app-header__brand--clickable {
    cursor: pointer;
}
