.app-header {
    position: sticky;
    top: 0;
    z-index: 50;
    min-height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 7.5%;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.app-header__left,
.app-header__right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.app-brand {
    min-width: 0;
    color: inherit;
}

.app-brand:hover .app-title {
    color: var(--primary);
}

.app-logo {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, #ffffff, #edf6fb);
    box-shadow: 0 3px 10px rgba(2, 40, 72, 0.12);
}

.app-logo img {
    width: 58px;
    height: 58px;
    object-fit: contain;
    display: block;
}

.app-title {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.06em;
    transition: color 0.16s ease;
}

.app-module {
    color: var(--text-muted);
    font-size: 12px;
}

.module-switcher {
    display: inline-flex;
    flex: 0 0 auto;
    padding: 3px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-muted, #f3f4f6);
}

.module-switcher__item {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border-radius: 7px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 650;
    text-decoration: none;
    white-space: nowrap;
}

.module-switcher__item:hover {
    color: var(--text);
}

.module-switcher__item.is-active {
    background: var(--surface);
    color: var(--primary);
    box-shadow: 0 1px 3px rgba(15, 23, 42, .14);
}

.app-shell {
    padding: 22px 0;
}

.app-container {
    width: 85%;
    max-width: 1800px;
    min-width: 320px;
    margin: 0 auto;
}

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 22px;
}

.module-section {
    margin-bottom: 28px;
}

.section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}

@media (max-width: 900px) {
    .app-header {
        padding: 10px 14px;
        align-items: flex-start;
        flex-direction: column;
    }

    .app-header__right {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .app-container {
        width: 100%;
        padding: 0 12px;
    }
}

@media (max-width: 520px) {
    .app-identity .app-title {
        font-size: 14px;
    }

    .app-logo {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
    }

    .app-logo img {
        width: 50px;
        height: 50px;
    }

    .module-switcher__item {
        min-height: 30px;
        padding: 0 10px;
    }
}
